@delegance/claude-autopilot 7.10.0 → 7.10.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.
- package/CHANGELOG.md +29 -1
- package/README.md +19 -13
- package/dist/src/cli/examples.d.ts +15 -0
- package/dist/src/cli/examples.js +108 -0
- package/dist/src/cli/help-text.js +13 -0
- package/dist/src/cli/index.js +12 -1
- package/examples/specs/fastapi.md +37 -0
- package/examples/specs/go-cli.md +32 -0
- package/examples/specs/node-cli.md +36 -0
- package/examples/specs/python-cli.md +35 -0
- package/examples/specs/rust-cli.md +34 -0
- package/package.json +14 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
- v5.6 Phase 7 (docs reconciliation) — pending.
|
|
4
4
|
|
|
5
|
+
## 7.10.1 — 2026-05-13
|
|
6
|
+
|
|
7
|
+
**v7.10.1 — `examples` verb.** Patch release. Closes the discoverability
|
|
8
|
+
gap a new user hits between `setup` and `scaffold --from-spec`: the
|
|
9
|
+
new `claude-autopilot examples` verb prints sample specs for each
|
|
10
|
+
supported stack (node / python / fastapi / go / rust) so an operator
|
|
11
|
+
can pipe one to a file and feed it back into the scaffolder.
|
|
12
|
+
|
|
13
|
+
**New:** `claude-autopilot examples` lists all five stacks with a
|
|
14
|
+
5-line preview. `claude-autopilot examples <stack>` prints the full
|
|
15
|
+
spec for one stack to stdout — pipe-friendly:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
claude-autopilot examples fastapi > docs/specs/my-api.md
|
|
19
|
+
# edit the spec...
|
|
20
|
+
claude-autopilot scaffold --from-spec docs/specs/my-api.md
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Bundled examples.** Five spec markdown files ship in
|
|
24
|
+
`examples/specs/{node-cli,python-cli,fastapi,go-cli,rust-cli}.md` —
|
|
25
|
+
one per supported scaffold target. Each shows the `## Files` section
|
|
26
|
+
shape the scaffolder reads, plus a `## Goal` and `## How to use`
|
|
27
|
+
section for human readers.
|
|
28
|
+
|
|
29
|
+
**Package shape.** `examples/` is added to the published `files:`
|
|
30
|
+
array in package.json so the directory ships in the npm tarball — the
|
|
31
|
+
verb resolves spec paths via `findPackageRoot` and works under both
|
|
32
|
+
source and globally installed CLI invocations.
|
|
33
|
+
|
|
5
34
|
## 7.10.0 — 2026-05-13
|
|
6
35
|
|
|
7
36
|
### Added
|
|
@@ -91,7 +120,6 @@ usage except for the bundled `tsx` deprecation warning.
|
|
|
91
120
|
A1-A8 covering ESM/CJS safety, CLI parser scope, PATH self-pointer,
|
|
92
121
|
AST audit, type-only imports, hand-rolled PATH lookup dropping the
|
|
93
122
|
`which` dep, XDG state dir, npm-only --omit=optional documentation).
|
|
94
|
-
|
|
95
123
|
## 7.7.0 (2026-05-11)
|
|
96
124
|
|
|
97
125
|
**v7.7.0 — Rust scaffold support.** Minor release. Promotes Rust from
|
package/README.md
CHANGED
|
@@ -17,8 +17,11 @@ claude-autopilot brainstorm "add SSO with SAML for enterprise tenants"
|
|
|
17
17
|
# → writes spec (reviewed by Codex) → writes plan (reviewed by Codex) →
|
|
18
18
|
# → creates branch → implements with subagents → runs migrations →
|
|
19
19
|
# → runs full test + lint + type + security gate → opens PR →
|
|
20
|
-
# →
|
|
21
|
-
# →
|
|
20
|
+
# → runs risk-tiered Codex PR review (1/2/3 passes by spec risk) →
|
|
21
|
+
# → triages bugbot findings, auto-fixes real bugs, re-runs validate →
|
|
22
|
+
# → merges with your configured permissions (default is admin-squash;
|
|
23
|
+
# configure branch protection + required checks if you need to enforce
|
|
24
|
+
# reviews/CI gates that the autopilot agent should not bypass)
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
*No hosted agent. No per-seat subscription. Runs locally on your machine, against your real repo, using your API keys. Every phase is a Claude Code skill you can intervene in, rewire, or run by itself.*
|
|
@@ -50,13 +53,14 @@ Every finding came with a concrete remediation (often a code patch or named libr
|
|
|
50
53
|
| **Cursor BugBot / CodeRabbit** | Hosted | Per-PR or seat | Vendor's model | Review only | Post-hoc |
|
|
51
54
|
| **Aider / Cline** | Local CLI | Free + your API key | User's choice | None | Continuous |
|
|
52
55
|
| **OpenHands / SWE-agent** | Local research | Free | User's choice | Agent decides | Rare |
|
|
53
|
-
| **claude-autopilot** | **Local CLI, your repo** | **
|
|
56
|
+
| **claude-autopilot** | **Local CLI, your repo** | **Open source CLI + your model/API costs (Claude / Codex / Gemini / Groq / Ollama-local)** | **Multi-model per role (Claude + Codex + Gemini)** | **Skill-per-phase, rewireable** | **Every phase, all state on disk** |
|
|
54
57
|
|
|
55
|
-
|
|
58
|
+
Four things only this product gives you:
|
|
56
59
|
|
|
57
|
-
1. **
|
|
58
|
-
2. **
|
|
60
|
+
1. **No hosted workspace or remote sandbox.** Your repo stays on your machine. No third-party agent runtime, no SaaS-side orchestration, no per-seat markup. Model prompts (diffs, file context, design questions) are sent to whichever LLM providers you've configured (Anthropic / OpenAI / Google / Groq / Ollama-local). For a truly local-only setup, you must point _every_ model used by the entire execution path at a local endpoint: that includes the Claude Code agent runtime itself (configure a local Claude Code provider) AND the autopilot review adapter (`openai-compatible` pointed at Ollama). Pointing only the review adapter at Ollama still ships prompts/diffs to Anthropic via Claude Code. For most teams, local-only isn't the goal; "no hosted orchestration + your existing provider keys" is.
|
|
61
|
+
2. **Risk-tiered review depth (policy-driven).** Specs declare `risk: low | medium | high` in frontmatter. The autopilot skill runs 1 / 2 / 3 sequential Codex passes accordingly, each with a remediation cycle in between. Enforcement is encoded in the skill (an LLM-driven instruction set, not a hard CLI gate) so it's auditable and editable: read `.claude/skills/autopilot/SKILL.md`, swap the tier rules for your codebase, expand the auto-escalation keyword list. Designed for teams that want review depth to scale with change risk instead of running forensic-grade review on every typo.
|
|
59
62
|
3. **Ships as a Claude Code skill, not a competing IDE.** `/brainstorm`, `/autopilot`, `/migrate`, `/validate` are first-class Claude Code commands. As Claude Code grows, autopilot rides that adoption. You don't switch tools to use it; it's already there.
|
|
63
|
+
4. **Multi-model council, available as a verb.** `claude-autopilot council` dispatches the same diff or design question to Claude + Codex + Gemini in parallel and synthesizes the consensus. Wire it into the autopilot pipeline by editing `.claude/skills/autopilot/SKILL.md` Step 7, or invoke standalone for one-off design decisions. The default pipeline uses sequential Codex review (cheaper, faster, often sufficient for routine changes); council is the higher-rigor option when you want broader model diversity.
|
|
60
64
|
|
|
61
65
|
Plus the four practical differences:
|
|
62
66
|
|
|
@@ -128,9 +132,9 @@ Each phase is a Claude Code skill (`.claude/skills/<name>/SKILL.md`). You can in
|
|
|
128
132
|
| **Migrate** | `migrate` | Dispatches to the configured migration skill (see [Migrate phase](#migrate-phase)) — runs your migration tool dev → QA → prod with per-env validation | Deterministic |
|
|
129
133
|
| **Validate** | `validate` | Static rules + tests + type check + security scan + LLM review | Any |
|
|
130
134
|
| **PR** | `commit-push-pr` | Opens the PR with auto-generated title, summary, and test plan | Claude |
|
|
131
|
-
| **Review** | `review
|
|
135
|
+
| **Review** | `codex-pr-review` (default) or `council` (opt-in) | Sequential Codex pass on the diff with risk-tiered iteration count (1/2/3 passes for low/medium/high). Swap in `council` for parallel multi-model dispatch if you want higher rigor. | Codex (default) or multi-model |
|
|
132
136
|
| **Triage** | `bugbot` | Fetches automated reviewer findings, auto-fixes real bugs, dismisses false positives | Claude |
|
|
133
|
-
| **Deploy** | `deploy` | Deploys via configured adapter (`vercel` \| `fly` \| `render` \| `generic`) with optional log streaming, health check, and bounded auto-rollback (see [Deploy phase](#deploy-phase)) | Deterministic |
|
|
137
|
+
| **Deploy** (opt-in) | `deploy` | Deploys via configured adapter (`vercel` \| `fly` \| `render` \| `generic`) with optional log streaming, health check, and bounded auto-rollback (see [Deploy phase](#deploy-phase)). Not on the default `/autopilot` critical path: the autopilot loop ends at merge, and your CI/CD handles prod. Invoke `claude-autopilot deploy` directly, or wire it into the autopilot skill as Step 10. | Deterministic |
|
|
134
138
|
|
|
135
139
|
### Migrate phase
|
|
136
140
|
|
|
@@ -181,11 +185,13 @@ deploy:
|
|
|
181
185
|
|
|
182
186
|
Features that are hard or impossible to find in the competitive set:
|
|
183
187
|
|
|
184
|
-
- **
|
|
185
|
-
- **
|
|
186
|
-
- **
|
|
187
|
-
- **
|
|
188
|
-
- **
|
|
188
|
+
- **Risk-tiered review depth (policy-driven).** Specs are tagged `risk: low | medium | high` in their frontmatter, with auto-escalation by keyword detection for sensitive categories (auth, multi-tenancy, sandboxing, billing, secrets, migrations, RLS, deploy/IAM, vector-DB tenancy — extend the list in the skill for your codebase). The pipeline runs 1 / 2 / 3 sequential Codex passes accordingly, each with a remediation cycle in between. Enforcement is encoded in `.claude/skills/autopilot/SKILL.md` (LLM-driven instructions, not a hard CLI gate), so it's auditable and editable. For teams that need hard enforcement, gate the merge step on the configured pass count by extending the skill or wrapping the CLI.
|
|
189
|
+
- **Retry-loop sameness detector.** Validate / Codex / bugbot retry loops compute a failure fingerprint before consuming each retry. If the same fingerprint fires twice in a row, the pipeline halts and surfaces it to you — instead of burning the remaining retry budget on attempts that are making no progress. Available as a public subpath import (`@delegance/claude-autopilot/run-state/sameness-detector`) for embedding into your own retry loops.
|
|
190
|
+
- **Multi-model council, available as a verb.** `claude-autopilot council` dispatches the same prompt to 3+ models in parallel and synthesizes the consensus. Opt-in for the autopilot pipeline (wire it into Step 7 of the autopilot skill), or invoke standalone for design decisions and architecture questions.
|
|
191
|
+
- **Fix with test verification.** `claude-autopilot fix --verify` runs your full test suite after every patch and reverts on failure. Safer than any tool that proposes fixes without running your tests.
|
|
192
|
+
- **Bug-bot auto-triage.** Watches Cursor BugBot / Copilot comments on your PR, triages each (real bug vs false positive), auto-fixes confirmed bugs, dismisses noise with explanations.
|
|
193
|
+
- **Schema alignment rule.** Ensures DB migrations, backend types, and frontend types stay in sync. Custom static rule, not something any competitor ships.
|
|
194
|
+
- **SARIF output + GitHub Code Scanning integration.** Findings appear as annotations in the PR and in the Security tab.
|
|
189
195
|
|
|
190
196
|
## Just the review layer
|
|
191
197
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Supported stack id → relative path under `examples/specs/`. */
|
|
2
|
+
export declare const EXAMPLE_STACKS: Record<string, string>;
|
|
3
|
+
/** Public stack ids in the order we want them listed. */
|
|
4
|
+
export declare const EXAMPLE_STACK_IDS: readonly ["node", "python", "fastapi", "go", "rust"];
|
|
5
|
+
/** Resolve the absolute on-disk path for a stack's spec file. */
|
|
6
|
+
export declare function resolveExamplePath(stack: string): string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Run the `examples` verb. With no `stack`, prints an intro + a summary card
|
|
9
|
+
* for each stack (path + first ~5 lines of the spec). With a stack id, prints
|
|
10
|
+
* the full spec content to stdout (suitable for piping into a file).
|
|
11
|
+
*
|
|
12
|
+
* Returns the exit code so the dispatcher can `process.exit(code)`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function runExamples(stack?: string): number;
|
|
15
|
+
//# sourceMappingURL=examples.d.ts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// v7.7.1 — `claude-autopilot examples [<stack>]`
|
|
2
|
+
//
|
|
3
|
+
// Discoverability bridge between `setup` and `scaffold --from-spec`. A new
|
|
4
|
+
// user runs `setup`, then `scaffold --from-spec ???` and has no idea what a
|
|
5
|
+
// spec looks like. This verb prints sample specs — one per supported stack —
|
|
6
|
+
// straight to stdout so the operator can pipe to a file, edit, and feed back
|
|
7
|
+
// into `scaffold`.
|
|
8
|
+
//
|
|
9
|
+
// claude-autopilot examples → list all 5 stacks
|
|
10
|
+
// claude-autopilot examples node → print just the Node spec
|
|
11
|
+
// claude-autopilot examples fastapi > foo.md → spec-as-template via shell
|
|
12
|
+
//
|
|
13
|
+
// The spec files ship in the published tarball via the `files: ["examples/"]`
|
|
14
|
+
// entry in package.json. At runtime we resolve them relative to the package
|
|
15
|
+
// root (found by `findPackageRoot`), so `examples` works whether the CLI is
|
|
16
|
+
// run from source, the built dist/, or a globally installed `npm i -g`
|
|
17
|
+
// invocation.
|
|
18
|
+
import * as fs from 'node:fs';
|
|
19
|
+
import * as path from 'node:path';
|
|
20
|
+
import { findPackageRoot } from "./_pkg-root.js";
|
|
21
|
+
/** Supported stack id → relative path under `examples/specs/`. */
|
|
22
|
+
export const EXAMPLE_STACKS = {
|
|
23
|
+
node: 'examples/specs/node-cli.md',
|
|
24
|
+
python: 'examples/specs/python-cli.md',
|
|
25
|
+
fastapi: 'examples/specs/fastapi.md',
|
|
26
|
+
go: 'examples/specs/go-cli.md',
|
|
27
|
+
rust: 'examples/specs/rust-cli.md',
|
|
28
|
+
};
|
|
29
|
+
/** Public stack ids in the order we want them listed. */
|
|
30
|
+
export const EXAMPLE_STACK_IDS = ['node', 'python', 'fastapi', 'go', 'rust'];
|
|
31
|
+
const BOLD = (t) => `\x1b[1m${t}\x1b[0m`;
|
|
32
|
+
const DIM = (t) => `\x1b[2m${t}\x1b[0m`;
|
|
33
|
+
/** Resolve the absolute on-disk path for a stack's spec file. */
|
|
34
|
+
export function resolveExamplePath(stack) {
|
|
35
|
+
const rel = EXAMPLE_STACKS[stack];
|
|
36
|
+
if (!rel)
|
|
37
|
+
return null;
|
|
38
|
+
const root = findPackageRoot(import.meta.url);
|
|
39
|
+
if (!root)
|
|
40
|
+
return null;
|
|
41
|
+
return path.join(root, rel);
|
|
42
|
+
}
|
|
43
|
+
/** Print the first N non-empty lines of a file for the listing summary. */
|
|
44
|
+
function previewHead(absPath, n) {
|
|
45
|
+
try {
|
|
46
|
+
const body = fs.readFileSync(absPath, 'utf8');
|
|
47
|
+
const lines = body.split('\n');
|
|
48
|
+
const head = [];
|
|
49
|
+
for (const line of lines) {
|
|
50
|
+
head.push(line);
|
|
51
|
+
if (head.length >= n)
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
return head.join('\n');
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return '(failed to read example file)';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Run the `examples` verb. With no `stack`, prints an intro + a summary card
|
|
62
|
+
* for each stack (path + first ~5 lines of the spec). With a stack id, prints
|
|
63
|
+
* the full spec content to stdout (suitable for piping into a file).
|
|
64
|
+
*
|
|
65
|
+
* Returns the exit code so the dispatcher can `process.exit(code)`.
|
|
66
|
+
*/
|
|
67
|
+
export function runExamples(stack) {
|
|
68
|
+
if (!stack) {
|
|
69
|
+
console.log('');
|
|
70
|
+
console.log(BOLD('Sample specs for each supported stack.'));
|
|
71
|
+
console.log(DIM('Pass `examples <stack>` to print just one. Pipe to a file to use as a template:'));
|
|
72
|
+
console.log(DIM(' claude-autopilot examples node > docs/specs/my-feature.md'));
|
|
73
|
+
console.log(DIM(' claude-autopilot scaffold --from-spec docs/specs/my-feature.md'));
|
|
74
|
+
console.log('');
|
|
75
|
+
for (const id of EXAMPLE_STACK_IDS) {
|
|
76
|
+
const abs = resolveExamplePath(id);
|
|
77
|
+
if (!abs || !fs.existsSync(abs)) {
|
|
78
|
+
console.log(`${BOLD(id)} ${DIM('(example file not found)')}`);
|
|
79
|
+
console.log('');
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
console.log(BOLD(id));
|
|
83
|
+
console.log(DIM(` ${abs}`));
|
|
84
|
+
const head = previewHead(abs, 5);
|
|
85
|
+
for (const line of head.split('\n')) {
|
|
86
|
+
console.log(` ${line}`);
|
|
87
|
+
}
|
|
88
|
+
console.log('');
|
|
89
|
+
}
|
|
90
|
+
return 0;
|
|
91
|
+
}
|
|
92
|
+
const abs = resolveExamplePath(stack);
|
|
93
|
+
if (!abs) {
|
|
94
|
+
process.stderr.write(`\x1b[31m[claude-autopilot] unknown stack "${stack}" — valid: ${EXAMPLE_STACK_IDS.join(', ')}\x1b[0m\n`);
|
|
95
|
+
return 1;
|
|
96
|
+
}
|
|
97
|
+
if (!fs.existsSync(abs)) {
|
|
98
|
+
process.stderr.write(`\x1b[31m[claude-autopilot] example file missing on disk: ${abs}\x1b[0m\n`);
|
|
99
|
+
process.stderr.write(`\x1b[2m Did the published tarball include the "examples/" directory? See package.json "files".\x1b[0m\n`);
|
|
100
|
+
return 1;
|
|
101
|
+
}
|
|
102
|
+
const body = fs.readFileSync(abs, 'utf8');
|
|
103
|
+
process.stdout.write(body);
|
|
104
|
+
if (!body.endsWith('\n'))
|
|
105
|
+
process.stdout.write('\n');
|
|
106
|
+
return 0;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=examples.js.map
|
|
@@ -29,6 +29,7 @@ export const HELP_GROUPS = [
|
|
|
29
29
|
{ verb: 'init', summary: 'Scaffold guardrail.config.yaml + auto-detect migrate stack (writes .autopilot/stack.md)' },
|
|
30
30
|
{ verb: 'setup', summary: 'Auto-detect stack, write config, install pre-push hook' },
|
|
31
31
|
{ verb: 'scaffold', summary: 'Scaffold project skeleton from a spec markdown (--from-spec <path> [--stack node|python|fastapi|go|rust])' },
|
|
32
|
+
{ verb: 'examples', summary: 'Print sample specs for each supported stack (use as starter templates for `scaffold --from-spec`)' },
|
|
32
33
|
{ verb: 'autopilot', summary: 'Multi-phase orchestrator — run scan → spec → plan → implement under one runId (v6.2.0)' },
|
|
33
34
|
{ verb: 'brainstorm', summary: 'Pipeline entry point (Claude Code skill — see /brainstorm)' },
|
|
34
35
|
{ verb: 'spec', summary: 'Spec-writing pointer (Claude Code skill — see /brainstorm)' },
|
|
@@ -213,6 +214,18 @@ export const HELP_OPTIONS = {
|
|
|
213
214
|
claude-autopilot autopilot
|
|
214
215
|
claude-autopilot autopilot --budget 25
|
|
215
216
|
claude-autopilot autopilot --phases=scan,spec,plan`,
|
|
217
|
+
examples: `Options (examples):
|
|
218
|
+
[<stack>] Optional: print only the spec for one stack (node|python|fastapi|go|rust)
|
|
219
|
+
With no arg, lists all supported stacks with a 5-line preview each.
|
|
220
|
+
|
|
221
|
+
Behavior: read-only. Reads bundled spec files from the package's
|
|
222
|
+
\`examples/specs/\` directory and prints them to stdout. Pipe
|
|
223
|
+
to a file to use as a starter template:
|
|
224
|
+
|
|
225
|
+
claude-autopilot examples node > docs/specs/my-feature.md
|
|
226
|
+
claude-autopilot scaffold --from-spec docs/specs/my-feature.md
|
|
227
|
+
|
|
228
|
+
Exit codes: 0 success, 1 unknown stack id or missing bundled file.`,
|
|
216
229
|
dashboard: `Options (dashboard):
|
|
217
230
|
login Open browser, mint API key via loopback callback
|
|
218
231
|
logout Revoke server-side, delete local config
|
package/dist/src/cli/index.js
CHANGED
|
@@ -226,7 +226,7 @@ These are aliases for the flat subcommands; they still work without the 'advance
|
|
|
226
226
|
// gc, delete, doctor) are dispatched inside its case block. The singular
|
|
227
227
|
// `run resume` form is handled BEFORE the default `run` -> review dispatch
|
|
228
228
|
// kicks in (see disambiguation block just below).
|
|
229
|
-
const SUBCOMMANDS = ['init', 'run', 'runs', 'scan', 'report', 'explain', 'ignore', 'ci', 'pr', 'fix', 'costs', 'watch', 'hook', 'autoregress', 'baseline', 'triage', 'lsp', 'worker', 'mcp', 'test-gen', 'pr-desc', 'doctor', 'preflight', 'setup', 'council', 'migrate-v4', 'migrate', 'migrate-doctor', 'deploy', 'brainstorm', 'spec', 'plan', 'implement', 'review', 'validate', 'autopilot', 'internal', 'help', '--help', '-h'];
|
|
229
|
+
const SUBCOMMANDS = ['init', 'run', 'runs', 'scan', 'report', 'explain', 'ignore', 'ci', 'pr', 'fix', 'costs', 'watch', 'hook', 'autoregress', 'baseline', 'triage', 'lsp', 'worker', 'mcp', 'test-gen', 'pr-desc', 'doctor', 'preflight', 'setup', 'council', 'migrate-v4', 'migrate', 'migrate-doctor', 'deploy', 'brainstorm', 'spec', 'plan', 'implement', 'review', 'validate', 'autopilot', 'examples', 'internal', 'help', '--help', '-h'];
|
|
230
230
|
const VALUE_FLAGS = ['base', 'config', 'files', 'format', 'output', 'debounce', 'ask', 'focus', 'fail-on', 'note', 'reason', 'expires', 'profile', 'severity', 'prompt', 'context-file', 'path', 'adapter', 'ref', 'sha', 'spec', 'context', 'mode', 'phases', 'budget', 'stack'];
|
|
231
231
|
// Bare invocation — no subcommand, no flags → show welcome guide
|
|
232
232
|
if (args.length === 0) {
|
|
@@ -993,6 +993,17 @@ switch (subcommand) {
|
|
|
993
993
|
process.exit(0);
|
|
994
994
|
break;
|
|
995
995
|
}
|
|
996
|
+
case 'examples': {
|
|
997
|
+
// v7.7.1 — `claude-autopilot examples [<stack>]`. Bridges the
|
|
998
|
+
// discoverability gap between `setup` and `scaffold --from-spec` —
|
|
999
|
+
// new users don't know what a spec looks like. Optional positional
|
|
1000
|
+
// arg selects a single stack; no arg lists all five.
|
|
1001
|
+
const { runExamples } = await import("./examples.js");
|
|
1002
|
+
const target = args[1] && !args[1].startsWith('--') ? args[1] : undefined;
|
|
1003
|
+
const code = runExamples(target);
|
|
1004
|
+
process.exit(code);
|
|
1005
|
+
break;
|
|
1006
|
+
}
|
|
996
1007
|
case 'council': {
|
|
997
1008
|
const config = flag('config');
|
|
998
1009
|
const prompt = flag('prompt');
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# tasks-api — FastAPI service
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
A small FastAPI HTTP service exposing a `/tasks` CRUD endpoint with
|
|
6
|
+
in-memory storage. Demonstrates the FastAPI scaffold path:
|
|
7
|
+
`pyproject.toml` + `src/<pkg>/main.py` layout, dependencies on
|
|
8
|
+
`fastapi` and `uvicorn[standard]`, and pytest with `httpx.AsyncClient`
|
|
9
|
+
for endpoint tests.
|
|
10
|
+
|
|
11
|
+
The scaffolder auto-classifies as FastAPI when prose mentions
|
|
12
|
+
`fastapi` AND a `main.py` is listed.
|
|
13
|
+
|
|
14
|
+
## Files
|
|
15
|
+
|
|
16
|
+
* `pyproject.toml` — hatchling build backend, depends on `fastapi`, `uvicorn[standard]`, and `httpx` (test-only)
|
|
17
|
+
* `requirements.txt` — Pinned lock file
|
|
18
|
+
* `.gitignore` — `__pycache__/`, `.venv/`, `dist/`, `*.egg-info/`, `.pytest_cache/`
|
|
19
|
+
* `src/tasks_api/__init__.py` — Package marker
|
|
20
|
+
* `src/tasks_api/main.py` — FastAPI app (`app = FastAPI()`), defines `GET/POST/DELETE /tasks`
|
|
21
|
+
* `src/tasks_api/models.py` — Pydantic `Task` model
|
|
22
|
+
* `tests/test_api.py` — Async pytest tests using `httpx.AsyncClient(app=app)`
|
|
23
|
+
* `README.md` — Usage: `uvicorn tasks_api.main:app --reload`
|
|
24
|
+
|
|
25
|
+
## How to use
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
claude-autopilot examples fastapi > spec.md
|
|
29
|
+
claude-autopilot scaffold --from-spec spec.md
|
|
30
|
+
python -m pip install -e .
|
|
31
|
+
pytest
|
|
32
|
+
uvicorn tasks_api.main:app --reload
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The scaffolder writes a FastAPI skeleton with one working endpoint as
|
|
36
|
+
a starting point. Replace the in-memory dict with a real backing
|
|
37
|
+
store (SQLite, Postgres, Redis) when you outgrow it.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# greet — Go 1.22 CLI
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
A small Go CLI that prints a greeting. Demonstrates the standard Go
|
|
6
|
+
module layout: `go.mod` at the repo root, `main.go` with a `main()`
|
|
7
|
+
function, and table-driven tests in `main_test.go`. No external
|
|
8
|
+
dependencies — uses only `fmt`, `os`, `flag` from the standard library.
|
|
9
|
+
|
|
10
|
+
This is the simplest Go scaffold target. For a multi-binary repo,
|
|
11
|
+
add `cmd/<name>/main.go` paths to the spec instead of root `main.go`.
|
|
12
|
+
|
|
13
|
+
## Files
|
|
14
|
+
|
|
15
|
+
* `go.mod` — `module greet`, `go 1.22`, no `require` block (stdlib only)
|
|
16
|
+
* `.gitignore` — `vendor/`, `*.test`, `*.out`, binary output names
|
|
17
|
+
* `main.go` — `package main`, defines `main()` and a pure `greet(name string) string`
|
|
18
|
+
* `main_test.go` — Table-driven tests for `greet()` plus a smoke test for `main()`
|
|
19
|
+
* `README.md` — Usage example: `go run . --name=World`
|
|
20
|
+
|
|
21
|
+
## How to use
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
claude-autopilot examples go > spec.md
|
|
25
|
+
claude-autopilot scaffold --from-spec spec.md
|
|
26
|
+
go test ./...
|
|
27
|
+
go run . --name=World
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The scaffolder writes a working "hello, name" skeleton with a
|
|
31
|
+
table-driven test you can extend. Edit `go.mod`'s module path before
|
|
32
|
+
publishing (e.g. `module github.com/you/greet`).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# url-summarizer — Node 22 ESM CLI
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
A small Node 22 ESM CLI that takes a URL on the command line, fetches
|
|
6
|
+
the page, calls an LLM for a 3-bullet markdown summary, and prints the
|
|
7
|
+
result to stdout. Demonstrates the v7.1.6 benchmark layout: a thin
|
|
8
|
+
`bin/` entry that imports a pure handler from `src/`, JS-only with
|
|
9
|
+
`tsconfig.json` set up for `allowJs + checkJs + noEmit` typechecking.
|
|
10
|
+
|
|
11
|
+
This is the simplest scaffold target — it lights up the Node ESM path
|
|
12
|
+
in `claude-autopilot scaffold --from-spec`.
|
|
13
|
+
|
|
14
|
+
## Files
|
|
15
|
+
|
|
16
|
+
* `package.json` — Node 22 ESM, `type: "module"`, bin: { url-summarizer: bin/url-summarizer.js }, scripts: { test: "node --test --import=tsx tests/", typecheck: "tsc --noEmit" }
|
|
17
|
+
* `tsconfig.json` — `allowJs + checkJs + noEmit`, `types: ["node"]`
|
|
18
|
+
* `.gitignore` — `node_modules/`, `.env.local`, `.guardrail-cache/`
|
|
19
|
+
* `bin/url-summarizer.js` — CLI entry; parses `argv`, calls handler, prints result
|
|
20
|
+
* `src/handler.js` — Pure async function `summarize(url): Promise<string>` (fetch + LLM call)
|
|
21
|
+
* `tests/handler.test.js` — Unit tests with mocked fetch + LLM
|
|
22
|
+
* `tests/cli.test.js` — CLI subprocess tests (uses `child_process.spawn`, NOT `spawnSync`)
|
|
23
|
+
* `README.md` — Usage example: `node bin/url-summarizer.js https://example.com`
|
|
24
|
+
|
|
25
|
+
## How to use
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
claude-autopilot examples node > spec.md
|
|
29
|
+
claude-autopilot scaffold --from-spec spec.md
|
|
30
|
+
npm test
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The scaffolder writes a working skeleton; you (or your impl agent) fill
|
|
34
|
+
in the handler body. The pre-existing tests should fail until the
|
|
35
|
+
handler is implemented — that's intentional, it gives the impl agent a
|
|
36
|
+
clear target.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# wordcount — Python 3.11+ CLI
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
A bare Python CLI that counts words in a text file. Demonstrates the
|
|
6
|
+
modern `pyproject.toml` + `src/<pkg>/` layout (the import-isolation
|
|
7
|
+
pattern that pytest + hatchling both recommend), with a console
|
|
8
|
+
script entry point and pytest-driven tests.
|
|
9
|
+
|
|
10
|
+
No FastAPI, no web framework — this is the path for "Python script /
|
|
11
|
+
library / CLI" specs. For HTTP services see `fastapi.md`.
|
|
12
|
+
|
|
13
|
+
## Files
|
|
14
|
+
|
|
15
|
+
* `pyproject.toml` — `[project]` table with hatchling build backend, `requires-python = ">=3.11"`, `dependencies = []`, `[project.scripts] wordcount = "wordcount.cli:main"`
|
|
16
|
+
* `requirements.txt` — Lock file; pinned via `pip-compile` or `uv pip compile`
|
|
17
|
+
* `.gitignore` — `__pycache__/`, `.venv/`, `dist/`, `*.egg-info/`, `.pytest_cache/`
|
|
18
|
+
* `src/wordcount/__init__.py` — Package marker
|
|
19
|
+
* `src/wordcount/cli.py` — `main()` entry; parses `argv`, calls counter, prints result
|
|
20
|
+
* `src/wordcount/counter.py` — Pure function `count_words(text: str) -> int`
|
|
21
|
+
* `tests/test_counter.py` — Unit tests for the counter
|
|
22
|
+
* `tests/test_cli.py` — CLI smoke test via `subprocess.run`
|
|
23
|
+
* `README.md` — Usage example: `wordcount path/to/file.txt`
|
|
24
|
+
|
|
25
|
+
## How to use
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
claude-autopilot examples python > spec.md
|
|
29
|
+
claude-autopilot scaffold --from-spec spec.md
|
|
30
|
+
python -m pip install -e .
|
|
31
|
+
pytest
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The scaffolder writes the package skeleton + a pinned `requirements.txt`
|
|
35
|
+
stub. Add your runtime deps to `pyproject.toml` then re-lock.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# greet — Rust 2021 binary crate
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
A small Rust binary crate that prints a greeting. Demonstrates the
|
|
6
|
+
default `cargo init` layout: `Cargo.toml` + `src/main.rs` for the
|
|
7
|
+
binary target + `tests/integration_test.rs` for the integration
|
|
8
|
+
smoke test. No external crate dependencies — uses only `std`.
|
|
9
|
+
|
|
10
|
+
This is the v7.7.0 binary-only path. For a library, list ONLY
|
|
11
|
+
`src/lib.rs` (no `main.rs`) and the scaffolder switches to library
|
|
12
|
+
mode and excludes `Cargo.lock` from `.gitignore` per Cargo's
|
|
13
|
+
documented convention.
|
|
14
|
+
|
|
15
|
+
## Files
|
|
16
|
+
|
|
17
|
+
* `Cargo.toml` — `[package]` name = "greet", edition = "2021", no `[dependencies]` block (stdlib only)
|
|
18
|
+
* `.gitignore` — `target/` (Cargo.lock NOT excluded — binary crate commits it)
|
|
19
|
+
* `src/main.rs` — `fn main()` plus a pure `fn greet(name: &str) -> String`
|
|
20
|
+
* `tests/integration_test.rs` — Integration smoke test that invokes the binary via `assert_cmd` (or `std::process::Command` for stdlib-only)
|
|
21
|
+
* `README.md` — Usage example: `cargo run -- --name=World`
|
|
22
|
+
|
|
23
|
+
## How to use
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
claude-autopilot examples rust > spec.md
|
|
27
|
+
claude-autopilot scaffold --from-spec spec.md
|
|
28
|
+
cargo test
|
|
29
|
+
cargo run -- --name=World
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The scaffolder writes a working "hello, name" binary skeleton with an
|
|
33
|
+
integration test stub you can extend. Rename the `[package].name` in
|
|
34
|
+
`Cargo.toml` before publishing to crates.io.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delegance/claude-autopilot",
|
|
3
|
-
"version": "7.10.
|
|
3
|
+
"version": "7.10.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"tag": "next"
|
|
@@ -15,7 +15,17 @@
|
|
|
15
15
|
"llm",
|
|
16
16
|
"sarif",
|
|
17
17
|
"cli",
|
|
18
|
-
"pipeline"
|
|
18
|
+
"pipeline",
|
|
19
|
+
"coding-agent",
|
|
20
|
+
"devin-alternative",
|
|
21
|
+
"cursor-alternative",
|
|
22
|
+
"autonomous-coding",
|
|
23
|
+
"multi-model",
|
|
24
|
+
"codex",
|
|
25
|
+
"mit-license",
|
|
26
|
+
"local-first",
|
|
27
|
+
"developer-tools",
|
|
28
|
+
"ci-cd"
|
|
19
29
|
],
|
|
20
30
|
"license": "MIT",
|
|
21
31
|
"workspaces": [
|
|
@@ -52,6 +62,7 @@
|
|
|
52
62
|
"dist/**/*.js",
|
|
53
63
|
"dist/**/*.d.ts",
|
|
54
64
|
"dist/**/*.json",
|
|
65
|
+
"examples/",
|
|
55
66
|
"presets/",
|
|
56
67
|
"skills/",
|
|
57
68
|
"scripts/test-runner.mjs",
|
|
@@ -84,7 +95,7 @@
|
|
|
84
95
|
"ulid": "^3.0.2"
|
|
85
96
|
},
|
|
86
97
|
"optionalDependencies": {
|
|
87
|
-
"@anthropic-ai/sdk": "^0.
|
|
98
|
+
"@anthropic-ai/sdk": "^0.96.0",
|
|
88
99
|
"@google/generative-ai": "^0.24.1",
|
|
89
100
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
90
101
|
"@supabase/supabase-js": "^2.97.0",
|