Files
MyAiConfiguration/docs/extending-configuration.md
T
Julian LechnerandClaude Opus 5.5 6159c6373c
CI / CI configuration security checks (pull_request) Successful in 2s
CI / Capabilities and shell quality (pull_request) Successful in 15s
CI / Python tests and compilation (pull_request) Successful in 36s
CI / QMD unit tests (pull_request) Successful in 7s
CI / Build and inspect generated packages (pull_request) Successful in 16s
CI / Bash integration and installation guards (pull_request) Failing after 51s
CI / PowerShell tests on Ubuntu (pull_request) Failing after 1m45s
CI / Installed client configuration smoke tests (pull_request) Canceled after 1m24s
docs(rules): fix contradictions, update technical rules, enforce rule structure
- Resolve contradictions: authorization is never a skipped "boundary check";
  one browser token policy (BFF/HttpOnly cookies first, RFC 10017); one
  sanitizer-bypass rule; Angular responses are unknown until validated.
- Add security rules for AI/LLM integration and Java XXE, concrete crypto
  and password-hashing parameters, and RFC 8725 JWT validation.
- Update version-dependent guidance after checking official sources:
  Angular 22, TypeScript 6/7, Node 24+, .NET 10/C# 14, JDK 21-25, Spring
  Boot 4; add a Spring Boot and Spring Security topic.
- Give every rule a unique level-1 title and scope line, keep language
  security files to language specifics, and fix routing for inbound vs
  outbound HTTP, XML parsing, and WPF/Angular parent rules.
- Validate rule structure and routing in validate-config.py, with tests.
- Fix CI issues found by a local run: shellcheck directive order, pinned
  ruff rule set, Invoke-Python test mock, CRLF-tolerant package checks,
  Windows-only credential test, and refreshed prompt-budget baselines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 10:51:08 +01:00

26 lines
3.2 KiB
Markdown

# Extending the configuration
Shared definitions are the source of truth. Rebuild after every semantic change.
## Add a rule
Create cross-cutting rules such as Git or Microsoft guidance as focused Markdown files directly in `shared/rules/`. Put each language, framework, or library in its own directory with an `index.md` and focused files under `references/`; put security rules in `shared/rules/security/`. Add the matching loading condition and generated Claude skill name to `shared/global-instructions.md` and the directory index. The build copies rule trees to Codex and generates Claude skills from each rule file. Put always-applicable guidance in `general.md`, which the build embeds for both clients; a new rule file is not automatically embedded.
Start every rule file with a unique level-1 heading followed by an "Apply these rules when ..." line: the heading becomes the generated Claude skill description, and the scope line tells an agent loading the file cold whether it applies. Language and framework rules contain only language-specific mechanics and point to the shared security, UI/UX, or parent-language rules instead of restating them. The build rejects rule files without a level-1 heading, duplicate titles, reference files missing from their index, index links to missing files, and routes in the global instructions to rules or skills that do not exist.
## Add a skill
Create `shared/skills/<skill>/SKILL.md` for a standalone skill, or `shared/skills/<category>/<skill>/SKILL.md` for a grouped workflow. Each leaf skill directory must contain a readable `SKILL.md` with valid YAML frontmatter. Keep the initial workflow focused; place longer supporting material under `references/`. Reference shared rules instead of repeating persistent standards.
## Add an agent
Create `shared/agents/<agent>/agent.yml` and `instructions.md`. Keep semantic behavior in these shared files; the build renders the Codex and Claude Code formats.
## Add a hook or shell-specific script
Add the script for both shells under `shared/hooks/scripts/` (PowerShell `Verb-Noun.ps1`, Bash `verb-noun.sh`), register it in `adapters/claude/config/settings.json` and `adapters/codex/config/config.toml` with a placeholder such as `__MY_HOOK_SCRIPT__`, and add one row with the PowerShell and Bash values to `adapters/placeholders.tsv`. Both builds read that table, so neither build script needs a change; the build fails on any placeholder left unresolved. Put hook logic that needs more than a few lines into one Python file that both wrappers call, and resolve the interpreter through `Resolve-Python.ps1`/`resolve-python.sh`. If the installer should recognize the hook as setup-owned when merging with local settings, add its name to `OWNED_HOOK_PATTERN` in `scripts/lib/install-options.py`.
## Add evals to a skill
Give every skill an `evals/evals.json` with a few realistic prompts, the expected behavior, and concrete assertions taken from the skill's own instructions. Include at least one negative or near-miss case, such as a prompt where a naive answer would skip a mandated step. Follow the format of the existing files (`skill_name`, and `evals` entries with `id`, `prompt`, `expected_output`, `assertions`, `files`).