@alexandrealvaro/agentic 0.15.0-beta.1 → 0.15.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/package.json +1 -1
  2. package/src/lib/rootdoc.js +52 -43
  3. package/src/skills/claude-code/ad-adr/SKILL.md +1 -0
  4. package/src/skills/claude-code/ad-architecture/SKILL.md +1 -0
  5. package/src/skills/claude-code/ad-audit/SKILL.md +1 -0
  6. package/src/skills/claude-code/ad-bootstrap/SKILL.md +1 -0
  7. package/src/skills/claude-code/ad-commit/SKILL.md +1 -0
  8. package/src/skills/claude-code/ad-deepen/SKILL.md +1 -0
  9. package/src/skills/claude-code/ad-design/SKILL.md +1 -0
  10. package/src/skills/claude-code/ad-diagnose/SKILL.md +1 -0
  11. package/src/skills/claude-code/ad-domain/SKILL.md +1 -0
  12. package/src/skills/claude-code/ad-grill/SKILL.md +1 -0
  13. package/src/skills/claude-code/ad-ground/SKILL.md +1 -0
  14. package/src/skills/claude-code/ad-hooks/SKILL.md +1 -0
  15. package/src/skills/claude-code/ad-merge/SKILL.md +1 -0
  16. package/src/skills/claude-code/ad-next/SKILL.md +1 -0
  17. package/src/skills/claude-code/ad-philosophy/SKILL.md +1 -0
  18. package/src/skills/claude-code/ad-pr/SKILL.md +1 -0
  19. package/src/skills/claude-code/ad-review/SKILL.md +1 -0
  20. package/src/skills/claude-code/ad-skill/SKILL.md +1 -0
  21. package/src/skills/claude-code/ad-spec/SKILL.md +1 -0
  22. package/src/skills/claude-code/ad-spike/SKILL.md +1 -0
  23. package/src/skills/claude-code/ad-subagent/SKILL.md +1 -0
  24. package/src/skills/claude-code/ad-task/SKILL.md +1 -0
  25. package/src/skills/claude-code/ad-tdg/SKILL.md +1 -0
  26. package/src/skills/codex/ad-adr/SKILL.md +1 -0
  27. package/src/skills/codex/ad-architecture/SKILL.md +1 -0
  28. package/src/skills/codex/ad-audit/SKILL.md +1 -0
  29. package/src/skills/codex/ad-bootstrap/SKILL.md +1 -0
  30. package/src/skills/codex/ad-commit/SKILL.md +1 -0
  31. package/src/skills/codex/ad-deepen/SKILL.md +1 -0
  32. package/src/skills/codex/ad-design/SKILL.md +1 -0
  33. package/src/skills/codex/ad-diagnose/SKILL.md +1 -0
  34. package/src/skills/codex/ad-domain/SKILL.md +1 -0
  35. package/src/skills/codex/ad-grill/SKILL.md +1 -0
  36. package/src/skills/codex/ad-ground/SKILL.md +1 -0
  37. package/src/skills/codex/ad-hooks/SKILL.md +1 -0
  38. package/src/skills/codex/ad-merge/SKILL.md +1 -0
  39. package/src/skills/codex/ad-next/SKILL.md +1 -0
  40. package/src/skills/codex/ad-philosophy/SKILL.md +1 -0
  41. package/src/skills/codex/ad-pr/SKILL.md +1 -0
  42. package/src/skills/codex/ad-review/SKILL.md +1 -0
  43. package/src/skills/codex/ad-skill/SKILL.md +1 -0
  44. package/src/skills/codex/ad-spec/SKILL.md +1 -0
  45. package/src/skills/codex/ad-spike/SKILL.md +1 -0
  46. package/src/skills/codex/ad-task/SKILL.md +1 -0
  47. package/src/skills/codex/ad-tdg/SKILL.md +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexandrealvaro/agentic",
3
- "version": "0.15.0-beta.1",
3
+ "version": "0.15.2-beta.1",
4
4
  "description": "Bootstrap and audit AGENTS.md, ARCHITECTURE.md, ADRs, skills, and subagents for engineering production code with LLMs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,48 +11,53 @@ const SECTION_END = '<!-- agentic-managed-skills:end -->';
11
11
  const SECTION_START_RE = /^<!-- agentic-managed-skills:start -->\n\n## Skills installed by `agentic`/m;
12
12
  const SECTION_END_RE = /^<!-- agentic-managed-skills:end -->$/m;
13
13
 
14
- export const SKILL_DESCRIPTIONS = {
15
- 'ad-bootstrap': 'Generate or audit `AGENTS.md` at the repo root.',
16
- 'ad-philosophy':
17
- 'Universal agent guardrails (think before coding, verify before claiming done). Auto-loads on non-trivial work.',
18
- 'ad-architecture': 'Generate or audit `ARCHITECTURE.md` at the repo root.',
19
- 'ad-adr': 'Draft a new ADR at `doc/adr/NNNN-<slug>.md`.',
20
- 'ad-spec':
21
- 'Draft a feature spec at `doc/specs/NNNN-<slug>.md` (Spec Kit-aligned mandatory sections). Layer 3 of the five-layer artifact stack.',
22
- 'ad-task': 'Draft a new task at `doc/tasks/NNNN-<slug>.md`.',
23
- 'ad-audit':
24
- 'Read-only drift report comparing AGENTS.md / ARCHITECTURE.md / ADRs against the code.',
25
- 'ad-review':
26
- 'Fresh-context code review per WORKFLOW §10 — assemble handoff, return structured findings.',
27
- 'ad-ground':
28
- 'Four-source pre-implementation research (docs / OSS / in-repo / git history) + happy-path synthesis + deviation gate. WORKFLOW §4 + §5.',
29
- 'ad-next':
30
- 'State survey + prioritized next-action recommendations across the five-layer artifact stack. Read-only navigation aid (`flutter doctor` pattern).',
31
- 'ad-spike':
32
- 'Staged spike with golden fixtures per WORKFLOW §14. Discovery + fixture + pipeline-with-gates + two-layer evaluation, when the *technique* is uncertain across multiple plausible approaches.',
33
- 'ad-tdg':
34
- 'Outcome-based prompting per WORKFLOW §9. Ground truth pair + Test Dependency Map + three approaches + single-criterion selection, when the technique is known but the implementation strategy is uncertain.',
35
- 'ad-domain':
36
- 'Lazy lifecycle owner of `CONTEXT.md` (Layer 2 — ubiquitous language per Evans 2003). Captures canonical project-specific nouns with aliases-to-avoid, relationships, and flagged ambiguities. Single-context or `CONTEXT-MAP.md` multi-context.',
37
- 'ad-grill':
38
- 'Interview-before-research grilling session — one question at a time with recommendation, codebase-first, sharpens vocabulary against `CONTEXT.md`, captures terms via `ad-domain` and decisions via `ad-adr` (three-criteria rule). Upstream of `ad-ground`.',
39
- 'ad-deepen':
40
- 'Surface deepening opportunities using WORKFLOW §8 vocabulary (Module / Interface / Depth / Seam / Adapter / Leverage / Locality). Three phases — explore, present numbered candidates with deletion-test framing, grill the chosen one. Pairs with `ad-audit`. Profile-scoped to `team` and `mature` only.',
41
- 'ad-diagnose':
42
- 'Disciplined diagnosis loop for hard bugs and performance regressions per WORKFLOW §15. Five phases — build a feedback loop (the skill itself), reproduce, hypothesise (3-5 ranked falsifiable), instrument (one variable at a time), fix + regression-test.',
43
- 'ad-commit':
44
- 'Atomic Conventional Commits with DCO `Signed-off-by` sign-off per ADR-0023. Four phases — scope intake, stage-split when concerns mix, draft message in Conventional Commits format, sign + write. Helper posture, not blocker.',
45
- 'ad-pr':
46
- 'Open a GitHub pull request with a uniform body shape (Summary / Test plan / Links) per ADR-0024. Four phases — preflight (`gh` auth + branch pushed), scope assembly, draft body, open + report URL. Title format = Conventional Commits.',
47
- 'ad-merge':
48
- 'Evaluate and merge a GitHub pull request per ADR-0025. Four phases — preflight, evaluate (CI / fresh-context review / linked task / unresolved comments / mergeability), decision (CI green = hard gate; others = warnings), merge with auto-detected mode + `--delete-branch`.',
49
- 'ad-design': 'Bootstrap `DESIGN.md` from existing tokens (frontend projects).',
50
- 'ad-subagent': 'Draft a new Claude Code subagent at `.claude/agents/<name>.md`.',
51
- 'ad-skill': 'Draft a new Claude Code or Codex skill at the appropriate path.',
52
- 'ad-hooks':
53
- 'Scaffold deterministic quality gates per WORKFLOW §11 — pre-commit + pre-push, runner detected from stack signals.',
14
+ // Where installed SKILL.md files live per agent. Mirrors the install layout
15
+ // (see ADR-0001). updateRootDoc is called per-target-project after install,
16
+ // so reads happen against the just-written installed copy — not the kit
17
+ // source tree (which rootdoc.js has no access to anyway).
18
+ const SKILL_PATH_BY_AGENT = {
19
+ 'claude-code': '.claude/skills',
20
+ codex: '.agents/skills',
54
21
  };
55
22
 
23
+ /**
24
+ * Read the `summary:` line from an installed SKILL.md frontmatter block.
25
+ *
26
+ * Per task-0029, every kit skill carries a kit-specific `summary:` field
27
+ * alongside the Anthropic-spec `description:` field. `description:` is
28
+ * trigger-keyword-rich for the agent's skill router; `summary:` is the
29
+ * compressed cell (≤320 chars, enforced by `test/skills.test.js`) that
30
+ * lands in the managed AGENTS.md table.
31
+ *
32
+ * Tries each known target-tree location in order. Throws if no installed
33
+ * copy has the field — a missing summary surfaces an incomplete install
34
+ * loudly instead of silently producing empty table cells.
35
+ */
36
+ function readSkillSummary(cwd, skill) {
37
+ let found = false;
38
+ for (const skillsDir of Object.values(SKILL_PATH_BY_AGENT)) {
39
+ const path = join(cwd, skillsDir, skill, 'SKILL.md');
40
+ if (!existsSync(path)) continue;
41
+ found = true;
42
+ const body = readFileSync(path, 'utf8');
43
+ // Horizontal whitespace only between `summary:` and the value. JavaScript
44
+ // `\s` matches `\n`, so `\s*` would silently consume the line break and
45
+ // capture the following frontmatter line as the summary when the field
46
+ // is present but empty. Restricting to `[ \t]*` keeps the match on one
47
+ // line and lets an empty-summary line fall through to the throw below.
48
+ const match = body.match(/^summary:[ \t]*(.+)$/m);
49
+ if (match) return match[1].trim();
50
+ }
51
+ if (found) {
52
+ throw new Error(
53
+ `skill ${skill} is installed but no SKILL.md carries a non-empty \`summary:\` frontmatter field`
54
+ );
55
+ }
56
+ throw new Error(
57
+ `skill ${skill} not found at any installed location; cannot read summary`
58
+ );
59
+ }
60
+
56
61
  /**
57
62
  * Find the first existing root doc; null if none.
58
63
  * Preference order: AGENTS.md (open standard), then CLAUDE.md (Claude Code legacy).
@@ -65,7 +70,7 @@ function findRootDoc(cwd) {
65
70
  return null;
66
71
  }
67
72
 
68
- function buildSection(skills) {
73
+ function buildSection(cwd, skills) {
69
74
  const lines = [];
70
75
  lines.push(SECTION_START);
71
76
  lines.push('');
@@ -78,7 +83,7 @@ function buildSection(skills) {
78
83
  lines.push('| Skill | Invoke | Notes |');
79
84
  lines.push('| --- | --- | --- |');
80
85
  for (const skill of skills) {
81
- const note = SKILL_DESCRIPTIONS[skill] || '';
86
+ const note = readSkillSummary(cwd, skill);
82
87
  const invoke =
83
88
  skill === 'ad-philosophy' ? '_(implicit)_' : `\`/${skill}\``;
84
89
  lines.push(`| \`${skill}\` | ${invoke} | ${note} |`);
@@ -135,10 +140,13 @@ export async function updateRootDoc({
135
140
  if (!found) return { type: 'absent', path: null };
136
141
 
137
142
  const body = readFileSync(found.path, 'utf8');
138
- const section = buildSection(skills);
139
143
  const bounds = findSectionBounds(body);
140
144
 
145
+ // Build the section lazily — readSkillSummary touches the installed
146
+ // SKILL.md files (per task-0029). When the user declines a section
147
+ // append/replace, there is no reason to walk every installed skill.
141
148
  if (bounds) {
149
+ const section = buildSection(cwd, skills);
142
150
  const updated = replaceSection(body, section, bounds);
143
151
  if (updated === body) return { type: 'unchanged', path: found.name };
144
152
  const ok = await confirmReplace(found.name);
@@ -150,6 +158,7 @@ export async function updateRootDoc({
150
158
  const ok = await confirmAppend(found.name);
151
159
  if (!ok) return { type: 'skipped', path: found.name };
152
160
 
161
+ const section = buildSection(cwd, skills);
153
162
  const sep = body.endsWith('\n') ? '\n' : '\n\n';
154
163
  if (!dryRun) writeFileSync(found.path, body + sep + section + '\n');
155
164
  return { type: 'appended', path: found.name };
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-adr
3
3
  description: Draft a new ADR (Architecture Decision Record) at doc/adr/NNNN-<short-title>.md, using Michael Nygard's Context/Decision/Consequences/Alternatives pattern. Use when the user wants to record, write, draft, propose, or document an architecture decision. Status starts at proposed; the agent does not flip to accepted without explicit user approval.
4
+ summary: Draft a new ADR at `doc/adr/NNNN-<slug>.md`.
4
5
  allowed-tools: Read, Write, Glob, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-architecture
3
3
  description: Generate ARCHITECTURE.md at the repo root by scanning the code first, pre-filling layers/patterns/observability/deployment from observed signals, then asking only the genuine gaps. Use when the user wants to bootstrap, scaffold, generate, document, or audit ARCHITECTURE.md (system-level patterns and boundaries, paired with ADRs in doc/adr/). Covers brownfield (code exists) and audit (drift report against existing ARCHITECTURE.md).
4
+ summary: Generate or audit `ARCHITECTURE.md` at the repo root.
4
5
  allowed-tools: Read, Write, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-audit
3
3
  description: Read-only drift audit — compare AGENTS.md, ARCHITECTURE.md, ADR statuses, feature specs in doc/specs/, and documentation discipline against what the code actually does. Outputs a drift list, never writes files. Use when the user wants to audit, review for drift, sanity-check, or report inconsistencies between the repo's docs and its code.
4
+ summary: Read-only drift report comparing AGENTS.md / ARCHITECTURE.md / ADRs against the code.
4
5
  allowed-tools: Read, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-bootstrap
3
3
  description: Generate AGENTS.md at the repo root by scanning the codebase first, pre-filling placeholders from observed signals, and asking only the genuine gaps. Use whenever the user wants to bootstrap, scaffold, generate, create, set up, or audit AGENTS.md / agents.md / CLAUDE.md (the operational guide for agents working on this project). Covers greenfield (empty repo), brownfield (code exists, no AGENTS.md), and audit (drift report against existing AGENTS.md).
4
+ summary: Generate or audit `AGENTS.md` at the repo root.
4
5
  allowed-tools: Read, Write, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-commit
3
3
  description: Atomic Conventional Commits with DCO `Signed-off-by` sign-off per ADR-0023. Four phases — scope intake, stage-split when concerns mix, draft message in Conventional Commits format, sign + write. Stage-split is interactive; identity comes from `git config user.name` / `user.email`. No `Co-Authored-By`. Helper posture, not blocker. Triggers on "commit this", "stage and commit", "atomic commit", "Conventional Commit", "sign off", "DCO", "split this commit", "/ad-commit".
4
+ summary: Atomic Conventional Commits with DCO `Signed-off-by` sign-off per ADR-0023. Four phases — scope intake, stage-split when concerns mix, draft message in Conventional Commits format, sign + write. Helper posture, not blocker.
4
5
  allowed-tools: Read, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-deepen
3
3
  description: Surface deepening opportunities in the codebase using the Ousterhout/Feathers vocabulary from WORKFLOW §8 (Module / Interface / Depth / Seam / Adapter / Leverage / Locality). Three-phase process — explore organically, present numbered candidates with deletion-test framing, grilling loop on the chosen candidate. Pairs with `ad-audit` (audit detects drift; deepen proposes refactors). Triggers on "deepen", "refactor for depth", "shallow module", "deletion test", "two-adapters rule", "interface is the test surface", "leverage", "locality", "/ad-deepen". Profile-scoped to `team` and `mature` only — premature for `poc` and `solo` per ADR-0020 §4.
4
+ summary: Surface deepening opportunities using WORKFLOW §8 vocabulary (Module / Interface / Depth / Seam / Adapter / Leverage / Locality). Three phases — explore, present numbered candidates with deletion-test framing, grill the chosen one. Pairs with `ad-audit`. Profile-scoped to `team` and `mature` only.
4
5
  allowed-tools: Read, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-design
3
3
  description: Generate DESIGN.md at the repo root by scanning existing design tokens (Figma export, tailwind.config, tokens.json, stylesheet) and synthesizing W3C-compatible YAML frontmatter + Markdown rationale per the Google Labs design.md spec. Use when the user wants to bootstrap, scaffold, generate, document, or audit DESIGN.md (visual contract — colors, typography, spacing, motion). Frontend projects only.
4
+ summary: Bootstrap `DESIGN.md` from existing tokens (frontend projects).
4
5
  allowed-tools: Read, Write, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-diagnose
3
3
  description: Disciplined diagnosis loop for hard bugs and performance regressions per WORKFLOW §15. Five phases — build a feedback loop, reproduce, hypothesise (3-5 ranked falsifiable), instrument, fix + regression-test. The feedback loop is the skill; everything else is mechanical. Triggers on "diagnose this", "debug this", "this is broken", "this is throwing", "performance regression", "find the bug", "build a repro", "feedback loop", "ranked hypotheses", "falsifiable", "/ad-diagnose". Routes to `ad-spike` when the technique is uncertain across approaches, `ad-grill` when the spec is unclear, `ad-tdg` when the bug is a clean ground-truth-pair regression.
4
+ summary: Disciplined diagnosis loop for hard bugs and performance regressions per WORKFLOW §15. Five phases — build a feedback loop (the skill itself), reproduce, hypothesise (3-5 ranked falsifiable), instrument (one variable at a time), fix + regression-test.
4
5
  allowed-tools: Read, Edit, Write, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-domain
3
3
  description: Lazily create or update `CONTEXT.md` (Layer 2 — ubiquitous language per Evans 2003) at the repo root, or `CONTEXT-MAP.md` plus per-context `CONTEXT.md` for multi-context repos. Captures canonical project-specific nouns, the aliases to avoid, the relationships between them, and resolved ambiguities. Triggers on "domain term", "ubiquitous language", "glossary", "what should we call", "naming drift", "canonical noun", "_Avoid_", "/ad-domain", or whenever a grilling/spec/architecture session resolves a vocabulary question. Lazy by design — file only exists when there is something to write.
4
+ summary: Lazy lifecycle owner of `CONTEXT.md` (Layer 2 — ubiquitous language per Evans 2003). Captures canonical project-specific nouns with aliases-to-avoid, relationships, and flagged ambiguities. Single-context or `CONTEXT-MAP.md` multi-context.
4
5
  allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-grill
3
3
  description: Interview-before-research grilling session that challenges a fuzzy ask against the existing codebase, sharpens vocabulary against `CONTEXT.md`, and resolves the design tree branch by branch. One question at a time, codebase-first when an answer is in code, with each question carrying a recommended answer. Triggers on "grill me", "interview me", "stress test the plan", "challenge my assumptions", "before implementing", "ask me questions", "fuzzy ask", "sharpen the question", "what should I clarify", "/ad-grill". Routes to `ad-ground` once the question is research-ready, `ad-tdg` once the technique is settled, `ad-spike` for technique discovery, `ad-diagnose` for debugging.
4
+ summary: Interview-before-research grilling session — one question at a time with recommendation, codebase-first, sharpens vocabulary against `CONTEXT.md`, captures terms via `ad-domain` and decisions via `ad-adr` (three-criteria rule). Upstream of `ad-ground`.
4
5
  allowed-tools: Read, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-ground
3
3
  description: Four-source pre-implementation research — official docs, validated open-source examples, in-repo patterns, and git history — then synthesize a happy path and gate any deviation with an irrefutable justification before code is written. Auto-invokes on non-trivial work, refactors, library or pattern selection, "research before coding", "before implementing", "which library", "which pattern", "how to approach", "ground before coding". Workflow-operational counterpart to WORKFLOW.md §4 (Find the Happy Path) and §5 (Ground in Real Patterns); pairs with ad-philosophy (posture) and ad-review (post-implementation §10 review).
4
+ summary: Four-source pre-implementation research (docs / OSS / in-repo / git history) + happy-path synthesis + deviation gate. WORKFLOW §4 + §5.
4
5
  allowed-tools: Read, Glob, Grep, Bash, WebFetch, WebSearch
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-hooks
3
3
  description: Scaffold deterministic quality gates per WORKFLOW.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration). Detects the project's stack and recommends a hook runner (Husky / lefthook / pre-commit / native), scaffolds the runner config, and updates AGENTS.md Quality Gates. Use when the user wants to wire hooks, configure pre-commit / pre-push, set up quality gates, prevent --no-verify bypass, or close the WORKFLOW §11 advisory-vs-deterministic gap. Opt-in skill; not auto-installed in the universal set.
4
+ summary: Scaffold deterministic quality gates per WORKFLOW §11 — pre-commit + pre-push, runner detected from stack signals.
4
5
  allowed-tools: Read, Write, Glob, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-merge
3
3
  description: Evaluate and merge a GitHub pull request per ADR-0025. Four phases — preflight (`gh` auth + PR resolution), evaluate (CI / fresh-context review / linked task / unresolved comments / mergeability), decision (CI green = hard gate; others = warnings yielding to user), merge via `gh pr merge` with auto-detected mode (squash / rebase / merge) and `--delete-branch`. Helper posture per ADR-0025 §3 — surfaces warnings, does not block on the senior engineer's judgment. Triggers on "merge this PR", "evaluate the PR", "is it mergeable", "gh pr merge", "/ad-merge".
4
+ summary: Evaluate and merge a GitHub pull request per ADR-0025. Four phases — preflight, evaluate (CI / fresh-context review / linked task / unresolved comments / mergeability), decision (CI green = hard gate; others = warnings), merge with auto-detected mode + `--delete-branch`.
4
5
  allowed-tools: Read, Bash, Grep
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-next
3
3
  description: Survey the project's state across the five-layer artifact stack and recommend prioritized next actions, modeled on `flutter doctor`. Use when the user asks "what's next", "next step", "where am I", "project status", "doctor", "what should I do", "audit my workflow", or whenever a navigation aid is needed mid-flow. Read-only; complements `ad-audit` (drift detection, a different question). Profile-aware — `poc` suppresses Layer 3 / 4 noise, `team` / `mature` run the full survey.
4
+ summary: State survey + prioritized next-action recommendations across the five-layer artifact stack. Read-only navigation aid (`flutter doctor` pattern).
4
5
  allowed-tools: Read, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-philosophy
3
3
  description: Universal agent behavior and documentation discipline — think before coding, ground in real patterns, prefer simplicity, make surgical changes, define verifiable goals, verify before claiming done, and write documentation that captures only definitions and decisions. Auto-invokes on non-trivial changes, refactors, debugging, "think before coding", "ground before coding", "verify done", "before implementing", on documentation work — "writing docs", "writing readme", "writing architecture", "writing adr", "writing task", "audit docs" — or whenever the task is ambiguous enough that guardrails matter.
4
+ summary: Universal agent guardrails (think before coding, verify before claiming done). Auto-loads on non-trivial work.
4
5
  ---
5
6
 
6
7
  # /ad-philosophy
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-pr
3
3
  description: Open a GitHub pull request with a uniform body shape per ADR-0024. Four phases — preflight (`gh` auth + branch pushed), scope assembly (commits + diff vs base), draft body (Summary / Test plan / Links), open + report URL. Title format = Conventional Commits, type inferred from the dominant commit type in the range. `gh` CLI soft-fail with install hint. Triggers on "open a PR", "create a pull request", "submit a PR", "gh pr create", "/ad-pr".
4
+ summary: Open a GitHub pull request with a uniform body shape (Summary / Test plan / Links) per ADR-0024. Four phases — preflight (`gh` auth + branch pushed), scope assembly, draft body, open + report URL. Title format = Conventional Commits.
4
5
  allowed-tools: Read, Bash, Glob, Grep
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-review
3
3
  description: Fresh-context code review per WORKFLOW §10 — assemble the diff plus the relevant spec slice (AGENTS.md, applicable ADRs, the task's Acceptance Criteria), delegate to a bundled fresh-context-reviewer subagent with no inherited context, return a structured findings list. Use when the user wants to review a diff, branch, PR, or recent commits against the project's spec, audit for bugs / coupling / edge cases / spec drift, or run a §10 senior-reviewing-junior pass. Adversarial framing — never emits an "approve" verdict.
4
+ summary: Fresh-context code review per WORKFLOW §10 — assemble handoff, return structured findings.
4
5
  allowed-tools: Read, Glob, Grep, Bash, Task
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-skill
3
3
  description: Draft a new Claude Code or Codex skill at .claude/skills/<name>/SKILL.md (or .agents/skills/<name>/SKILL.md for Codex), using the Anthropic Skills format. Use when the user wants to create, write, draft, or scaffold a custom skill for an agentic coding tool. Asks one question per missing field; never invents skill names or triggers.
4
+ summary: Draft a new Claude Code or Codex skill at the appropriate path.
4
5
  allowed-tools: Read, Write, Glob, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-spec
3
3
  description: Draft a feature-level specification at doc/specs/NNNN-<slug>.md following the kit's five-layer artifact stack (Constitution → Domain → Spec → Plan/Decisions → Code). Adapts GitHub Spec Kit's mandatory sections (User Scenarios, Requirements, Success Criteria) to the kit's documentation discipline. Use when the user wants to write, draft, scaffold, or open a feature spec, PRD, product requirements, feature brief, user stories, or success criteria for a feature multiple tasks will implement. Status starts at draft; the file is the binding feature contract once accepted.
4
+ summary: Draft a feature spec at `doc/specs/NNNN-<slug>.md` (Spec Kit-aligned mandatory sections). Layer 3 of the five-layer artifact stack.
4
5
  allowed-tools: Read, Write, Glob, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-spike
3
3
  description: Scaffold a staged spike with golden fixtures per WORKFLOW.md §14, for cases where the spec is clear but the technique is uncertain across multiple plausible approaches. Four stages — discovery, golden fixture, pipeline with gates, two-layer evaluation. Use when the unknown is *how*, not *what*. Triggers on "spike", "uncertain technique", "which library", "CV pipeline", "evaluate approaches", "ground truth", "golden fixture", "staged pipeline", "debug per stage". Routes to `ad-ground` if the *how* is routine and a single happy path is obvious. Read-and-write — creates `spikes/NNNN-<slug>/` with fixtures, debug per-stage artifacts, eval results.
4
+ summary: Staged spike with golden fixtures per WORKFLOW §14. Discovery + fixture + pipeline-with-gates + two-layer evaluation, when the *technique* is uncertain across multiple plausible approaches.
4
5
  allowed-tools: Read, Write, Glob, Grep, Bash, WebFetch, WebSearch
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-subagent
3
3
  description: Draft a new Claude Code subagent at .claude/agents/<name>.md, using the official subagents format. Use when the user wants to create, write, draft, or scaffold a custom Claude Code subagent for delegated work (fresh-context reviewer, codebase researcher, diff auditor, etc.). Asks one question per missing field; never invents roles or tool sets. Claude Code only — Codex has no subagent primitive.
4
+ summary: Draft a new Claude Code subagent at `.claude/agents/<name>.md`.
4
5
  allowed-tools: Read, Write, Glob, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-task
3
3
  description: Draft a new task tracking file at doc/tasks/NNNN-<short-slug>.md, using a checkbox-toggle + append-only-Notes format optimized for LLM editing. Use when the user wants to create, draft, scaffold, or open a task, ticket, work item, or backlog entry tracked in the repo. Status starts at proposed; the file is the source of truth, not a board.
4
+ summary: Draft a new task at `doc/tasks/NNNN-<slug>.md`.
4
5
  allowed-tools: Read, Write, Glob, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-tdg
3
3
  description: Outcome-based prompting per WORKFLOW.md §9. Give the agent the finish line first, not the path. Five steps — confirm regime, ground truth pair, Test Dependency Map, three approaches, pick by one criterion, implement and verify. Triggers on "outcome-based", "TDG", "ground truth", "expected output", "three approaches", "pick by criterion", "test dependency map", "TDM", "before modifying", "tests covering this file", "give the finish line". Routes to `ad-spike` if the technique itself is uncertain. No file written; output is the verified implementation that lands through normal commits.
4
+ summary: Outcome-based prompting per WORKFLOW §9. Ground truth pair + Test Dependency Map + three approaches + single-criterion selection, when the technique is known but the implementation strategy is uncertain.
4
5
  allowed-tools: Read, Glob, Grep, Bash
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-adr
3
3
  description: Draft a new ADR (Architecture Decision Record) at doc/adr/NNNN-<short-title>.md, using Michael Nygard's Context/Decision/Consequences/Alternatives pattern. Use when the user wants to record, write, draft, propose, or document an architecture decision. Status starts at proposed.
4
+ summary: Draft a new ADR at `doc/adr/NNNN-<slug>.md`.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-architecture
3
3
  description: Generate ARCHITECTURE.md at the repo root by scanning the code first, pre-filling layers/patterns/observability/deployment from observed signals, then asking only the genuine gaps. Use when the user wants to bootstrap, scaffold, generate, document, or audit ARCHITECTURE.md (system-level patterns and boundaries, paired with ADRs in doc/adr/).
4
+ summary: Generate or audit `ARCHITECTURE.md` at the repo root.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-audit
3
3
  description: Read-only drift audit — compare AGENTS.md, ARCHITECTURE.md, and ADR statuses against what the code actually does. Outputs a drift list, never writes files. Use when the user wants to audit, review for drift, sanity-check, or report inconsistencies between the repo's docs and its code.
4
+ summary: Read-only drift report comparing AGENTS.md / ARCHITECTURE.md / ADRs against the code.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-bootstrap
3
3
  description: Generate AGENTS.md at the repo root by scanning the codebase first, pre-filling placeholders from observed signals, and asking only the genuine gaps. Use whenever the user wants to bootstrap, scaffold, generate, create, set up, or audit AGENTS.md / CLAUDE.md / agents.md (the operational guide for agents working on this project).
4
+ summary: Generate or audit `AGENTS.md` at the repo root.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-commit
3
3
  description: Atomic Conventional Commits with DCO `Signed-off-by` sign-off per ADR-0023. Four phases — scope intake, stage-split when concerns mix, draft message in Conventional Commits format, sign + write. Stage-split is interactive; identity comes from `git config user.name` / `user.email`. No `Co-Authored-By`. Helper posture, not blocker. Triggers on "commit this", "stage and commit", "atomic commit", "Conventional Commit", "sign off", "DCO", "split this commit", "/ad-commit".
4
+ summary: Atomic Conventional Commits with DCO `Signed-off-by` sign-off per ADR-0023. Four phases — scope intake, stage-split when concerns mix, draft message in Conventional Commits format, sign + write. Helper posture, not blocker.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-deepen
3
3
  description: Surface deepening opportunities in the codebase using the Ousterhout/Feathers vocabulary from WORKFLOW §8 (Module / Interface / Depth / Seam / Adapter / Leverage / Locality). Three-phase process — explore organically, present numbered candidates with deletion-test framing, grilling loop on the chosen candidate. Pairs with `ad-audit` (audit detects drift; deepen proposes refactors). Triggers on "deepen", "refactor for depth", "shallow module", "deletion test", "two-adapters rule", "interface is the test surface", "leverage", "locality", "/ad-deepen". Profile-scoped to `team` and `mature` only — premature for `poc` and `solo` per ADR-0020 §4.
4
+ summary: Surface deepening opportunities using WORKFLOW §8 vocabulary (Module / Interface / Depth / Seam / Adapter / Leverage / Locality). Three phases — explore, present numbered candidates with deletion-test framing, grill the chosen one. Pairs with `ad-audit`. Profile-scoped to `team` and `mature` only.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-design
3
3
  description: Generate DESIGN.md at the repo root by scanning existing design tokens (Figma export, tailwind.config, tokens.json, stylesheet) and synthesizing W3C-compatible YAML frontmatter + Markdown rationale per the Google Labs design.md spec. Use when the user wants to bootstrap, scaffold, generate, document, or audit DESIGN.md (visual contract — colors, typography, spacing, motion). Frontend projects only.
4
+ summary: Bootstrap `DESIGN.md` from existing tokens (frontend projects).
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-diagnose
3
3
  description: Disciplined diagnosis loop for hard bugs and performance regressions per WORKFLOW §15. Five phases — build a feedback loop, reproduce, hypothesise (3-5 ranked falsifiable), instrument, fix + regression-test. The feedback loop is the skill; everything else is mechanical. Triggers on "diagnose this", "debug this", "this is broken", "this is throwing", "performance regression", "find the bug", "build a repro", "feedback loop", "ranked hypotheses", "falsifiable", "/ad-diagnose". Routes to `ad-spike` when the technique is uncertain across approaches, `ad-grill` when the spec is unclear, `ad-tdg` when the bug is a clean ground-truth-pair regression.
4
+ summary: Disciplined diagnosis loop for hard bugs and performance regressions per WORKFLOW §15. Five phases — build a feedback loop (the skill itself), reproduce, hypothesise (3-5 ranked falsifiable), instrument (one variable at a time), fix + regression-test.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-domain
3
3
  description: Lazily create or update `CONTEXT.md` (Layer 2 — ubiquitous language per Evans 2003) at the repo root, or `CONTEXT-MAP.md` plus per-context `CONTEXT.md` for multi-context repos. Captures canonical project-specific nouns, the aliases to avoid, the relationships between them, and resolved ambiguities. Triggers on "domain term", "ubiquitous language", "glossary", "what should we call", "naming drift", "canonical noun", "_Avoid_", "/ad-domain", or whenever a grilling/spec/architecture session resolves a vocabulary question. Lazy by design — file only exists when there is something to write.
4
+ summary: Lazy lifecycle owner of `CONTEXT.md` (Layer 2 — ubiquitous language per Evans 2003). Captures canonical project-specific nouns with aliases-to-avoid, relationships, and flagged ambiguities. Single-context or `CONTEXT-MAP.md` multi-context.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-grill
3
3
  description: Interview-before-research grilling session that challenges a fuzzy ask against the existing codebase, sharpens vocabulary against `CONTEXT.md`, and resolves the design tree branch by branch. One question at a time, codebase-first when an answer is in code, with each question carrying a recommended answer. Triggers on "grill me", "interview me", "stress test the plan", "challenge my assumptions", "before implementing", "ask me questions", "fuzzy ask", "sharpen the question", "what should I clarify", "/ad-grill". Routes to `ad-ground` once the question is research-ready, `ad-tdg` once the technique is settled, `ad-spike` for technique discovery, `ad-diagnose` for debugging.
4
+ summary: Interview-before-research grilling session — one question at a time with recommendation, codebase-first, sharpens vocabulary against `CONTEXT.md`, captures terms via `ad-domain` and decisions via `ad-adr` (three-criteria rule). Upstream of `ad-ground`.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-ground
3
3
  description: Four-source pre-implementation research — official docs, validated open-source examples, in-repo patterns, and git history — then synthesize a happy path and gate any deviation with an irrefutable justification before code is written. Auto-invokes on non-trivial work, refactors, library or pattern selection, "research before coding", "before implementing", "which library", "which pattern", "how to approach", "ground before coding". Workflow-operational counterpart to WORKFLOW.md §4 (Find the Happy Path) and §5 (Ground in Real Patterns).
4
+ summary: Four-source pre-implementation research (docs / OSS / in-repo / git history) + happy-path synthesis + deviation gate. WORKFLOW §4 + §5.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-hooks
3
3
  description: Scaffold deterministic quality gates per WORKFLOW.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration). Detects the project's stack and recommends a hook runner (Husky / lefthook / pre-commit / native), scaffolds the runner config, and updates AGENTS.md Quality Gates. Use when the user wants to wire hooks, configure pre-commit / pre-push, set up quality gates, prevent --no-verify bypass, or close the WORKFLOW §11 advisory-vs-deterministic gap. Opt-in skill; not auto-installed.
4
+ summary: Scaffold deterministic quality gates per WORKFLOW §11 — pre-commit + pre-push, runner detected from stack signals.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-merge
3
3
  description: Evaluate and merge a GitHub pull request per ADR-0025. Four phases — preflight (`gh` auth + PR resolution), evaluate (CI / fresh-context review / linked task / unresolved comments / mergeability), decision (CI green = hard gate; others = warnings yielding to user), merge via `gh pr merge` with auto-detected mode (squash / rebase / merge) and `--delete-branch`. Helper posture per ADR-0025 §3 — surfaces warnings, does not block on the senior engineer's judgment. Triggers on "merge this PR", "evaluate the PR", "is it mergeable", "gh pr merge", "/ad-merge".
4
+ summary: Evaluate and merge a GitHub pull request per ADR-0025. Four phases — preflight, evaluate (CI / fresh-context review / linked task / unresolved comments / mergeability), decision (CI green = hard gate; others = warnings), merge with auto-detected mode + `--delete-branch`.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-next
3
3
  description: Survey the project's state across the five-layer artifact stack and recommend prioritized next actions, modeled on `flutter doctor`. Use when the user asks "what's next", "next step", "where am I", "project status", "doctor", "what should I do", "audit my workflow". Read-only; complements `ad-audit` (drift detection, a different question). Profile-aware — `poc` suppresses Layer 3/4 noise, `team`/`mature` run the full survey.
4
+ summary: State survey + prioritized next-action recommendations across the five-layer artifact stack. Read-only navigation aid (`flutter doctor` pattern).
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-philosophy
3
3
  description: Universal agent behavior and documentation discipline — think before coding, ground in real patterns, prefer simplicity, make surgical changes, define verifiable goals, verify before claiming done, and write documentation that captures only definitions and decisions. Auto-invokes on non-trivial changes, refactors, debugging, "think before coding", "ground before coding", "verify done", "before implementing", on documentation work — "writing docs", "writing readme", "writing architecture", "writing adr", "writing task", "audit docs" — or whenever the task is ambiguous enough that guardrails matter.
4
+ summary: Universal agent guardrails (think before coding, verify before claiming done). Auto-loads on non-trivial work.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-pr
3
3
  description: Open a GitHub pull request with a uniform body shape per ADR-0024. Four phases — preflight (`gh` auth + branch pushed), scope assembly (commits + diff vs base), draft body (Summary / Test plan / Links), open + report URL. Title format = Conventional Commits, type inferred from the dominant commit type in the range. `gh` CLI soft-fail with install hint. Triggers on "open a PR", "create a pull request", "submit a PR", "gh pr create", "/ad-pr".
4
+ summary: Open a GitHub pull request with a uniform body shape (Summary / Test plan / Links) per ADR-0024. Four phases — preflight (`gh` auth + branch pushed), scope assembly, draft body, open + report URL. Title format = Conventional Commits.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-review
3
3
  description: Fresh-context code review per WORKFLOW §10 — assemble the diff plus the relevant spec slice (AGENTS.md, applicable ADRs, the task's Acceptance Criteria), perform a /clear handoff to a clean session, return a structured findings list. Use when the user wants to review a diff, branch, PR, or recent commits against the project's spec, audit for bugs / coupling / edge cases / spec drift, or run a §10 senior-reviewing-junior pass. Adversarial framing — never emits an "approve" verdict.
4
+ summary: Fresh-context code review per WORKFLOW §10 — assemble handoff, return structured findings.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-skill
3
3
  description: Draft a new Claude Code or Codex skill at .claude/skills/<name>/SKILL.md (or .agents/skills/<name>/SKILL.md for Codex), using the Anthropic Skills format. Use when the user wants to create, write, draft, or scaffold a custom skill for an agentic coding tool. Asks one question per missing field; never invents skill names or triggers.
4
+ summary: Draft a new Claude Code or Codex skill at the appropriate path.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-spec
3
3
  description: Draft a feature-level specification at doc/specs/NNNN-<slug>.md following the five-layer artifact stack (Constitution → Domain → Spec → Plan/Decisions → Code). Adapts GitHub Spec Kit's mandatory sections (User Scenarios, Requirements, Success Criteria) to the kit's documentation discipline. Use when the user wants to write, draft, scaffold, or open a feature spec, PRD, product requirements, feature brief, user stories, or success criteria. Status starts at draft.
4
+ summary: Draft a feature spec at `doc/specs/NNNN-<slug>.md` (Spec Kit-aligned mandatory sections). Layer 3 of the five-layer artifact stack.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-spike
3
3
  description: Scaffold a staged spike with golden fixtures per WORKFLOW.md §14, for cases where the spec is clear but the technique is uncertain across multiple plausible approaches. Four stages — discovery, golden fixture, pipeline with gates, two-layer evaluation. Use when the unknown is *how*, not *what*. Triggers on "spike", "uncertain technique", "which library", "CV pipeline", "evaluate approaches", "ground truth", "golden fixture", "staged pipeline", "debug per stage". Routes to `ad-ground` if the *how* is routine and a single happy path is obvious.
4
+ summary: Staged spike with golden fixtures per WORKFLOW §14. Discovery + fixture + pipeline-with-gates + two-layer evaluation, when the *technique* is uncertain across multiple plausible approaches.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-task
3
3
  description: Draft a new task tracking file at doc/tasks/NNNN-<short-slug>.md, using a checkbox-toggle + append-only-Notes format optimized for LLM editing. Use when the user wants to create, draft, scaffold, or open a task, ticket, work item, or backlog entry tracked in the repo. Status starts at proposed.
4
+ summary: Draft a new task at `doc/tasks/NNNN-<slug>.md`.
4
5
  ---
5
6
 
6
7
  <background_information>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ad-tdg
3
3
  description: Outcome-based prompting per WORKFLOW.md §9. Give the agent the finish line first, not the path. Five steps — confirm regime, ground truth pair, Test Dependency Map, three approaches, pick by one criterion, implement and verify. Triggers on "outcome-based", "TDG", "ground truth", "expected output", "three approaches", "pick by criterion", "test dependency map", "TDM", "before modifying", "tests covering this file", "give the finish line". Routes to `ad-spike` if the technique itself is uncertain. No file written; output is the verified implementation that lands through normal commits.
4
+ summary: Outcome-based prompting per WORKFLOW §9. Ground truth pair + Test Dependency Map + three approaches + single-criterion selection, when the technique is known but the implementation strategy is uncertain.
4
5
  ---
5
6
 
6
7
  <background_information>