adapt-change
Propagate a change: find the affected artifacts through the traceability graph, confirm them with the user, rerun only those skills and check coherence.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 13
- Forks
- 1
01 前言 Front Matter
- model
- opus
- description
- Propagate a change: find the affected artifacts through the traceability graph, confirm them with the user, rerun only those skills and check coherence.
- argument-hint
- --change="<text>" [--type=constraint|market|competitor|tech|regulation] [--auto] [--lang=ja|en]
03 SKILL.md 正文
Adapt to Change (Re-propagation Engine)
Shared files: a path written @rules/…, @skills/…, @templates/… or @docs/… is relative to the
plugin root, ${CLAUDE_PLUGIN_ROOT} — not to the project being worked on. Read it from there.
Desired Outcome
Apply a change to an existing product design with minimal, reversible re-runs:
- Change log —
reports/05_adaptation/change-log.md: the change (description,--type, timestamp) and a before/after diff summary for every re-run artifact (for reversibility). - Impact analysis —
reports/05_adaptation/impact-analysis.md: "change → impacted ID → re-evaluate? + reason", i.e. the candidate blast radius after the judgment pass, plus an## Architect-Side Impactsection listing every affected architect-owned ID and the skill that owns it — reported, never re-run here (see Decision Criteria). - Updated artifacts — the affected skills re-run with existing artifacts as input, and the
corresponding edges in
work/traceability.jsonupdated.
Invocation
/product:adapt-change --change="<text>" [--type=constraint|market|competitor|tech|regulation] [--auto] [--lang=ja|en]
| Argument/Flag | Required | Description |
|---|---|---|
--change="<text>" |
Required | What changed (free text) |
--type=... |
Recommended | Where the change enters the graph: constraint / market / competitor / tech / regulation |
--auto |
Optional | Skip the human confirmation step (apply the judged impact set directly) |
--lang |
Optional | Override output language |
Decision Criteria
- Minimal re-run. Never touch a skill the change does not reach. The graph proposes the candidate set; the judgment pass decides whether each upstream reference still holds.
- Deterministic candidates, judged scope. Step 2 (transitive closure) is pure graph work; step 3 (opus) expands/shrinks it with recorded reasons.
- Reversibility. Record a before/after diff summary for every rewritten artifact.
- Human checkpoint. Confirm the impact set before rewriting anything (unless
--auto). - The architect boundary is a reporting boundary, not a blind spot. After a handoff
traceability.jsonholds architect nodes too (FR-derived fromFEAT-, architect-originatedNFR-, the physical-only nodes — @docs/design.md §1.5), so the closure in step 2 legitimately reaches them. This skill names them and stops: it never rewrites an artifact underreports/00_requirements/or any other architect output, and never invokes an architect skill. Re-running system design is the user's call, made with/architect:*— a product-side change is not authority to rewrite requirements or architecture documents. - Stop condition: change logged, impact set judged and confirmed, affected product skills
re-run,
traceability.jsonupdated,reviewrun for coherence, and any architect-owned impact reported with the skill that owns it.
Prerequisites
| Input | Required/Recommended | Source | If missing/empty |
|---|---|---|---|
--change |
Required | User | block with a message — nothing to propagate |
work/traceability.json |
Required | all prior skills | block with a message — the engine reads only this |
| existing artifacts | Required | prior skills | block — there must be a design to adapt |
Process
- Intake — record the change in
change-log.md(description,--type, timestamp passed in). Apply@rules/product/adaptation-engine.md. - Candidate blast radius (deterministic) — seed from the
--typehint, then walktraceability.jsonupstreamedges in reverse to get the downstream transitive closure. - Judgment pass (opus) — for each candidate decide if its upstream reference still holds;
expand/shrink the set; write "change → impacted ID → re-evaluate? + reason" to
impact-analysis.md. - Split the set at the plugin boundary. Partition the confirmed candidates into
product-owned and architect-owned using each node's
skillfield (and itssource_file— anything underreports/00_requirements/or a later architect directory is architect's). Only the product side is re-run below. - Confirm — present the impact set via
AskUserQuestion, with the architect-owned items shown as reported, not re-run so the user sees what will and will not be touched (skip under--auto). - Minimal re-run — re-run only the confirmed affected product skills with existing
artifacts as input; record before/after diffs; update the affected edges in
traceability.json. - Coherence check — invoke
/product:review(consistency + traceability lenses) to catch contradictions introduced by the re-propagation. When the impact set crossed the boundary, the @docs/design.md §1.5 cross-plugin check applies as well: everyFR-still reachable from aFEAT-, no productNFR-re-numbered, noupstreamID left dangling across the boundary by this re-run. A break there is a finding, reported — not repaired by rewriting architect's side of it. - Report the handoff-forward work — write a
## Architect-Side Impactsection inimpact-analysis.md: one row per architect-owned ID (ID, artifact, why the change reaches it, the owning skill from itsskillfield) and the command to act on it, typically/architect:define-requirements --input=<the re-run product reports>forFR-/NFR-, or the later architect skill named on the node. State plainly that nothing on that side was modified. When the set is empty, say so — an explicit "the change does not cross the boundary" is what makes its absence trustworthy. - Record — finalize both files; append the change summary to
work/context.md.
Output
reports/05_adaptation/change-log.md, reports/05_adaptation/impact-analysis.md, the re-run
artifacts, and an updated work/traceability.json.
Reference Materials
| Resource | Purpose |
|---|---|
@rules/product/adaptation-engine.md |
Edge store, transitive-closure + judgment algorithm, principles |
Related Skills
| Skill | Relationship |
|---|---|
/product:review |
Downstream — runs the coherence check after re-propagation |
/product:validate-assumptions |
Related — a change may re-open the gate |
| any product pipeline skill | Re-invoked selectively as the confirmed impact set requires |
/architect:define-requirements |
Boundary — architect-owned impact is reported for the user to act on with this (or the later architect skill named on the node), never re-run from here |
04 同仓库更多 Skills
doctor
Check the install and a project: plugins at the repository's version, hooks and skills in place, the two knowledge bundles present and fresh, the project's registry, question store, audit log, learned rules and claims readable. Run it first when a command misbehaves.
verify-sql-migration
Prove a SQL migration on data: golden checks against an authorized source database and differential tests against ScalarDB. Never touches production.
verify-implementation
Check code against the design (API contract, transactions, security, requirements, the example chain) and report every divergence; optionally runs the eight-stage quality gate.
update-knowledge
Fetch or update an OKF knowledge bundle: ScalarDB/ScalarDL, or the vendored Kubernetes/Terraform bundle.
start
Interactive entry point for system architecture work: refactor a legacy application into services, or design a new system from requirements; picks the path from the project's state. To move a database to ScalarDB, use migrate-database.
select-scalardb-edition
Choose the ScalarDB edition (Community, Enterprise Standard or Premium, plus Enterprise Options), deployment mode and cluster topology through a short interview.