/ab-method:sync-architecturefrom ab-method
Detects gaps between a completed task's diff and architecture/domain docs, routing findings to the exact doc each belongs in. Use after task completion or standalone on a diff.
Ships in ab-method. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Detect, from a completed task's diff, what the change introduced that the architecture and domain docs don't know yet — then fold it into the docs in place. It runs beside ../review-implementation/SKILL.md but asks a different question: that skill asks "is this diff good code?", this one asks "are the docs now wrong or incomplete?"
It is the automated detection half of /update-architecture and reuses its routing table. Talk to the
user per .ab-method/rules/communication.md; every doc write follows .ab-method/rules/docs.md.
Silence is the default output. A bug fix, styling, or CRUD that follows existing patterns produces no deltas. A finding survives only if a doc is genuinely now wrong or incomplete. Never invent churn.
ALWAYS check .ab-method/structure/index.yaml FIRST for where the docs live — paths are
user-configurable. Use the project root's copy; only if the project has none (plugin install), read the
bundled default at ../../../.ab-method/structure/index.yaml relative to this SKILL.md. Every path it
names is relative to the project root. Sweep only this task's diff (its commit range) plus its
progress-tracker.md mission summaries — never a whole-repo audit.
git diff for its commit range and its Mission Summaries (Files / Built / Integrates with).tech-stack.md, the
index.md of docs/architecture/frontend/ and backend/ (then only the topic files the diff touches),
UBIQUITOUS_LANGUAGE.md, CONTEXT.md, docs/adr/, and docs/seams/index.md (then only the seam docs the
diff touches).frontend-patterns.md / backend-patterns.md instead of the split folders: route to
them as they are, and note once in the report that /ab-cleanup migrates them.Spawn a single subagent, architecture-sync, with the diff, the mission summaries, the current docs, and
the task's unresolved-questions.md if present. It returns a routed findings list (often empty) and edits
nothing. On Codex spawn it at the orchestrator's level; on Claude it may nest.
Its brief — detect only what the docs don't already capture, routed with /update-architecture's table:
| Finding | Routes to (update-architecture step) |
|---|---|
| New / renamed / moved endpoint, CLI command, cron, webhook, queue consumer | tech-stack.md Entry Points (2a) — plus the backend api topic if a convention shifted |
| New or swapped component / service / state / auth pattern | the closest topic file under docs/architecture/<layer>/ (2b) |
| New dependency, third-party API/queue, new limit, test-framework shift | tech-stack.md Stack / External Services / Constraints / Testing (2c) |
| New domain term, or a term whose meaning shifted | UBIQUITOUS_LANGUAGE.md (+ CONTEXT.md if meaning shifted) (2d) |
| A hard-to-reverse, surprising, trade-off-carrying decision | ADR candidate (2e) — never written inline; defer to /domain-model |
| A seam doc's files, interface or adapters changed | that docs/seams/<slug>.md (2f) |
A seam's status moved (format: codebase-design's SEAM-FORMAT.md) | that seam doc's Status line (2f): set from the seam's Check per the lifecycle there (introducing → migrating once most callers go through it → settled once Check is empty) |
| A new module that clears the seam bar | a new docs/seams/<slug>.md + its index.md line (2f) |
For each finding return: What (the thing introduced, citing file/mission), Doc (target file + section or topic), Proposed delta (the in-place edit: which entry it merges into or replaces, and the new wording), Class (Step 3).
Example: "New endpoint
POST /charges(src/api/charges.ts, mission 2) — missing from tech-stack.md Entry Points. Delta: addPOST /charges — create a charge (bearer auth)to the Entry Points list. Class: safe-edit."
Deltas obey .ab-method/rules/docs.md: the rule plus one exemplar path, never a list of instances;
no task names, "added in", or dated blocks; no [DEPRECATED] — what stopped being true is deleted; the
why is an ADR link, not prose. A new topic file only when no existing topic fits, plus its one line in
that layer's index.md.
Never document a black box as established practice. A placeholder behind a TODO(UQ-n) seam recorded
in unresolved-questions.md is provisional: don't write it as a constraint, a pattern, or a term, and a
parked question is never an ADR candidate. Route what the change built around it (the endpoint, the
dependency, the seam's existence) and describe the placeholder only as what it is ("currency fixed to USD
pending UQ-1").
Out of scope: code quality (review-implementation), whole-repo deepening
(/improve-codebase-architecture). With nothing missing, return exactly:
Docs in sync — no architecture updates needed.
safe-edit — an in-place edit that makes the doc match the diff with no judgment call: add a line to
an existing list, merge into the closest entry, replace an entry the diff made untrue (the old pattern is
gone from the code), add a glossary term, update a seam doc's files / interface / adapters, or move a
seam's status when its Check proves it (run it; cite its result).needs-judgment — a term's meaning shifted, a new bounded context, an ADR candidate, a new seam whose
name, interface or bar needs deciding, or an edit that can't pass the budget gate without deciding what else
to cut. Route to /domain-model (domain / ADR) or
/update-architecture (larger reshapes); don't apply here.After applying any edit, run the gate:
node .ab-method/scripts/check-docs.js # plugin installs: npx ab-method check-docs
Interactive (create-task tail, or standalone): present deltas grouped by target doc, each marked
safe-edit / needs-judgment. Apply the safe-edits the user approves, run the gate, and compact any
failing file under .ab-method/rules/docs.md before reporting. Point needs-judgment findings at the
right workflow.
Autonomous (start-task / start-roadmap) — the orchestrator, not the detector, applies:
safe-edit in place, then run the gate.docs(<task>): sync architecture docs. Nothing applied → no commit.needs-judgment and reverted deltas) in the task's review.md under an
Architecture sync heading, or in the run report if no review.md exists. Never write an ADR and
never prompt.check-docs passes.What SKILL.md sets; muted values are Claude Code's defaults
36 skills in this plugin
/ab-analyze-backendAnalyze and document a project's backend patterns — API design, data access, service structure. Use when the user wants a backend-only architecture analysis./ab-analyze-frontendAnalyze and document a project's frontend patterns — component structure, state management, conventions. Use when the user wants a frontend-only architecture analysis./ab-analyze-projectAnalyze a project's architecture end to end — extract domain language, map the tech stack, document frontend and backend patterns. Use when onboarding a new codebase or refreshing the architecture baseline.npx claudepluginhub ayoubben18/ab-method --plugin ab-methodOther plugins' skills for the same job