بنقرة واحدة
canon-change
Use when you need a governed change run in a live codebase where invariants and existing behavior matter.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when you need a governed change run in a live codebase where invariants and existing behavior matter.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when you need a governed Canon review of a real diff or pull-request range instead of a loose chat summary.
Use when a repository does not have Canon runtime state yet and you need to initialize .canon before any governed workflow.
Use when you need a governed Canon policy-shaping run to shape a new or modified policy with mandatory impact evaluation.
Use when you need a governed backlog run that decomposes bounded upstream decisions into delivery epics and slices.
Use when you need a governed Canon architecture run to record decisions, tradeoffs, and risk-gated approvals.
Use when you need a governed domain-language packet that stabilizes the shared vocabulary of a product area before downstream design or change work.
| name | canon-change |
| description | Use when you need a governed change run in a live codebase where invariants and existing behavior matter. |
| preflight | {"requires_canon":true,"requires_initialized":true,"canonical_input":"change","system_context":"existing","risk_required":true,"zone_required":true,"owner_optional":true} |
available-nowdefault visibility: discoverable-standardExpose the delivered Canon change workflow as a governed run started from your AI assistant.
RISKZONEOptional:
OWNER when the user wants to override Git-derived ownership explicitlycanon is on PATH. If missing, point to the install guide..canon/ exists. If missing, point to $canon-init.RUN_ID.canon-input/ as read-only source material. Do not rewrite, normalize, append to, or otherwise modify the user's input files during preflight, clarification, generation, critique, or summary.--system-context existing; if the user is actually shaping a new system or a new capability, redirect to $canon-system-shaping or $canon-architecture instead of forcing change.canon-input/change.md or canon-input/change/ as the canonical authored-input locations for this mode.--input-text instead of materializing a repo file automatically.--input from the active editor file, open tabs, recent .canon/ artifacts, or any other path under .canon/.OWNER is optional. If omitted, Canon should try repository-local or global Git identity before asking for explicit owner input.$canon-requirements rather than guessing.canon inspect risk-zone --mode change --input <INPUT_PATH> to infer a provisional pair, explain the Canon rationale and confidence, and ask the user to confirm or override before invoking Canon.low confidence, present it as provisional and invite override rather than treating it as final.low-impact, bounded-impact, or systemic-impact.green, yellow, or red.Canon does not invent the change body for you. Canon governs, validates, and persists the packet. You (the assistant) MUST author the real change body from the bounded source material BEFORE calling canon run --mode change.
Do this every time, even when the user starts from change intent rather than a finished brief:
canon-input/change.md or a folder-backed packet under canon-input/change/. The authored body MUST include all of the following H2 sections with concrete content tied to the source you just read:## System Slice## Domain Slice## Excluded Areas## Intended Change## Legacy Invariants## Domain Invariants## Forbidden Normalization## Change Surface## Ownership## Cross-Context Risks## Implementation Plan## Sequencing## Validation Strategy## Independent Checks## Decision Record## Decision Drivers## Options Considered## Decision Evidence## Boundary Tradeoffs## Recommendation## Why Not The Others## Consequences## Unresolved QuestionsOwner:, Risk Level:, and Zone: may remain in the brief, but they are outside authored-body extraction in this first slice.Change Surface: do not satisfy this first-slice contract. Use the canonical H2 headings above.## Missing Authored Body naming the missing canonical heading instead of fabricating filler.$canon-requirements or ask targeted intake questions before invoking Canon rather than submitting an empty brief.Author the packet as a change owner writing an ADR-style bounded change plan for maintainers and reviewers of the live system.
## Missing Authored Body
rather than fabricating completeness.canon run --mode change --system-context existing --risk <RISK> --zone <ZONE> [--owner <OWNER>] (--input <INPUT_PATH> | --input-text <INPUT_TEXT>)continue existing run versus start fresh as a primary choice. New intake is the default path unless the user explicitly requests continuation or provides a RUN_ID.canon publish <RUN_ID> keeps publishing only the visible change packet by default.canon publish <RUN_ID> --adr when the operator wants the same governed decision to enter the durable registry at tech-docs/adr/ADR-XXXX-<slug>.md.--to changes the packet destination only; --adr never relocates the ADR registry.## Missing Authored Body or other honesty markers, keep those signals explicit when describing or reviewing the resulting ADR..canon/runs/<RUN_ID>/artifacts/change/working-brief.md while keeping canon-input/ read-only.continue, refine, or same run, supplies a RUN_ID, or chooses Canon's explicit continuation path.$canon-status for the compact summary and canon inspect refinement --run <RUN_ID> when the user needs the working-brief path, clarification records, readiness delta, or lineage.After preflight succeeds and the real Canon run exists, the assistant is responsible for turning the change packet from templated stubs into a grounded, reviewable artifact set.
canon-input/change/, treat the directory as one authored packet and read it recursively before generation..canon/artifacts/<RUN_ID>/change/ exists and the packet stays attached to a real run id.canon-input/ as read-only source material. Do not rewrite, normalize, append to, or otherwise modify the user's input files during preflight, clarification, generation, critique, or summary..canon/artifacts/<RUN_ID>/change/ during generation. Surface any proposed code changes as patch text or annotated excerpts inside the change packet, not as in-place edits to the working tree..canon/artifacts/<RUN_ID>/change/..canon/artifacts/<RUN_ID>/change/.When the authored input is structurally present but materially ambiguous on points that would force the assistant to invent content, ask targeted clarification questions before generation rather than papering over the gap.
and, or, or comma-separated sub-questions.Each question must follow this shape:
- Question: <one-sentence question>
- Affects: <artifact or section it changes>
- Why it matters: <one short line on what changes if unanswered>
- Context: <≤2 lines from authored input, or `no input coverage`>
- Options:
a) <concrete option>
b) <concrete option>
c) <concrete option>
d) Other (free-form)
- Default if skipped: <explicit default>
- Status: Required | Optional
Question line as the main prompt and surface Why it matters and Context as secondary or tooltip text rather than dumping the full block inline.Write .canon/artifacts/<RUN_ID>/change/ai-provenance.md describing how the
packet was produced. It must include:
Clarification Loop section with: number of questions presented, number of Required questions answered, number of Required questions left unresolved, number of Optional questions answered or deferred, and the number of substantive clarifications that drove material changes per artifact section..canon/artifacts/... paths when Canon emitted themInspect evidence before Approve generation... when no readable packet exists yet.canon/artifacts/<RUN_ID>/change/ and .canon/artifacts/<RUN_ID>/change/ai-provenance.md, never back into canon-input/ and never as in-place edits to the working tree.canon/ is missing, point to $canon-init.--owner <OWNER> explicitly or tell the user to configure git user.name and git user.email.change currently supports only --system-context existing and redirect them to $canon-system-shaping or $canon-architecture.--input-text content and keep already valid ownership or intake fields.$canon-requirements as the honest next step.RISK, use guided fixed choices with the exact allowed values low-impact, bounded-impact, and systemic-impact.ZONE, use guided fixed choices with the exact allowed values green, yellow, and red.AwaitingApproval, surface the exact target Canon produced and do not imply the run is complete.canon-input/, or any source file outside .canon/artifacts/<RUN_ID>/change/, stop, restore the file from the user's last saved version or from Git, and report the rollback before continuing.$canon-inspect-artifacts as drill-down.$canon-inspect-artifacts first if Canon emitted a reviewable packet; otherwise recommend $canon-inspect-evidence.$canon-inspect-artifacts first only if Canon emitted a readable packet that explains the block.$canon-inspect-artifacts first so the user can review the bounded packet before approving the broader surface.$canon-inspect-evidence first, then $canon-approve, then $canon-resume.$canon-inspect-evidence when the user needs the invocation rationale, policy decision, or evidence lineage behind the packet, especially before generation has emitted readable artifacts.$canon-status to re-check the overall run state only after inspection or resume, not as a generic first stop.Approve generation....$canon-status$canon-inspect-evidence$canon-inspect-artifacts$canon-approve$canon-resumeBefore starting the governed run, check for before_run hooks:
If .canon/hooks.toml exists and is valid TOML with version = 1:
Parse hooks.before_run.actions array.
Filter by mode_filter: skip hooks whose mode_filter does not include
change. If mode_filter is null or absent, include the hook.
For each matching hook, emit a proposal block:
## Lifecycle Hook Detected
**Event**: before_run
**Hook**: <id>
**Command**: `<command>`
**Working Directory**: <repo-root>
**Description**: <description>
**Required**: <Yes if optional=false, No if optional=true>
**Trusted**: <Yes if trusted=true, No if trusted=false>
Proceed with this hook? [Yes / No / Skip all hooks]
Apply confirmation rules per the optional/trusted matrix in
.agents/skills/canon-shared/references/hooks-schema.md.
For untrusted hooks (trusted: false), add an extra confirmation step
explaining that the command source is not in the trusted allowlist.
If .canon/hooks.toml is missing, unreadable, or has invalid TOML, skip
hook detection silently. Do not block the run flow.
Record hook trace in ai-provenance.md (see Hook Trace Recording below).
After each hook proposal is resolved, append to the run's ai-provenance.md:
## Hook Traces
| Hook ID | Event | Command | Trusted | Outcome | Exit Code | Timestamp |
|---------|-------|---------|---------|---------|-----------|-----------|
| <id> | before_run | <command> | <yes/no> | <accepted/declined/skipped> | <code or n/a> | <ISO 8601> |