Skip to content

Commit 2c78dfa

Browse files
jeremyederclaude
andcommitted
Add spec-kit-auto skill for autonomous end-to-end development
Orchestrates the full superpowers workflow chain (specify, plan, implement, simplify, lint/security, finish) without human interaction between phases. Treats user input as authoritative spec, resolves ambiguity from project context, and runs quality gates including CodeRabbit CLI, auto-detected linters, and inline security review. Also adds plugin manifest for skill auto-discovery. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e2021e2 commit 2c78dfa

2 files changed

Lines changed: 187 additions & 0 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "reference",
3+
"version": "1.0.0",
4+
"description": "AI-assisted development patterns and skills for the Ambient Code reference repository.",
5+
"skills": "auto"
6+
}
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
---
2+
name: spec-kit-auto
3+
description: Use when the user provides a complete spec, requirements document, or feature description and wants fully autonomous end-to-end implementation without interactive brainstorming - covers specify, plan, implement, simplify, lint, security review, and branch finishing
4+
---
5+
6+
# Spec-Kit Auto
7+
8+
Autonomous end-to-end orchestrator for the superpowers workflow chain. Takes complete input, runs specify through implement through quality gates, with no human interaction between phases.
9+
10+
**Core principle:** The user's input is the spec. Enrich it, plan it, build it, verify it. Only stop for blocking ambiguity.
11+
12+
**This is a rigid skill. Follow it exactly.**
13+
14+
**Commit after each phase completes.**
15+
16+
## When to Use
17+
18+
- User provides a complete spec, requirements, or feature description
19+
- User provides reference documents and expects autonomous execution
20+
- Not for exploratory brainstorming or vague requirements — use `superpowers:brainstorming` instead
21+
22+
## The Pipeline
23+
24+
Specify → Plan → Implement → Simplify → Lint & Security → Finish
25+
26+
## Ambiguity Resolution
27+
28+
Applies to all phases. Resolve by: (1) checking project docs — CLAUDE.md, memory, architecture files, existing patterns; (2) following existing codebase conventions; (3) choosing the simpler option (YAGNI); (4) documenting the decision in the spec or plan.
29+
30+
**Only escalate to the user when** two valid interpretations would produce fundamentally different architectures, the decision requires domain knowledge absent from all available documents, or getting it wrong would require a full rewrite.
31+
32+
## Phase 1: Specify
33+
34+
**Goal:** Transform user input into a formal spec document.
35+
36+
The user's input IS the spec. Do not brainstorm. Do not ask clarifying questions unless the ambiguity is blocking (would be wrong >50% of the time if guessed).
37+
38+
1. Read the user's input and any referenced documents
39+
2. Load project context: CLAUDE.md, architecture docs, memory files, existing code patterns
40+
3. Enrich the input into a structured spec document:
41+
- **Goal** (1 sentence)
42+
- **Architecture** (how it fits into the existing codebase)
43+
- **Components** (what gets built, with boundaries)
44+
- **Data flow** (inputs, outputs, interfaces)
45+
- **Error handling** (failure modes and recovery)
46+
- **Testing strategy** (what to test, how)
47+
4. Write to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
48+
5. Self-review: placeholder scan, internal consistency, scope check, ambiguity check (pick one interpretation, make it explicit)
49+
50+
## Phase 2: Plan
51+
52+
**REQUIRED SUB-SKILL:** Use `superpowers:writing-plans`
53+
54+
1. Invoke writing-plans against the spec from Phase 1
55+
2. Plan is written with bite-sized TDD tasks, exact file paths, complete code
56+
3. Plan self-review runs automatically (spec coverage, placeholder scan, type consistency)
57+
4. Save to `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`
58+
59+
## Phase 3: Implement
60+
61+
**REQUIRED SUB-SKILL:** Use `superpowers:using-git-worktrees` for workspace isolation
62+
**REQUIRED SUB-SKILL:** Use `superpowers:subagent-driven-development`
63+
64+
1. Set up isolated worktree
65+
2. Execute the plan via subagent-driven development:
66+
- Fresh subagent per task
67+
- Two-stage review after each task (spec compliance, then code quality)
68+
- TDD discipline enforced per `superpowers:test-driven-development`
69+
3. All tasks complete with passing reviews
70+
71+
**Fallback:** If subagent support is unavailable, use `superpowers:executing-plans`.
72+
73+
## Phase 4: Simplify
74+
75+
**REQUIRED SKILL:** Use `simplify`
76+
77+
1. Run `simplify` against all changed files
78+
2. Three parallel review agents check code reuse, code quality, and efficiency
79+
3. Fix all valid findings
80+
81+
## Phase 5: Lint and Security
82+
83+
Run linting, security scanning, and code review. Three parallel tracks:
84+
85+
### Track A: Auto-Detect and Run Local Linters
86+
87+
Detect project linters from config files and run them:
88+
89+
| Config File | Linter | Command |
90+
|-------------|--------|---------|
91+
| `pyproject.toml` / `ruff.toml` | ruff | `ruff check --fix .` |
92+
| `pyproject.toml` [tool.black] | black | `black .` |
93+
| `.eslintrc*` / `eslint.config.*` | eslint | `npx eslint --fix .` |
94+
| `Cargo.toml` | clippy + rustfmt | `cargo clippy && cargo fmt` |
95+
| `.golangci.yml` | golangci-lint | `golangci-lint run` |
96+
| `Makefile` | checkmake | `checkmake Makefile` |
97+
| `Dockerfile*` | hadolint | `hadolint Dockerfile` |
98+
| `.github/workflows/*.yml` | actionlint | `actionlint` |
99+
| `*.sh` | shellcheck | `shellcheck *.sh` |
100+
| `docs/**/*.md` | markdownlint | `markdownlint docs/**/*.md --fix` |
101+
102+
Run all detected linters. Fix auto-fixable issues. Report unfixable issues.
103+
104+
### Track B: CodeRabbit CLI Review
105+
106+
Run the CodeRabbit CLI for code review aligned with team standards.
107+
108+
**Auth check:** Before running, verify authentication:
109+
110+
```bash
111+
command -v coderabbit >/dev/null 2>&1 || { echo "coderabbit CLI not installed, skipping Track B"; }
112+
coderabbit auth status 2>&1 | grep -q "Logged in" || { echo "Not authenticated. Run: coderabbit auth login"; }
113+
```
114+
115+
Note: `coderabbit auth status` emits ANSI codes and spinners, so `2>&1` is required. If not authenticated, skip this track and note it in the final report.
116+
117+
**Team review standards** (from `.coderabbit.yaml`):
118+
119+
- Flag only errors, security risks, or functionality-breaking problems
120+
- Limit to 3-5 comments max; group similar issues
121+
- No style, formatting, or refactoring suggestions
122+
- Performance: flag O(n^2)+, N+1 patterns, unbounded growth, missing pagination
123+
- Security: flag hardcoded secrets, missing auth, injection vulnerabilities, leaked sensitive data
124+
125+
Fix all actionable findings. Skip false positives with a note.
126+
127+
### Track C: Inline Security Review
128+
129+
Dispatch a general-purpose subagent to review all changed files (`git diff main...HEAD`). The subagent should also reference the project's `security-standards.md` context file if one exists. Review for:
130+
131+
1. **Secrets/credentials** — hardcoded tokens, API keys, passwords in source or logs
132+
2. **Injection** — SQL, command, path traversal, XSS in any user-controlled input
133+
3. **Auth/authz** — missing authentication or authorization checks on endpoints
134+
4. **Data exposure** — sensitive data in API responses, logs, error messages
135+
5. **Dependency risk** — known-vulnerable packages, unpinned versions
136+
6. **Resource safety** — unbounded allocations, missing timeouts, missing cleanup
137+
138+
For each finding: file, line(s), severity (critical/high/medium), specific risk, fix. Fix all critical and high findings. Document medium findings for review.
139+
140+
### Ensure CI Linting
141+
142+
Check if a lint workflow using `wearerequired/lint-action@v2` exists in `.github/workflows/`. If missing, create `.github/workflows/lint.yml` with checkout, language-appropriate linter installation (use `uv pip install` for Python), and `auto_fix: false`. Adapt to match detected project languages. Check for existing lint workflows first to avoid duplication.
143+
144+
## Phase 6: Finish
145+
146+
**REQUIRED SUB-SKILL:** Use `superpowers:verification-before-completion`
147+
**REQUIRED SUB-SKILL:** Use `superpowers:finishing-a-development-branch`
148+
149+
1. Run verification-before-completion: execute test suite, confirm all pass with evidence
150+
2. Run finishing-a-development-branch: present integration options, execute choice
151+
152+
## Rationalizations to Reject
153+
154+
| Excuse | Reality |
155+
|--------|---------|
156+
| "Input is unclear, need to ask" | Enrich from project context. Only ask if blocking. |
157+
| "Simplify found nothing" | Run it anyway. Evidence before claims. |
158+
| "Security review is overkill for this change" | Every change gets reviewed. No exceptions. |
159+
| "Linter not installed, skip it" | Note it in the report. Don't silently skip. |
160+
| "Tests pass, skip verification" | Verification means running them NOW and showing output. |
161+
| "CodeRabbit isn't authenticated" | Skip with a note. Run the other two tracks. |
162+
| "This is too simple for the full pipeline" | Simple changes are where skipped steps cause the most damage. |
163+
| "Code looks clean enough, skip simplify" | Run it. Let the agents decide. |
164+
| "I'll reorder phases for efficiency" | Follow the pipeline exactly. No reordering. |
165+
| "Design contradicts CLAUDE.md but seems better" | CLAUDE.md wins. Always. |
166+
167+
## Integration
168+
169+
**Skills invoked (in order):**
170+
171+
| Phase | Skill | Purpose |
172+
|-------|-------|---------|
173+
| 2 | `superpowers:writing-plans` | Create implementation plan |
174+
| 3 | `superpowers:using-git-worktrees` | Workspace isolation |
175+
| 3 | `superpowers:subagent-driven-development` | Execute plan with subagents |
176+
| 3 | `superpowers:test-driven-development` | Implementation discipline |
177+
| 4 | `simplify` | Code quality review |
178+
| 6 | `superpowers:verification-before-completion` | Evidence before claims |
179+
| 6 | `superpowers:finishing-a-development-branch` | Branch integration |
180+
181+
**Fallback:** `superpowers:executing-plans` if subagent support unavailable

0 commit comments

Comments
 (0)