skills/ArchitectureDecision/SKILL.md
Find, read, create, validate, and capture Architecture Decision Records. USE WHEN ADR lookup, architecture decision, project context, decision history, create ADR, new ADR, validate ADR, capture ADRs, decisions directory, or editing any ADR file.
npx skillsauth add n4m3z/forge-core ArchitectureDecisionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find, read, create, validate, and capture Architecture Decision Records (ADRs). ADRs document significant decisions with context, alternatives, and rationale. Rules enforce; ADRs explain the why.
ADRs live in docs/decisions/. We use structured-madr with custom extensions for RACI accountability and provenance tracking (templates/forge-adr.md, validated by templates/forge-adr.json).
Required frontmatter: title, description, type, category, tags, status, created, updated, author, project, responsible, accountable, consulted, informed, upstream. Status values are lowercase: proposed, accepted, deprecated, superseded.
Before proposing architectural changes or challenging existing patterns, check the project's ADRs via this skill. Do not contradict an accepted ADR without explicitly acknowledging it and proposing a superseding record.
After writing an ADR with body-level links to other ADRs, backfill those references into the related: frontmatter field. Body links are for human navigation; related: is for machine-readable cross-referencing.
When modifying code in an area governed by an ADR, re-read the ADR and verify it still describes reality. Drift between ADR claims and actual behavior is a docs bug — fix the ADR (or the code) before layering new behavior on top.
@user/ForgeADR.md
@TemplateReference.md
@SchemaValidation.md
@user/ContextKeeper.md
| Workflow | Trigger | Section | | ------------ | --------------------------------------------------- | -------------------------------------- | | Find | "list ADRs", "show decisions", "what did we decide" | Find Workflow | | Create | "create ADR", "new ADR", "write ADR" | Create Workflow | | Validate | "validate ADR", "check ADR", "lint ADR" | Validate Workflow | | Capture | Post-compaction prompt, "capture ADRs from session" | Capture Workflow |
| Scope | Location | When to use |
| ------------------ | --------------------------------- | ------------------------------------ |
| Ecosystem-spanning | $ADR_DIRECTORY at project root | Decisions affecting multiple modules |
| Module-internal | $ADR_DIRECTORY within a module | Decisions scoped to one module |
| Status | Meaning |
| ------------ | -------------------------------------------- |
| proposed | Under discussion, not yet decided |
| accepted | Decision in effect |
| deprecated | No longer recommended, not replaced |
| superseded | Replaced by a newer ADR — link the successor |
Never modify an accepted ADR's decision text. To revise, create a new ADR and mark the old one superseded.
Search $ADR_DIRECTORY (default docs/decisions/). If not found, search fallbacks:
doc/adr/docs/adr/**/adr/Use Glob to find markdown files with numbered or dated prefixes. Exclude template files.
Present an index table:
| # | Title | Status | Date |
| ---- | ----------------------------------- | -------- | ---------- |
| 0001 | Adopt Architecture Decision Records | accepted | 2026-03-02 |
Extract title from frontmatter title: field, status and date from status: and created:.
When asked about a specific topic, search ADR titles and content for relevant keywords. Read and summarize matching ADRs with: Context, Decision, Consequences, Status.
Determine scope: ecosystem-spanning (root $ADR_DIRECTORY) or module-internal? If the user hasn't specified, ask.
If the ADR directory does not exist, scaffold it: create the directory and copy $ADR_MDSCHEMA if one exists in the project's templates.
Scan existing ADRs and assign the next available number.
Gather content from the user or conversation context: title (short noun phrase), context (what prompted this?), options considered, decision (what was chosen and why?), consequences (optional tradeoffs).
Check for overlap first. Read every existing ADR in the target directory (titles AND bodies, not just filenames). For each existing ADR, evaluate the relationship:
accepted, mark old superseded.Use the $ADR_TEMPLATE (default templates/structured-madr.md). Fill in all frontmatter fields and body sections. Write to the ADR directory.
Set status to proposed unless the decision is already confirmed — then set accepted.
Run the Validate workflow on the new file.
If a file path was provided, validate that file. Otherwise, ask which ADR to validate or validate the entire ADR directory.
Run frontmatter schema validation against $ADR_SCHEMA (default templates/structured-madr.json). Use the first available tool:
a. structured-madr local checkout at ~/Data/Developer/zircote/structured-madr:
INPUT_PATH=$ADR_DIRECTORY INPUT_SCHEMA=$ADR_SCHEMA npm run validate --prefix ~/Data/Developer/zircote/structured-madr
b. check-jsonschema:
check-jsonschema --schemafile $ADR_SCHEMA $ADR_DIRECTORY/*.md
Check structural compliance if $ADR_MDSCHEMA exists in the ADR directory.
Check content rules:
$ADR_PREFIX pattern (number or date)status is one of: proposed, accepted, deprecated, supersededcreated and updated are YYYY-MM-DD format## Context and Problem Statement is present and non-empty## Decision Outcome or ## Decision is present and non-emptyReport COMPLIANT (all checks pass) or NON-COMPLIANT (list failures with fixes, offer to fix automatically).
Triggered post-compaction or by the user asking to capture decisions from the current session.
If ContextKeeper MCP is available, query search_archive for additional session context that may have been compressed away.
Review the current conversation context for architectural decisions. Look for: technology choices, pattern adoptions, convention changes, structural refactors, trade-off evaluations with explicit reasoning.
For each identified decision, run the Create workflow. Set status to accepted if the decision was confirmed during the session, proposed if it was discussed but not finalized.
If no architectural decisions are found, report that and exit.
$ADR_DIRECTORY must contain $ADR_MDSCHEMA when it exists — scaffold it if missingdevelopment
Reactive correction and root-cause fix. USE WHEN something went wrong, user is frustrated, demands a correction, says wtf, what the hell, why did you, that's wrong, this is broken, no not that, stop. Executes the immediate fix, then hunts the upstream artifact that caused it and creates a corrective change.
development
Decompose a research question into sub-queries, spawn parallel WebResearcher agents per angle, synthesize findings with citations and explicit confidence. USE WHEN the user asks to research, investigate, look online, look up, dig into, find sources, gather evidence, or survey what's known about a topic. Single-pass; for multi-round adversarial research use ResearchCouncil in forge-council.
tools
Author project documentation that future humans (and AI sessions) actually read. Covers TLDRs for tools, READMEs, runbooks, journals. USE WHEN write documentation, create tldr, tool one-pager, document a cli, write readme, runbook, journal entry, capture knowledge about a tool, distill a session into reusable notes.
development
Review your own staged changes via a code-review TUI before triggering a commit. USE WHEN about to commit, walking through your own staged diff, self-reviewing before approval, tuicr, revdiff, git diff cached.