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.
- package/.agent/skills/codebase-mapper/SKILL.md +226 -0
- package/.agent/skills/context-compressor/SKILL.md +201 -0
- package/.agent/skills/context-fetch/SKILL.md +184 -0
- package/.agent/skills/context-health-monitor/SKILL.md +105 -0
- package/.agent/skills/debugger/SKILL.md +273 -0
- package/.agent/skills/empirical-validation/SKILL.md +97 -0
- package/.agent/skills/executor/SKILL.md +465 -0
- package/.agent/skills/plan-checker/SKILL.md +283 -0
- package/.agent/skills/planner/SKILL.md +485 -0
- package/.agent/skills/token-budget/SKILL.md +166 -0
- package/.agent/skills/verifier/SKILL.md +421 -0
- package/.agent/workflows/add-phase.md +96 -0
- package/.agent/workflows/add-todo.md +69 -0
- package/.agent/workflows/audit-milestone.md +107 -0
- package/.agent/workflows/check-todos.md +80 -0
- package/.agent/workflows/complete-milestone.md +135 -0
- package/.agent/workflows/debug.md +235 -0
- package/.agent/workflows/discuss-phase.md +103 -0
- package/.agent/workflows/execute.md +325 -0
- package/.agent/workflows/health.md +122 -0
- package/.agent/workflows/help.md +96 -0
- package/.agent/workflows/insert-phase.md +109 -0
- package/.agent/workflows/install.md +152 -0
- package/.agent/workflows/list-phase-assumptions.md +82 -0
- package/.agent/workflows/map.md +394 -0
- package/.agent/workflows/new-milestone.md +126 -0
- package/.agent/workflows/new-project.md +368 -0
- package/.agent/workflows/pause.md +176 -0
- package/.agent/workflows/plan-milestone-gaps.md +116 -0
- package/.agent/workflows/plan.md +380 -0
- package/.agent/workflows/progress.md +90 -0
- package/.agent/workflows/quick.md +128 -0
- package/.agent/workflows/remove-phase.md +139 -0
- package/.agent/workflows/research-phase.md +160 -0
- package/.agent/workflows/resume.md +131 -0
- package/.agent/workflows/update.md +203 -0
- package/.agent/workflows/verify.md +263 -0
- package/.agent/workflows/web-search.md +121 -0
- package/.agent/workflows/whats-new.md +80 -0
- package/.gemini/GEMINI.md +67 -0
- package/.gsd/DEBUG.md +26 -0
- package/.gsd/GSD-STYLE.md +272 -0
- package/.gsd/PROJECT_RULES.md +256 -0
- package/.gsd/ROADMAP.md +38 -0
- package/.gsd/SPEC.md +16 -0
- package/.gsd/STATE.md +10 -0
- package/.gsd/adapters/CLAUDE.md +77 -0
- package/.gsd/adapters/GEMINI.md +92 -0
- package/.gsd/adapters/GPT_OSS.md +130 -0
- package/.gsd/docs/model-selection-playbook.md +128 -0
- package/.gsd/docs/runbook.md +296 -0
- package/.gsd/docs/token-optimization-guide.md +207 -0
- package/.gsd/model_capabilities.yaml +108 -0
- package/.gsd/phases/1/1-PLAN.md +44 -0
- package/.gsd/phases/1/2-PLAN.md +54 -0
- package/.gsd/phases/1/3-PLAN.md +46 -0
- package/.gsd/phases/1/4-PLAN.md +39 -0
- package/.gsd/phases/2/2-1-SUMMARY.md +8 -0
- package/.gsd/phases/2/2-PLAN.md +47 -0
- package/.gsd/phases/3/3-1-SUMMARY.md +8 -0
- package/.gsd/phases/3/3-PLAN.md +43 -0
- package/.gsd/phases/4/4-1-PLAN.md +44 -0
- package/.gsd/phases/4/4-1-SUMMARY.md +8 -0
- package/.gsd/phases/4/4-2-PLAN.md +59 -0
- package/.gsd/phases/4/4-2-SUMMARY.md +8 -0
- package/.gsd/phases/4/4-3-PLAN.md +42 -0
- package/.gsd/phases/4/4-3-SUMMARY.md +8 -0
- package/.gsd/phases/4/VERIFICATION.md +8 -0
- package/.gsd/phases/5/1-SUMMARY.md +5 -0
- package/.gsd/phases/5/5-PLAN.md +47 -0
- package/.gsd/phases/5/RESEARCH.md +24 -0
- package/.gsd/phases/5/VERIFICATION.md +8 -0
- package/.gsd/phases/6/1-SUMMARY.md +6 -0
- package/.gsd/phases/6/6-PLAN.md +46 -0
- package/.gsd/phases/6/RESEARCH.md +33 -0
- package/.gsd/phases/6/VERIFICATION.md +7 -0
- package/.gsd/phases/7/1-SUMMARY.md +12 -0
- package/.gsd/phases/7/7-PLAN.md +78 -0
- package/.gsd/phases/7/VERIFICATION.md +7 -0
- package/.gsd/templates/DEBUG.md +123 -0
- package/.gsd/templates/PLAN.md +90 -0
- package/.gsd/templates/RESEARCH.md +75 -0
- package/.gsd/templates/SUMMARY.md +103 -0
- package/.gsd/templates/UAT.md +168 -0
- package/.gsd/templates/VERIFICATION.md +70 -0
- package/.gsd/templates/architecture.md +67 -0
- package/.gsd/templates/context.md +91 -0
- package/.gsd/templates/decisions.md +37 -0
- package/.gsd/templates/discovery.md +122 -0
- package/.gsd/templates/journal.md +46 -0
- package/.gsd/templates/milestone.md +91 -0
- package/.gsd/templates/phase-summary.md +52 -0
- package/.gsd/templates/project.md +124 -0
- package/.gsd/templates/requirements.md +92 -0
- package/.gsd/templates/roadmap.md +103 -0
- package/.gsd/templates/spec.md +51 -0
- package/.gsd/templates/sprint.md +57 -0
- package/.gsd/templates/stack.md +62 -0
- package/.gsd/templates/state.md +92 -0
- package/.gsd/templates/state_snapshot.md +132 -0
- package/.gsd/templates/todo.md +32 -0
- package/.gsd/templates/token_report.md +79 -0
- package/.gsd/templates/user-setup.md +116 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +1 -0
- package/LICENSE +21 -21
- package/README.MD +1280 -1230
- package/commitlint.config.js +3 -0
- package/dist/index.d.mts +1397 -908
- package/dist/index.d.ts +1397 -908
- package/dist/index.js +29 -28
- package/dist/index.mjs +29 -28
- package/package.json +11 -27
- package/tsconfig.json +19 -19
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Gemini Adapter
|
|
2
|
+
|
|
3
|
+
> **Everything in this file is optional.**
|
|
4
|
+
> For canonical rules, see [PROJECT_RULES.md](../PROJECT_RULES.md).
|
|
5
|
+
|
|
6
|
+
This adapter provides optional enhancements for Gemini models in Antigravity.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Model Selection
|
|
11
|
+
|
|
12
|
+
### Flash vs Pro
|
|
13
|
+
|
|
14
|
+
| Model Type | Best For |
|
|
15
|
+
|------------|----------|
|
|
16
|
+
| **Flash** | Quick iterations, simple edits, high-volume tasks |
|
|
17
|
+
| **Pro** | Complex planning, large refactors, deep analysis |
|
|
18
|
+
|
|
19
|
+
**Default recommendation:** Start with Pro for planning, switch to Flash for implementation.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Context Window Optimization
|
|
24
|
+
|
|
25
|
+
Gemini models often have large context windows. Optimize usage:
|
|
26
|
+
|
|
27
|
+
1. **Load full files strategically** — Large context allows it, but still prefer search-first
|
|
28
|
+
2. **Batch related files** — Group related code in single context load
|
|
29
|
+
3. **Clear separation** — Use XML tags to separate file contents
|
|
30
|
+
|
|
31
|
+
### Context Loading Pattern
|
|
32
|
+
|
|
33
|
+
```xml
|
|
34
|
+
<file path="src/auth/login.ts">
|
|
35
|
+
{file contents}
|
|
36
|
+
</file>
|
|
37
|
+
|
|
38
|
+
<file path="src/auth/types.ts">
|
|
39
|
+
{file contents}
|
|
40
|
+
</file>
|
|
41
|
+
|
|
42
|
+
<task>
|
|
43
|
+
{your task here}
|
|
44
|
+
</task>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Grounding
|
|
50
|
+
|
|
51
|
+
When available, use grounding for:
|
|
52
|
+
|
|
53
|
+
- Checking latest documentation
|
|
54
|
+
- Verifying API behaviors
|
|
55
|
+
- Validating external service states
|
|
56
|
+
|
|
57
|
+
**Not for:** Code implementation (use codebase content).
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Code Execution
|
|
62
|
+
|
|
63
|
+
If code execution sandbox is available:
|
|
64
|
+
|
|
65
|
+
- Use for verification commands
|
|
66
|
+
- Use for testing snippets
|
|
67
|
+
- Document outputs in SUMMARY.md
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Integration with .gemini/
|
|
72
|
+
|
|
73
|
+
The `.gemini/GEMINI.md` file can reference this adapter:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
# In .gemini/GEMINI.md
|
|
77
|
+
|
|
78
|
+
For canonical rules, see .gsd/PROJECT_RULES.md.
|
|
79
|
+
For Gemini-specific tips, see .gsd/adapters/GEMINI.md.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Anti-Patterns
|
|
85
|
+
|
|
86
|
+
❌ **Loading entire codebase** — Even with large context, quality degrades
|
|
87
|
+
❌ **Ignoring context thresholds** — 50% is still the quality boundary
|
|
88
|
+
❌ **Skipping STATE.md** — Context window size doesn't replace persistent state
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
*See PROJECT_RULES.md for canonical requirements.*
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# GPT & Open Source Models Adapter
|
|
2
|
+
|
|
3
|
+
> **Everything in this file is optional.**
|
|
4
|
+
> For canonical rules, see [PROJECT_RULES.md](../PROJECT_RULES.md).
|
|
5
|
+
|
|
6
|
+
This adapter provides guidance for GPT models and open-source alternatives.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## GPT Models
|
|
11
|
+
|
|
12
|
+
### Model Selection
|
|
13
|
+
|
|
14
|
+
| Model | Best For |
|
|
15
|
+
|-------|----------|
|
|
16
|
+
| **GPT-4o** | Balanced speed and quality, multimodal |
|
|
17
|
+
| **GPT-4 Turbo** | Complex reasoning, large context |
|
|
18
|
+
| **GPT-3.5** | Fast iterations, simple tasks |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### Function Calling
|
|
23
|
+
|
|
24
|
+
When function calling is available:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"name": "run_verification",
|
|
29
|
+
"description": "Execute a verification command",
|
|
30
|
+
"parameters": {
|
|
31
|
+
"command": "npm test",
|
|
32
|
+
"expected": "All tests pass"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Use for:**
|
|
38
|
+
- Verification commands
|
|
39
|
+
- File operations
|
|
40
|
+
- External service checks
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### Context Optimization
|
|
45
|
+
|
|
46
|
+
GPT models may have smaller context than some alternatives:
|
|
47
|
+
|
|
48
|
+
1. **Be selective** — Only load necessary files
|
|
49
|
+
2. **Use search-first** — Critical for context efficiency
|
|
50
|
+
3. **Summarize large files** — Extract relevant sections only
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Open Source Models
|
|
55
|
+
|
|
56
|
+
### General Guidance
|
|
57
|
+
|
|
58
|
+
Open source models vary widely. General tips:
|
|
59
|
+
|
|
60
|
+
| Consideration | Guidance |
|
|
61
|
+
|---------------|----------|
|
|
62
|
+
| **Context length** | Verify model's limit; adjust file loading |
|
|
63
|
+
| **Instruction following** | Use explicit, structured prompts |
|
|
64
|
+
| **Code quality** | May need more verification steps |
|
|
65
|
+
| **Speed** | Varies by hardware; plan accordingly |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### Local Deployment
|
|
70
|
+
|
|
71
|
+
For locally-running models:
|
|
72
|
+
|
|
73
|
+
1. **Resource planning** — Ensure adequate GPU/RAM
|
|
74
|
+
2. **Latency expectations** — Adjust iteration speed assumptions
|
|
75
|
+
3. **Fallback strategy** — Document when to switch to cloud models
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### Recommended Patterns
|
|
80
|
+
|
|
81
|
+
**Structured prompts work better:**
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
## Task
|
|
85
|
+
{clear task description}
|
|
86
|
+
|
|
87
|
+
## Context
|
|
88
|
+
{relevant code snippets}
|
|
89
|
+
|
|
90
|
+
## Expected Output
|
|
91
|
+
{what you need back}
|
|
92
|
+
|
|
93
|
+
## Constraints
|
|
94
|
+
{any limitations or requirements}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Shorter Context Strategies
|
|
100
|
+
|
|
101
|
+
When working with limited context:
|
|
102
|
+
|
|
103
|
+
1. **Aggressive search-first** — Never load full files blindly
|
|
104
|
+
2. **Incremental loading** — Add context as needed, not upfront
|
|
105
|
+
3. **State snapshots more frequently** — Prevent context overflow
|
|
106
|
+
4. **Split large tasks** — Smaller plans, more waves
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Anti-Patterns
|
|
111
|
+
|
|
112
|
+
❌ **Assuming GPT-4 context** — Verify actual model limits
|
|
113
|
+
❌ **Complex nested prompts** — Keep structure flat and clear
|
|
114
|
+
❌ **Ignoring model limits** — Quality crashes hard past context limit
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Model-Specific Files
|
|
119
|
+
|
|
120
|
+
Not required, but if organizing:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
.openai/ # For OpenAI API configuration
|
|
124
|
+
.ollama/ # For Ollama local models
|
|
125
|
+
.llm/ # Generic local LLM config
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
*See PROJECT_RULES.md for canonical requirements.*
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Model Selection Playbook
|
|
2
|
+
|
|
3
|
+
> Guidance for choosing models by phase and task type.
|
|
4
|
+
>
|
|
5
|
+
> **No model is required.** These are recommendations, not requirements.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Selection by Phase
|
|
10
|
+
|
|
11
|
+
### Planning & Architecture
|
|
12
|
+
|
|
13
|
+
**Recommended capabilities:**
|
|
14
|
+
- Extended reasoning / thinking mode
|
|
15
|
+
- Large context window (analyze multiple files)
|
|
16
|
+
- Strong at structured output (specs, plans)
|
|
17
|
+
|
|
18
|
+
**Why:** Planning requires understanding full system context and making architectural decisions.
|
|
19
|
+
|
|
20
|
+
**Examples:** Models with "thinking" or "reasoning" modes, larger context variants.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### Code Implementation
|
|
25
|
+
|
|
26
|
+
**Recommended capabilities:**
|
|
27
|
+
- Fast iteration speed
|
|
28
|
+
- Good at code completion
|
|
29
|
+
- Tool/function calling (for verification commands)
|
|
30
|
+
|
|
31
|
+
**Why:** Implementation involves many small changes with frequent verification cycles.
|
|
32
|
+
|
|
33
|
+
**Examples:** Speed-tier models, code-specialized variants.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
### Refactoring
|
|
38
|
+
|
|
39
|
+
**Recommended capabilities:**
|
|
40
|
+
- Large context window (see before/after)
|
|
41
|
+
- Pattern recognition
|
|
42
|
+
- Consistent style application
|
|
43
|
+
|
|
44
|
+
**Why:** Refactoring requires maintaining consistency across large code changes.
|
|
45
|
+
|
|
46
|
+
**Examples:** Standard or long-context variants.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### Debugging
|
|
51
|
+
|
|
52
|
+
**Recommended capabilities:**
|
|
53
|
+
- Extended reasoning (hypothesis generation)
|
|
54
|
+
- Good at reading stack traces
|
|
55
|
+
- Context for error patterns
|
|
56
|
+
|
|
57
|
+
**Why:** Debugging requires hypothesis testing and pattern matching.
|
|
58
|
+
|
|
59
|
+
**Examples:** Reasoning-focused models.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### Code Review
|
|
64
|
+
|
|
65
|
+
**Recommended capabilities:**
|
|
66
|
+
- Large context (review full PR diff)
|
|
67
|
+
- Security pattern knowledge
|
|
68
|
+
- Style consistency checking
|
|
69
|
+
|
|
70
|
+
**Why:** Review requires seeing both code and context together.
|
|
71
|
+
|
|
72
|
+
**Examples:** Long-context variants.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Capability Tiers
|
|
77
|
+
|
|
78
|
+
| Tier | Characteristics | Best For |
|
|
79
|
+
|------|-----------------|----------|
|
|
80
|
+
| **Fast** | Quick responses, lower cost | Implementation, iteration |
|
|
81
|
+
| **Standard** | Balanced speed/quality | Most tasks |
|
|
82
|
+
| **Reasoning** | Extended thinking, slower | Planning, debugging, architecture |
|
|
83
|
+
| **Long-context** | >100k tokens | Review, refactoring |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Anti-Patterns
|
|
88
|
+
|
|
89
|
+
❌ **Using reasoning models for simple edits** — Overkill, slow, expensive
|
|
90
|
+
|
|
91
|
+
❌ **Using fast models for architecture** — Insufficient depth for complex decisions
|
|
92
|
+
|
|
93
|
+
❌ **Ignoring context limits** — Leads to quality degradation
|
|
94
|
+
|
|
95
|
+
❌ **Forcing a specific model** — Breaks model-agnosticism
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Model Switching Mid-Session
|
|
100
|
+
|
|
101
|
+
**When to switch:**
|
|
102
|
+
- Context is getting polluted (approaching 50%)
|
|
103
|
+
- Task type changes significantly (planning → implementation)
|
|
104
|
+
- Current model struggling with task type
|
|
105
|
+
|
|
106
|
+
**How to switch:**
|
|
107
|
+
1. Create state snapshot
|
|
108
|
+
2. Update STATE.md with current position
|
|
109
|
+
3. Start fresh session with appropriate model
|
|
110
|
+
4. Load STATE.md to resume
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## GSD Model-Agnostic Principle
|
|
115
|
+
|
|
116
|
+
GSD works with any capable LLM. The methodology compensates for model differences through:
|
|
117
|
+
|
|
118
|
+
1. **Structured plans** — Reduce ambiguity
|
|
119
|
+
2. **Explicit verification** — Catch errors regardless of model
|
|
120
|
+
3. **State persistence** — Enable model switching
|
|
121
|
+
4. **Fresh context** — Prevent accumulation issues
|
|
122
|
+
|
|
123
|
+
Choose models based on task needs, not methodology requirements.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
*See .gsd/PROJECT_RULES.md for canonical rules.*
|
|
128
|
+
*See .gsd/docs/runbook.md for operational procedures.*
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# GSD Runbook
|
|
2
|
+
|
|
3
|
+
> Operational procedures for debugging, validation, and recovery.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Quick Commands
|
|
8
|
+
|
|
9
|
+
### Status Check
|
|
10
|
+
|
|
11
|
+
**PowerShell:**
|
|
12
|
+
```powershell
|
|
13
|
+
# Current git status
|
|
14
|
+
git status
|
|
15
|
+
|
|
16
|
+
# Recent commits
|
|
17
|
+
git log --oneline -10
|
|
18
|
+
|
|
19
|
+
# Current branch
|
|
20
|
+
git branch --show-current
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Bash:**
|
|
24
|
+
```bash
|
|
25
|
+
# Current git status
|
|
26
|
+
git status
|
|
27
|
+
|
|
28
|
+
# Recent commits
|
|
29
|
+
git log --oneline -10
|
|
30
|
+
|
|
31
|
+
# Current branch
|
|
32
|
+
git branch --show-current
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Wave Validation
|
|
38
|
+
|
|
39
|
+
### Verify Wave Completion
|
|
40
|
+
|
|
41
|
+
**Before marking a wave complete:**
|
|
42
|
+
|
|
43
|
+
1. All tasks have commits:
|
|
44
|
+
```powershell
|
|
45
|
+
git log --oneline -N # N = number of tasks in wave
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
2. All verifications passed (documented in SUMMARY.md)
|
|
49
|
+
|
|
50
|
+
3. STATE.md updated with current position
|
|
51
|
+
|
|
52
|
+
4. State snapshot created
|
|
53
|
+
|
|
54
|
+
### Wave Rollback
|
|
55
|
+
|
|
56
|
+
**If a wave needs to be reverted:**
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
# Find commit before wave started
|
|
60
|
+
git log --oneline -20
|
|
61
|
+
|
|
62
|
+
# Reset to that commit (keeps changes staged)
|
|
63
|
+
git reset --soft <commit-hash>
|
|
64
|
+
|
|
65
|
+
# Or hard reset (discards changes)
|
|
66
|
+
git reset --hard <commit-hash>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Debugging Procedures
|
|
72
|
+
|
|
73
|
+
### 3-Strike Rule
|
|
74
|
+
|
|
75
|
+
After 3 consecutive failed debug attempts:
|
|
76
|
+
|
|
77
|
+
1. **Stop** — Don't try a 4th approach in same session
|
|
78
|
+
|
|
79
|
+
2. **Document** in STATE.md:
|
|
80
|
+
```markdown
|
|
81
|
+
## Debug Session
|
|
82
|
+
|
|
83
|
+
**Problem:** {description}
|
|
84
|
+
|
|
85
|
+
**Attempts:**
|
|
86
|
+
1. {approach 1} → {result}
|
|
87
|
+
2. {approach 2} → {result}
|
|
88
|
+
3. {approach 3} → {result}
|
|
89
|
+
|
|
90
|
+
**Hypothesis:** {current theory}
|
|
91
|
+
|
|
92
|
+
**Recommended next:** {suggested approach}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
3. **Fresh session** — Start new conversation with documented context
|
|
96
|
+
|
|
97
|
+
### Log Inspection
|
|
98
|
+
|
|
99
|
+
**Find relevant logs:**
|
|
100
|
+
|
|
101
|
+
```powershell
|
|
102
|
+
# Search for error patterns
|
|
103
|
+
Select-String -Path "*.log" -Pattern "error|exception|failed" -CaseSensitive:$false
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Search for error patterns
|
|
108
|
+
grep -ri "error\|exception\|failed" *.log
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Verification Commands
|
|
114
|
+
|
|
115
|
+
### Build Verification
|
|
116
|
+
|
|
117
|
+
```powershell
|
|
118
|
+
# Node.js
|
|
119
|
+
npm run build
|
|
120
|
+
if ($LASTEXITCODE -eq 0) { Write-Host "✅ Build passed" }
|
|
121
|
+
|
|
122
|
+
# Python
|
|
123
|
+
python -m py_compile src/**/*.py
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Test Verification
|
|
127
|
+
|
|
128
|
+
```powershell
|
|
129
|
+
# Node.js
|
|
130
|
+
npm test
|
|
131
|
+
|
|
132
|
+
# Python
|
|
133
|
+
pytest -v
|
|
134
|
+
|
|
135
|
+
# Go
|
|
136
|
+
go test ./...
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Lint Verification
|
|
140
|
+
|
|
141
|
+
```powershell
|
|
142
|
+
# Node.js
|
|
143
|
+
npm run lint
|
|
144
|
+
|
|
145
|
+
# Python
|
|
146
|
+
ruff check .
|
|
147
|
+
|
|
148
|
+
# Go
|
|
149
|
+
golangci-lint run
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## State Recovery
|
|
155
|
+
|
|
156
|
+
### From STATE.md
|
|
157
|
+
|
|
158
|
+
When resuming work:
|
|
159
|
+
|
|
160
|
+
1. Read STATE.md for current position
|
|
161
|
+
2. Check "Last Action" for context
|
|
162
|
+
3. Follow "Next Steps" to continue
|
|
163
|
+
4. Verify recent commits match documented progress
|
|
164
|
+
|
|
165
|
+
### From Git History
|
|
166
|
+
|
|
167
|
+
If STATE.md is outdated:
|
|
168
|
+
|
|
169
|
+
```powershell
|
|
170
|
+
# See recent work
|
|
171
|
+
git log --oneline -20
|
|
172
|
+
|
|
173
|
+
# Check specific commit details
|
|
174
|
+
git show <commit-hash> --stat
|
|
175
|
+
|
|
176
|
+
# View file at specific commit
|
|
177
|
+
git show <commit-hash>:path/to/file
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Context Pollution Recovery
|
|
181
|
+
|
|
182
|
+
If quality is degrading mid-session:
|
|
183
|
+
|
|
184
|
+
1. Create state snapshot immediately
|
|
185
|
+
2. Update STATE.md with full context
|
|
186
|
+
3. Commit any pending work
|
|
187
|
+
4. Start fresh session
|
|
188
|
+
5. Run `/resume` to reload context
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Search Commands
|
|
193
|
+
|
|
194
|
+
### Find in Codebase
|
|
195
|
+
|
|
196
|
+
**PowerShell:**
|
|
197
|
+
```powershell
|
|
198
|
+
# Find pattern in files
|
|
199
|
+
Select-String -Path "src/**/*.ts" -Pattern "TODO" -Recurse
|
|
200
|
+
|
|
201
|
+
# Find files by name
|
|
202
|
+
Get-ChildItem -Recurse -Filter "*.config.*"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Bash:**
|
|
206
|
+
```bash
|
|
207
|
+
# Find pattern in files (with ripgrep)
|
|
208
|
+
rg "TODO" --type ts
|
|
209
|
+
|
|
210
|
+
# Find pattern in files (with grep)
|
|
211
|
+
grep -r "TODO" src/
|
|
212
|
+
|
|
213
|
+
# Find files by name
|
|
214
|
+
find . -name "*.config.*"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Search-First Workflow
|
|
218
|
+
|
|
219
|
+
Before reading any file:
|
|
220
|
+
|
|
221
|
+
1. Search for relevant terms:
|
|
222
|
+
```powershell
|
|
223
|
+
Select-String -Path "**/*.md" -Pattern "architecture" -Recurse
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
2. Identify candidate files from results
|
|
227
|
+
|
|
228
|
+
3. Read only relevant sections:
|
|
229
|
+
```powershell
|
|
230
|
+
Get-Content file.md | Select-Object -Skip 49 -First 20 # Lines 50-70
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Common Issues
|
|
236
|
+
|
|
237
|
+
### "SPEC.md not FINALIZED"
|
|
238
|
+
|
|
239
|
+
**Cause:** Planning lock prevents implementation
|
|
240
|
+
|
|
241
|
+
**Fix:**
|
|
242
|
+
1. Open `.gsd/SPEC.md`
|
|
243
|
+
2. Complete all required sections
|
|
244
|
+
3. Change status to `Status: FINALIZED`
|
|
245
|
+
4. Retry command
|
|
246
|
+
|
|
247
|
+
### "Context degrading"
|
|
248
|
+
|
|
249
|
+
**Symptoms:** Shorter responses, skipped steps, inconsistency
|
|
250
|
+
|
|
251
|
+
**Fix:**
|
|
252
|
+
1. Create state snapshot
|
|
253
|
+
2. Commit current work
|
|
254
|
+
3. Start fresh session
|
|
255
|
+
4. Run `/resume`
|
|
256
|
+
|
|
257
|
+
### "Commit failed"
|
|
258
|
+
|
|
259
|
+
**Causes:** Staged conflicts, hook failures
|
|
260
|
+
|
|
261
|
+
**Debug:**
|
|
262
|
+
```powershell
|
|
263
|
+
git status
|
|
264
|
+
git diff --staged
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Checklist Templates
|
|
270
|
+
|
|
271
|
+
### Pre-Execution Checklist
|
|
272
|
+
|
|
273
|
+
- [ ] SPEC.md is FINALIZED
|
|
274
|
+
- [ ] ROADMAP.md has current phase
|
|
275
|
+
- [ ] STATE.md loaded and understood
|
|
276
|
+
- [ ] Previous wave verified complete
|
|
277
|
+
|
|
278
|
+
### Post-Wave Checklist
|
|
279
|
+
|
|
280
|
+
- [ ] All tasks committed
|
|
281
|
+
- [ ] Verifications documented
|
|
282
|
+
- [ ] STATE.md updated
|
|
283
|
+
- [ ] State snapshot created
|
|
284
|
+
- [ ] No uncommitted changes
|
|
285
|
+
|
|
286
|
+
### Session End Checklist
|
|
287
|
+
|
|
288
|
+
- [ ] Current work committed
|
|
289
|
+
- [ ] STATE.md has "Next Steps"
|
|
290
|
+
- [ ] JOURNAL.md updated (if milestone)
|
|
291
|
+
- [ ] No loose ends
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
*See .gsd/PROJECT_RULES.md for canonical rules.*
|
|
296
|
+
*See .gsd/docs/model-selection-playbook.md for model guidance.*
|