aidlc-fast 0.0.0-stage → 0.6.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.
Files changed (53) hide show
  1. package/README.md +91 -2
  2. package/bin/aidlc-fast.js +38 -0
  3. package/clients/claude/README.md +9 -0
  4. package/clients/claude/commands/aidlc-fast.md +28 -0
  5. package/clients/cursor/README.md +9 -0
  6. package/clients/cursor/commands/aidlc-fast.md +25 -0
  7. package/clients/cursor/rules/aidlc-fast.mdc +12 -0
  8. package/clients/generic/AGENTS.md +54 -0
  9. package/clients/generic/README.md +5 -0
  10. package/clients/generic/WORKFLOW.md +17 -0
  11. package/cursor/README.md +9 -0
  12. package/cursor/commands/aidlc-fast.md +25 -0
  13. package/cursor/rules/aidlc-fast.mdc +12 -0
  14. package/dist/graph.json +414 -0
  15. package/package.json +42 -4
  16. package/scopes/bugfix.json +26 -0
  17. package/scopes/express.json +26 -0
  18. package/scopes/feature.json +26 -0
  19. package/scopes/mvp.json +26 -0
  20. package/scopes/refactor.json +26 -0
  21. package/scopes/security-patch.json +26 -0
  22. package/scripts/postinstall.js +11 -0
  23. package/src/audit.ts +39 -0
  24. package/src/ceremony.ts +56 -0
  25. package/src/cli.ts +454 -0
  26. package/src/clients.ts +186 -0
  27. package/src/compile.ts +73 -0
  28. package/src/configure.ts +164 -0
  29. package/src/doctor.ts +112 -0
  30. package/src/e2e.ts +166 -0
  31. package/src/human-gate.ts +158 -0
  32. package/src/learn.ts +218 -0
  33. package/src/parse-stage.ts +65 -0
  34. package/src/paths.ts +51 -0
  35. package/src/project-state.ts +211 -0
  36. package/src/project-summary.ts +260 -0
  37. package/src/rework.ts +44 -0
  38. package/src/router.ts +466 -0
  39. package/src/scope.ts +49 -0
  40. package/src/sensors.ts +77 -0
  41. package/src/state.ts +183 -0
  42. package/src/types.ts +155 -0
  43. package/src/verify-cmd.ts +135 -0
  44. package/stages/brief.md +26 -0
  45. package/stages/build.md +25 -0
  46. package/stages/done.md +22 -0
  47. package/stages/e2e.md +28 -0
  48. package/stages/gate-plan.md +40 -0
  49. package/stages/gate-ship.md +36 -0
  50. package/stages/intent.md +24 -0
  51. package/stages/learn.md +26 -0
  52. package/stages/review.md +26 -0
  53. package/stages/verify.md +29 -0
package/README.md CHANGED
@@ -1,3 +1,92 @@
1
- # Temporary Holding Version
1
+ # aidlc-fast
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Thinned [AI-DLC](https://builder.aws.com/content/3GnQs6zaYp4mAx9FWBulDkhWnBo/ai-dlc-v2-core-concepts)-inspired orchestrator: **code routes, model works**.
4
+
5
+ **For teammates:** one slash command and checkboxes in chat. No AIDLC vocabulary required.
6
+
7
+ ## Install once (project)
8
+
9
+ Requires [Bun](https://bun.sh) on PATH for the CLI runtime.
10
+
11
+ ```bash
12
+ npm install -D file:../aidlc-fast # or published aidlc-fast
13
+ npx aidlc-fast config --harness generic,cursor,claude
14
+ ```
15
+
16
+ (`npx` is only for this install step.)
17
+
18
+ ## How humans use it
19
+
20
+ In **Cursor** or **Claude Code** chat:
21
+
22
+ ```text
23
+ /aidlc-fast Add crash reports and show logs in the app
24
+ ```
25
+
26
+ Then answer checkboxes when asked:
27
+
28
+ ```text
29
+ ## Plan check
30
+ - [ ] Approve this plan
31
+ - [ ] Change the plan: …
32
+ - [ ] Different idea: …
33
+ ```
34
+
35
+ Later:
36
+
37
+ ```text
38
+ ## Ship check
39
+ - [ ] Ship it
40
+ - [ ] Not yet: …
41
+ ```
42
+
43
+ Continue a run: `/aidlc-fast` (empty).
44
+
45
+ **You never type APPROVE in a terminal.** The agent advances gates from your chat reply.
46
+
47
+ ## Flow (plain language)
48
+
49
+ ```text
50
+ /aidlc-fast + intent
51
+ → Understanding (may ask checkboxes)
52
+ → Plan check
53
+ → Building (+ quiet quality checks)
54
+ → Ship check
55
+ → Done
56
+ ```
57
+
58
+ `express` scope skips Plan check / review / learn — still runs verify + e2e + Ship check.
59
+
60
+ ## Agent / CLI (hidden from humans)
61
+
62
+ The CLI still owns state: `start`, `complete`, `rework`, `approve --human-reply "…"`, etc. Agents must not dump these at users. See `AGENTS.md` after config.
63
+
64
+ ```bash
65
+ aidlc-fast status --json
66
+ aidlc-fast prompt
67
+ aidlc-fast doctor
68
+ ```
69
+
70
+ ### Scopes
71
+
72
+ bugfix · feature · refactor · mvp · security-patch · express
73
+
74
+ ### Knowledge
75
+
76
+ `org.md` → `team.md` → `project.md` (narrower must not contradict broader).
77
+ `config` merges instructions into root `AGENTS.md`.
78
+
79
+ ## Layout
80
+
81
+ ```
82
+ aidlc-fast/
83
+ clients/generic/ # AGENTS.md + WORKFLOW
84
+ clients/cursor/ # /aidlc-fast only
85
+ clients/claude/ # /aidlc-fast only
86
+ stages/ scopes/ src/ bin/
87
+
88
+ <app>/.aidlc-fast/ …
89
+ <app>/.cursor/commands/aidlc-fast.md
90
+ <app>/.claude/commands/aidlc-fast.md
91
+ AGENTS.md
92
+ ```
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Cross-runtime launcher: prefers Bun (ships TS), falls back to `bun` on PATH
4
+ * or prints install guidance. Works when the package is installed via npm/pnpm/yarn.
5
+ */
6
+ import { spawnSync } from "node:child_process";
7
+ import { existsSync } from "node:fs";
8
+ import { dirname, join } from "node:path";
9
+ import { fileURLToPath } from "node:url";
10
+
11
+ const here = dirname(fileURLToPath(import.meta.url));
12
+ const pkgRoot = join(here, "..");
13
+ const cliTs = join(pkgRoot, "src", "cli.ts");
14
+ const args = process.argv.slice(2);
15
+
16
+ function run(cmd, cmdArgs) {
17
+ return spawnSync(cmd, cmdArgs, {
18
+ stdio: "inherit",
19
+ shell: process.platform === "win32",
20
+ env: process.env,
21
+ });
22
+ }
23
+
24
+ if (!existsSync(cliTs)) {
25
+ console.error("aidlc-fast: missing src/cli.ts — reinstall the package.");
26
+ process.exit(1);
27
+ }
28
+
29
+ // Prefer bun
30
+ let result = run("bun", ["run", cliTs, ...args]);
31
+ if (result.error && result.error.code === "ENOENT") {
32
+ console.error(
33
+ "aidlc-fast requires Bun (https://bun.sh) on PATH.\n" +
34
+ "Install Bun, then re-run: npx aidlc-fast config",
35
+ );
36
+ process.exit(1);
37
+ }
38
+ process.exit(result.status ?? 1);
@@ -0,0 +1,9 @@
1
+ # Claude Code adapter
2
+
3
+ ```bash
4
+ npx aidlc-fast config --harness generic,claude
5
+ ```
6
+
7
+ Installs **only** `.claude/commands/aidlc-fast.md` → **`/aidlc-fast`**.
8
+
9
+ Humans: `/aidlc-fast …` and checkbox replies. Agent runs the CLI under the hood.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Start or continue aidlc-fast (chat checkboxes only)
3
+ argument-hint: "[your intent, or leave empty to continue]"
4
+ ---
5
+
6
+ You are the aidlc-fast agent. Humans only use **`/aidlc-fast`** and chat replies.
7
+
8
+ User arguments: $ARGUMENTS
9
+
10
+ ## Human UX (never break this)
11
+
12
+ - One entry: `/aidlc-fast` (+ optional intent text).
13
+ - Questions and **Plan check** / **Ship check**: checkboxes → wait for reply in chat.
14
+ - **Never** show `npx`, shell recipes, stage ids, or “type APPROVE”.
15
+ - After a Plan/Ship reply, silently:
16
+ `aidlc-fast approve --human-reply "<exact words>"` or `reject --human-reply "…"`.
17
+ - Never invent `--human-reply`.
18
+
19
+ ## What to run
20
+
21
+ | Args | Do |
22
+ |---|---|
23
+ | Intent text (no subcommand) | `aidlc-fast start "<args>"` then follow Steps |
24
+ | _(empty)_ | `status` then `next`; continue current run |
25
+ | `start …` / `complete` / `next` / `rework …` / `config` / … | `aidlc-fast $ARGUMENTS` |
26
+ | `approve` / `reject` | Only with `--human-reply` from their last message |
27
+
28
+ Use the project-local `aidlc-fast` binary. Labels for humans: Understanding → Plan check → Building → Ship check → Done.
@@ -0,0 +1,9 @@
1
+ # Cursor adapter
2
+
3
+ ```bash
4
+ npx aidlc-fast config --harness generic,cursor
5
+ ```
6
+
7
+ Installs **only** `.cursor/commands/aidlc-fast.md` → **`/aidlc-fast`**, plus a small rule.
8
+
9
+ Humans: `/aidlc-fast …` and checkbox replies (Plan check / Ship check). Agent runs the CLI under the hood.
@@ -0,0 +1,25 @@
1
+ # aidlc-fast
2
+
3
+ You are the aidlc-fast agent. Humans only use **`/aidlc-fast`** and chat replies.
4
+
5
+ User arguments: `$ARGUMENTS`
6
+
7
+ ## Human UX (never break this)
8
+
9
+ - One entry: `/aidlc-fast` (+ optional intent text).
10
+ - Questions and **Plan check** / **Ship check**: checkboxes → wait for reply in chat.
11
+ - **Never** show `npx`, shell recipes, stage ids, or “type APPROVE”.
12
+ - After a Plan/Ship reply, silently:
13
+ `aidlc-fast approve --human-reply "<exact words>"` or `reject --human-reply "…"`.
14
+ - Never invent `--human-reply`.
15
+
16
+ ## What to run
17
+
18
+ | Args | Do |
19
+ |---|---|
20
+ | Intent text (no subcommand) | `aidlc-fast start "<args>"` then follow Steps |
21
+ | _(empty)_ | `status` then `next`; continue current run |
22
+ | `start …` / `complete` / `next` / `rework …` / `config` / … | `aidlc-fast $ARGUMENTS` |
23
+ | `approve` / `reject` | Only with `--human-reply` from their last message |
24
+
25
+ Use the project-local `aidlc-fast` binary. Labels for humans: Understanding → Plan check → Building → Ship check → Done.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: When the user runs /aidlc-fast, follow the CLI under the hood — chat checkboxes only for humans.
3
+ globs:
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # aidlc-fast
8
+
9
+ - Humans: **`/aidlc-fast`** + checkbox replies only (Plan check / Ship check).
10
+ - You run the CLI. Never show `npx`, stage ids, or “type APPROVE”.
11
+ - After a chat reply at a check: `approve|reject --human-reply "<exact words>"`.
12
+ - Never invent `--human-reply`. See root `AGENTS.md`.
@@ -0,0 +1,54 @@
1
+ # aidlc-fast — agent instructions
2
+
3
+ Humans only know **`/aidlc-fast`** and answering **checkboxes in chat**. You run the CLI under the hood. Never show them shell commands, stage ids, or AIDLC jargon.
4
+
5
+ ## Human UX (required)
6
+
7
+ 1. Start from `/aidlc-fast <intent>` (or continue with `/aidlc-fast`).
8
+ 2. Questions: one checkbox group → **wait** for their reply.
9
+ 3. **Plan check** / **Ship check**: checkboxes → wait → then silently:
10
+ - `aidlc-fast approve --human-reply "<their exact words>"`
11
+ - or `aidlc-fast reject --human-reply "<their exact words>"`
12
+ 4. **Forbidden to show humans:** `npx`, `APPROVE`, `complete`, `rework`, `gate-plan`, CLI dumps.
13
+ 5. **Forbidden:** inventing `--human-reply`, or CI bypass flags outside automated tests.
14
+
15
+ ### Checkbox templates
16
+
17
+ Plan check:
18
+ ```markdown
19
+ ## Plan check
20
+
21
+ **Goal:** …
22
+ **Scope:** …
23
+
24
+ - [ ] Approve this plan
25
+ - [ ] Change the plan: _…_
26
+ - [ ] Different idea: _…_
27
+
28
+ Reply with one choice.
29
+ ```
30
+
31
+ Ship check:
32
+ ```markdown
33
+ ## Ship check
34
+
35
+ **Done:** … · **Checks:** … · **E2E:** …
36
+
37
+ - [ ] Ship it
38
+ - [ ] Not yet: _…_
39
+
40
+ Reply with one choice.
41
+ ```
42
+
43
+ ## Agent loop (hidden from human)
44
+
45
+ 1. CLI decides the stage (`next` / `status`). Obey Steps.
46
+ 2. After work: `complete`. On quality fail: `rework … --reason "…"`.
47
+ 3. Read `.aidlc-fast/knowledge/project-summary.md` and `project.md`.
48
+ 4. Brief is the contract only after Plan check approval.
49
+ 5. E2E: prefer Playwright; else browser tools + starter spec. Don’t claim pass without evidence.
50
+ 6. Sensors are advisory. Never overwrite `knowledge/` wholesale.
51
+
52
+ ## Scopes
53
+
54
+ bugfix · feature · refactor · mvp · security-patch · express (skips Plan check / review / learn).
@@ -0,0 +1,5 @@
1
+ # Generic client (any AI workflow)
2
+
3
+ Installs `AGENTS.md` + `.aidlc-fast/WORKFLOW.md`. Humans still use chat checkboxes; agents run the CLI.
4
+
5
+ Add slash packs with `--harness generic,cursor,claude` for **`/aidlc-fast`**.
@@ -0,0 +1,17 @@
1
+ # aidlc-fast workflow
2
+
3
+ ```mermaid
4
+ flowchart TD
5
+ start["/aidlc-fast + intent"] --> understand[Understanding]
6
+ understand --> plan[Plan check]
7
+ plan --> build[Building]
8
+ build --> ship[Ship check]
9
+ ship --> doneNode[Done]
10
+ ```
11
+
12
+ | Who | What |
13
+ |-----|------|
14
+ | Human | `/aidlc-fast`, checkbox replies |
15
+ | Agent | Runs CLI (`start` / `complete` / `rework` / `approve --human-reply`) |
16
+
17
+ Scopes: `bugfix` · `feature` · `refactor` · `mvp` · `security-patch` · `express`
@@ -0,0 +1,9 @@
1
+ # Cursor stubs
2
+
3
+ One command: **`/aidlc-fast`**.
4
+
5
+ ```bash
6
+ npx aidlc-fast config --harness generic,cursor
7
+ ```
8
+
9
+ Flow: `/aidlc-fast <intent>` → Plan check (chat) → Building → Ship check (chat) → Done.
@@ -0,0 +1,25 @@
1
+ # aidlc-fast
2
+
3
+ You are the aidlc-fast agent. Humans only use **`/aidlc-fast`** and chat replies.
4
+
5
+ User arguments: `$ARGUMENTS`
6
+
7
+ ## Human UX (never break this)
8
+
9
+ - One entry: `/aidlc-fast` (+ optional intent text).
10
+ - Questions and **Plan check** / **Ship check**: checkboxes → wait for reply in chat.
11
+ - **Never** show `npx`, shell recipes, stage ids, or “type APPROVE”.
12
+ - After a Plan/Ship reply, silently:
13
+ `aidlc-fast approve --human-reply "<exact words>"` or `reject --human-reply "…"`.
14
+ - Never invent `--human-reply`.
15
+
16
+ ## What to run
17
+
18
+ | Args | Do |
19
+ |---|---|
20
+ | Intent text (no subcommand) | `aidlc-fast start "<args>"` then follow Steps |
21
+ | _(empty)_ | `status` then `next`; continue current run |
22
+ | `start …` / `complete` / `next` / `rework …` / `config` / … | `aidlc-fast $ARGUMENTS` |
23
+ | `approve` / `reject` | Only with `--human-reply` from their last message |
24
+
25
+ Use the project-local `aidlc-fast` binary. Labels for humans: Understanding → Plan check → Building → Ship check → Done.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: When the user runs /aidlc-fast, follow the CLI under the hood — chat checkboxes only for humans.
3
+ globs:
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # aidlc-fast
8
+
9
+ - Humans: **`/aidlc-fast`** + checkbox replies only (Plan check / Ship check).
10
+ - You run the CLI. Never show `npx`, stage ids, or “type APPROVE”.
11
+ - After a chat reply at a check: `approve|reject --human-reply "<exact words>"`.
12
+ - Never invent `--human-reply`. See root `AGENTS.md`.