feat: referentiel projets dynamique + validation nommage by design

Durcit la convention de nommage des projets (dérive constatée : 'Sliding
Automation', 'code_versioning'... au lieu des formes canoniques).

- trilium_api.py : projets_canoniques() lit le référentiel = valeurs du label
  projet sur les notes de type=projet (source unique, pas de constante en dur).
  Note-projet CodeVersioning créée (manquait).
- mcp_server.py : _valider_projet() branché dans les 6 tools de création
  (add_decision/history/backlog, new_conversation, create_entite, add_skill).
  Refuse un projet non canonique (suggestion si faute) ou inconnu (renvoi au
  processus de création de projet). Ne verrouille pas si référentiel illisible.
- lint_audit.py : VAL-nommage aligné sur le référentiel (attrape casse, espace
  ET snake_case ; l'ancien 'contient un espace' ratait code_versioning).
- Données : 79 notes ré-étiquetées vers les 3 formes canoniques.

Quality by design : l'erreur de nommage devient impossible à l'écriture, le
Lint n'est plus que le filet de sécurité.
This commit is contained in:
2026-07-17 14:59:33 +02:00
parent d1e67431b6
commit 943acbc573
2425 changed files with 710525 additions and 6 deletions
@@ -0,0 +1,94 @@
"""
pygments.lexers.jslt
~~~~~~~~~~~~~~~~~~~~
Lexers for the JSLT language
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, combined, words
from pygments.token import Comment, Keyword, Name, Number, Operator, \
Punctuation, String, Whitespace
__all__ = ['JSLTLexer']
_WORD_END = r'(?=[^0-9A-Z_a-z-])'
class JSLTLexer(RegexLexer):
"""
For JSLT source.
"""
name = 'JSLT'
url = 'https://github.com/schibsted/jslt'
filenames = ['*.jslt']
aliases = ['jslt']
mimetypes = ['text/x-jslt']
version_added = '2.10'
tokens = {
'root': [
(r'[\t\n\f\r ]+', Whitespace),
(r'//.*(\n|\Z)', Comment.Single),
(r'-?(0|[1-9][0-9]*)', Number.Integer),
(r'-?(0|[1-9][0-9]*)(.[0-9]+a)?([Ee][+-]?[0-9]+)', Number.Float),
(r'"([^"\\]|\\.)*"', String.Double),
(r'[(),:\[\]{}]', Punctuation),
(r'(!=|[<=>]=?)', Operator),
(r'[*+/|-]', Operator),
(r'\.', Operator),
(words(('import',), suffix=_WORD_END), Keyword.Namespace, combined('import-path', 'whitespace')),
(words(('as',), suffix=_WORD_END), Keyword.Namespace, combined('import-alias', 'whitespace')),
(words(('let',), suffix=_WORD_END), Keyword.Declaration, combined('constant', 'whitespace')),
(words(('def',), suffix=_WORD_END), Keyword.Declaration, combined('function', 'whitespace')),
(words(('false', 'null', 'true'), suffix=_WORD_END), Keyword.Constant),
(words(('else', 'for', 'if'), suffix=_WORD_END), Keyword),
(words(('and', 'or'), suffix=_WORD_END), Operator.Word),
(words((
'all', 'any', 'array', 'boolean', 'capture', 'ceiling',
'contains', 'ends-with', 'error', 'flatten', 'floor',
'format-time', 'from-json', 'get-key', 'hash-int', 'index-of',
'is-array', 'is-boolean', 'is-decimal', 'is-integer',
'is-number', 'is-object', 'is-string', 'join', 'lowercase',
'max', 'min', 'mod', 'not', 'now', 'number', 'parse-time',
'parse-url', 'random', 'replace', 'round', 'sha256-hex', 'size',
'split', 'starts-with', 'string', 'sum', 'test', 'to-json',
'trim', 'uppercase', 'zip', 'zip-with-index', 'fallback'), suffix=_WORD_END),
Name.Builtin),
(r'[A-Z_a-z][0-9A-Z_a-z-]*:[A-Z_a-z][0-9A-Z_a-z-]*', Name.Function),
(r'[A-Z_a-z][0-9A-Z_a-z-]*', Name),
(r'\$[A-Z_a-z][0-9A-Z_a-z-]*', Name.Variable),
],
'constant': [
(r'[A-Z_a-z][0-9A-Z_a-z-]*', Name.Variable, 'root'),
],
'function': [
(r'[A-Z_a-z][0-9A-Z_a-z-]*', Name.Function, combined('function-parameter-list', 'whitespace')),
],
'function-parameter-list': [
(r'\(', Punctuation, combined('function-parameters', 'whitespace')),
],
'function-parameters': [
(r',', Punctuation),
(r'\)', Punctuation, 'root'),
(r'[A-Z_a-z][0-9A-Z_a-z-]*', Name.Variable),
],
'import-path': [
(r'"([^"]|\\.)*"', String.Symbol, 'root'),
],
'import-alias': [
(r'[A-Z_a-z][0-9A-Z_a-z-]*', Name.Namespace, 'root'),
],
'string': [
(r'"', String.Double, '#pop'),
(r'\\.', String.Escape),
],
'whitespace': [
(r'[\t\n\f\r ]+', Whitespace),
(r'//.*(\n|\Z)', Comment.Single),
]
}