From starter
Synchronise docs/ avec les changements de code. Fan-out parallèle par doc. Met à jour index.md.
How this skill is triggered — by the user, by Claude, or both
Slash command
/starter:doc-syncThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Diff stat (tracked changes): !`python "${CLAUDE_PLUGIN_ROOT}/tools/git_diff_combined.py" --stat --cap 50 '*.py' 'pyproject.toml' '*.md' 2>/dev/null`
python "${CLAUDE_PLUGIN_ROOT}/tools/git_diff_combined.py" --stat --cap 50 '*.py' 'pyproject.toml' '*.md' 2>/dev/nullgit ls-files --others --exclude-standard -- '*.py' 'pyproject.toml' '*.md' 2>/dev/null | head -20python "${CLAUDE_PLUGIN_ROOT}/tools/git_diff_combined.py" --include-untracked --cap 500 '*.py' 'pyproject.toml' 2>/dev/nullgrep -l -E '\{\{[^}]+\}\}|À compléter|Phrase unique' docs/*.md 2>/dev/null || truetest -d docs && echo yes || echo nodate +%Y-%m-%d 2>/dev/nullDetect mode (template-fill or diff-patch), fan out N parallel doc-patcher subagents (one per impacted doc), wait for all results, then update docs/index.md §2 freshness table inline. Stage all patched files.
docs/ exists is no → output docs/ folder absent. Run /starter:proj-init first. Stop.No code changes detected. Docs unchanged. Stop with success.If diff stat is empty BUT placeholder docs exist, that's template-fill mode (first authoring after proj-init). Continue.
Docs with placeholders is non-empty → mode = "template-fill". Targets = all 5 non-index docs that exist under docs/: glossaire.md, data-model.md, contracts.md, fonctionnel.md, architecture.md.mode = "diff-patch". Classify the diff against the routing rules below; targets = subset of the 5 whose rule fires. If unsure for a given doc, include it (fan-out is cheap; the subagent returns quickly if there's no relevant change).| Doc | Fires when the diff shows… |
|---|---|
glossaire.md | new business term, acronym, domain concept |
data-model.md | class definitions, dataclass fields, schema changes, entity relationships |
contracts.md | new endpoint, route, public method, event signature, API contract |
fonctionnel.md | user-visible behavior, business rule, use case |
architecture.md | new module/service, dependency added in pyproject, infrastructure change |
If targets is empty in diff-patch mode → output No code changes detected. Docs unchanged. Stop with success.
Issue ALL Task calls in a single message — this is the parallelism that delivers the speedup. For N targets, that's N Task tool calls in the same response, not one after another.
Each Task call invokes subagent doc-patcher with this JSON:
{
"target_doc": "docs/<one-of-the-5>.md",
"mode": "<template-fill or diff-patch>",
"diff": "<full diff text from Context above, may be empty in template-fill mode>",
"scope": "<the routing-rule string for this doc, copied from the table above>",
"docs_path": "docs/"
}
Wait for all subagents to return. Each returns:
{"patched": ["docs/X.md"], "skipped": [...], "summary": "..."}
Aggregate:
all_patched = flat union of every patched list across all subagentsall_skipped = flat union of every skipped listIf all_patched is non-empty, the parent updates docs/index.md §2 freshness table directly via MultiEdit:
Read docs/index.md.all_patched, locate its row in the §2 table (e.g., | [architecture.md](architecture.md) | ... | ... | ... | ... |).MultiEdit call with one entry per patched doc, each replacing the row's date column with today's date (from Context above) and status with Brouillon. Leave PR and Owner columns unchanged unless they contain {{...}} placeholders, in which case replace with —.If index.md itself was in placeholder_docs and template-fill mode is active, the parent's MultiEdit should also fill the document title and tagline placeholders ({{NOM_PROJET}}, etc.) inline — read pyproject.toml for the project name. This is the only doc the parent edits content-wise; everything else is owned by subagents.
Append docs/index.md to all_patched.
For each file in all_patched, run:
git add -- "<file>"
Output a single line:
all_patched empty AND all_skipped empty → No doc updates needed.all_skipped empty → Patched N docs in parallel: <comma-list>.all_skipped non-empty → Patched N docs: <list>. Skipped M: <comma-list of reasons>.all_patched empty AND all_skipped non-empty → No doc updates applied. M skipped: <reasons>.Task partent dans un seul message du parent. Sériels = pénalité de 5-10× sur le wall-clock. Si tu n'es pas sûr, fais le tous d'un coup et oublie l'optimisation fine.index.md. Tous les autres docs sont édités par les subagents doc-patcher. Pas d'exception.git diff avant commit.npx claudepluginhub nasswiel/shapsha --plugin starterProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.