Skip to content

feat: add adr skill#123

Open
tigra wants to merge 2 commits into
provectus:mainfrom
tigra:feat/adr-skill
Open

feat: add adr skill#123
tigra wants to merge 2 commits into
provectus:mainfrom
tigra:feat/adr-skill

Conversation

@tigra

@tigra tigra commented May 22, 2026

Copy link
Copy Markdown

What

Adds an opt-in /awos:adr command that captures an Architecture Decision Record — context, alternatives considered, decision, rationale, and consequences — saved as a numbered file under context/adr/.

A defining property: every bulleted section (pros/cons of each alternative, consequences, references) is confirmed by the user via multi-select, not auto-authored — the skill seeds candidate bullets and only the ones the user selects (plus free-text additions) land in the file.

Files

  • commands/adr.md + claude/commands/adr.md wrapper
  • templates/adr-template.md
  • Integration hooks (opt-in):
    • commands/architecture.md — offer ADR(s) after a material architecture change
    • commands/tech.md — offer ADR(s) for architectural choices captured in a tech spec

Backward compatibility

Both hooks are opt-in: the skill opens with an AskUserQuestion skip option, so existing architecture / tech flows are unchanged unless the user opts in.

Validation

  • npm test → 69/69 pass
  • npx prettier --check . clean

Suggested release-drafter label: minor (new feature skill).

Summary by CodeRabbit

  • New Features

    • Added an optional ADR (Architecture Decision Record) logging workflow and integrated it into architecture and technical-consideration flows to capture significant architectural choices.
  • Documentation

    • Added a comprehensive ADR guide and a standardized ADR template to guide capture, review, status, and storage of architectural decisions.

Adds an opt-in /awos:adr command that captures an Architecture Decision
Record — context, alternatives considered, decision, rationale, and
consequences — saved as a numbered file under context/adr/. Bulleted
sections (pros/cons, consequences, references) are confirmed by the user
via multi-select rather than auto-authored.

- commands/adr.md + claude/commands/adr.md wrapper
- templates/adr-template.md
- integration hooks: architecture.md (offer ADRs after a material
  architecture change) and tech.md (offer ADRs for architectural choices
  in a tech spec). Both hooks are opt-in — the skill opens with a skip
  option, so existing flows are unchanged unless the user opts in.
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bde63da9-2917-4f02-be10-d616993b5fab

📥 Commits

Reviewing files that changed from the base of the PR and between 6a1d020 and 2df00f4.

📒 Files selected for processing (1)
  • commands/tech.md
✅ Files skipped from review due to trivial changes (1)
  • commands/tech.md

📝 Walkthrough

Walkthrough

Adds an ADR command, a reusable ADR template, a stepwise ADR capture workflow (opt-in, context, alternatives, rationale, consequences, review, save), and optional hooks into architecture and tech workflows to offer ADR logging when architecture changes are meaningful.

Changes

ADR Command System

Layer / File(s) Summary
ADR Template and Command Overview
templates/adr-template.md, claude/commands/adr.md, commands/adr.md (lines 1–40)
Adds a complete ADR markdown template and command header: purpose, argument-hint, expected template/artifact locations, and initial command overview.
Interaction rules and decision capture
commands/adr.md (lines 43–133)
Defines strict AskUserQuestion usage, opt-out control flow (skip/defer/capture), decision identification, capture of forcing function/constraints, and stepwise alternatives collection with confirmed multi-select pros/cons and rationale synthesis.
Consequences, review loop, and storage
commands/adr.md (lines 135–187)
Three-round consequences capture, status/references/authors selection, draft-and-review loop, ensure context/adr/ exists, compute next ADR index and kebab slug, save context/adr/NNN-<slug>.md, remove _pending.md stubs, and suggest follow-up commands.
Integration into architecture & tech flows
commands/architecture.md (lines 74–75), commands/tech.md (lines 90–91)
Offers ADR capture as an optional sub-step in architecture Step 3 finalization and after tech-spec finalization to prompt users to log architectural decisions discovered during those workflows.

🎯 3 (Moderate) | ⏱️ ~20 minutes

"A rabbit hops through ADRs with cheer,
Notes the choice and writes it clear.
Alternatives weighed, rationale penned,
Consequences logged before the end.
Saved in context/adr — decisions dear."

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add adr skill' accurately describes the main change: introducing a new ADR (Architecture Decision Record) skill/command to the AWOS system.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
commands/adr.md (1)

49-188: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit Creation Mode / Update Mode flow.

The command currently defines one capture flow, but it does not explicitly support both
required modes (Creation Mode for new ADRs and Update Mode for existing ADRs) as a
first-class contract.

Proposed patch
 # PROCESS
 
+## Mode selection (run before Step 0)
+
+Use `AskUserQuestion` to choose:
+
+- `Creation Mode — create a new ADR`
+- `Update Mode — revise an existing ADR`
+
+Rules:
+
+- Always produce exactly one output document for this command run.
+- In Creation Mode, follow Steps 0–9 and write `context/adr/NNN-<slug>.md` (or `_pending.md` on defer).
+- In Update Mode, select one existing ADR from `context/adr/*.md` (excluding `_pending.md`), load it, and run the same interview flow as targeted edits; preserve ADR number/filename unless the user explicitly requests a title/slug rename.
+
 ## Universal principles (apply to every step below)

As per coding guidelines: "commands/**/*.md ... Commands must support both 'Creation Mode' for new documents and 'Update Mode' for existing documents, generating a single output document per command".

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@commands/architecture.md`:
- Line 74: The "Offer ADR(s) (optional)" step currently instructs invoking the
ADR skill inline (via `.awos/commands/adr.md` / AskUserQuestion) which can
produce additional output files and breaks the single-output rule; change the
text so `/awos:architecture` only suggests ADR creation as a follow-up or
explicit user-triggered handoff (e.g., "To record ADRs, run the ADR command:
`.awos/commands/adr.md`" or "Would you like to open the ADR creation command?")
and remove any instruction to automatically invoke the ADR skill or perform ADR
creation inline, ensuring the command generates a single output document
(architecture.md) only.

In `@commands/tech.md`:
- Line 94: The current step "Offer ADR(s) (optional)" directly invokes ADR
capture and can create extra files under /awos:tech; change it to suggest the
next command instead of executing it inline by replacing the in-flow ADR
invocation with a suggestion like "suggest next command: `/awos:adr
<user_prompt>`" (reference the step heading "Offer ADR(s) (optional)" and the
`/awos:adr` skill name) so the command output remains a single document
(technical-considerations.md) and ADR creation becomes an explicit user-invoked
follow-up.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b846b69-18ea-4187-b181-45bbffefd9f4

📥 Commits

Reviewing files that changed from the base of the PR and between 8c7f34c and 6a1d020.

📒 Files selected for processing (5)
  • claude/commands/adr.md
  • commands/adr.md
  • commands/architecture.md
  • commands/tech.md
  • templates/adr-template.md

Comment thread commands/architecture.md

1. Write the final content to `context/product/architecture.md`.
2. Proceed to **Step 4: Coverage Hint**.
2. **Offer ADR(s) (optional):** If the architecture was meaningfully changed (creation mode, or a material update — not a typo fix), follow the instructions in `.awos/commands/adr.md` to optionally log one or more ADRs capturing the architectural decisions just made (e.g., the chosen tech stack components, deployment target, data store, security posture, region — anything where a real alternative was considered). Pass a short note as `<user_prompt>` describing the trigger, e.g. `"architecture.md §[section] — chose [tech/pattern] over [alternative]"`. The ADR skill itself opens with an `AskUserQuestion` skip option, so simply invoke it; the user may decline or defer at that prompt. After it returns (whether logged, skipped, or deferred), continue.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Keep /awos:architecture single-output; don’t execute ADR creation inline.

This step makes the command potentially write multiple documents (architecture.md plus ADR files), which breaks the framework contract for core commands. Keep ADR as a suggested next command (or explicit user-triggered handoff) instead of invoking it inside this flow.

As per coding guidelines, "commands/**/*.md ... [must] generat[e] a single output document per command."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@commands/architecture.md` at line 74, The "Offer ADR(s) (optional)" step
currently instructs invoking the ADR skill inline (via `.awos/commands/adr.md` /
AskUserQuestion) which can produce additional output files and breaks the
single-output rule; change the text so `/awos:architecture` only suggests ADR
creation as a follow-up or explicit user-triggered handoff (e.g., "To record
ADRs, run the ADR command: `.awos/commands/adr.md`" or "Would you like to open
the ADR creation command?") and remove any instruction to automatically invoke
the ADR skill or perform ADR creation inline, ensuring the command generates a
single output document (architecture.md) only.

Comment thread commands/tech.md
1. **Identify Path:** The output path is the `technical-considerations.md` file inside the directory you identified in Step 1.
2. **Save File:** Once the user approves the draft, write the final content into this file.
3. Review the saved spec for new technologies, frameworks, tools, or testing approaches not already covered by the project's existing architecture and specialist agents.
3. **Offer ADR(s) (optional):** Review the saved technical considerations for **architectural choices** that don't already have an ADR — for example, picking a new datastore, a new service, a new pattern, a new vendor, a region, an auth model, or a non-trivial trade-off where a real alternative was considered. For each such choice not already captured, follow the instructions in `.awos/commands/adr.md` to optionally log an ADR. Pass a short note as `<user_prompt>` describing the trigger, e.g. `"technical-considerations.md (spec [name]) — chose [tech/pattern]"`. The ADR skill itself opens with a skip option, so simply invoke it; the user may decline or defer. Skip this step entirely if the tech spec is purely follow-on detail of decisions already covered by existing ADRs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid multi-document writes inside /awos:tech.

Running ADR capture from this step can produce extra files beyond technical-considerations.md, violating the one-command/one-output rule. Please switch this to a “suggest next command: /awos:adr ...” pattern rather than in-flow execution.

As per coding guidelines, "commands/**/*.md ... [must] generat[e] a single output document per command."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@commands/tech.md` at line 94, The current step "Offer ADR(s) (optional)"
directly invokes ADR capture and can create extra files under /awos:tech; change
it to suggest the next command instead of executing it inline by replacing the
in-flow ADR invocation with a suggestion like "suggest next command: `/awos:adr
<user_prompt>`" (reference the step heading "Offer ADR(s) (optional)" and the
`/awos:adr` skill name) so the command output remains a single document
(technical-considerations.md) and ADR creation becomes an explicit user-invoked
follow-up.

AlexanderMakarov pushed a commit that referenced this pull request Jul 2, 2026
Squash/rebase-merging a PR leaves no merge commit, so every metric built
on `git log --merges` silently read 0 on healthy repos, and per-author
merge counts credited only whoever clicked the merge button (dossier
03-squash-merge-blind-spot.md).

- The git collector now counts squash-merged PRs as merge events:
  first-parent non-merge trunk commits carrying a forge PR ref — GitHub
  "Title (#123)", Azure DevOps "Merged PR 123: …", Bitbucket
  "(pull request #12)", GitLab "See merge request …!45" in the body —
  attributed to the commit author, which for a squash merge IS the PR
  author. window_stats gains merge_commits / squash_merges /
  merge_strategy (merge-commit | squash | mixed | unknown).
- Deploy frequency, change-failure rate, and rework rate now measure
  squash repos correctly (their revert/fix keyword filters cover the
  squashed subjects too).
- Lead time, PR cycle time, and review rework are merge-record proxies
  that cannot exist without real merge commits: on a squash-strategy
  repo they SKIP with a connector-pointing reason instead of reporting
  a confident number from unrepresentative residue. The MTTR git proxy
  stays included (per its contract) but degrades confidence with an
  explanatory note.
- activeContributors: merge-share now includes squash events, restoring
  the safety valve on squash repos; when a repo has no merge events at
  all, commit-share replaces merge-share so the rule can't degenerate
  to LOC-share-only (the '1 active of 9' collapse).

Validated on the dossier's evidence repo: 19 merges credited to one
maintainer → 114 merge events across the 4 real PR authors,
strategy=squash.

Claude-Session: https://claude.ai/code/session_014UpLfgFPaACkrEUuk7CGiF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant