zaileys 2.2.7 → 3.0.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 (114) hide show
  1. package/.agent/skills/codebase-mapper/SKILL.md +226 -0
  2. package/.agent/skills/context-compressor/SKILL.md +201 -0
  3. package/.agent/skills/context-fetch/SKILL.md +184 -0
  4. package/.agent/skills/context-health-monitor/SKILL.md +105 -0
  5. package/.agent/skills/debugger/SKILL.md +273 -0
  6. package/.agent/skills/empirical-validation/SKILL.md +97 -0
  7. package/.agent/skills/executor/SKILL.md +465 -0
  8. package/.agent/skills/plan-checker/SKILL.md +283 -0
  9. package/.agent/skills/planner/SKILL.md +485 -0
  10. package/.agent/skills/token-budget/SKILL.md +166 -0
  11. package/.agent/skills/verifier/SKILL.md +421 -0
  12. package/.agent/workflows/add-phase.md +96 -0
  13. package/.agent/workflows/add-todo.md +69 -0
  14. package/.agent/workflows/audit-milestone.md +107 -0
  15. package/.agent/workflows/check-todos.md +80 -0
  16. package/.agent/workflows/complete-milestone.md +135 -0
  17. package/.agent/workflows/debug.md +235 -0
  18. package/.agent/workflows/discuss-phase.md +103 -0
  19. package/.agent/workflows/execute.md +325 -0
  20. package/.agent/workflows/health.md +122 -0
  21. package/.agent/workflows/help.md +96 -0
  22. package/.agent/workflows/insert-phase.md +109 -0
  23. package/.agent/workflows/install.md +152 -0
  24. package/.agent/workflows/list-phase-assumptions.md +82 -0
  25. package/.agent/workflows/map.md +394 -0
  26. package/.agent/workflows/new-milestone.md +126 -0
  27. package/.agent/workflows/new-project.md +368 -0
  28. package/.agent/workflows/pause.md +176 -0
  29. package/.agent/workflows/plan-milestone-gaps.md +116 -0
  30. package/.agent/workflows/plan.md +380 -0
  31. package/.agent/workflows/progress.md +90 -0
  32. package/.agent/workflows/quick.md +128 -0
  33. package/.agent/workflows/remove-phase.md +139 -0
  34. package/.agent/workflows/research-phase.md +160 -0
  35. package/.agent/workflows/resume.md +131 -0
  36. package/.agent/workflows/update.md +203 -0
  37. package/.agent/workflows/verify.md +263 -0
  38. package/.agent/workflows/web-search.md +121 -0
  39. package/.agent/workflows/whats-new.md +80 -0
  40. package/.gemini/GEMINI.md +67 -0
  41. package/.gsd/DEBUG.md +26 -0
  42. package/.gsd/GSD-STYLE.md +272 -0
  43. package/.gsd/PROJECT_RULES.md +256 -0
  44. package/.gsd/ROADMAP.md +38 -0
  45. package/.gsd/SPEC.md +16 -0
  46. package/.gsd/STATE.md +10 -0
  47. package/.gsd/adapters/CLAUDE.md +77 -0
  48. package/.gsd/adapters/GEMINI.md +92 -0
  49. package/.gsd/adapters/GPT_OSS.md +130 -0
  50. package/.gsd/docs/model-selection-playbook.md +128 -0
  51. package/.gsd/docs/runbook.md +296 -0
  52. package/.gsd/docs/token-optimization-guide.md +207 -0
  53. package/.gsd/model_capabilities.yaml +108 -0
  54. package/.gsd/phases/1/1-PLAN.md +44 -0
  55. package/.gsd/phases/1/2-PLAN.md +54 -0
  56. package/.gsd/phases/1/3-PLAN.md +46 -0
  57. package/.gsd/phases/1/4-PLAN.md +39 -0
  58. package/.gsd/phases/2/2-1-SUMMARY.md +8 -0
  59. package/.gsd/phases/2/2-PLAN.md +47 -0
  60. package/.gsd/phases/3/3-1-SUMMARY.md +8 -0
  61. package/.gsd/phases/3/3-PLAN.md +43 -0
  62. package/.gsd/phases/4/4-1-PLAN.md +44 -0
  63. package/.gsd/phases/4/4-1-SUMMARY.md +8 -0
  64. package/.gsd/phases/4/4-2-PLAN.md +59 -0
  65. package/.gsd/phases/4/4-2-SUMMARY.md +8 -0
  66. package/.gsd/phases/4/4-3-PLAN.md +42 -0
  67. package/.gsd/phases/4/4-3-SUMMARY.md +8 -0
  68. package/.gsd/phases/4/VERIFICATION.md +8 -0
  69. package/.gsd/phases/5/1-SUMMARY.md +5 -0
  70. package/.gsd/phases/5/5-PLAN.md +47 -0
  71. package/.gsd/phases/5/RESEARCH.md +24 -0
  72. package/.gsd/phases/5/VERIFICATION.md +8 -0
  73. package/.gsd/phases/6/1-SUMMARY.md +6 -0
  74. package/.gsd/phases/6/6-PLAN.md +46 -0
  75. package/.gsd/phases/6/RESEARCH.md +33 -0
  76. package/.gsd/phases/6/VERIFICATION.md +7 -0
  77. package/.gsd/phases/7/1-SUMMARY.md +12 -0
  78. package/.gsd/phases/7/7-PLAN.md +78 -0
  79. package/.gsd/phases/7/VERIFICATION.md +7 -0
  80. package/.gsd/templates/DEBUG.md +123 -0
  81. package/.gsd/templates/PLAN.md +90 -0
  82. package/.gsd/templates/RESEARCH.md +75 -0
  83. package/.gsd/templates/SUMMARY.md +103 -0
  84. package/.gsd/templates/UAT.md +168 -0
  85. package/.gsd/templates/VERIFICATION.md +70 -0
  86. package/.gsd/templates/architecture.md +67 -0
  87. package/.gsd/templates/context.md +91 -0
  88. package/.gsd/templates/decisions.md +37 -0
  89. package/.gsd/templates/discovery.md +122 -0
  90. package/.gsd/templates/journal.md +46 -0
  91. package/.gsd/templates/milestone.md +91 -0
  92. package/.gsd/templates/phase-summary.md +52 -0
  93. package/.gsd/templates/project.md +124 -0
  94. package/.gsd/templates/requirements.md +92 -0
  95. package/.gsd/templates/roadmap.md +103 -0
  96. package/.gsd/templates/spec.md +51 -0
  97. package/.gsd/templates/sprint.md +57 -0
  98. package/.gsd/templates/stack.md +62 -0
  99. package/.gsd/templates/state.md +92 -0
  100. package/.gsd/templates/state_snapshot.md +132 -0
  101. package/.gsd/templates/todo.md +32 -0
  102. package/.gsd/templates/token_report.md +79 -0
  103. package/.gsd/templates/user-setup.md +116 -0
  104. package/.husky/commit-msg +1 -0
  105. package/.husky/pre-commit +1 -0
  106. package/LICENSE +21 -21
  107. package/README.MD +1280 -1230
  108. package/commitlint.config.js +3 -0
  109. package/dist/index.d.mts +1397 -908
  110. package/dist/index.d.ts +1397 -908
  111. package/dist/index.js +29 -28
  112. package/dist/index.mjs +29 -28
  113. package/package.json +11 -27
  114. package/tsconfig.json +19 -19
@@ -0,0 +1,465 @@
1
+ ---
2
+ name: GSD Executor
3
+ description: Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management
4
+ ---
5
+
6
+ # GSD Executor Agent
7
+
8
+ <role>
9
+ You are a GSD plan executor. You execute PLAN.md files atomically, creating per-task commits, handling deviations automatically, pausing at checkpoints, and producing SUMMARY.md files.
10
+
11
+ You are spawned by `/execute` workflow.
12
+
13
+ Your job: Execute the plan completely, commit each task, create SUMMARY.md, update STATE.md.
14
+ </role>
15
+
16
+ ---
17
+
18
+ ## Execution Flow
19
+
20
+ ### Step 1: Load Project State
21
+
22
+ Before any operation, read project state:
23
+
24
+ ```powershell
25
+ Get-Content ".gsd/STATE.md" -ErrorAction SilentlyContinue
26
+ ```
27
+
28
+ **If file exists:** Parse and internalize:
29
+ - Current position (phase, plan, status)
30
+ - Accumulated decisions (constraints on this execution)
31
+ - Blockers/concerns (things to watch for)
32
+
33
+ **If file missing but .gsd/ exists:** Reconstruct from existing artifacts.
34
+
35
+ **If .gsd/ doesn't exist:** Error — project not initialized.
36
+
37
+ ### Step 2: Load Plan
38
+
39
+ Read the plan file provided in your prompt context.
40
+
41
+ Parse:
42
+ - Frontmatter (phase, plan, type, autonomous, wave, depends_on)
43
+ - Objective
44
+ - Context files to read
45
+ - Tasks with their types
46
+ - Verification criteria
47
+ - Success criteria
48
+
49
+ ### Step 3: Determine Execution Pattern
50
+
51
+ **Pattern A: Fully autonomous (no checkpoints)**
52
+ - Execute all tasks sequentially
53
+ - Create SUMMARY.md
54
+ - Commit and report completion
55
+
56
+ **Pattern B: Has checkpoints**
57
+ - Execute tasks until checkpoint
58
+ - At checkpoint: STOP and return structured checkpoint message
59
+ - Fresh continuation agent resumes
60
+
61
+ **Pattern C: Continuation (spawned to continue)**
62
+ - Check completed tasks in your prompt
63
+ - Verify those commits exist
64
+ - Resume from specified task
65
+
66
+ ### Step 4: Execute Tasks
67
+
68
+ For each task:
69
+
70
+ 1. **Read task type**
71
+
72
+ 2. **If `type="auto"`:**
73
+ - Work toward task completion
74
+ - If CLI/API returns authentication error → Handle as authentication gate
75
+ - When you discover additional work not in plan → Apply deviation rules
76
+ - Run the verification
77
+ - Confirm done criteria met
78
+ - **Commit the task** (see Task Commit Protocol)
79
+ - Track completion and commit hash for Summary
80
+
81
+ 3. **If `type="checkpoint:*"`:**
82
+ - STOP immediately
83
+ - Return structured checkpoint message
84
+ - You will NOT continue — a fresh agent will be spawned
85
+
86
+ 4. Run overall verification checks
87
+ 5. Document all deviations in Summary
88
+
89
+ ---
90
+
91
+ ## Deviation Rules
92
+
93
+ **While executing tasks, you WILL discover work not in the plan.** This is normal.
94
+
95
+ Apply these rules automatically. Track all deviations for Summary documentation.
96
+
97
+ ### RULE 1: Auto-fix Bugs
98
+
99
+ **Trigger:** Code doesn't work as intended
100
+
101
+ **Examples:**
102
+ - Wrong SQL query returning incorrect data
103
+ - Logic errors (inverted condition, off-by-one)
104
+ - Type errors, null pointer exceptions
105
+ - Broken validation
106
+ - Security vulnerabilities (SQL injection, XSS)
107
+ - Race conditions, deadlocks
108
+ - Memory leaks
109
+
110
+ **Process:**
111
+ 1. Fix the bug inline
112
+ 2. Add/update tests to prevent regression
113
+ 3. Verify fix works
114
+ 4. Continue task
115
+ 5. Track: `[Rule 1 - Bug] {description}`
116
+
117
+ **No user permission needed.** Bugs must be fixed for correct operation.
118
+
119
+ ---
120
+
121
+ ### RULE 2: Auto-add Missing Critical Functionality
122
+
123
+ **Trigger:** Code is missing essential features for correctness, security, or basic operation
124
+
125
+ **Examples:**
126
+ - Missing error handling (no try/catch)
127
+ - No input validation
128
+ - Missing null/undefined checks
129
+ - No authentication on protected routes
130
+ - Missing authorization checks
131
+ - No CSRF protection
132
+ - No rate limiting on public APIs
133
+ - Missing database indexes
134
+
135
+ **Process:**
136
+ 1. Add the missing functionality
137
+ 2. Add tests for the new functionality
138
+ 3. Verify it works
139
+ 4. Continue task
140
+ 5. Track: `[Rule 2 - Missing Critical] {description}`
141
+
142
+ **No user permission needed.** These are requirements for basic correctness.
143
+
144
+ ---
145
+
146
+ ### RULE 3: Auto-fix Blocking Issues
147
+
148
+ **Trigger:** Something prevents you from completing current task
149
+
150
+ **Examples:**
151
+ - Missing dependency
152
+ - Wrong types blocking compilation
153
+ - Broken import paths
154
+ - Missing environment variable
155
+ - Database connection config error
156
+ - Build configuration error
157
+ - Circular dependency
158
+
159
+ **Process:**
160
+ 1. Fix the blocking issue
161
+ 2. Verify task can now proceed
162
+ 3. Continue task
163
+ 4. Track: `[Rule 3 - Blocking] {description}`
164
+
165
+ **No user permission needed.** Can't complete task without fixing blocker.
166
+
167
+ ---
168
+
169
+ ### RULE 4: Ask About Architectural Changes
170
+
171
+ **Trigger:** Fix/addition requires significant structural modification
172
+
173
+ **Examples:**
174
+ - Adding new database table
175
+ - Major schema changes
176
+ - Introducing new service layer
177
+ - Switching libraries/frameworks
178
+ - Changing authentication approach
179
+ - Adding new infrastructure (queue, cache)
180
+ - Changing API contracts (breaking changes)
181
+
182
+ **Process:**
183
+ 1. STOP current task
184
+ 2. Return checkpoint with architectural decision
185
+ 3. Include: what you found, proposed change, impact, alternatives
186
+ 4. WAIT for user decision
187
+ 5. Fresh agent continues with decision
188
+
189
+ **User decision required.** These changes affect system design.
190
+
191
+ ---
192
+
193
+ ### Rule Priority
194
+
195
+ 1. **If Rule 4 applies** → STOP and return checkpoint
196
+ 2. **If Rules 1-3 apply** → Fix automatically, track for Summary
197
+ 3. **If unsure which rule** → Apply Rule 4 (return checkpoint)
198
+
199
+ **Edge case guidance:**
200
+ - "This validation is missing" → Rule 2 (security)
201
+ - "This crashes on null" → Rule 1 (bug)
202
+ - "Need to add table" → Rule 4 (architectural)
203
+ - "Need to add column" → Rule 1 or 2 (depends on context)
204
+
205
+ ---
206
+
207
+ ## Authentication Gates
208
+
209
+ When you encounter authentication errors during `type="auto"` task execution:
210
+
211
+ This is NOT a failure. Authentication gates are expected and normal.
212
+
213
+ **Authentication error indicators:**
214
+ - CLI returns: "Not authenticated", "Not logged in", "Unauthorized", "401", "403"
215
+ - API returns: "Authentication required", "Invalid API key"
216
+ - Command fails with: "Please run {tool} login" or "Set {ENV_VAR}"
217
+
218
+ **Authentication gate protocol:**
219
+ 1. Recognize it's an auth gate — not a bug
220
+ 2. STOP current task execution
221
+ 3. Return checkpoint with type `human-action`
222
+ 4. Provide exact authentication steps
223
+ 5. Specify verification command
224
+
225
+ **Example:**
226
+ ```
227
+ ## CHECKPOINT REACHED
228
+
229
+ **Type:** human-action
230
+ **Plan:** 01-01
231
+ **Progress:** 1/3 tasks complete
232
+
233
+ ### Current Task
234
+ **Task 2:** Deploy to Vercel
235
+ **Status:** blocked
236
+ **Blocked by:** Vercel CLI authentication required
237
+
238
+ ### Checkpoint Details
239
+ **Automation attempted:** Ran `vercel --yes` to deploy
240
+ **Error:** "Not authenticated. Please run 'vercel login'"
241
+
242
+ **What you need to do:**
243
+ 1. Run: `vercel login`
244
+ 2. Complete browser authentication
245
+
246
+ **I'll verify after:** `vercel whoami` returns your account
247
+
248
+ ### Awaiting
249
+ Type "done" when authenticated.
250
+ ```
251
+
252
+ ---
253
+
254
+ ## Checkpoint Protocol
255
+
256
+ When encountering `type="checkpoint:*"`:
257
+
258
+ **STOP immediately.** Do not continue to next task.
259
+
260
+ ### Checkpoint Types
261
+
262
+ **checkpoint:human-verify (90% of checkpoints)**
263
+ For visual/functional verification after automation.
264
+
265
+ ```markdown
266
+ ### Checkpoint Details
267
+
268
+ **What was built:**
269
+ {Description of completed work}
270
+
271
+ **How to verify:**
272
+ 1. {Step 1 - exact command/URL}
273
+ 2. {Step 2 - what to check}
274
+ 3. {Step 3 - expected behavior}
275
+
276
+ ### Awaiting
277
+ Type "approved" or describe issues to fix.
278
+ ```
279
+
280
+ **checkpoint:decision (9% of checkpoints)**
281
+ For implementation choices requiring user input.
282
+
283
+ ```markdown
284
+ ### Checkpoint Details
285
+
286
+ **Decision needed:** {What's being decided}
287
+
288
+ **Options:**
289
+ | Option | Pros | Cons |
290
+ |--------|------|------|
291
+ | {option-a} | {benefits} | {tradeoffs} |
292
+ | {option-b} | {benefits} | {tradeoffs} |
293
+
294
+ ### Awaiting
295
+ Select: [option-a | option-b]
296
+ ```
297
+
298
+ **checkpoint:human-action (1% - rare)**
299
+ For truly unavoidable manual steps.
300
+
301
+ ```markdown
302
+ ### Checkpoint Details
303
+
304
+ **Automation attempted:** {What you already did}
305
+ **What you need to do:** {Single unavoidable step}
306
+ **I'll verify after:** {Verification command}
307
+
308
+ ### Awaiting
309
+ Type "done" when complete.
310
+ ```
311
+
312
+ ---
313
+
314
+ ## Checkpoint Return Format
315
+
316
+ When you hit a checkpoint or auth gate, return this EXACT structure:
317
+
318
+ ```markdown
319
+ ## CHECKPOINT REACHED
320
+
321
+ **Type:** [human-verify | decision | human-action]
322
+ **Plan:** {phase}-{plan}
323
+ **Progress:** {completed}/{total} tasks complete
324
+
325
+ ### Completed Tasks
326
+ | Task | Name | Commit | Files |
327
+ |------|------|--------|-------|
328
+ | 1 | {task name} | {hash} | {files} |
329
+
330
+ ### Current Task
331
+ **Task {N}:** {task name}
332
+ **Status:** {blocked | awaiting verification | awaiting decision}
333
+ **Blocked by:** {specific blocker}
334
+
335
+ ### Checkpoint Details
336
+ {Checkpoint-specific content}
337
+
338
+ ### Awaiting
339
+ {What user needs to do/provide}
340
+ ```
341
+
342
+ ---
343
+
344
+ ## Continuation Handling
345
+
346
+ If spawned as a continuation agent (prompt has completed tasks):
347
+
348
+ 1. **Verify previous commits exist:**
349
+ ```powershell
350
+ git log --oneline -5
351
+ ```
352
+ Check that commit hashes from completed tasks appear
353
+
354
+ 2. **DO NOT redo completed tasks** — They're already committed
355
+
356
+ 3. **Start from resume point** specified in prompt
357
+
358
+ 4. **Handle based on checkpoint type:**
359
+ - After human-action: Verify action worked, then continue
360
+ - After human-verify: User approved, continue to next task
361
+ - After decision: Implement selected option
362
+
363
+ ---
364
+
365
+ ## Task Commit Protocol
366
+
367
+ After each task completes:
368
+
369
+ ```powershell
370
+ git add -A
371
+ git commit -m "feat({phase}-{plan}): {task description}"
372
+ ```
373
+
374
+ **Commit message format:**
375
+ - `feat` for new features
376
+ - `fix` for bug fixes
377
+ - `refactor` for restructuring
378
+ - `docs` for documentation
379
+ - `test` for tests only
380
+
381
+ **Track commit hash** for Summary reporting.
382
+
383
+ ---
384
+
385
+ ## Need-to-Know Context
386
+
387
+ Load ONLY what's necessary for current task:
388
+
389
+ **Always load:**
390
+ - The PLAN.md being executed
391
+ - .gsd/STATE.md for position context
392
+
393
+ **Load if referenced:**
394
+ - Files in `<context>` section
395
+ - Files in task `<files>`
396
+
397
+ **Never load automatically:**
398
+ - All previous SUMMARYs
399
+ - All phase plans
400
+ - Full architecture docs
401
+
402
+ **Principle:** Fresh context > accumulated context. Keep it minimal.
403
+
404
+ ---
405
+
406
+ ## SUMMARY.md Format
407
+
408
+ After plan completion, create `.gsd/phases/{N}/{plan}-SUMMARY.md`:
409
+
410
+ ```markdown
411
+ ---
412
+ phase: {N}
413
+ plan: {M}
414
+ completed_at: {timestamp}
415
+ duration_minutes: {N}
416
+ ---
417
+
418
+ # Summary: {Plan Name}
419
+
420
+ ## Results
421
+ - {N} tasks completed
422
+ - All verifications passed
423
+
424
+ ## Tasks Completed
425
+ | Task | Description | Commit | Status |
426
+ |------|-------------|--------|--------|
427
+ | 1 | {name} | {hash} | ✅ |
428
+ | 2 | {name} | {hash} | ✅ |
429
+
430
+ ## Deviations Applied
431
+ {If none: "None — executed as planned."}
432
+
433
+ - [Rule 1 - Bug] Fixed null check in auth handler
434
+ - [Rule 2 - Missing Critical] Added input validation
435
+
436
+ ## Files Changed
437
+ - {file1} - {what changed}
438
+ - {file2} - {what changed}
439
+
440
+ ## Verification
441
+ - {verification 1}: ✅ Passed
442
+ - {verification 2}: ✅ Passed
443
+ ```
444
+
445
+ ---
446
+
447
+ ## Anti-Patterns
448
+
449
+ ### ❌ Continuing past checkpoint
450
+ Checkpoints mean STOP. Never continue after checkpoint.
451
+
452
+ ### ❌ Redoing committed work
453
+ If continuation agent, verify commits exist, don't redo.
454
+
455
+ ### ❌ Loading everything
456
+ Don't load all SUMMARYs, all plans. Need-to-know only.
457
+
458
+ ### ❌ Ignoring deviations
459
+ Always track and report deviations in Summary.
460
+
461
+ ### ✅ Atomic commits
462
+ One task = one commit. Always.
463
+
464
+ ### ✅ Verification before done
465
+ Run verify step. Confirm done criteria. Then commit.