/nonoise:arch-syncfrom nonoise
Generic projector of a validated PRD's "Impact on docs/architecture/" checklist into the actual files. Reads the validated PRD plus its referenced Haft DecisionRecords, parses the strict `[file: NN.md]` format from the appended `## Impact on docs/architecture/` section, proposes a unified diff per target file, applies only the diffs the architect approves, and writes a sync report under `docs/architecture/sync-reports/`. Stack-neutral — knows no target constraints, never validates anything, never reads source code. Triggers — invoked by Polly after `arch-decision` PASS (the architect chooses "Sì — invoco arch-sync" at the post-finalize menu); also invokable manually with phrases like "arch-sync <prd-path>", "project the validated PRD into docs/architecture/", "sync architecture from <prd-path>", "recepisci il PRD validato <path>".
Ships in nonoise. 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.
docs/architecture/A writer assistant that turns the ## Impact on docs/architecture/ checklist
(projected by arch-decision into the PRD after Haft binding) into actual file
writes, with diff preview and per-file confirmation. Stack-neutral by design:
it does not know what constitutes a valid constraint, pattern, or component
for your project. That knowledge belongs in the human's head and, optionally,
in a project-locked skill the architect builds with skill-finder /
ops-skill-builder.
arch-brainstorm → arch-decision → [arch-sync] → sprint-manifest
↑
optional, opt-in,
offered by Polly
arch-sync is never invoked automatically by arch-decision. The
architect chooses to run it (via Polly's post-finalize menu, or manually).
This preserves the "the source of truth is governed by the human" design
principle of arch-decision.
Read prdPath, which must have status: validated and an
## Impact on docs/architecture/ checklist, plus one of two authorities:
haft.decisions entries with actual IDs and
repository-root-relative .haft/decisions/ carrier paths. Resolve refs from
the repository root even after the PRD moves to a sprint.decision.mode: lightweight with choice and rationale
(written by arch-decision when the FPF gate did not fire). There are no
Haft refs to recover and the Haft runtime is not required: the PRD
frontmatter is the authority. Skip the DecisionRecord checks below and record
haft_decisions: none (lightweight decision) in the sync report.A PRD with neither is not ready: send it back to arch-decision.
For a formal decision, require the Haft MCP runtime as described in quint-fpf; if unavailable stop
with create-nonoise --upgrade . and create-nonoise doctor .. Recover each
exact decision with haft_query(action="related", artifact_ref=...). Confirm
that it is active, current and binds the accepted choice. Missing, rejected,
superseded or ambiguous authority blocks only the affected projection; use
arch-decision to resolve it. Never treat a legacy audit as current authority.
Open the PRD at prdPath. Verify frontmatter status: validated.
Recover the exact referenced Haft DecisionRecords and inspect their binding
scope and freshness. Do not mutate them. (Lightweight decision: read
decision.choice and decision.rationale instead.)
Find ## Impact on docs/architecture/ in the validated PRD and check that its
effects are supported by those records.
Parse the strict-format bullets:
- [file: <basename>] <Verb>: <payload>
where <Verb> ∈ { Add, Append, Mark, Remove, Update }.
Bullets that don't match the format (missing [file:] tag, unknown
verb, missing colon after verb) are collected into a skipped list and
shown to the architect in Step 3 for manual handling.
Group parsed entries by target file. For each file, classify the operation:
| Case | Operation |
|---|---|
File exists, verb is Add or Append | Append at the end of the file (or under the matching section heading if one already exists — e.g. Append: pattern … goes under a ## Patterns heading) |
| File doesn't exist | Create with a minimal stub (frontmatter kind: architecture, H1 title from the basename, an empty body) and write the new entries |
File exists, verb is Mark, Remove, or Update | Patch: locate the relevant block deterministically — case-insensitive substring match against H2/H3 heading text first, then against the first column of any markdown table; scan top-to-bottom; if more than one match, list ALL matches with their line numbers and ask the architect to pick by index. Never pick implicitly. |
For every target file the plan touches, render a unified diff
(--- old / +++ new). Number each diff block.
Also list:
skipped bullets from Step 1, with a one-line reason each
("missing [file:] tag", "unknown verb 'Foo'", etc.) so the
architect can apply them by hand.Prompt the architect (the bracketed numbers below are an example — show whichever diff numbers Step 3 produced):
Apply which diffs? (e.g. "1,2,4", "all", "none", "skip 3"):
Honor the architect's choice. Apply only the approved diffs. Rejected diffs are kept in the sync report (Step 5) so they're recoverable.
Write docs/architecture/sync-reports/YYYY-MM-DD-<area>-<study>.md with
this frontmatter:
---
title: "Sync report — <area>/<study>"
kind: sync-report
prd_source: <prdPath>
haft_decisions: <exact PRD haft.decisions references>
synced_at: YYYY-MM-DD
triggered_by: polly | manual
status: validated
---
Body sections:
git addThen print to the architect:
✅ Sync done.
- Files touched: <N>
- Diffs applied: <N>
- Diffs rejected: <N>
- Skipped bullets (manual handling): <N>
- Report: <path>
andreani-arch-docs)docs/architecture/arch-decision's job)| Condition | Action |
|---|---|
prdPath frontmatter status is not validated | Stop. Instruct the architect to run arch-decision first. |
| Target file is git-dirty (uncommitted local changes) | Warn before showing the diff. The architect can still proceed. |
| A target file already contains the same text being added (idempotency) | Skip silently — note in the sync report under "no-op (already present)". Comparison rule: trim trailing whitespace per line, collapse runs of blank lines to one, normalize markdown list markers (* → -); case-sensitive otherwise. Anything else counts as a real diff. |
| Step 4 architect input doesn't parse | Re-prompt. Never interpret silence as "all" — always require explicit input. |
arch-sync is a writer, not a reviewer.
If the architect's checklist contains a controversial change,
arch-sync writes it as instructed. The review happened at
arch-decision Phase 5.5.[file: …]
tag is the only source of truth. If a bullet says "this is a
constraint" but the tag points to 04-components.md, the file is
04-components.md. Don't second-guess.arch-sync reads from it; never writes to it.Some projects ship their own architecture sync skill that knows the
target constraints, the component registry, and the technical-debt
taxonomy (the canonical example is andreani-arch-docs, mode M, in the
Andreani / RISKO project). arch-sync does NOT replace those — it's the
generic spine. A project-locked sync skill can:
arch-sync to enrich the writes (registry update, debt
register entries, conformance checks)arch-sync entirely by claiming the same Polly trigger
point — the architect simply chooses the project-specific skill
insteadBoth modes are valid; the choice is per-project.
The first time the skill runs in a project, it creates
docs/architecture/sync-reports/. The reports are part of the
architectural trace and SHOULD be committed to git.
Gitignore safety check: before writing the first sync report, run
git check-ignore <report-path> on the target. If the path is ignored
(some projects gitignore parts of docs/), warn the architect prominently
— the report would be invisible to git, defeating its purpose as a trace.
The architect can either un-ignore the path or accept the risk explicitly.
arch-decision — produces
the validated PRD checklist + Haft references that arch-sync consumesquint-fpf — the FPF
methodology that arch-decision runs to produce the auditc4-doc-writer — orthogonal
consumer of the same validated PRD; updates Structurizr DSLWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub russosalv/nonoise --plugin nonoise27 skills in this plugin
/arch-brainstormDialogic architectural brainstorming skill. Helps an architect study how to implement something starting from just an area name, exploring the existing codebase, reading the project's source of truth at `docs/architecture/` plus `docs/requirements/` and `docs/calls/`, and producing a narrative PRD (story of the decision, inline Mermaid diagrams, explicit anti-scope) under `docs/prd/<area>/`. USE AS STEP 1 of the end-to-end architectural workflow — brainstorm → arch-decision (Haft FPF validation via `quint-fpf`) → sprint-manifest (promotion to sprint). Triggers — "I want to study how to implement X", "how should we handle Y", "brainstorm on area Z", "open a PRD for W", "arch-brainstorm area <slug>". Also triggers without explicit mention when the user is defining a new architectural work area from scratch and wants to think it through together./arch-decisionValidate an existing draft PRD through Haft ProblemCard, solution variants and parity comparison, then route the operator's explicit Phase 5.5 choice through h-decide and project the result into PRD frontmatter. Use for architectural PRD validation when the FPF gate fires; otherwise records a lightweight decision in the PRD with no Haft run. Creates no duplicate FPF audit register.