ai-driven-skills 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,140 @@
1
+ # ai-driven-skills
2
+
3
+ AI-driven incremental development for [Claude Code](https://claude.com/claude-code). Six slash commands that turn a Claude Code session into a self-driving project loop: bootstrap a project skeleton, plan the next task, build it, verify it, archive it — and optionally repeat until the roadmap is exhausted.
4
+
5
+ Lighter than PRD/ADR/issue ceremony. Heavier than vibe-coding. Designed for one human + one agent on one repo.
6
+
7
+ ```
8
+ /init-arch → /plan-next → /verify → /report
9
+
10
+ /auto (loop /plan-next until done)
11
+
12
+ /sync-arch (reconcile docs ↔ code when drifted)
13
+ ```
14
+
15
+ ## Install
16
+
17
+ ### Globally (recommended)
18
+
19
+ ```bash
20
+ npx ai-driven-skills@latest install
21
+ ```
22
+
23
+ Installs to `~/.claude/skills/` so the commands are available in every project.
24
+
25
+ ### Per project
26
+
27
+ ```bash
28
+ npx ai-driven-skills@latest install --project
29
+ ```
30
+
31
+ Installs to `./.claude/skills/` in the current directory only.
32
+
33
+ ### Other commands
34
+
35
+ ```bash
36
+ npx ai-driven-skills@latest list # show what's installed where
37
+ npx ai-driven-skills@latest install -f # overwrite existing files
38
+ npx ai-driven-skills@latest uninstall # remove all 6 skills
39
+ npx ai-driven-skills@latest help
40
+ ```
41
+
42
+ After installing, restart Claude Code (or run `/help`) so the new slash commands are picked up.
43
+
44
+ ## What you get
45
+
46
+ | Command | Purpose |
47
+ |---|---|
48
+ | `/init-arch` | Bootstrap the project skeleton: `ARCHITECTURE.md`, `DONT.md`, `ROADMAP.md`, `STATE.md`, `verify.sh`, `tasks/`. Interactive grilling for new projects, reverse-engineering for existing ones. |
49
+ | `/plan-next` | Drive **one** task end-to-end: pick from ROADMAP → generate PRD + verify.sh → implement → verify → archive. |
50
+ | `/auto` | Loop `/plan-next` until ROADMAP is exhausted or a stop condition halts. Skips `🛑 needs-review` and `HITL` markers. |
51
+ | `/verify` | Run task verify + project verify on demand. Read-only, no fixes. |
52
+ | `/sync-arch` | Reconcile `ARCHITECTURE.md` / `DONT.md` / `ROADMAP.md` with the current code. Proposes diffs, applies on confirmation. |
53
+ | `/report` | Print a project status snapshot. Read-only. |
54
+
55
+ ## How it works
56
+
57
+ The skills share four state files at the project root:
58
+
59
+ - **`ARCHITECTURE.md`** — modules, tech stack, conventions
60
+ - **`DONT.md`** — hard constraints, things never to do
61
+ - **`ROADMAP.md`** — task list with statuses (`[ ]`, `[~]`, `[x]`, `🛑 needs-review`, `HITL`)
62
+ - **`STATE.md`** — current task, last verify, recent decisions
63
+
64
+ Plus:
65
+
66
+ - **`verify.sh`** — project-level regression check (tests, lint, build)
67
+ - **`tasks/NNN-<type>-<slug>/`** — per-task PRD, verify.sh, report.md, CHANGES.md
68
+
69
+ Tasks are stored in numbered directories (`001-feature-foo/`, `002-bug-bar/`, …). The "current task" is just a field in `STATE.md` — no symlinks, so this works on macOS, Linux, and Windows.
70
+
71
+ ## Typical workflow
72
+
73
+ ```bash
74
+ # 1. Bootstrap (once per project)
75
+ /init-arch
76
+
77
+ # 2. Drive one task at a time
78
+ /plan-next
79
+
80
+ # 3. Or let it run hands-off
81
+ /auto
82
+
83
+ # 4. Spot-check anytime
84
+ /verify
85
+ /report
86
+
87
+ # 5. Reconcile when docs drift from code
88
+ /sync-arch
89
+ ```
90
+
91
+ ## Stop conditions (the safety net)
92
+
93
+ `/plan-next` and `/auto` halt instead of papering over problems when:
94
+
95
+ - Required state files are missing
96
+ - Same test fails 3+ times
97
+ - A task would touch `DONT.md`-protected code
98
+ - A task is marked `🛑 needs-review` or `HITL`
99
+ - More than 10 files would be modified
100
+ - Project `verify.sh` fails after a task verify passes (regression detected)
101
+
102
+ You always get a clear halt message — never silent retry, never silent rewrite of constraints.
103
+
104
+ ## Cross-platform
105
+
106
+ - Pure Node.js CLI (no native deps)
107
+ - No symlinks (Windows-friendly)
108
+ - File copy install / removal — no shell tricks
109
+ - Works with Node 14+
110
+
111
+ ## For maintainers — publishing to npm
112
+
113
+ ```bash
114
+ # 1. Login (once per machine)
115
+ npm login
116
+
117
+ # 2. Verify package contents
118
+ npm pack --dry-run
119
+
120
+ # 3. Bump version
121
+ npm version patch # or minor / major
122
+
123
+ # 4. Publish
124
+ npm publish --access public
125
+
126
+ # 5. Verify
127
+ npx ai-driven-skills@latest help
128
+ ```
129
+
130
+ Pre-publish checklist:
131
+
132
+ - [ ] All 6 skills present in `skills/`
133
+ - [ ] `bin/cli.js` runs without error: `node bin/cli.js help`
134
+ - [ ] `npm pack --dry-run` shows only `bin/`, `skills/`, `README.md`, `package.json`
135
+ - [ ] `repository.url` in `package.json` points to the real repo
136
+ - [ ] Bumped `version` field
137
+
138
+ ## License
139
+
140
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,193 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * ai-driven-skills CLI
4
+ *
5
+ * Cross-platform installer for the 6 AI-driven development skills.
6
+ * Copies SKILL.md files into the user's Claude Code skills directory.
7
+ *
8
+ * Usage:
9
+ * npx ai-driven-skills install [--global|--project] [--force]
10
+ * npx ai-driven-skills uninstall [--global|--project]
11
+ * npx ai-driven-skills list
12
+ * npx ai-driven-skills help
13
+ */
14
+
15
+ 'use strict';
16
+
17
+ const fs = require('fs');
18
+ const path = require('path');
19
+ const os = require('os');
20
+
21
+ const SKILL_NAMES = ['init-arch', 'plan-next', 'auto', 'verify', 'sync-arch', 'report'];
22
+ const PACKAGE_ROOT = path.resolve(__dirname, '..');
23
+ const SKILLS_SRC = path.join(PACKAGE_ROOT, 'skills');
24
+
25
+ function parseArgs(argv) {
26
+ const args = { command: null, scope: 'global', force: false };
27
+ for (const a of argv.slice(2)) {
28
+ if (a === '--global') args.scope = 'global';
29
+ else if (a === '--project') args.scope = 'project';
30
+ else if (a === '--force' || a === '-f') args.force = true;
31
+ else if (!args.command) args.command = a;
32
+ }
33
+ return args;
34
+ }
35
+
36
+ function getTargetDir(scope) {
37
+ if (scope === 'project') {
38
+ return path.join(process.cwd(), '.claude', 'skills');
39
+ }
40
+ return path.join(os.homedir(), '.claude', 'skills');
41
+ }
42
+
43
+ function ensureDir(dir) {
44
+ fs.mkdirSync(dir, { recursive: true });
45
+ }
46
+
47
+ function copyFile(src, dest) {
48
+ fs.copyFileSync(src, dest);
49
+ }
50
+
51
+ function rmrf(target) {
52
+ if (!fs.existsSync(target)) return;
53
+ fs.rmSync(target, { recursive: true, force: true });
54
+ }
55
+
56
+ function cmdInstall(scope, force) {
57
+ const targetRoot = getTargetDir(scope);
58
+ ensureDir(targetRoot);
59
+
60
+ console.log(`Installing ai-driven-skills (${scope}) → ${targetRoot}`);
61
+
62
+ let installed = 0;
63
+ let skipped = 0;
64
+
65
+ for (const name of SKILL_NAMES) {
66
+ const srcSkill = path.join(SKILLS_SRC, name, 'SKILL.md');
67
+ const destDir = path.join(targetRoot, name);
68
+ const destSkill = path.join(destDir, 'SKILL.md');
69
+
70
+ if (!fs.existsSync(srcSkill)) {
71
+ console.warn(` ! source missing: ${name} (skipped)`);
72
+ continue;
73
+ }
74
+
75
+ if (fs.existsSync(destSkill) && !force) {
76
+ console.log(` - ${name}: already installed (use --force to overwrite)`);
77
+ skipped++;
78
+ continue;
79
+ }
80
+
81
+ ensureDir(destDir);
82
+ copyFile(srcSkill, destSkill);
83
+ console.log(` + ${name}`);
84
+ installed++;
85
+ }
86
+
87
+ console.log('');
88
+ console.log(`Done. ${installed} installed, ${skipped} skipped.`);
89
+ if (installed > 0) {
90
+ console.log('');
91
+ console.log('Restart Claude Code (or reload skills) to pick up the new commands:');
92
+ console.log(' /init-arch — bootstrap project skeleton');
93
+ console.log(' /plan-next — drive one task end-to-end');
94
+ console.log(' /auto — loop /plan-next until ROADMAP exhausted');
95
+ console.log(' /verify — run task + project verify');
96
+ console.log(' /sync-arch — reconcile docs with code');
97
+ console.log(' /report — print project status');
98
+ }
99
+ }
100
+
101
+ function cmdUninstall(scope) {
102
+ const targetRoot = getTargetDir(scope);
103
+ console.log(`Uninstalling ai-driven-skills (${scope}) ← ${targetRoot}`);
104
+
105
+ let removed = 0;
106
+ for (const name of SKILL_NAMES) {
107
+ const dir = path.join(targetRoot, name);
108
+ if (fs.existsSync(dir)) {
109
+ rmrf(dir);
110
+ console.log(` - ${name}`);
111
+ removed++;
112
+ }
113
+ }
114
+ console.log('');
115
+ console.log(`Done. ${removed} removed.`);
116
+ }
117
+
118
+ function cmdList() {
119
+ const globalDir = getTargetDir('global');
120
+ const projectDir = getTargetDir('project');
121
+
122
+ console.log('ai-driven-skills — installation status');
123
+ console.log('');
124
+ for (const [scope, dir] of [['global', globalDir], ['project', projectDir]]) {
125
+ console.log(`[${scope}] ${dir}`);
126
+ for (const name of SKILL_NAMES) {
127
+ const installed = fs.existsSync(path.join(dir, name, 'SKILL.md'));
128
+ console.log(` ${installed ? '✓' : ' '} ${name}`);
129
+ }
130
+ console.log('');
131
+ }
132
+ }
133
+
134
+ function cmdHelp() {
135
+ console.log(`ai-driven-skills — AI-driven incremental development for Claude Code
136
+
137
+ Usage:
138
+ npx ai-driven-skills <command> [options]
139
+
140
+ Commands:
141
+ install Install all 6 skills into Claude Code's skills directory
142
+ uninstall Remove the 6 skills
143
+ list Show which skills are currently installed
144
+ help Show this message
145
+
146
+ Options:
147
+ --global Target ~/.claude/skills/ (default)
148
+ --project Target ./.claude/skills/ in current directory
149
+ --force, -f Overwrite existing files on install
150
+
151
+ Examples:
152
+ npx ai-driven-skills install
153
+ npx ai-driven-skills install --project
154
+ npx ai-driven-skills install --force
155
+ npx ai-driven-skills uninstall --project
156
+ npx ai-driven-skills list
157
+
158
+ Skills installed:
159
+ init-arch · plan-next · auto · verify · sync-arch · report
160
+
161
+ Cross-platform: works on macOS, Linux, and Windows (no symlinks used).
162
+ `);
163
+ }
164
+
165
+ function main() {
166
+ const args = parseArgs(process.argv);
167
+ switch (args.command) {
168
+ case 'install':
169
+ return cmdInstall(args.scope, args.force);
170
+ case 'uninstall':
171
+ case 'remove':
172
+ return cmdUninstall(args.scope);
173
+ case 'list':
174
+ case 'ls':
175
+ return cmdList();
176
+ case 'help':
177
+ case '--help':
178
+ case '-h':
179
+ case null:
180
+ return cmdHelp();
181
+ default:
182
+ console.error(`Unknown command: ${args.command}`);
183
+ console.error(`Run "npx ai-driven-skills help" for usage.`);
184
+ process.exit(1);
185
+ }
186
+ }
187
+
188
+ try {
189
+ main();
190
+ } catch (err) {
191
+ console.error(`Error: ${err.message}`);
192
+ process.exit(1);
193
+ }
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "ai-driven-skills",
3
+ "version": "0.1.0",
4
+ "description": "AI-driven incremental development skills for Claude Code: init-arch, plan-next, auto, verify, sync-arch, report.",
5
+ "bin": {
6
+ "ai-driven-skills": "bin/cli.js"
7
+ },
8
+ "files": [
9
+ "bin",
10
+ "skills",
11
+ "README.md"
12
+ ],
13
+ "engines": {
14
+ "node": ">=14"
15
+ },
16
+ "keywords": [
17
+ "claude",
18
+ "claude-code",
19
+ "skills",
20
+ "ai",
21
+ "agent",
22
+ "automation"
23
+ ],
24
+ "license": "MIT"
25
+ }
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: auto
3
+ description: Continuous AI-driven development. Loops `/plan-next` until ROADMAP is exhausted or a stop condition fires. Use when the user wants the project to advance hands-off across multiple tasks. Honors HITL / 🛑 needs-review markers and halts on regressions.
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ Run `/plan-next` repeatedly until the ROADMAP is exhausted or a stop condition halts the loop.
9
+
10
+ The user's intent: they want the project to keep moving without re-prompting after each task. They've already initialized the skeleton (`/init-arch`) and seeded ROADMAP.md. Your job is to drive task after task, surface progress concisely, and stop the moment something needs human attention — never paper over a failure to keep the loop alive.
11
+
12
+ Run the loop steps below. Do not skip stop checks. The user can Ctrl+C at any time.
13
+
14
+ </what-to-do>
15
+
16
+ <supporting-info>
17
+
18
+ ## Step 0 — Preflight
19
+
20
+ Before entering the loop, confirm:
21
+
22
+ 1. `STATE.md`, `ROADMAP.md`, `DONT.md` all exist. If missing → halt, tell user to run `/init-arch`.
23
+ 2. `STATE.md` `current_task` is `null`. If a task is already in-progress → halt and ask whether to resume it (`/plan-next` will resume) or abandon and reset.
24
+ 3. ROADMAP "Up next" has at least one task that is not `🛑 needs-review` and not `HITL`. Otherwise → halt with reason.
25
+
26
+ Parse optional flags:
27
+ - `--max N` — stop after N tasks completed (default: unlimited until ROADMAP exhausted)
28
+ - `--include-hitl` — also process tasks marked `HITL` (default: skip them)
29
+ - `--dry-run` — print what would be done, don't execute
30
+
31
+ ## Step 1 — Loop
32
+
33
+ For each iteration:
34
+
35
+ 1. **Check stop conditions** (see table below). If any fire → halt with reason.
36
+ 2. **Pick next eligible task** from ROADMAP "Up next":
37
+ - Skip tasks marked `🛑 needs-review` (record them in a "skipped" list for the final summary)
38
+ - Skip tasks marked `HITL` unless `--include-hitl`
39
+ - If no eligible task remains → exit loop with "ROADMAP exhausted (or all remaining require human)"
40
+ 3. **Invoke `/plan-next`** to drive that task through plan → build → verify → archive.
41
+ 4. **Read the result**:
42
+ - Success → print one-line summary: `✅ NNN-<type>-<slug> done (Xs build, Ys verify)`
43
+ - Halt from `/plan-next` (any stop condition) → propagate halt, do not retry
44
+ 5. **Increment counter**. If `--max N` reached → exit loop.
45
+
46
+ Between iterations, do not pause or sleep — the user can interrupt.
47
+
48
+ ## Step 2 — Final summary
49
+
50
+ When the loop exits (for any reason), print:
51
+
52
+ ```
53
+ ai-driven-skills /auto session summary
54
+ ─────────────────────────────────────
55
+ Completed: N tasks
56
+ - 001-feature-foo ✅
57
+ - 002-bug-bar ✅
58
+ - 003-refactor-baz ✅
59
+
60
+ Skipped (needs-review / HITL): M tasks
61
+ - 004-feature-qux (🛑 needs-review)
62
+ - 005-feature-quux (HITL)
63
+
64
+ Stopped because: <reason>
65
+
66
+ Next:
67
+ <suggested action — e.g. "Resolve 🛑 markers, then re-run /auto"
68
+ or "ROADMAP exhausted — add new entries or run /sync-arch"
69
+ or "Verify failed on task NNN — see tasks/NNN-.../report.md">
70
+ ```
71
+
72
+ ## Stop conditions
73
+
74
+ The loop halts immediately, without starting a new task, if any of these fire:
75
+
76
+ | Condition | Reason |
77
+ |---|---|
78
+ | `/plan-next` halted with any stop condition | Propagate that halt — never retry blindly |
79
+ | Project `verify.sh` failed (regression) | Critical — surface the failure, do not continue |
80
+ | Same task type failed 2× in a row | Pattern suggests a systemic issue |
81
+ | 3+ consecutive tasks needed `🛑 needs-review` after planning | Architecture is drifting — call `/sync-arch` |
82
+ | ROADMAP "Up next" empty (all eligible tasks done) | Normal exhaustion |
83
+ | `--max N` count reached | User-requested cap |
84
+ | User-supplied `DONT.md` violation surfaced | Always halt — never auto-resolve constraint conflicts |
85
+ | Unexpected error from any tool call | Halt with the error verbatim — don't swallow it |
86
+
87
+ ## Behavioral rules
88
+
89
+ - **Never modify ROADMAP entries to dodge a halt.** If a task is `🛑 needs-review`, you skip it; you don't unmark it.
90
+ - **Never lower the bar to make verify pass.** Don't disable tests, comment out checks, or relax acceptance criteria.
91
+ - **Never edit `DONT.md` to make a planned change legal.** That's a halt — surface and ask.
92
+ - **Never start a new task while `current_task` is set.** That signals an in-progress task — resume it, don't bypass.
93
+ - Keep per-task output minimal — one line per task. Detailed reports already live in `tasks/NNN-.../report.md`.
94
+
95
+ ## When NOT to use this skill
96
+
97
+ - ROADMAP has only one task → just run `/plan-next` directly.
98
+ - User wants to review each task before the next starts → run `/plan-next --review` manually in a loop.
99
+ - Project skeleton not initialized → use `/init-arch` first.
100
+ - Architecture has drifted significantly → run `/sync-arch` before resuming auto-mode.
101
+
102
+ </supporting-info>
@@ -0,0 +1,230 @@
1
+ ---
2
+ name: init-arch
3
+ description: Initialize the AI-driven-skills project skeleton — ARCHITECTURE.md, DONT.md, ROADMAP.md, STATE.md, verify.sh, tasks/. For new projects, run an interactive grilling session to build ARCHITECTURE. For existing projects, reverse-engineer a draft from the codebase. Use this once per project before any other ai-driven-skills command.
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ Bootstrap the project so the rest of the ai-driven-skills toolkit (`/plan-next`, `/auto`, `/verify`, `/sync-arch`, `/report`) can operate.
9
+
10
+ The user's intent: they want to start using AI-driven incremental development on either a fresh project or an existing codebase. They need the four state files and the `tasks/` directory in place. For new projects, the architecture is in their head — extract it through an interview. For existing projects, the architecture is in the code — extract it by reading.
11
+
12
+ If any of the required files already exist, **do not overwrite them**. Halt and tell the user — they should either confirm overwrite explicitly or run `/sync-arch` to update specific files.
13
+
14
+ </what-to-do>
15
+
16
+ <supporting-info>
17
+
18
+ ## Step 0 — Detect project state
19
+
20
+ Check whether the project is empty/new or has existing code:
21
+
22
+ - **New project signals**: empty directory, only README.md, no source files
23
+ - **Existing project signals**: has source files (`.py` / `.ts` / `.go` / `.kt` etc.), has `package.json` / `pyproject.toml` / similar
24
+
25
+ Pick the appropriate path below.
26
+
27
+ Also check for existing skeleton files:
28
+ - `ARCHITECTURE.md`, `DONT.md`, `ROADMAP.md`, `STATE.md`, `verify.sh`, `tasks/`
29
+
30
+ If **any** exist, halt and report which ones are present. Ask the user whether to:
31
+ 1. Skip init (use what's already there)
32
+ 2. Reinitialize specific files (they pick which)
33
+ 3. Cancel
34
+
35
+ ## Path A — New project (interactive grilling)
36
+
37
+ The architecture isn't written down anywhere. Extract it by interviewing the user.
38
+
39
+ Ask questions **one at a time**, waiting for the answer before continuing. For each question, recommend an answer based on what you already know.
40
+
41
+ **Topics to cover, in order:**
42
+
43
+ 1. **One-line project purpose** — "What does this project do, in one sentence?"
44
+ 2. **Core domain concepts** — Probe for the 3-7 nouns/verbs that define the project. Watch for ambiguous terms that need disambiguation.
45
+ 3. **Module / component breakdown** — How does the user think about the major pieces? (modules, services, layers, contexts)
46
+ 4. **Hard constraints** — What's off-limits? Technologies that can't be used, decisions already made elsewhere, regulatory requirements. These become DONT.md.
47
+ 5. **Initial roadmap** — What are the first 3-10 things to build? In what order?
48
+
49
+ After each answer, write to the appropriate file immediately (don't batch). Show the user what you wrote.
50
+
51
+ ## Path B — Existing project (reverse-engineering)
52
+
53
+ The architecture is in the code. Extract a draft, then have the user correct it.
54
+
55
+ **Steps:**
56
+
57
+ 1. **Survey the codebase** — Use the Explore agent or direct grep/find to map:
58
+ - Top-level directories and their apparent purpose
59
+ - Build / config files (`package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, etc.)
60
+ - Existing docs (`README.md`, `docs/`, `ARCHITECTURE.md` if any)
61
+ - Test directories
62
+ - Entry points (`main.py`, `index.ts`, etc.)
63
+
64
+ 2. **Draft ARCHITECTURE.md** — Based on the survey:
65
+ - One-line purpose (extract from README or infer from code)
66
+ - Module/component map (from directory structure)
67
+ - Tech stack (from build files)
68
+ - Conventions you can detect (test naming, file structure patterns)
69
+
70
+ 3. **Draft DONT.md** — Initially empty or with placeholder. Tell the user "I cannot detect implicit constraints from code alone. Please add hard rules here as we discover them."
71
+
72
+ 4. **Draft ROADMAP.md** — Initially with one entry: "Review and confirm initial architecture draft (`/sync-arch`)". The user adds real tasks afterward.
73
+
74
+ 5. **Present the drafts** to the user. Highlight specifically:
75
+ - "Here's what I inferred. Anything wrong?"
76
+ - "Here are areas where I had to guess. Please confirm or correct."
77
+
78
+ 6. **Iterate** based on user feedback. Update the files in place.
79
+
80
+ ## Files to create (both paths)
81
+
82
+ ### `ARCHITECTURE.md` template
83
+
84
+ ```markdown
85
+ # Architecture
86
+
87
+ ## Purpose
88
+
89
+ One paragraph describing what this project does and why.
90
+
91
+ ## Modules
92
+
93
+ | Module | Purpose | Notes |
94
+ |---|---|---|
95
+ | <name> | <one line> | <key constraint or context> |
96
+
97
+ ## Tech stack
98
+
99
+ - Language(s): <list>
100
+ - Key frameworks/libraries: <list>
101
+ - Storage: <list>
102
+ - External services: <list>
103
+
104
+ ## Conventions
105
+
106
+ - <convention 1>
107
+ - <convention 2>
108
+
109
+ ## Sub-architecture docs
110
+
111
+ For complex modules, link to deeper docs here:
112
+ - `<module>/ARCHITECTURE.md` — <brief>
113
+ ```
114
+
115
+ ### `DONT.md` template
116
+
117
+ ```markdown
118
+ # DON'T
119
+
120
+ Hard constraints. Things never to do. Grep-friendly.
121
+
122
+ Add entries as bullet points. Keep each entry one line. The reason in parentheses if non-obvious.
123
+
124
+ ## Examples (delete these once you have real entries)
125
+
126
+ - DON'T modify files in `legacy/` — frozen on YYYY-MM-DD
127
+ - DON'T add JSON schemas to `contracts/` unless they cross process boundaries
128
+ - DON'T introduce new external dependencies without explicit approval
129
+ ```
130
+
131
+ ### `ROADMAP.md` template
132
+
133
+ ```markdown
134
+ # Roadmap
135
+
136
+ Status legend: `[ ]` not started · `[~]` in progress · `[x]` done · `🛑 needs-review` halt auto-mode here · `HITL` requires human
137
+
138
+ ## In progress
139
+
140
+ (nothing yet)
141
+
142
+ ## Up next
143
+
144
+ - [ ] 001-<type>-<slug> — <one-line description>
145
+ - [ ] 002-<type>-<slug> — <one-line description>
146
+
147
+ ## Backlog
148
+
149
+ - [ ] <type>-<slug> — <description>
150
+
151
+ ## Done
152
+
153
+ (nothing yet)
154
+ ```
155
+
156
+ ### `STATE.md` template
157
+
158
+ ```markdown
159
+ # State
160
+
161
+ current_task: null
162
+ last_completed: null
163
+ last_verify: null
164
+ next_planned: 001-<type>-<slug>
165
+ blocked: none
166
+
167
+ ## Recent decisions (last 5)
168
+
169
+ (none yet)
170
+ ```
171
+
172
+ ### `verify.sh` template
173
+
174
+ ```bash
175
+ #!/usr/bin/env bash
176
+ set -euo pipefail
177
+
178
+ # Project-level verification — runs after every task to defend against regressions.
179
+ # Add commands that should always pass: tests, lint, type-check, build.
180
+
181
+ echo "Running project verification..."
182
+
183
+ # Example:
184
+ # pytest
185
+ # npm test
186
+ # cargo test
187
+
188
+ echo "✅ Project verification passed"
189
+ ```
190
+
191
+ Make `verify.sh` executable: `chmod +x verify.sh` (skip on Windows; mention in output).
192
+
193
+ ### `tasks/` directory
194
+
195
+ Create empty `tasks/` directory. Optionally create `tasks/.gitkeep` so git tracks it.
196
+
197
+ ## Final summary
198
+
199
+ After all files are written, print:
200
+
201
+ ```
202
+ ✅ ai-driven-skills project initialized.
203
+
204
+ Files created:
205
+ ARCHITECTURE.md (X lines)
206
+ DONT.md
207
+ ROADMAP.md (N tasks queued)
208
+ STATE.md
209
+ verify.sh
210
+ tasks/
211
+
212
+ Next steps:
213
+ 1. Review ARCHITECTURE.md and ROADMAP.md
214
+ 2. Add real entries to DONT.md as constraints become clear
215
+ 3. Run `/plan-next` to start the first task
216
+ 4. Or `/auto` to run continuously
217
+ ```
218
+
219
+ ## Stop conditions
220
+
221
+ - User refuses to answer a grilling question → record what's known, leave gaps marked `<TBD>`, proceed
222
+ - Existing skeleton files conflict → halt, ask before overwriting
223
+ - Codebase too large to survey reasonably (>10k files) → halt, ask user to point at specific top-level dirs to focus on
224
+
225
+ ## When NOT to use this skill
226
+
227
+ - Project is already initialized → use `/sync-arch` to update specific files
228
+ - User just wants to add one task → edit ROADMAP.md directly, then `/plan-next`
229
+
230
+ </supporting-info>
@@ -0,0 +1,204 @@
1
+ ---
2
+ name: plan-next
3
+ description: AI-driven incremental development. Reads STATE.md / ROADMAP.md / DONT.md, picks the next task, generates its PRD + verify.sh, implements it, verifies, and archives — all in one shot. Use when the user wants to advance the project by one task without manual planning ceremony.
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ Drive one full task lifecycle: **plan → build → verify → archive**.
9
+
10
+ The user's intent: they want forward motion without the overhead of writing PRDs, ADRs, and issues by hand. They have already set up the project skeleton (via `/init-arch`). You read the project state, decide what to do next, do it, verify it works, and archive the result. If anything is unclear or risky, stop and ask — don't guess.
11
+
12
+ Run the steps below in order. Do not skip steps. If a step fails or surfaces a stop condition, halt immediately and report.
13
+
14
+ </what-to-do>
15
+
16
+ <supporting-info>
17
+
18
+ ## Step 0 — Mandatory context load
19
+
20
+ Read these three files **first**, before doing anything else:
21
+
22
+ 1. `STATE.md` — current task, last completed, recent decisions
23
+ 2. `ROADMAP.md` — full task list with status, `🛑 needs-review` markers
24
+ 3. `DONT.md` — hard constraints, things never to do
25
+
26
+ If any of these files is missing, halt and tell the user to run `/init-arch` first.
27
+
28
+ If `STATE.md` shows `current_task` is set (i.e. an in-progress task exists), **do not plan a new task** — resume that one (jump to Step 2).
29
+
30
+ ## Step 1 — Plan
31
+
32
+ Pick the next task by this priority:
33
+
34
+ 1. First task in ROADMAP's "Up next" section that is **not** marked `🛑 needs-review`
35
+ 2. If all "Up next" tasks are `needs-review`, halt and tell the user
36
+ 3. If "Up next" is empty, halt and tell the user "ROADMAP exhausted"
37
+
38
+ **Skip task types that auto-mode shouldn't do:**
39
+ - Tasks marked `HITL` (human-in-the-loop) — halt and ask
40
+ - Tasks of type `spike` if their PRD is empty — halt and ask the user to provide direction first
41
+
42
+ For the picked task:
43
+
44
+ 1. Determine the task ID (next sequential number, see `tasks/` for highest existing)
45
+ 2. Determine the task type (`feature` / `bug` / `refactor` / `chore` / `spike`) from the ROADMAP entry
46
+ 3. Create `tasks/NNN-<type>-<slug>/` directory
47
+ 4. Generate `PRD.md` using the template below — fill in based on ROADMAP entry, ARCHITECTURE.md context, and DONT.md constraints
48
+ 5. Generate `verify.sh` — a runnable shell script that exits 0 on success, non-zero on failure
49
+ 6. Update `STATE.md` `current_task` field to `NNN-<type>-<slug>`
50
+
51
+ **PRD.md template:**
52
+
53
+ ```markdown
54
+ # Task NNN — <title>
55
+
56
+ **Type**: feature | bug | refactor | chore | spike
57
+ **Created**: YYYY-MM-DD
58
+ **Status**: in_progress
59
+
60
+ ## What
61
+
62
+ One paragraph: end-to-end behavior, not layer-by-layer implementation.
63
+
64
+ ## Why
65
+
66
+ One paragraph: motivation, link to ROADMAP entry or upstream issue.
67
+
68
+ ## Acceptance criteria
69
+
70
+ - [ ] Criterion 1 (must be verifiable by verify.sh)
71
+ - [ ] Criterion 2
72
+ - [ ] Criterion 3
73
+
74
+ ## Constraints
75
+
76
+ Reference relevant lines from DONT.md and ARCHITECTURE.md. Be specific.
77
+
78
+ ## Implementation notes
79
+
80
+ Brief sketch of approach. Avoid file paths that may go stale; reference modules/components by domain name.
81
+ ```
82
+
83
+ **verify.sh template:**
84
+
85
+ ```bash
86
+ #!/usr/bin/env bash
87
+ set -euo pipefail
88
+
89
+ # Task NNN verification
90
+ # Each acceptance criterion above should map to a check below.
91
+
92
+ echo "Running task NNN verification..."
93
+
94
+ # Example: run tests for the new module
95
+ # pytest tests/test_<module>.py -v
96
+
97
+ # Example: lint
98
+ # npm run lint
99
+
100
+ # Example: smoke test the feature
101
+ # ./run-feature.sh && grep "expected" output.log
102
+
103
+ echo "✅ All checks passed"
104
+ ```
105
+
106
+ After generating PRD + verify.sh: **print a one-line summary and proceed to Step 2 without asking for confirmation** (unless `--review` flag was passed).
107
+
108
+ If `--review` flag was passed: print the PRD content and ask "Proceed with implementation? (yes/no)" before continuing.
109
+
110
+ ## Step 2 — Build
111
+
112
+ Implement the task per the PRD at `tasks/<current_task>/PRD.md` (the path comes from STATE.md `current_task`).
113
+
114
+ **Hard rules:**
115
+
116
+ - Re-read `DONT.md` before touching any file. If a planned change violates DONT.md, halt and report.
117
+ - Stay within the modules implied by the PRD. If the task requires changes outside the implied scope, halt and ask.
118
+ - Keep edits minimal — match acceptance criteria, no gold-plating.
119
+ - Use TaskCreate / TaskUpdate (the in-session task tracker) to track sub-steps within this task.
120
+
121
+ **Stop conditions** (halt immediately and report):
122
+
123
+ - Same test fails 3+ times after fix attempts
124
+ - A required file/dependency is missing and you'd have to invent its design
125
+ - DONT.md violation discovered mid-implementation
126
+ - Number of files modified exceeds 10 (sanity check against runaway changes)
127
+
128
+ ## Step 3 — Verify
129
+
130
+ Run the task verify script: `bash tasks/<current_task>/verify.sh`.
131
+
132
+ Then run the project-level `./verify.sh` (regression defense). If it doesn't exist, skip this and note in the report.
133
+
134
+ **If task verify fails**: do not retry blindly. Read the failure, fix the cause, re-run. Three failures in a row → halt and report.
135
+
136
+ **If project verify fails**: halt immediately. Do not archive. This is a regression — surface it with full diagnostic detail.
137
+
138
+ ## Step 4 — Archive
139
+
140
+ Only reached if both verifies pass.
141
+
142
+ 1. Generate `tasks/<current_task>/report.md` using the template below
143
+ 2. Generate `tasks/<current_task>/CHANGES.md` listing files added/modified/deleted with brief reason
144
+ 3. Update `tasks/<current_task>/PRD.md` — change `Status: in_progress` to `Status: done`
145
+ 4. Update `STATE.md`:
146
+ - `current_task` → `null`
147
+ - `last_completed` → this task ID with date
148
+ - `last_verify` → ✅ pass with timestamp
149
+ - Append a one-line entry to "Recent decisions" if a non-obvious choice was made
150
+ 5. Update `ROADMAP.md`:
151
+ - Move this task from "In progress" to "Done" (or mark `[x]`)
152
+
153
+ **report.md template:**
154
+
155
+ ```markdown
156
+ # Task NNN Verify Report
157
+
158
+ **Task**: <type>-<slug>
159
+ **Verified**: YYYY-MM-DD HH:MM
160
+ **Status**: ✅ PASS
161
+ **Duration**: <seconds>s (build) + <seconds>s (verify)
162
+
163
+ ## Acceptance criteria
164
+
165
+ - [x] Criterion 1
166
+ - [x] Criterion 2
167
+
168
+ ## Tests run
169
+
170
+ - <test file or command> — <result>
171
+ - Project verify.sh — passed (regression OK) | skipped (not present)
172
+
173
+ ## Files changed
174
+
175
+ See CHANGES.md.
176
+
177
+ ## Notes
178
+
179
+ Anything non-obvious worth flagging for future readers. Skip if nothing notable.
180
+ ```
181
+
182
+ After archive: print one-line success summary and exit. Do **not** start the next task — that's `/auto`'s job.
183
+
184
+ ## Stop conditions summary
185
+
186
+ Halt immediately, do not proceed silently, in any of these cases:
187
+
188
+ | Condition | Action |
189
+ |---|---|
190
+ | Required state files missing | Tell user to run `/init-arch` |
191
+ | ROADMAP exhausted | Report "all tasks done" |
192
+ | Next task is `🛑 needs-review` or `HITL` | Report and ask |
193
+ | DONT.md violation | Report and ask how to proceed |
194
+ | Same test fails 3+ times | Report failure with diagnostics |
195
+ | Files modified > 10 | Report and ask |
196
+ | Project verify.sh fails after task verify passes | Report regression, do not archive |
197
+
198
+ ## When NOT to use this skill
199
+
200
+ - Project skeleton not initialized → use `/init-arch` first
201
+ - User wants to plan only without building → tell them this skill is one-shot; suggest manually editing ROADMAP if they want to think first
202
+ - User wants continuous multi-task execution → use `/auto` instead
203
+
204
+ </supporting-info>
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: report
3
+ description: Generate a project status report from STATE.md, ROADMAP.md, and the tasks/ archive. Use when the user wants a snapshot of progress — what's done, what's in flight, what's blocked, recent verify results — without re-reading every state file. Read-only.
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ Produce a concise, accurate status report for the project.
9
+
10
+ The user's intent: they want to understand current state at a glance. Maybe they're returning after time away, preparing a standup update, or sharing progress with a collaborator. They don't want to grep through every file themselves.
11
+
12
+ This skill is **read-only**. It never modifies state, code, or docs.
13
+
14
+ </what-to-do>
15
+
16
+ <supporting-info>
17
+
18
+ ## Step 0 — Load inputs
19
+
20
+ Read:
21
+ 1. `STATE.md`
22
+ 2. `ROADMAP.md`
23
+ 3. `ARCHITECTURE.md` (purpose line only — for the report header)
24
+ 4. List `tasks/` directory; for each subdir, read `report.md` if present (success records) or `PRD.md` (in-progress / failed)
25
+
26
+ If state files missing → halt, tell user to run `/init-arch`.
27
+
28
+ Parse optional flags:
29
+ - `--last N` — show only the last N completed tasks (default: 5)
30
+ - `--verbose` — include full acceptance criteria for each completed task
31
+ - `--format markdown|plain` — output style (default: markdown)
32
+
33
+ ## Step 1 — Compute report sections
34
+
35
+ ### Header
36
+ - Project purpose (first paragraph of ARCHITECTURE.md)
37
+ - Report timestamp
38
+
39
+ ### Current focus
40
+ - `current_task` from STATE.md — if set, include task title + acceptance criteria status
41
+ - If `null`, say "no task in flight"
42
+
43
+ ### Recently completed (last N)
44
+ - Pull from `tasks/*/report.md` sorted by verify timestamp descending
45
+ - For each: ID, title, verify status, duration
46
+
47
+ ### Up next
48
+ - First 5 entries from ROADMAP "Up next" section
49
+ - Mark `🛑 needs-review` and `HITL` flags clearly
50
+
51
+ ### Blocked / needs human
52
+ - Any ROADMAP entries with `🛑 needs-review` or `HITL`
53
+ - `STATE.md` `blocked` field if not "none"
54
+
55
+ ### Recent decisions
56
+ - Last 5 entries from STATE.md "Recent decisions"
57
+
58
+ ### Verify health
59
+ - `STATE.md` `last_verify` field
60
+ - Count of consecutive passing tasks (scan tasks/ in reverse, stop at first ❌)
61
+
62
+ ## Step 2 — Render
63
+
64
+ Default markdown format:
65
+
66
+ ```markdown
67
+ # Project Status — <project name>
68
+
69
+ > <one-line purpose>
70
+ >
71
+ > Generated: <YYYY-MM-DD HH:MM>
72
+
73
+ ## Current focus
74
+
75
+ **Task**: NNN-<type>-<slug>
76
+ **Started**: <date>
77
+ **Acceptance criteria**:
78
+ - [x] Criterion 1
79
+ - [ ] Criterion 2
80
+ - [ ] Criterion 3
81
+
82
+ (or "No task in flight — run `/plan-next` to start the next one.")
83
+
84
+ ## Recently completed (last 5)
85
+
86
+ | ID | Title | Verified | Duration |
87
+ |---|---|---|---|
88
+ | 008-feature-foo | Add login flow | 2026-05-08 14:22 ✅ | 4m 12s |
89
+ | 007-bug-bar | Fix timezone bug | 2026-05-08 11:05 ✅ | 1m 40s |
90
+
91
+ ## Up next
92
+
93
+ - [ ] 009-feature-baz — Add password reset
94
+ - [ ] 010-refactor-qux — Extract auth middleware (🛑 needs-review)
95
+ - [ ] 011-feature-quux — Add 2FA (HITL)
96
+
97
+ ## Blocked / needs attention
98
+
99
+ - 010-refactor-qux: needs-review marker — see ROADMAP for context
100
+ - 011-feature-quux: HITL — requires human implementation
101
+
102
+ ## Recent decisions (last 5)
103
+
104
+ - 2026-05-08: Switched session storage from JWT to server-side cookies
105
+ - 2026-05-07: Adopted pytest-asyncio for async test cases
106
+ - ...
107
+
108
+ ## Verify health
109
+
110
+ - Last verify: ✅ pass (2026-05-08 14:22)
111
+ - 8 consecutive passing tasks
112
+ ```
113
+
114
+ Plain format: same content, no tables, no headers — flat text.
115
+
116
+ ## Behavioral rules
117
+
118
+ - **Never modify any file.** This is observational only.
119
+ - **Never invent data.** If a section has no content (e.g. no completed tasks yet), say so explicitly — don't fabricate.
120
+ - Date formatting: ISO 8601 (YYYY-MM-DD HH:MM) for accuracy; relative time ("3 days ago") only as supplement, never replacement.
121
+ - Don't editorialize. Report what's there, don't recommend next steps unless explicitly asked.
122
+
123
+ ## When NOT to use this skill
124
+
125
+ - You want to fix something the report would surface → use `/plan-next` or `/sync-arch`.
126
+ - You only need to know the next task → just read `STATE.md` `next_planned`.
127
+ - Project not initialized → use `/init-arch`.
128
+
129
+ </supporting-info>
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: sync-arch
3
+ description: Reconcile ARCHITECTURE.md / DONT.md / ROADMAP.md with the current code reality. Use when the codebase has drifted from the docs (after manual edits, after a long auto-mode run, or when `/plan-next` keeps producing `🛑 needs-review` markers). Surveys the code, proposes diffs, applies them only with user confirmation.
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ Detect drift between the project state files and the actual codebase, then update the docs to match reality (or flag genuine architecture changes for human decision).
9
+
10
+ The user's intent: their docs and code have fallen out of sync. They don't want to rewrite from scratch (`/init-arch` would do that and lose history); they want a targeted reconciliation that preserves intentional decisions while correcting stale facts.
11
+
12
+ This skill **proposes** changes — it does not silently rewrite the architecture. The user approves each diff before it's applied.
13
+
14
+ </what-to-do>
15
+
16
+ <supporting-info>
17
+
18
+ ## Step 0 — Load current state
19
+
20
+ Read in this order:
21
+ 1. `ARCHITECTURE.md`
22
+ 2. `DONT.md`
23
+ 3. `ROADMAP.md`
24
+ 4. `STATE.md`
25
+ 5. Most recent 3 entries under `tasks/` (to see what's recently been built)
26
+
27
+ If any of the four state files is missing → halt, tell user to run `/init-arch`.
28
+
29
+ Parse optional flags:
30
+ - `--file <ARCHITECTURE|DONT|ROADMAP>` — only reconcile one file
31
+ - `--apply` — apply all proposed diffs without per-file confirmation (use with care)
32
+
33
+ ## Step 1 — Survey the codebase
34
+
35
+ Use the Explore agent or direct grep/find to gather current truth:
36
+
37
+ - Top-level directories and their apparent purpose
38
+ - Build / config files (`package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, etc.)
39
+ - New modules added since `ARCHITECTURE.md` last mentioned them
40
+ - Removed or renamed modules still referenced in docs
41
+ - Tech stack additions (new deps in lockfiles)
42
+ - New conventions (test patterns, file structure)
43
+
44
+ Don't try to summarize the whole codebase — focus on **what changed since the docs were written**. Use `git log --since=<last_arch_update>` if available to scope the search.
45
+
46
+ ## Step 2 — Compute drift per file
47
+
48
+ ### `ARCHITECTURE.md` drift
49
+
50
+ - Modules in docs but not in code → propose removal or mark as deprecated
51
+ - Modules in code but not in docs → propose addition with one-line purpose
52
+ - Tech stack mismatches → propose update
53
+ - Conventions that no longer hold → propose removal
54
+
55
+ ### `DONT.md` drift
56
+
57
+ DON'T entries are intentional — never auto-remove. Instead:
58
+ - For each entry, check if the constraint is still grep-able / verifiable
59
+ - If the constraint references a path that no longer exists → flag for user review (don't delete; the rule may have been violated)
60
+ - If a new constraint pattern is detectable in code (e.g. a new `legacy/` dir was added) → propose adding it for user confirmation
61
+
62
+ ### `ROADMAP.md` drift
63
+
64
+ - Tasks marked `[ ]` whose acceptance criteria appear satisfied in code → propose marking `[x]`
65
+ - Tasks in "Done" that have no corresponding `tasks/` entry → flag (likely manually added)
66
+ - "In progress" tasks where `STATE.md` `current_task` is `null` → propose moving back to "Up next" or to "Done"
67
+
68
+ ## Step 3 — Present the diff
69
+
70
+ For each file with proposed changes, show a unified-diff-style preview:
71
+
72
+ ```
73
+ ─── ARCHITECTURE.md ───
74
+ @@ Modules table @@
75
+ + | logger | Structured JSON logging | Added 2026-04 |
76
+ - | legacy_auth | Old auth shim | Removed |
77
+
78
+ @@ Tech stack @@
79
+ - - Storage: SQLite
80
+ + - Storage: SQLite + Redis (caching layer added in tasks/012)
81
+ ```
82
+
83
+ Then ask: `Apply these changes to ARCHITECTURE.md? (yes / edit / skip)`
84
+
85
+ - **yes** → write the changes
86
+ - **edit** → let the user provide a counter-proposal, then write
87
+ - **skip** → leave the file untouched, move to the next
88
+
89
+ ## Step 4 — Update STATE.md
90
+
91
+ After all approved diffs are applied:
92
+
93
+ - Append a one-line entry to `STATE.md` "Recent decisions": `<date>: /sync-arch reconciliation — updated <files>`
94
+ - Do not change `current_task`, `last_completed`, or `last_verify` — those are owned by `/plan-next`.
95
+
96
+ ## Step 5 — Final summary
97
+
98
+ ```
99
+ ai-driven-skills /sync-arch summary
100
+ ─────────────────────────────────────
101
+ ARCHITECTURE.md: 3 changes applied | 1 skipped
102
+ DONT.md: 0 changes applied | 2 flagged for review
103
+ ROADMAP.md: 5 changes applied
104
+
105
+ Items flagged for your review:
106
+ - DONT.md line 7 references `legacy/` which no longer exists — was this rule satisfied or violated?
107
+ - ROADMAP "Done" entry "004-feature-foo" has no tasks/ directory — was this manually added?
108
+
109
+ Next:
110
+ <suggested action>
111
+ ```
112
+
113
+ ## Behavioral rules
114
+
115
+ - **Never silently delete from `DONT.md`.** Constraints are intentional; flag, don't remove.
116
+ - **Never invent purpose for unfamiliar modules.** If a module's intent isn't clear from code or comments, mark it `<unknown — please describe>` for the user to fill in.
117
+ - **Never modify `tasks/NNN-.../` archives.** Those are historical records.
118
+ - Preserve user formatting and ordering where possible — only diff what's actually changed in meaning.
119
+
120
+ ## When NOT to use this skill
121
+
122
+ - Project just initialized → docs are the source of truth, no drift yet.
123
+ - You want to start fresh → use `/init-arch` (it will refuse to overwrite, so back up first).
124
+ - A single `🛑 needs-review` marker → resolve it inline in ROADMAP, no need for full sync.
125
+
126
+ </supporting-info>
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: verify
3
+ description: Run verification on demand. Executes the current task's verify.sh, then the project-level verify.sh, and reports pass/fail with diagnostics. Use when the user wants to spot-check the codebase outside the normal `/plan-next` lifecycle — after manual edits, before a commit, or to investigate a regression.
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ Run the project's verification scripts and report the outcome clearly.
9
+
10
+ The user's intent: they want to know whether the code is currently in a green state. They might have edited files manually, returned to the project after time away, or be about to commit. Don't try to fix anything — just run, observe, and report. If the user wants a fix, that's a separate `/plan-next` invocation.
11
+
12
+ </what-to-do>
13
+
14
+ <supporting-info>
15
+
16
+ ## Step 0 — Locate verify scripts
17
+
18
+ 1. Read `STATE.md` to determine `current_task`.
19
+ 2. If `current_task` is set, the task verify path is `tasks/<current_task>/verify.sh`.
20
+ 3. Project verify path is `./verify.sh` at repo root.
21
+
22
+ If neither exists → halt and tell the user to run `/init-arch`.
23
+
24
+ Parse optional flags:
25
+ - `--task-only` — skip project verify
26
+ - `--project-only` — skip task verify
27
+ - `--task <id>` — verify a specific task instead of `current_task`
28
+
29
+ ## Step 1 — Run task verify (if applicable)
30
+
31
+ If a task verify exists and `--project-only` was not passed:
32
+
33
+ 1. Run `bash tasks/<task>/verify.sh`.
34
+ 2. Capture exit code, stdout, stderr.
35
+ 3. Print one-line result: `✅ task <id> verify passed` or `❌ task <id> verify FAILED (exit N)`.
36
+
37
+ Do **not** retry. Do **not** attempt a fix. This skill reports — it does not repair.
38
+
39
+ ## Step 2 — Run project verify (if applicable)
40
+
41
+ If `./verify.sh` exists and `--task-only` was not passed:
42
+
43
+ 1. Run `bash ./verify.sh`.
44
+ 2. Capture exit code, stdout, stderr.
45
+ 3. Print one-line result.
46
+
47
+ If `./verify.sh` is missing → note "no project verify configured" (not a failure).
48
+
49
+ ## Step 3 — Report
50
+
51
+ Print a structured report:
52
+
53
+ ```
54
+ ai-driven-skills /verify report
55
+ ─────────────────────────────────────
56
+ Task verify (NNN-<type>-<slug>): ✅ PASS | ❌ FAIL | ⏭ skipped
57
+ Project verify: ✅ PASS | ❌ FAIL | ⏭ skipped
58
+
59
+ Duration: Xs total
60
+
61
+ <If any failure, include the last 30 lines of output here, verbatim>
62
+
63
+ Next:
64
+ <if all pass> Verification clean. Safe to commit / continue.
65
+ <if task fails> See tasks/<id>/PRD.md for acceptance criteria. Run /plan-next to resume work on this task.
66
+ <if project fails> Regression detected. Investigate before continuing — likely caused by recent edits.
67
+ ```
68
+
69
+ ## Behavioral rules
70
+
71
+ - **Never modify code or scripts to make a check pass.**
72
+ - **Never re-run a failing check more than once** (a single retry is OK to rule out flakiness — call it out if you do).
73
+ - If the verify script itself errors (syntax error, missing interpreter), report that as a script bug, not a verify failure.
74
+ - Don't update `STATE.md` `last_verify` here — that field is owned by `/plan-next` (which verifies as part of the task lifecycle). Manual verify runs are observational and shouldn't poison the state of record.
75
+
76
+ ## When NOT to use this skill
77
+
78
+ - You want to fix a failing test → use `/plan-next` (it will plan a bug task).
79
+ - You want to add new tests → that's a feature task, use `/plan-next`.
80
+ - Project not initialized → use `/init-arch`.
81
+
82
+ </supporting-info>