opencodekit 0.17.1 → 0.17.2

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 (26) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENT_ALIGNMENT.md +564 -0
  3. package/dist/template/.opencode/agent/build.md +140 -0
  4. package/dist/template/.opencode/agent/general.md +89 -0
  5. package/dist/template/.opencode/agent/plan.md +175 -0
  6. package/dist/template/.opencode/agent/review.md +96 -0
  7. package/dist/template/.opencode/command/create.md +57 -15
  8. package/dist/template/.opencode/command/init-context.md +259 -0
  9. package/dist/template/.opencode/command/init-user.md +103 -0
  10. package/dist/template/.opencode/command/init.md +53 -39
  11. package/dist/template/.opencode/command/plan.md +200 -16
  12. package/dist/template/.opencode/command/ship.md +251 -17
  13. package/dist/template/.opencode/command/start.md +35 -4
  14. package/dist/template/.opencode/memory/_templates/PROJECT.md +58 -0
  15. package/dist/template/.opencode/memory/_templates/ROADMAP.md +93 -0
  16. package/dist/template/.opencode/memory/_templates/STATE.md +89 -0
  17. package/dist/template/.opencode/memory/_templates/tech-stack.md +35 -0
  18. package/dist/template/.opencode/memory/project/project.md +92 -0
  19. package/dist/template/.opencode/memory/project/roadmap.md +142 -0
  20. package/dist/template/.opencode/memory/project/state.md +84 -0
  21. package/dist/template/.opencode/opencode.json +1030 -1027
  22. package/dist/template/.opencode/package.json +1 -1
  23. package/dist/template/.opencode/skill/context-initialization/SKILL.md +60 -0
  24. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +76 -0
  25. package/dist/template/.opencode/skill/writing-plans/SKILL.md +68 -0
  26. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -759,7 +759,7 @@ var cac = (name = "") => new CAC(name);
759
759
  // package.json
760
760
  var package_default = {
761
761
  name: "opencodekit",
762
- version: "0.17.1",
762
+ version: "0.17.2",
763
763
  description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
764
764
  keywords: ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
765
765
  license: "MIT",
@@ -0,0 +1,564 @@
1
+ # GSD ↔ OpenCodeKit Agent Alignment
2
+
3
+ ## Executive Summary
4
+
5
+ GSD has **11 specialized agents** (~12,000 total lines) vs OpenCodeKit's **8 general agents** (~1,200 total lines). GSD's depth enables rigorous execution; OpenCodeKit's simplicity enables faster adoption. This document maps them and proposes a hybrid architecture.
6
+
7
+ ---
8
+
9
+ ## Agent Mapping Matrix
10
+
11
+ | GSD Agent | Lines | Role | OpenCodeKit Equivalent | Gap Analysis |
12
+ | -------------------------- | ----- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
13
+ | `gsd-planner` | 1,158 | Creates executable phase plans with goal-backward methodology, dependency graphs, wave assignment | `plan` (225 lines) | **5x depth gap**: GSD has TDD detection, discovery levels, scope estimation, gap closure mode, revision mode |
14
+ | `gsd-executor` | 404 | Executes plans atomically with deviation rules, checkpoint protocol, TDD cycles | `build` (191 lines) | **2x depth gap**: GSD has 4 deviation rules, auth gates, task commit protocol, self-check |
15
+ | `gsd-verifier` | 524 | Goal-backward verification (not task completion) with 3-level artifact checks | `review` (104 lines) + `verification-before-completion` skill | **Verifies goals vs code**: GSD checks if phase goal achieved, not just if tasks ran |
16
+ | `gsd-debugger` | 1,199 | Systematic debugging with scientific method, hypothesis testing, debug file protocol | `systematic-debugging` + `root-cause-tracing` skills | **Structured process**: GSD has debug file protocol, evidence tracking, elimination lists |
17
+ | `gsd-phase-researcher` | ~300 | Domain research for specific phases | `scout` (91 lines) | Similar scope, GSD has more structured output |
18
+ | `gsd-research-synthesizer` | ~200 | Aggregates parallel research findings | _No equivalent_ | **Missing**: Multi-agent research aggregation |
19
+ | `gsd-plan-checker` | ~400 | Validates plans against requirements before execution | _No equivalent_ | **Missing**: Pre-execution plan validation |
20
+ | `gsd-roadmapper` | ~300 | Creates ROADMAP.md with phase structure | _No equivalent_ | **Missing**: Dedicated roadmap creation |
21
+ | `gsd-codebase-mapper` | ~500 | Analyzes existing codebase architecture | `explore` (65 lines) | Deeper analysis: stack, conventions, concerns, architecture |
22
+ | `gsd-project-researcher` | ~250 | Project-level ecosystem research | `scout` | Overlaps with phase-researcher |
23
+ | `gsd-integration-checker` | ~200 | Validates integrations work correctly | _No equivalent_ | **Missing**: Integration validation agent |
24
+
25
+ ---
26
+
27
+ ## Detailed Alignment
28
+
29
+ ### 1. PLANNER ALIGNMENT
30
+
31
+ #### GSD gsd-planner (1,158 lines)
32
+
33
+ ```yaml
34
+ Core Capabilities:
35
+ - Goal-backward methodology (truths → artifacts → wiring)
36
+ - Discovery levels (0-3) with mandatory protocol
37
+ - TDD detection heuristic
38
+ - Dependency graph construction (needs/creates/has_checkpoint)
39
+ - Wave assignment for parallel execution
40
+ - Scope estimation with context budget rules (~50% target)
41
+ - Gap closure mode (--gaps flag)
42
+ - Revision mode (checker feedback incorporation)
43
+ - Checkpoint protocol (3 types with structured returns)
44
+ - XML task format specification
45
+
46
+ Key Concepts:
47
+ - Plans ARE prompts (not documents that become prompts)
48
+ - Vertical slices preferred over horizontal layers
49
+ - 2-3 tasks per plan maximum
50
+ - Deviation rules (4 rules for auto-fixing)
51
+ ```
52
+
53
+ #### OpenCodeKit plan (225 lines)
54
+
55
+ ```yaml
56
+ Core Capabilities:
57
+ - Architecture as ritual philosophy
58
+ - Five-phase ritual (Ground → Calibrate → Transform → Release → Reset)
59
+ - Memory ritual for planning context
60
+ - Delegation to @explore and @scout
61
+ - Basic plan artifact structure
62
+
63
+ Gaps vs GSD:
64
+ - No goal-backward methodology
65
+ - No discovery levels
66
+ - No TDD detection
67
+ - No dependency graphs or wave assignment
68
+ - No context budget awareness
69
+ - No checkpoint protocol
70
+ - No gap closure or revision modes
71
+ ```
72
+
73
+ #### Recommended: Enhanced plan Agent
74
+
75
+ ```markdown
76
+ ## Enhancements to port from GSD:
77
+
78
+ 1. **Add Goal-Backward Section**
79
+ - Derive observable truths from PRD goals
80
+ - Map truths → artifacts → wiring
81
+ - Document must_haves in plan frontmatter
82
+
83
+ 2. **Add Discovery Levels**
84
+ - Level 0: Skip (existing patterns only)
85
+ - Level 1: Quick verification (2-5 min)
86
+ - Level 2: Standard research (15-30 min)
87
+ - Level 3: Deep dive (1+ hour)
88
+
89
+ 3. **Add Dependency Graph Construction**
90
+ - For each task: record needs/creates/has_checkpoint
91
+ - Assign waves based on dependencies
92
+ - Identify parallelization opportunities
93
+
94
+ 4. **Add Context Budget Rules**
95
+ - ~50% context target per plan
96
+ - 2-3 tasks maximum per plan
97
+ - Split signals (>5 files, >3 tasks)
98
+
99
+ 5. **Add Checkpoint Protocol**
100
+ - checkpoint:human-verify (90% of cases)
101
+ - checkpoint:decision (9%)
102
+ - checkpoint:human-action (1%)
103
+ ```
104
+
105
+ ---
106
+
107
+ ### 2. EXECUTOR ALIGNMENT
108
+
109
+ #### GSD gsd-executor (404 lines)
110
+
111
+ ```yaml
112
+ Core Capabilities:
113
+ - Deviation rules (4 explicit rules)
114
+ - Authentication gates (auth errors as checkpoints)
115
+ - Checkpoint protocol with continuation handling
116
+ - TDD execution (RED → GREEN → REFACTOR)
117
+ - Task commit protocol (per-task commits)
118
+ - Summary creation with frontmatter
119
+ - Self-check before proceeding
120
+ - State updates via gsd-tools
121
+
122
+ Deviation Rules:
123
+ Rule 1: Auto-fix bugs (no permission needed)
124
+ Rule 2: Auto-add missing critical functionality
125
+ Rule 3: Auto-fix blocking issues
126
+ Rule 4: ASK about architectural changes
127
+ ```
128
+
129
+ #### OpenCodeKit build (191 lines)
130
+
131
+ ```yaml
132
+ Core Capabilities:
133
+ - Five-phase ritual (Ground → Calibrate → Transform → Release → Reset)
134
+ - Verification as calibration
135
+ - Memory ritual
136
+ - Delegation patterns
137
+ - Skills loading
138
+
139
+ Gaps vs GSD:
140
+ - No deviation rules
141
+ - No checkpoint protocol
142
+ - No TDD execution flow
143
+ - No per-task commit protocol
144
+ - No self-check requirement
145
+ ```
146
+
147
+ #### Recommended: Enhanced build Agent
148
+
149
+ ```markdown
150
+ ## Enhancements to port from GSD:
151
+
152
+ 1. **Add Deviation Rules Section**
153
+ - Rule 1: Auto-fix bugs (broken behavior, errors)
154
+ - Rule 2: Auto-add missing critical functionality (validation, auth, error handling)
155
+ - Rule 3: Auto-fix blocking issues (missing deps, wrong types)
156
+ - Rule 4: ASK about architectural changes (new tables, library switches)
157
+
158
+ 2. **Add Checkpoint Protocol**
159
+ - Stop at checkpoint:\* tasks
160
+ - Return structured checkpoint message
161
+ - Support continuation agents
162
+
163
+ 3. **Add TDD Execution Flow**
164
+ - RED: Create failing test → commit
165
+ - GREEN: Minimal code to pass → commit
166
+ - REFACTOR: Clean up → commit if changes
167
+
168
+ 4. **Add Task Commit Protocol**
169
+ - Check modified files: git status --short
170
+ - Stage individually (NEVER git add .)
171
+ - Commit format: type(phase-plan): description
172
+ - Record hash for summary
173
+
174
+ 5. **Add Self-Check Requirement**
175
+ - Verify created files exist
176
+ - Verify commits exist
177
+ - Append result to summary
178
+ ```
179
+
180
+ ---
181
+
182
+ ### 3. VERIFIER ALIGNMENT
183
+
184
+ #### GSD gsd-verifier (524 lines)
185
+
186
+ ```yaml
187
+ Core Philosophy:
188
+ - Task completion ≠ Goal achievement
189
+ - Goal-backward verification (not task-forward)
190
+ - Do NOT trust SUMMARY.md claims
191
+ - Verify what ACTUALLY exists in code
192
+
193
+ Three-Level Verification:
194
+ Level 1: Exists (file present)
195
+ Level 2: Substantive (not a stub)
196
+ Level 3: Wired (connected/used)
197
+
198
+ Artifact Verification:
199
+ - Use gsd-tools for automated checks
200
+ - Map to must_haves from PLAN frontmatter
201
+ - Status: VERIFIED | STUB | MISSING | ORPHANED
202
+
203
+ Key Link Verification:
204
+ - Component → API (fetch + response handling)
205
+ - API → Database (query + result returned)
206
+ - Form → Handler (handler + API call)
207
+ - State → Render (state displayed)
208
+ ```
209
+
210
+ #### OpenCodeKit review (104 lines)
211
+
212
+ ```yaml
213
+ Core Philosophy:
214
+ - Read-only review agent
215
+ - Quality guardian mindset
216
+ - Severity-ranked findings (P0-P3)
217
+
218
+ Triage Criteria:
219
+ - Affects correctness, performance, security
220
+ - Introduced or worsened by change
221
+ - Fixable without unrealistic rigor
222
+ - Author would actually want to fix
223
+
224
+ Gaps vs GSD:
225
+ - Reviews code changes, not goal achievement
226
+ - No three-level artifact verification
227
+ - No key link verification
228
+ - No stub detection patterns
229
+ ```
230
+
231
+ #### Recommended: New verify Agent OR Enhanced review
232
+
233
+ ````markdown
234
+ ## Option A: New verify Agent (recommended)
235
+
236
+ Create `.opencode/agent/verify.md` as goal-backward verifier:
237
+
238
+ ```yaml
239
+ ---
240
+ description: Goal-backward verification agent - checks if goals are achieved, not just tasks completed
241
+ mode: subagent
242
+ ---
243
+ Core Responsibilities: 1. Load PRD success criteria
244
+ 2. Derive observable truths
245
+ 3. Verify artifacts exist and are substantive
246
+ 4. Verify key links are wired
247
+ 5. Detect stubs and anti-patterns
248
+ 6. Report gaps in structured format
249
+ ```
250
+ ````
251
+
252
+ ## Option B: Enhanced review Agent
253
+
254
+ Add section to existing review.md:
255
+
256
+ - Goal-backward verification mode
257
+ - Three-level artifact checking
258
+ - Stub detection patterns
259
+ - Key link verification
260
+
261
+ ````
262
+
263
+ ---
264
+
265
+ ### 4. DEBUGGER ALIGNMENT
266
+
267
+ #### GSD gsd-debugger (1,199 lines)
268
+ ```yaml
269
+ Core Philosophy:
270
+ - User = Reporter, Claude = Investigator
271
+ - Meta-debugging: fighting your own mental model
272
+ - Scientific method: falsifiable hypotheses
273
+ - Foundation principles: observable facts only
274
+
275
+ Cognitive Biases to Avoid:
276
+ - Confirmation bias
277
+ - Anchoring
278
+ - Availability bias
279
+ - Sunk cost fallacy
280
+
281
+ Investigation Techniques:
282
+ - Binary search / divide and conquer
283
+ - Rubber duck debugging
284
+ - Minimal reproduction
285
+ - Working backwards
286
+ - Differential debugging
287
+ - Observability first
288
+ - Comment out everything
289
+ - Git bisect
290
+
291
+ Debug File Protocol:
292
+ Location: .planning/debug/{slug}.md
293
+ Sections: Symptoms, Eliminated, Evidence, Resolution
294
+ Update rules: OVERWRITE vs APPEND
295
+ Status transitions: gathering → investigating → fixing → verifying → resolved
296
+ ````
297
+
298
+ #### OpenCodeKit Skills
299
+
300
+ ```yaml
301
+ Existing:
302
+ - systematic-debugging skill
303
+ - root-cause-tracing skill
304
+
305
+ Gaps vs GSD:
306
+ - No debug file protocol
307
+ - No persistent debug state
308
+ - No cognitive bias awareness
309
+ - No investigation technique library
310
+ ```
311
+
312
+ #### Recommended: Port to New Skill
313
+
314
+ ```markdown
315
+ ## Create `.opencode/skill/gsd-debugging/SKILL.md`
316
+
317
+ Port GSD debugger content as skill:
318
+
319
+ - Scientific method framework
320
+ - Hypothesis testing protocol
321
+ - Investigation techniques (8 methods)
322
+ - Debug file protocol
323
+ - Verification patterns
324
+ - Research vs reasoning decision tree
325
+ ```
326
+
327
+ ---
328
+
329
+ ### 5. RESEARCH AGENTS ALIGNMENT
330
+
331
+ #### GSD Research Agents
332
+
333
+ ```yaml
334
+ gsd-phase-researcher:
335
+ - Domain research for specific phases
336
+ - Stack investigation
337
+ - Architecture patterns
338
+ - Pitfall identification
339
+
340
+ gsd-research-synthesizer:
341
+ - Aggregates parallel research findings
342
+ - Resolves conflicts
343
+ - Produces unified recommendations
344
+
345
+ gsd-project-researcher:
346
+ - Project-level ecosystem research
347
+ - Similar to phase-researcher but broader
348
+ ```
349
+
350
+ #### OpenCodeKit Research Agents
351
+
352
+ ```yaml
353
+ scout (91 lines):
354
+ - External research specialist
355
+ - Source quality hierarchy
356
+ - Concise recommendations
357
+
358
+ explore (65 lines):
359
+ - Read-only codebase cartographer
360
+ - LSP-based symbol lookup
361
+ - Usage pattern discovery
362
+ ```
363
+
364
+ #### Gap: Research Synthesizer
365
+
366
+ ```markdown
367
+ ## Missing: gsd-research-synthesizer equivalent
368
+
369
+ When multiple scout/explore agents run in parallel,
370
+ there's no dedicated agent to:
371
+
372
+ - Aggregate findings
373
+ - Resolve conflicts
374
+ - Produce unified recommendations
375
+
376
+ Recommendation: Add synthesis responsibility to plan agent
377
+ or create dedicated research-lead agent.
378
+ ```
379
+
380
+ ---
381
+
382
+ ### 6. SPECIALIZED GSD AGENTS (No OpenCodeKit Equivalent)
383
+
384
+ #### gsd-plan-checker (~400 lines)
385
+
386
+ ```markdown
387
+ Validates plans against requirements before execution.
388
+
389
+ Dimensions Checked:
390
+
391
+ - requirement_coverage: All requirements have tasks
392
+ - task_completeness: All tasks have required elements
393
+ - dependency_correctness: Dependencies are valid
394
+ - key_links_planned: Critical connections planned
395
+ - scope_sanity: Plan is achievable
396
+ - must_haves_derivation: must_haves exist and are valid
397
+
398
+ Recommendation: Add as skill or plan agent mode
399
+ ```
400
+
401
+ #### gsd-roadmapper (~300 lines)
402
+
403
+ ```markdown
404
+ Creates ROADMAP.md with phase structure.
405
+
406
+ Outputs:
407
+
408
+ - PROJECT.md (vision)
409
+ - REQUIREMENTS.md (scoped v1/v2)
410
+ - ROADMAP.md (phases with goals)
411
+ - STATE.md (memory)
412
+
413
+ Recommendation: Add `/roadmap` command
414
+ ```
415
+
416
+ #### gsd-codebase-mapper (~500 lines)
417
+
418
+ ```markdown
419
+ Analyzes existing codebase before new work.
420
+
421
+ Produces:
422
+
423
+ - STACK.md (tech stack)
424
+ - ARCHITECTURE.md (patterns)
425
+ - CONVENTIONS.md (coding standards)
426
+ - CONCERNS.md (tech debt, issues)
427
+ - STRUCTURE.md (file organization)
428
+ - INTEGRATIONS.md (external deps)
429
+ - TESTING.md (test patterns)
430
+
431
+ Recommendation: Add `/map-codebase` command
432
+ ```
433
+
434
+ #### gsd-integration-checker (~200 lines)
435
+
436
+ ```markdown
437
+ Validates integrations work correctly.
438
+
439
+ Checks:
440
+
441
+ - API contracts
442
+ - Database connections
443
+ - External service health
444
+ - Webhook endpoints
445
+ - Auth flows
446
+
447
+ Recommendation: Add to verify agent or as skill
448
+ ```
449
+
450
+ ---
451
+
452
+ ## Unified Agent Architecture Proposal
453
+
454
+ ### Primary Agents (Keep Current Structure)
455
+
456
+ ```yaml
457
+ build:
458
+ role: Primary execution coordinator
459
+ enhancements:
460
+ - Add deviation rules section
461
+ - Add checkpoint protocol
462
+ - Add TDD execution flow
463
+ - Add task commit protocol
464
+
465
+ plan:
466
+ role: Blueprint architect
467
+ enhancements:
468
+ - Add goal-backward methodology
469
+ - Add discovery levels
470
+ - Add dependency graph construction
471
+ - Add wave assignment
472
+ - Add context budget rules
473
+
474
+ explore:
475
+ role: Read-only codebase cartographer
476
+ current: Good alignment with gsd-codebase-mapper
477
+
478
+ review:
479
+ role: Code review specialist
480
+ enhancements:
481
+ - Add goal-backward verification mode
482
+ - OR create separate verify agent
483
+
484
+ scout:
485
+ role: External research specialist
486
+ current: Good alignment with gsd-phase-researcher
487
+ ```
488
+
489
+ ### New Agents to Create
490
+
491
+ ```yaml
492
+ verify (NEW):
493
+ description: Goal-backward verification agent
494
+ purpose: Check if goals achieved, not just tasks completed
495
+ ported_from: gsd-verifier
496
+
497
+ research-lead (NEW - optional):
498
+ description: Research synthesis coordinator
499
+ purpose: Aggregate parallel research, resolve conflicts
500
+ ported_from: gsd-research-synthesizer
501
+ ```
502
+
503
+ ### New Commands to Create
504
+
505
+ ```yaml
506
+ /map-codebase:
507
+ description: Analyze existing codebase
508
+ creates: STACK.md, ARCHITECTURE.md, CONVENTIONS.md, etc.
509
+ ported_from: gsd:map-codebase
510
+
511
+ /roadmap:
512
+ description: Create project roadmap
513
+ creates: PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md
514
+ ported_from: gsd:new-project (planning phase only)
515
+
516
+ /verify:
517
+ description: Verify goal achievement
518
+ purpose: Run verify agent against bead
519
+ ported_from: gsd:verify-work
520
+ ```
521
+
522
+ ### New Skills to Create
523
+
524
+ ```yaml
525
+ gsd-planning:
526
+ description: GSD-style planning methodology
527
+ content: Goal-backward, discovery levels, dependency graphs, wave assignment
528
+
529
+ gsd-debugging:
530
+ description: Systematic debugging with scientific method
531
+ content: Hypothesis testing, investigation techniques, debug file protocol
532
+
533
+ gsd-execution:
534
+ description: GSD-style execution discipline
535
+ content: Deviation rules, checkpoint protocol, TDD cycles
536
+ ```
537
+
538
+ ---
539
+
540
+ ## Implementation Priority
541
+
542
+ | Priority | Item | Effort | Impact |
543
+ | -------- | ---------------------------------- | ------ | ------ |
544
+ | P0 | Add deviation rules to build agent | 2h | High |
545
+ | P0 | Add goal-backward to plan agent | 4h | High |
546
+ | P1 | Create verify agent | 6h | High |
547
+ | P1 | Add checkpoint protocol to build | 3h | High |
548
+ | P2 | Create gsd-debugging skill | 4h | Medium |
549
+ | P2 | Create gsd-planning skill | 4h | Medium |
550
+ | P2 | Add /map-codebase command | 4h | Medium |
551
+ | P3 | Create research-lead agent | 3h | Low |
552
+ | P3 | Add /roadmap command | 3h | Low |
553
+
554
+ ---
555
+
556
+ ## Summary
557
+
558
+ **GSD's Strength:** Deep, rigorous methodology with explicit protocols for every phase.
559
+
560
+ **OpenCodeKit's Strength:** Clean architecture, Beads integration, skills system.
561
+
562
+ **The Opportunity:** Port GSD's execution discipline (deviation rules, goal-backward verification, checkpoint protocol) into OpenCodeKit's cleaner architecture. Don't adopt GSD's ceremony — adapt its rigor.
563
+
564
+ **Key Principle:** Plans ARE prompts. Don't create documents that become prompts — create the prompt directly. This is GSD's core insight that OpenCodeKit should adopt.