specialist-agent 2.11.4 → 2.12.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 (80) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex/INSTALL.md +32 -9
  4. package/.cursor-plugin/marketplace.json +4 -4
  5. package/.cursor-plugin/plugin.json +2 -2
  6. package/.opencode/opencode.json +45 -0
  7. package/README.md +18 -2
  8. package/agents/analyst-lite.md +1 -1
  9. package/agents/analyst.md +5 -1
  10. package/agents/api.md +1 -0
  11. package/agents/architect-lite.md +1 -1
  12. package/agents/architect.md +10 -1
  13. package/agents/autopilot-lite.md +46 -0
  14. package/agents/autopilot.md +196 -0
  15. package/agents/cloud-lite.md +1 -1
  16. package/agents/cloud.md +2 -1
  17. package/agents/data.md +1 -0
  18. package/agents/debugger.md +3 -0
  19. package/agents/deps-lite.md +1 -1
  20. package/agents/deps.md +2 -1
  21. package/agents/designer.md +8 -0
  22. package/agents/devops-lite.md +1 -1
  23. package/agents/devops.md +2 -1
  24. package/agents/docs-lite.md +1 -1
  25. package/agents/docs.md +2 -1
  26. package/agents/executor-lite.md +1 -1
  27. package/agents/executor.md +58 -31
  28. package/agents/explorer-lite.md +1 -1
  29. package/agents/explorer.md +14 -1
  30. package/agents/finance.md +1 -0
  31. package/agents/i18n.md +1 -0
  32. package/agents/legal.md +1 -0
  33. package/agents/marketing.md +9 -0
  34. package/agents/memory.md +103 -178
  35. package/agents/orchestrator-lite.md +1 -1
  36. package/agents/orchestrator.md +62 -39
  37. package/agents/pair-lite.md +1 -1
  38. package/agents/pair.md +2 -1
  39. package/agents/perf.md +1 -0
  40. package/agents/planner-lite.md +1 -1
  41. package/agents/planner.md +17 -11
  42. package/agents/product.md +9 -0
  43. package/agents/refactor.md +1 -0
  44. package/agents/ripple-lite.md +1 -1
  45. package/agents/ripple.md +4 -1
  46. package/agents/scout-lite.md +1 -1
  47. package/agents/scout.md +2 -1
  48. package/agents/security-lite.md +1 -1
  49. package/agents/security.md +4 -1
  50. package/agents/sentry-triage-lite.md +1 -1
  51. package/agents/sentry-triage.md +4 -1
  52. package/agents/starter-lite.md +1 -1
  53. package/agents/starter.md +2 -1
  54. package/agents/support.md +1 -0
  55. package/agents/tdd.md +3 -0
  56. package/agents/tester.md +1 -0
  57. package/cli/index.mjs +1 -1
  58. package/hooks/hooks.json +11 -0
  59. package/hooks/lifecycle.json +10 -0
  60. package/hooks/native/auto-dispatch.mjs +7 -2
  61. package/hooks/native/session-end.mjs +42 -0
  62. package/package.json +1 -1
  63. package/skills/audit/SKILL.md +71 -9
  64. package/skills/autopilot/SKILL.md +286 -0
  65. package/skills/brainstorm/SKILL.md +60 -7
  66. package/skills/codereview/SKILL.md +16 -3
  67. package/skills/copywriting/SKILL.md +218 -0
  68. package/skills/cro/SKILL.md +234 -0
  69. package/skills/design-review/SKILL.md +217 -0
  70. package/skills/grill/SKILL.md +270 -0
  71. package/skills/improve-architecture/SKILL.md +205 -0
  72. package/skills/prd/SKILL.md +241 -0
  73. package/skills/recall/SKILL.md +36 -74
  74. package/skills/remember/SKILL.md +41 -91
  75. package/skills/seo-audit/SKILL.md +240 -0
  76. package/skills/tdd/SKILL.md +49 -4
  77. package/skills/write-skill/SKILL.md +18 -6
  78. package/templates/autopilot/PROMPT.md +39 -0
  79. package/templates/autopilot/README.md +122 -0
  80. package/templates/autopilot/devcontainer.json +21 -0
@@ -0,0 +1,240 @@
1
+ ---
2
+ name: seo-audit
3
+ description: "Use when auditing a website or web application for SEO issues - covering meta tags, structured data, content structure, Core Web Vitals indicators, and crawlability."
4
+ user-invocable: true
5
+ argument-hint: "[path or URL]"
6
+ allowed-tools: Read, Bash, Glob, Grep
7
+ ---
8
+
9
+ # /seo-audit - SEO Technical Audit
10
+
11
+ Audit web application source code for SEO issues - meta tags, structured data, content structure, Core Web Vitals indicators, and crawlability - producing a scored report with actionable fixes.
12
+
13
+ **Target:** $ARGUMENTS
14
+
15
+ ## When to Use
16
+
17
+ - Before launching a new website or landing page
18
+ - After major frontend refactors that may have broken SEO
19
+ - When organic search traffic has dropped
20
+ - During framework migration (SSR/SSG changes)
21
+ - When adding i18n and need hreflang setup
22
+ - Before a marketing campaign that depends on organic traffic
23
+ - NOT for: content strategy or keyword research (use `@marketing` SEO mode)
24
+ - NOT for: design or UX issues (use `/design-review`)
25
+ - NOT for: pure performance optimization (use `@perf`)
26
+
27
+ ## Workflow
28
+
29
+ ### Step 1: Scope & Rendering Strategy Detection
30
+
31
+ 1. **Identify pages/routes to audit:**
32
+
33
+ ```bash
34
+ # Find page/route files
35
+ find $TARGET -path "*/pages/*" -o -path "*/app/*" -o -path "*/routes/*" | grep -E "\.(tsx?|vue|svelte|astro)$" | grep -v "_\|layout\|error\|loading" | head -30
36
+ ```
37
+
38
+ 2. **Detect rendering strategy:**
39
+
40
+ ```bash
41
+ # Check for SSR/SSG configuration
42
+ grep -rn "getStaticProps\|getServerSideProps\|generateStaticParams\|getStaticPaths" $TARGET --include="*.ts" --include="*.tsx" 2>/dev/null | head -10
43
+ grep -rn "defineNuxtConfig\|ssr:\|prerender" $TARGET --include="*.ts" --include="*.config.*" 2>/dev/null | head -5
44
+ grep -rn "export const prerender\|export const ssr" $TARGET --include="*.ts" --include="*.svelte" 2>/dev/null | head -5
45
+ ```
46
+
47
+ 3. **Classify:** SSR (server-rendered), SSG (static), CSR (client-only), ISR (incremental), Hybrid
48
+
49
+ **Output:**
50
+ ```markdown
51
+ ## Scope
52
+ - Pages: [N] routes detected
53
+ - Framework: [Next.js/Nuxt/SvelteKit/Astro/other]
54
+ - Rendering: [SSR/SSG/CSR/ISR/Hybrid]
55
+ - i18n: [detected/not detected]
56
+ ```
57
+
58
+ ### Step 2: Technical SEO Audit
59
+
60
+ Check meta tags and structured data for each page:
61
+
62
+ | Check | What to Look For | Impact |
63
+ |-------|------------------|--------|
64
+ | Title tag | Unique, 50-60 chars, keyword-rich | HIGH |
65
+ | Meta description | Unique, 150-160 chars, compelling | HIGH |
66
+ | Open Graph tags | og:title, og:description, og:image, og:url | MEDIUM |
67
+ | Twitter cards | twitter:card, twitter:title, twitter:image | MEDIUM |
68
+ | Canonical URL | Self-referencing canonical on every page | HIGH |
69
+ | Robots meta | Proper noindex/nofollow where needed | HIGH |
70
+ | Structured data | JSON-LD for relevant schema types | MEDIUM |
71
+ | Hreflang | Present if multi-language | HIGH (if i18n) |
72
+ | Favicon | Present and proper size | LOW |
73
+
74
+ ```bash
75
+ # Check for meta tag implementation
76
+ grep -rn "title\|meta.*description\|og:title\|twitter:card" $TARGET --include="*.tsx" --include="*.vue" --include="*.svelte" --include="*.astro" 2>/dev/null | head -20
77
+
78
+ # Check for Head/Meta components (framework-specific)
79
+ grep -rn "Head>\|useHead\|useSeoMeta\|<svelte:head\|Astro.props" $TARGET --include="*.tsx" --include="*.vue" --include="*.svelte" --include="*.astro" 2>/dev/null | head -15
80
+
81
+ # Check for JSON-LD structured data
82
+ grep -rn "application/ld+json\|structuredData\|jsonLd" $TARGET --include="*.tsx" --include="*.vue" --include="*.svelte" 2>/dev/null | head -10
83
+ ```
84
+
85
+ ### Step 3: Content Structure Audit
86
+
87
+ | Check | Criteria | Severity |
88
+ |-------|----------|----------|
89
+ | H1 tag | Exactly one H1 per page | HIGH |
90
+ | Heading hierarchy | Logical H1 → H2 → H3, no skipped levels | MEDIUM |
91
+ | Alt text | All images have descriptive alt text | HIGH |
92
+ | Internal links | Meaningful anchor text, no "click here" | MEDIUM |
93
+ | Content length | Adequate content for the page type | LOW |
94
+ | Semantic HTML | Proper use of `<article>`, `<nav>`, `<main>`, `<section>` | MEDIUM |
95
+
96
+ ```bash
97
+ # Check heading usage
98
+ grep -rn "<h1\|<h2\|<h3\|<H1\|<H2\|<H3" $TARGET --include="*.tsx" --include="*.vue" --include="*.svelte" 2>/dev/null | head -20
99
+
100
+ # Check for missing alt text
101
+ grep -rn "<img\|<Image" $TARGET --include="*.tsx" --include="*.vue" --include="*.svelte" 2>/dev/null | grep -v "alt=" | head -10
102
+
103
+ # Check semantic HTML usage
104
+ grep -rn "<article\|<section\|<nav\|<main\|<aside\|<header\|<footer" $TARGET --include="*.tsx" --include="*.vue" --include="*.svelte" 2>/dev/null | wc -l
105
+ ```
106
+
107
+ ### Step 4: Performance & Core Web Vitals Indicators
108
+
109
+ Check code-level indicators that affect CWV:
110
+
111
+ | Check | CWV Metric | What to Look For |
112
+ |-------|-----------|------------------|
113
+ | Image optimization | LCP | next/image, lazy loading, srcset, WebP/AVIF |
114
+ | Font loading | CLS | display:swap, font preloading, system font fallback |
115
+ | JS bundle size | FID/INP | Dynamic imports, code splitting, tree shaking |
116
+ | CSS loading | CLS | Critical CSS inline, non-blocking stylesheet loading |
117
+ | Layout shifts | CLS | Explicit width/height on images, skeleton screens |
118
+ | Third-party scripts | FID/INP | Deferred/async loading, script placement |
119
+
120
+ ```bash
121
+ # Image optimization
122
+ grep -rn "<img\|<Image" $TARGET --include="*.tsx" --include="*.vue" 2>/dev/null | grep -v "loading=\|lazy\|next/image\|nuxt-img" | head -10
123
+
124
+ # Font loading strategy
125
+ grep -rn "font-display\|@font-face\|display.*swap" $TARGET --include="*.css" --include="*.tsx" 2>/dev/null | head -5
126
+
127
+ # Dynamic imports (code splitting)
128
+ grep -rn "dynamic(\|lazy(\|import(" $TARGET --include="*.tsx" --include="*.vue" --include="*.ts" 2>/dev/null | grep -v "node_modules" | head -10
129
+
130
+ # Third-party scripts
131
+ grep -rn "<script.*src=\|<Script" $TARGET --include="*.tsx" --include="*.vue" --include="*.html" 2>/dev/null | head -10
132
+ ```
133
+
134
+ ### Step 5: Crawlability Audit
135
+
136
+ | Check | What to Look For |
137
+ |-------|------------------|
138
+ | robots.txt | Exists, allows critical paths, blocks /api and admin |
139
+ | Sitemap | sitemap.xml exists and includes all public routes |
140
+ | 404 page | Custom 404 with navigation, proper status code |
141
+ | Redirects | No redirect chains (>2 hops), 301 for permanent |
142
+ | URL structure | Clean, descriptive slugs, no query params for content |
143
+ | SPA concerns | Prerendering for CSR apps, proper hydration |
144
+ | Dynamic routes | Meta tags set per-route, not hardcoded |
145
+
146
+ ```bash
147
+ # Check for robots.txt
148
+ find . -name "robots.txt" -not -path "*/node_modules/*" 2>/dev/null
149
+
150
+ # Check for sitemap
151
+ find . -name "sitemap*" -not -path "*/node_modules/*" 2>/dev/null
152
+ grep -rn "sitemap" $TARGET --include="*.ts" --include="*.config.*" 2>/dev/null | head -5
153
+
154
+ # Check for 404 page
155
+ find $TARGET -name "404*" -o -name "not-found*" -o -name "\[...slug\]*" 2>/dev/null | head -5
156
+
157
+ # Check for redirect configuration
158
+ grep -rn "redirect\|rewrite" $TARGET --include="*.config.*" --include="*.ts" 2>/dev/null | head -10
159
+ ```
160
+
161
+ ### Step 6: Scoring & Report
162
+
163
+ Score each category 0-100:
164
+
165
+ | Score Range | Rating |
166
+ |-------------|--------|
167
+ | 90-100 | Excellent |
168
+ | 70-89 | Good |
169
+ | 50-69 | Needs Work |
170
+ | 0-49 | Critical |
171
+
172
+ **Scoring formula per category:**
173
+ - Start at 100
174
+ - CRITICAL finding: -25 points
175
+ - HIGH finding: -15 points
176
+ - MEDIUM finding: -10 points
177
+ - LOW finding: -5 points
178
+ - Minimum: 0
179
+
180
+ ## Verification Protocol
181
+
182
+ **Before claiming the audit is complete:**
183
+
184
+ 1. All 5 audit dimensions were checked (technical SEO, content, CWV, crawlability, rendering)
185
+ 2. Every finding has severity level and file:line reference
186
+ 3. Rendering strategy was correctly identified and audit was adapted to it
187
+ 4. Framework-specific meta patterns were checked (not just raw HTML)
188
+ 5. At least 3 pages/routes were individually scanned
189
+ 6. Scores were calculated with the formula above
190
+
191
+ ## Anti-Rationalization
192
+
193
+ | Excuse | Reality |
194
+ |--------|---------|
195
+ | "SEO doesn't matter for our app" | Even SaaS apps need landing pages that rank. SEO drives organic acquisition at zero marginal cost. |
196
+ | "We'll add meta tags later" | Missing meta tags from day 1 means lost indexing time. Search engines need weeks to crawl and rank. |
197
+ | "It's a SPA, SEO doesn't apply" | SPAs need SSR/SSG for SEO. If Google can't render it, it doesn't exist in search results. |
198
+ | "Our content is good enough" | Good content with bad technical SEO is invisible. Fix the plumbing so the content can flow. |
199
+ | "The framework handles SEO" | Frameworks provide tools, not configuration. You still need proper meta, structured data, and sitemap. |
200
+ | "We don't need structured data" | Rich snippets increase CTR by 20-40%. Structured data is free visibility in search results. |
201
+ | "We'll do SEO after launch" | Retrofitting SEO is 3-5x more expensive than building it in. Especially for routing and rendering changes. |
202
+
203
+ ## Rules
204
+
205
+ 1. **Read-only** - Never modify files during an audit
206
+ 2. **Framework-aware** - Check framework-specific meta patterns, not just raw HTML
207
+ 3. **Rendering-aware** - Adapt checks to SSR/SSG/CSR strategy
208
+ 4. **Score every category** - Use the scoring formula consistently
209
+ 5. **Evidence required** - Every finding needs a file:line reference
210
+ 6. **Prioritize by impact** - CRITICAL findings first, always
211
+ 7. **No vanity metrics** - Focus on technical SEO, not keyword density or word count
212
+
213
+ ## Output
214
+
215
+ ```
216
+ ──── /seo-audit ────
217
+ Target: $ARGUMENTS
218
+ Framework: [detected]
219
+ Rendering: [SSR/SSG/CSR/Hybrid]
220
+ Pages scanned: [N]
221
+
222
+ Technical SEO: [score]/100 - [N findings]
223
+ Content: [score]/100 - [N findings]
224
+ Performance: [score]/100 - [N findings]
225
+ Crawlability: [score]/100 - [N findings]
226
+
227
+ Severity:
228
+ CRITICAL: N
229
+ HIGH: N
230
+ MEDIUM: N
231
+ LOW: N
232
+
233
+ Top Findings:
234
+ 1. [CRITICAL] [description] - [file:line]
235
+ 2. [HIGH] [description] - [file:line]
236
+ 3. [HIGH] [description] - [file:line]
237
+
238
+ Overall SEO Score: [N]/100
239
+ Rating: [Excellent | Good | Needs Work | Critical]
240
+ ```
@@ -12,6 +12,18 @@ Implement the feature using strict TDD methodology.
12
12
 
13
13
  **Target:** $ARGUMENTS
14
14
 
15
+ ## When to Use
16
+
17
+ - Implementing a new function, service, or module where correctness is critical
18
+ - Fixing a bug that needs a regression test to prove it's fixed
19
+ - Building business logic (calculations, validations, state machines)
20
+ - When code handles money, auth, or sensitive data
21
+ - Refactoring existing code that lacks test coverage
22
+ - NOT for: quick prototypes or throwaway code
23
+ - NOT for: pure UI layout changes with no logic
24
+ - NOT for: configuration changes (env vars, build config)
25
+ - NOT for: code that already has comprehensive tests (just add to existing suite)
26
+
15
27
  ## Iron Law
16
28
 
17
29
  ```
@@ -32,6 +44,33 @@ For each behavior to implement:
32
44
  └───────┘ └───────┘ └──────────┘
33
45
  ```
34
46
 
47
+ ### Step 0: Detect Test Runner
48
+
49
+ Auto-detect the project's test runner before starting:
50
+
51
+ ```bash
52
+ # Detect test runner from package.json or config files
53
+ if [ -f "vitest.config.ts" ] || [ -f "vitest.config.js" ] || grep -q '"vitest"' package.json 2>/dev/null; then
54
+ TEST_CMD="npx vitest run"
55
+ TEST_FILTER="--testNamePattern"
56
+ elif [ -f "jest.config.ts" ] || [ -f "jest.config.js" ] || grep -q '"jest"' package.json 2>/dev/null; then
57
+ TEST_CMD="npx jest"
58
+ TEST_FILTER="--testNamePattern"
59
+ elif [ -f "playwright.config.ts" ] || [ -f "playwright.config.js" ]; then
60
+ TEST_CMD="npx playwright test"
61
+ TEST_FILTER="--grep"
62
+ elif grep -q '"mocha"' package.json 2>/dev/null; then
63
+ TEST_CMD="npx mocha"
64
+ TEST_FILTER="--grep"
65
+ else
66
+ TEST_CMD="npm test --"
67
+ TEST_FILTER="--testNamePattern"
68
+ fi
69
+ echo "Test runner: $TEST_CMD"
70
+ ```
71
+
72
+ Use the detected `$TEST_CMD` and `$TEST_FILTER` throughout all cycles.
73
+
35
74
  ### Step 1: RED - Write Failing Test
36
75
 
37
76
  1. **Create/open test file**
@@ -50,7 +89,7 @@ For each behavior to implement:
50
89
  ```
51
90
  3. **Run test:**
52
91
  ```bash
53
- npm test -- --testNamePattern="[test name]"
92
+ $TEST_CMD $TEST_FILTER="[test name]"
54
93
  ```
55
94
  4. **Verify FAILS** - Capture output showing failure
56
95
  5. **BLOCKED** if test passes (wrong test or code exists)
@@ -64,7 +103,7 @@ For each behavior to implement:
64
103
 
65
104
  2. **Run test:**
66
105
  ```bash
67
- npm test -- --testNamePattern="[test name]"
106
+ $TEST_CMD $TEST_FILTER="[test name]"
68
107
  ```
69
108
  3. **Verify PASSES** - Capture output showing success
70
109
  4. **BLOCKED** if test fails (fix before continuing)
@@ -78,10 +117,14 @@ For each behavior to implement:
78
117
 
79
118
  2. **Run ALL tests:**
80
119
  ```bash
81
- npm test
120
+ $TEST_CMD
82
121
  ```
83
122
  3. **Verify ALL PASS**
84
- 4. **Commit cycle:**
123
+ 4. **Check coverage change** (if coverage tool is available):
124
+ ```bash
125
+ $TEST_CMD --coverage 2>/dev/null | grep -A 5 "Stmts\|Lines\|%" || true
126
+ ```
127
+ 5. **Commit cycle:**
85
128
  ```bash
86
129
  git add -A && git commit -m "feat: [behavior] (TDD cycle N)"
87
130
  ```
@@ -145,6 +188,8 @@ Coverage: [if available]
145
188
  | "I'll write tests after" | Tests written after implementation verify your bias, not correctness. |
146
189
  | "The test framework isn't set up" | Set it up. That's part of the task. |
147
190
  | "Just this once I'll skip RED" | "Just this once" is how every shortcut becomes a habit. |
191
+ | "The existing tests are enough" | Enough for what? New behavior needs new tests. Existing tests verify old assumptions. |
192
+ | "I'll test the integration, not the unit" | Integration tests verify wiring. Unit tests verify logic. You need both. Start with unit. |
148
193
 
149
194
  ## Rules
150
195
 
@@ -130,11 +130,15 @@ Before writing the skill, test what happens WITHOUT it:
130
130
  Write a skill that addresses the specific failures from RED:
131
131
 
132
132
  ```markdown
133
- 1. Create skills/[name]/SKILL.md
134
- 2. Address ONLY the failures observed in baseline
135
- 3. Don't add hypothetical cases
136
- 4. Test again WITH the skill loaded
137
- 5. Verify the agent now behaves correctly
133
+ 1. Check for duplicate skills BEFORE creating:
134
+ - Search existing skills by name: find skills/ -name "SKILL.md" | head -30
135
+ - Search by keywords in descriptions: grep -l "[keyword]" skills/*/SKILL.md
136
+ - If a similar skill exists, EXTEND it instead of creating a new one
137
+ 2. Create skills/[name]/SKILL.md
138
+ 3. Address ONLY the failures observed in baseline
139
+ 4. Don't add hypothetical cases
140
+ 5. Test again WITH the skill loaded
141
+ 6. Verify the agent now behaves correctly
138
142
  ```
139
143
 
140
144
  ### REFACTOR: Close Loopholes
@@ -157,12 +161,13 @@ Before deploying the skill:
157
161
  - [ ] Description starts with "Use when..."
158
162
  - [ ] Description does NOT summarize workflow
159
163
  - [ ] Name uses only lowercase, numbers, hyphens
164
+ - [ ] No duplicate skill exists with same name or overlapping purpose
160
165
 
161
166
  ### Content
162
167
  - [ ] Clear overview with core principle
163
168
  - [ ] Workflow with numbered steps
164
169
  - [ ] Verification Protocol section
165
- - [ ] Anti-Rationalization table
170
+ - [ ] Anti-Rationalization table (5+ entries)
166
171
  - [ ] Rules section
167
172
  - [ ] Output format section
168
173
 
@@ -172,10 +177,17 @@ Before deploying the skill:
172
177
  - [ ] Concise (< 500 words for frequently-loaded skills)
173
178
  - [ ] Keywords for search throughout
174
179
 
180
+ ### Pack Awareness (if writing for a framework pack)
181
+ - [ ] Skill placed in packs/[framework]/skills/[name]/SKILL.md
182
+ - [ ] Examples use framework-specific patterns (not generic)
183
+ - [ ] Test commands match framework tooling (Vitest for Vue/React, Jest for Angular, etc.)
184
+ - [ ] References pack's ARCHITECTURE.md for conventions
185
+
175
186
  ### Testing
176
187
  - [ ] Baseline tested WITHOUT skill (RED)
177
188
  - [ ] Agent complies WITH skill (GREEN)
178
189
  - [ ] Rationalizations addressed (REFACTOR)
190
+ - [ ] Passes validation: node tests/validate-agents.mjs --strict
179
191
  ```
180
192
 
181
193
  ## Anti-Rationalization
@@ -0,0 +1,39 @@
1
+ # Autopilot - Iteration {{ITERATION}} of {{MAX_ITERATIONS}}
2
+
3
+ ## Source of Truth (PRD)
4
+
5
+ {{PRD_CONTENT}}
6
+
7
+ ## Current Progress
8
+
9
+ {{PROGRESS_CONTENT}}
10
+
11
+ ## Instructions
12
+
13
+ 1. Read the PRD above carefully - it is your source of truth
14
+ 2. Read the progress above to understand what has been completed
15
+ 3. If the Tasks table is empty, extract all implementable tasks from the PRD and update the Tasks table in `{{PROGRESS_FILE}}` with proper entries (Status: PENDING)
16
+ 4. Find the NEXT task with Status = PENDING
17
+ 5. If no PENDING tasks remain, update Status to COMPLETE and add `{{COMPLETION_SIGNAL}}` as the last line of `{{PROGRESS_FILE}}`, then exit
18
+ 6. Execute that ONE task completely:
19
+ - Follow existing codebase patterns and conventions
20
+ - Write clean, tested code following SOLID principles
21
+ - Run tests if a test command exists
22
+ - Run type checking if applicable
23
+ 7. Update `{{PROGRESS_FILE}}`:
24
+ - Mark the task as DONE (or BLOCKED if it failed after your best effort)
25
+ - Increment "Current iteration" to {{ITERATION}}
26
+ - Add an entry to the Iteration Log with: task number, result, files changed, notes
27
+ 8. Git commit your work:
28
+ ```bash
29
+ git add -A && git commit -m "autopilot: iteration {{ITERATION}} - [brief task description]"
30
+ ```
31
+ 9. Exit when done with this ONE task
32
+
33
+ ## Constraints
34
+
35
+ - Work on exactly ONE task per iteration
36
+ - Do NOT skip ahead or combine tasks
37
+ - If a task fails after 2 attempts, mark it BLOCKED with error notes and move to the next PENDING task
38
+ - Do NOT modify the PRD file
39
+ - Always update `{{PROGRESS_FILE}}` before exiting
@@ -0,0 +1,122 @@
1
+ # Autopilot - DevContainer Setup
2
+
3
+ Run Autopilot safely inside a container with full autonomy.
4
+
5
+ ## Why DevContainer?
6
+
7
+ Running `claude --dangerously-skip-permissions` gives Claude
8
+ unrestricted access to your system. A DevContainer isolates
9
+ execution so Claude cannot affect your host machine.
10
+
11
+ ## Quick Start
12
+
13
+ ### 1. Copy DevContainer Config
14
+
15
+ ```bash
16
+ mkdir -p .devcontainer
17
+ cp templates/autopilot/devcontainer.json .devcontainer/devcontainer.json
18
+ ```
19
+
20
+ ### 2. Set API Key
21
+
22
+ Ensure `ANTHROPIC_API_KEY` is set in your host environment:
23
+
24
+ ```bash
25
+ # Linux/macOS
26
+ export ANTHROPIC_API_KEY="your-key-here"
27
+
28
+ # Windows (PowerShell)
29
+ $env:ANTHROPIC_API_KEY = "your-key-here"
30
+ ```
31
+
32
+ The DevContainer automatically forwards this env var.
33
+
34
+ ### 3. Open in Container
35
+
36
+ In VS Code:
37
+ 1. Install the **Dev Containers** extension (ms-vscode-remote)
38
+ 2. Open the project folder
39
+ 3. Click the bottom-left corner → **Reopen in Container**
40
+ 4. Wait for container build to complete
41
+
42
+ ### 4. Create a PRD
43
+
44
+ Inside the container terminal:
45
+
46
+ ```bash
47
+ claude
48
+ # Then: /prd "Your feature description"
49
+ # Exit claude after PRD is generated
50
+ ```
51
+
52
+ ### 5. Run Autopilot
53
+
54
+ ```bash
55
+ ./scripts/autopilot.sh docs/PRD-your-feature.md \
56
+ --max-iterations=10 \
57
+ --model=claude-opus-4-6 \
58
+ --dangerously-skip-permissions
59
+ ```
60
+
61
+ Leave it running. Come back later to check results.
62
+
63
+ ## Options Reference
64
+
65
+ | Option | Default | Description |
66
+ |--------|---------|-------------|
67
+ | `--max-iterations=N` | 10 | Safety limit |
68
+ | `--model=MODEL` | claude-sonnet-4-6 | Claude model |
69
+ | `--completion-signal=STR` | AUTOPILOT_COMPLETE | Stop signal |
70
+ | `--progress-file=PATH` | .claude/autopilot/progress.md | State file |
71
+ | `--dangerously-skip-permissions` | off | Auto-approve |
72
+
73
+ ## Checking Progress
74
+
75
+ From another terminal (or after the loop finishes):
76
+
77
+ ```bash
78
+ cat .claude/autopilot/progress.md
79
+ git log --oneline
80
+ ```
81
+
82
+ ## Resuming After Interruption
83
+
84
+ Just run the same command again. The script reads
85
+ `progress.md` and continues from where it stopped.
86
+
87
+ ## Rollback
88
+
89
+ If something went wrong:
90
+
91
+ ```bash
92
+ # List restore points
93
+ git tag -l "restore-point/ralf-*"
94
+
95
+ # Rollback to the start
96
+ git reset --hard restore-point/ralf-[timestamp]
97
+ ```
98
+
99
+ ## Security Notes
100
+
101
+ - The container is isolated from your host filesystem
102
+ - `--dangerously-skip-permissions` only affects the container
103
+ - Claude cannot access host files, network, or processes
104
+ - Always review generated code before merging to main
105
+ - Use a feature branch for Autopilot work
106
+
107
+ ## Troubleshooting
108
+
109
+ **Claude CLI not found:**
110
+ The container runs `npm install` on creation.
111
+ If Claude is missing, run `npm install -g @anthropic-ai/claude-code`.
112
+
113
+ **API key not forwarded:**
114
+ Check that `ANTHROPIC_API_KEY` is set on your host
115
+ before opening the container.
116
+
117
+ **Permission denied on script:**
118
+ Run `chmod +x scripts/autopilot.sh`.
119
+
120
+ **Container build fails:**
121
+ Ensure Docker Desktop is running and has enough resources
122
+ (at least 4GB RAM allocated).
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "Autopilot - Specialist Agent",
3
+ "image": "mcr.microsoft.com/devcontainers/javascript-node:22",
4
+ "features": {
5
+ "ghcr.io/devcontainers/features/git:1": {},
6
+ "ghcr.io/devcontainers/features/github-cli:1": {}
7
+ },
8
+ "postCreateCommand": "npm install && chmod +x scripts/autopilot.sh",
9
+ "customizations": {
10
+ "vscode": {
11
+ "extensions": [
12
+ "anthropics.claude-code"
13
+ ]
14
+ }
15
+ },
16
+ "remoteEnv": {
17
+ "ANTHROPIC_API_KEY": "${localEnv:ANTHROPIC_API_KEY}"
18
+ },
19
+ "mounts": [],
20
+ "runArgs": ["--init"]
21
+ }