ワンクリックで
kmg-adr-guide
Auto-surface ADR creation when user makes architectural decisions or chooses between technical approaches
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Auto-surface ADR creation when user makes architectural decisions or chooses between technical approaches
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Provide orientation to the Knowledge Graph system architecture and guidance for knowledge capture
Enforce zero-deviation plan execution when user invokes plan implementation
Auto-invoke knowledge graph search when user asks about project history, past decisions, or previously solved problems
Ensure the knowledge graph is consulted before any recommendation is made
Route capture-that / remember-that requests to the correct destination via auto-detection
Intercept explicit doc-update requests and route to the correct command
| name | kmg-adr-guide |
| description | Auto-surface ADR creation when user makes architectural decisions or chooses between technical approaches |
Purpose: Auto-surface ADR creation when user makes architectural decisions or chooses between technical approaches. Dispatches to the create-adr-agent for the full creation workflow.
Trigger Keywords:
Behavior: When triggered, guide the user toward documenting the decision as an Architecture Decision Record:
Extract context from the conversation before asking anything:
Supersede Check: Before presenting the summary, run a recall query for similar decisions. Present matches and ask:
"Does this decision supersede an existing ADR, or is it net-new?" If it supersedes, note the superseded ADR number (e.g., "ADR-NNN").
Show the user a summary of what was extracted:
"This looks like an architecture decision worth capturing. Here's what I'd pre-fill:
Title: [title] Status: [status] Context: [context] Decision: [decision] Rationale: [rationale] Supersedes: [superseded ADR or None]
Want me to create the ADR from this?"
Dispatch to create-adr-agent with the full context payload if user agrees:
context_provided: true
title: "[title]"
status: "[Proposed|Accepted]"
category: "[Architecture|Process|Technology]"
context: "[context text]"
decision: "[decision text]"
rationale: "[rationale text]"
consequences: "[consequences text or blank]"
supersedes: "[superseded ADR NNN or blank]"
related_lessons: []
The agent uses context_provided: true to skip its interactive wizard and go directly to draft generation.
Step 4a — Project-wide cascade:
After extracting the decision, invoke the kmgraph:kmg-recall skill (via Skill tool) with the decision topic as input, then grep for other ADRs, skills, commands, docs referencing the affected concept. Present a list: [file] — [action required]. If nothing found, state it explicitly.
Step 4b — In-plan cascade advisory:
If an active plan exists (check docs/plans/ for recently modified plan files), output:
"Decision captured — if an active plan is in progress, review its tasks for cascade impact before executing."
Step 5: Open Questions:
After completing the ADR, add an ## Open Questions section:
## Open Questions
<!-- Unresolved questions that need follow-up. session-wrap aggregates these. -->
Leave it empty if no open questions exist. session-wrap will read and surface these at session end.
Dispatch:
When the user agrees to create an ADR, spawn the create-adr-agent subagent with the full context payload defined in Behavior step 4 above.
After create-adr-agent completes successfully and the ADR file is confirmed written, touch a flag file so kmg-execute-plan can detect ADR capture without model self-tracking:
touch "/tmp/kmgraph-adr-captured-$(date +%Y-%m-%d).flag"
Example Trigger:
User: "We need to decide: should we use PostgreSQL for the main database
or stick with the current approach?"
Assistant Response: "This looks like an architecture decision worth capturing. Here's what I'd pre-fill:
Title: Use PostgreSQL for Primary Database Status: Proposed Context: The team is evaluating whether to adopt PostgreSQL for the main database or continue with the current approach. Decision: Switch to PostgreSQL as the primary database. Rationale: PostgreSQL offers better support for complex queries and has strong community support. Supersedes: None
Want me to create the ADR from this?"
If the user agrees, dispatch to create-adr-agent with the full context payload.
v0.2.1 Decision Note: Agent dispatch was chosen over the previous /kmgraph:kmg-create-adr command suggestion because the ADR creation workflow (7 phases, 8 user prompts, git metadata, template population, index management) benefits from dedicated agent handling. The create-adr command's thin refactor to dispatch to this agent is deferred to v0.2.2.