my-opencode 1.1.0 → 1.2.1
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/LICENSE +21 -21
- package/README.md +180 -180
- package/agents/architect.md +30 -30
- package/agents/code-reviewer.md +29 -29
- package/agents/executor.md +30 -30
- package/agents/fullstack-dev.md +57 -53
- package/agents/spec-writer.md +37 -37
- package/agents/team-lead.md +60 -60
- package/agents/tech-writer.md +30 -30
- package/agents/test-engineer.md +30 -30
- package/agents/verifier.md +33 -33
- package/bin/cli.js +311 -311
- package/opencode.json +167 -164
- package/package.json +48 -48
- package/scripts/postinstall.js +182 -182
- package/skills/adr/SKILL.md +91 -91
- package/skills/adr/references/templates.md +100 -100
- package/skills/adr/scripts/README.md +5 -5
- package/skills/dev-flow/SKILL.md +188 -188
- package/skills/dev-flow/references/code-phase.md +72 -72
- package/skills/dev-flow/references/contract-phase.md +81 -81
- package/skills/dev-flow/references/verify-phase.md +129 -129
- package/skills/dev-flow/scripts/README.md +3 -3
- package/skills/docs-gen/SKILL.md +162 -162
- package/skills/docs-gen/references/doc-styles.md +216 -216
- package/skills/docs-gen/scripts/README.md +5 -5
- package/skills/orchestrate/SKILL.md +112 -112
- package/skills/orchestrate/references/orchestration-patterns.md +56 -56
- package/skills/pr-review/SKILL.md +110 -110
- package/skills/pr-review/references/review-dimensions.md +117 -117
- package/skills/pr-review/references/security-checklist.md +122 -122
- package/skills/pr-review/scripts/README.md +5 -5
- package/skills/test-gen/SKILL.md +143 -143
- package/skills/test-gen/references/framework-detection.md +105 -105
- package/skills/test-gen/references/test-patterns.md +260 -260
- package/skills/test-gen/scripts/README.md +5 -5
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
# Code Phase — Detailed Workflow
|
|
2
|
-
|
|
3
|
-
## Entry Conditions
|
|
4
|
-
|
|
5
|
-
- Plan handoff exists at `.handoffs/dev-flow/plan.md`
|
|
6
|
-
- Plan has been reviewed and approved by user
|
|
7
|
-
|
|
8
|
-
## Process
|
|
9
|
-
|
|
10
|
-
### 1. Read the Plan
|
|
11
|
-
- Load `.handoffs/dev-flow/plan.md`
|
|
12
|
-
- Understand the implementation steps
|
|
13
|
-
- Note which files to modify and how
|
|
14
|
-
|
|
15
|
-
### 2. Setup
|
|
16
|
-
- For each file to be modified, read the current content first
|
|
17
|
-
- Understand the existing code structure
|
|
18
|
-
|
|
19
|
-
### 3. Implement Step by Step
|
|
20
|
-
- Follow the implementation steps from the plan
|
|
21
|
-
- After each step, verify the change is coherent
|
|
22
|
-
- If you discover something the plan missed, note the deviation
|
|
23
|
-
|
|
24
|
-
### 4. Follow Project Conventions
|
|
25
|
-
- Look at neighboring files for style/pattern reference
|
|
26
|
-
- Match existing code style (naming, imports, formatting)
|
|
27
|
-
- Follow the project's established patterns
|
|
28
|
-
|
|
29
|
-
### 5. Self-Review
|
|
30
|
-
Before moving to Verify phase:
|
|
31
|
-
- [ ] All planned changes implemented
|
|
32
|
-
- [ ] No dead code or commented-out code
|
|
33
|
-
- [ ] Error handling in place
|
|
34
|
-
- [ ] Edge cases considered
|
|
35
|
-
- [ ] No secrets or debug logs committed
|
|
36
|
-
- [ ] Changes follow project conventions
|
|
37
|
-
|
|
38
|
-
### 6. Output Handoff
|
|
39
|
-
|
|
40
|
-
Write to `.handoffs/dev-flow/code.md`:
|
|
41
|
-
|
|
42
|
-
```markdown
|
|
43
|
-
# Code Changes: <title>
|
|
44
|
-
|
|
45
|
-
## Summary
|
|
46
|
-
<overview of what was changed>
|
|
47
|
-
|
|
48
|
-
## Files Changed
|
|
49
|
-
| File | Action | Description |
|
|
50
|
-
|------|--------|-------------|
|
|
51
|
-
| src/foo.ts | Modified | Added feature logic |
|
|
52
|
-
|
|
53
|
-
## Deviations from Plan
|
|
54
|
-
- <any changes from the original plan, with rationale>
|
|
55
|
-
|
|
56
|
-
## Pending Items
|
|
57
|
-
- <things that need attention before completion>
|
|
58
|
-
|
|
59
|
-
## Self-Review Checklist
|
|
60
|
-
- [ ] All changes tested locally
|
|
61
|
-
- [ ] No regressions introduced
|
|
62
|
-
- [ ] Code follows project conventions
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Anti-Patterns
|
|
66
|
-
|
|
67
|
-
- ❌ Modifying files without reading them first
|
|
68
|
-
- ❌ Copy-pasting code without understanding
|
|
69
|
-
- ❌ Leaving debug code, console.log, TODO comments
|
|
70
|
-
- ❌ Ignoring error handling
|
|
71
|
-
- ❌ Making unrelated changes
|
|
72
|
-
- ❌ Skipping the plan handoff read
|
|
1
|
+
# Code Phase — Detailed Workflow
|
|
2
|
+
|
|
3
|
+
## Entry Conditions
|
|
4
|
+
|
|
5
|
+
- Plan handoff exists at `.handoffs/dev-flow/plan.md`
|
|
6
|
+
- Plan has been reviewed and approved by user
|
|
7
|
+
|
|
8
|
+
## Process
|
|
9
|
+
|
|
10
|
+
### 1. Read the Plan
|
|
11
|
+
- Load `.handoffs/dev-flow/plan.md`
|
|
12
|
+
- Understand the implementation steps
|
|
13
|
+
- Note which files to modify and how
|
|
14
|
+
|
|
15
|
+
### 2. Setup
|
|
16
|
+
- For each file to be modified, read the current content first
|
|
17
|
+
- Understand the existing code structure
|
|
18
|
+
|
|
19
|
+
### 3. Implement Step by Step
|
|
20
|
+
- Follow the implementation steps from the plan
|
|
21
|
+
- After each step, verify the change is coherent
|
|
22
|
+
- If you discover something the plan missed, note the deviation
|
|
23
|
+
|
|
24
|
+
### 4. Follow Project Conventions
|
|
25
|
+
- Look at neighboring files for style/pattern reference
|
|
26
|
+
- Match existing code style (naming, imports, formatting)
|
|
27
|
+
- Follow the project's established patterns
|
|
28
|
+
|
|
29
|
+
### 5. Self-Review
|
|
30
|
+
Before moving to Verify phase:
|
|
31
|
+
- [ ] All planned changes implemented
|
|
32
|
+
- [ ] No dead code or commented-out code
|
|
33
|
+
- [ ] Error handling in place
|
|
34
|
+
- [ ] Edge cases considered
|
|
35
|
+
- [ ] No secrets or debug logs committed
|
|
36
|
+
- [ ] Changes follow project conventions
|
|
37
|
+
|
|
38
|
+
### 6. Output Handoff
|
|
39
|
+
|
|
40
|
+
Write to `.handoffs/dev-flow/code.md`:
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
# Code Changes: <title>
|
|
44
|
+
|
|
45
|
+
## Summary
|
|
46
|
+
<overview of what was changed>
|
|
47
|
+
|
|
48
|
+
## Files Changed
|
|
49
|
+
| File | Action | Description |
|
|
50
|
+
|------|--------|-------------|
|
|
51
|
+
| src/foo.ts | Modified | Added feature logic |
|
|
52
|
+
|
|
53
|
+
## Deviations from Plan
|
|
54
|
+
- <any changes from the original plan, with rationale>
|
|
55
|
+
|
|
56
|
+
## Pending Items
|
|
57
|
+
- <things that need attention before completion>
|
|
58
|
+
|
|
59
|
+
## Self-Review Checklist
|
|
60
|
+
- [ ] All changes tested locally
|
|
61
|
+
- [ ] No regressions introduced
|
|
62
|
+
- [ ] Code follows project conventions
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Anti-Patterns
|
|
66
|
+
|
|
67
|
+
- ❌ Modifying files without reading them first
|
|
68
|
+
- ❌ Copy-pasting code without understanding
|
|
69
|
+
- ❌ Leaving debug code, console.log, TODO comments
|
|
70
|
+
- ❌ Ignoring error handling
|
|
71
|
+
- ❌ Making unrelated changes
|
|
72
|
+
- ❌ Skipping the plan handoff read
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
# Contract Phase — Detailed Workflow
|
|
2
|
-
|
|
3
|
-
The Contract phase replaces the old Plan phase. It produces **persistent, committed** specification documents instead of temporary handoffs.
|
|
4
|
-
|
|
5
|
-
## Entry Conditions
|
|
6
|
-
|
|
7
|
-
- User request received (feature, bug, refactor)
|
|
8
|
-
- Dev-flow skill activated
|
|
9
|
-
- Optional: ADRs exist in `docs/adr/` that constrain this feature
|
|
10
|
-
|
|
11
|
-
## Analysis Process
|
|
12
|
-
|
|
13
|
-
### 1. Understand the Request
|
|
14
|
-
- Read the user's request carefully
|
|
15
|
-
- Ask clarifying questions if ambiguous (one at a time, with rationale)
|
|
16
|
-
- Identify the core goal, not just the surface request
|
|
17
|
-
|
|
18
|
-
### 2. Check Existing ADRs
|
|
19
|
-
- Read `docs/adr/README.md` for index
|
|
20
|
-
- Identify relevant ADRs that constrain or inform this feature
|
|
21
|
-
- Reference ADR numbers in the contract document
|
|
22
|
-
|
|
23
|
-
### 3. Explore the Codebase
|
|
24
|
-
- Read relevant files to understand current state
|
|
25
|
-
- Use Grep/Glob to find related code
|
|
26
|
-
- Identify patterns and conventions
|
|
27
|
-
|
|
28
|
-
### 4. Specify the Contract
|
|
29
|
-
|
|
30
|
-
Write to `docs/specs/<feature>/README.md`:
|
|
31
|
-
|
|
32
|
-
```markdown
|
|
33
|
-
# Feature: <title>
|
|
34
|
-
|
|
35
|
-
## Requirements
|
|
36
|
-
FR-1: System MUST <behavior>
|
|
37
|
-
FR-2: System SHOULD <behavior>
|
|
38
|
-
FR-3: System MAY <behavior>
|
|
39
|
-
|
|
40
|
-
## Acceptance Criteria
|
|
41
|
-
- GIVEN <context> WHEN <action> THEN <expected result>
|
|
42
|
-
|
|
43
|
-
## API Contract
|
|
44
|
-
- POST /api/xxx
|
|
45
|
-
Request: { field: type }
|
|
46
|
-
Response: { field: type }
|
|
47
|
-
|
|
48
|
-
## Data Model
|
|
49
|
-
| Entity | Field | Type | Constraints |
|
|
50
|
-
|
|
51
|
-
## Out of Scope
|
|
52
|
-
- <explicit exclusions>
|
|
53
|
-
|
|
54
|
-
## Architecture References
|
|
55
|
-
- ADR-001: <title>
|
|
56
|
-
- ADR-003: <title>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### 5. User Review
|
|
60
|
-
- Present contract to user
|
|
61
|
-
- Ask: "Does this contract look correct? Ready to implement?"
|
|
62
|
-
- Wait for approval before proceeding to Code phase
|
|
63
|
-
|
|
64
|
-
## Key Differences from Old Plan Phase
|
|
65
|
-
|
|
66
|
-
| Aspect | Old Plan (handoff) | New Contract (persistent) |
|
|
67
|
-
|--------|-------------------|--------------------------|
|
|
68
|
-
| Location | `.handoffs/dev-flow/plan.md` | `docs/specs/<feature>/README.md` |
|
|
69
|
-
| Persistence | Temporary (gitignored) | Committed to repo |
|
|
70
|
-
| Audience | Next phase only | All current and future developers |
|
|
71
|
-
| Granularity | Implementation steps | Requirements + ACs + API |
|
|
72
|
-
| Parallel work | Not supported | Frontend/backend can work in parallel |
|
|
73
|
-
| ADR integration | None | Explicit reference |
|
|
74
|
-
|
|
75
|
-
## Anti-Patterns
|
|
76
|
-
|
|
77
|
-
- ❌ Writing contracts in `.handoffs/` instead of `docs/specs/`
|
|
78
|
-
- ❌ Over-specifying implementation details (that's for Code phase)
|
|
79
|
-
- ❌ Ignoring existing ADRs
|
|
80
|
-
- ❌ Writing contracts in a different doc per code phase (update the single contract)
|
|
81
|
-
- ❌ Skipping user review for complex features
|
|
1
|
+
# Contract Phase — Detailed Workflow
|
|
2
|
+
|
|
3
|
+
The Contract phase replaces the old Plan phase. It produces **persistent, committed** specification documents instead of temporary handoffs.
|
|
4
|
+
|
|
5
|
+
## Entry Conditions
|
|
6
|
+
|
|
7
|
+
- User request received (feature, bug, refactor)
|
|
8
|
+
- Dev-flow skill activated
|
|
9
|
+
- Optional: ADRs exist in `docs/adr/` that constrain this feature
|
|
10
|
+
|
|
11
|
+
## Analysis Process
|
|
12
|
+
|
|
13
|
+
### 1. Understand the Request
|
|
14
|
+
- Read the user's request carefully
|
|
15
|
+
- Ask clarifying questions if ambiguous (one at a time, with rationale)
|
|
16
|
+
- Identify the core goal, not just the surface request
|
|
17
|
+
|
|
18
|
+
### 2. Check Existing ADRs
|
|
19
|
+
- Read `docs/adr/README.md` for index
|
|
20
|
+
- Identify relevant ADRs that constrain or inform this feature
|
|
21
|
+
- Reference ADR numbers in the contract document
|
|
22
|
+
|
|
23
|
+
### 3. Explore the Codebase
|
|
24
|
+
- Read relevant files to understand current state
|
|
25
|
+
- Use Grep/Glob to find related code
|
|
26
|
+
- Identify patterns and conventions
|
|
27
|
+
|
|
28
|
+
### 4. Specify the Contract
|
|
29
|
+
|
|
30
|
+
Write to `docs/specs/<feature>/README.md`:
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
# Feature: <title>
|
|
34
|
+
|
|
35
|
+
## Requirements
|
|
36
|
+
FR-1: System MUST <behavior>
|
|
37
|
+
FR-2: System SHOULD <behavior>
|
|
38
|
+
FR-3: System MAY <behavior>
|
|
39
|
+
|
|
40
|
+
## Acceptance Criteria
|
|
41
|
+
- GIVEN <context> WHEN <action> THEN <expected result>
|
|
42
|
+
|
|
43
|
+
## API Contract
|
|
44
|
+
- POST /api/xxx
|
|
45
|
+
Request: { field: type }
|
|
46
|
+
Response: { field: type }
|
|
47
|
+
|
|
48
|
+
## Data Model
|
|
49
|
+
| Entity | Field | Type | Constraints |
|
|
50
|
+
|
|
51
|
+
## Out of Scope
|
|
52
|
+
- <explicit exclusions>
|
|
53
|
+
|
|
54
|
+
## Architecture References
|
|
55
|
+
- ADR-001: <title>
|
|
56
|
+
- ADR-003: <title>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 5. User Review
|
|
60
|
+
- Present contract to user
|
|
61
|
+
- Ask: "Does this contract look correct? Ready to implement?"
|
|
62
|
+
- Wait for approval before proceeding to Code phase
|
|
63
|
+
|
|
64
|
+
## Key Differences from Old Plan Phase
|
|
65
|
+
|
|
66
|
+
| Aspect | Old Plan (handoff) | New Contract (persistent) |
|
|
67
|
+
|--------|-------------------|--------------------------|
|
|
68
|
+
| Location | `.handoffs/dev-flow/plan.md` | `docs/specs/<feature>/README.md` |
|
|
69
|
+
| Persistence | Temporary (gitignored) | Committed to repo |
|
|
70
|
+
| Audience | Next phase only | All current and future developers |
|
|
71
|
+
| Granularity | Implementation steps | Requirements + ACs + API |
|
|
72
|
+
| Parallel work | Not supported | Frontend/backend can work in parallel |
|
|
73
|
+
| ADR integration | None | Explicit reference |
|
|
74
|
+
|
|
75
|
+
## Anti-Patterns
|
|
76
|
+
|
|
77
|
+
- ❌ Writing contracts in `.handoffs/` instead of `docs/specs/`
|
|
78
|
+
- ❌ Over-specifying implementation details (that's for Code phase)
|
|
79
|
+
- ❌ Ignoring existing ADRs
|
|
80
|
+
- ❌ Writing contracts in a different doc per code phase (update the single contract)
|
|
81
|
+
- ❌ Skipping user review for complex features
|
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
# Verify Phase — Detailed Workflow
|
|
2
|
-
|
|
3
|
-
## Entry Conditions
|
|
4
|
-
|
|
5
|
-
- Code handoff exists at `.handoffs/dev-flow/code.md`
|
|
6
|
-
- Code changes have been implemented
|
|
7
|
-
|
|
8
|
-
## Process
|
|
9
|
-
|
|
10
|
-
Run verification steps in order. Stop at first failure and report.
|
|
11
|
-
|
|
12
|
-
### 1. Detect Project Type
|
|
13
|
-
- Look for `package.json` → Node.js project
|
|
14
|
-
- Look for `Cargo.toml` → Rust project
|
|
15
|
-
- Look for `pyproject.toml` / `requirements.txt` → Python project
|
|
16
|
-
- Look for `go.mod` → Go project
|
|
17
|
-
- Use `ls` on project root to detect
|
|
18
|
-
|
|
19
|
-
### 2. Run Lint
|
|
20
|
-
```
|
|
21
|
-
# Node
|
|
22
|
-
npm run lint # or yarn lint, pnpm lint
|
|
23
|
-
|
|
24
|
-
# Rust
|
|
25
|
-
cargo clippy
|
|
26
|
-
|
|
27
|
-
# Python
|
|
28
|
-
ruff check . # or flake8, pylint
|
|
29
|
-
|
|
30
|
-
# Go
|
|
31
|
-
go vet ./...
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**Pass condition:** Exit code 0, no errors.
|
|
35
|
-
**Fail:** Record lint errors in handoff.
|
|
36
|
-
|
|
37
|
-
### 3. Run Typecheck (if applicable)
|
|
38
|
-
```
|
|
39
|
-
# TypeScript
|
|
40
|
-
npx tsc --noEmit # or npm run typecheck
|
|
41
|
-
|
|
42
|
-
# Rust
|
|
43
|
-
cargo check
|
|
44
|
-
|
|
45
|
-
# Python (pyright/mypy)
|
|
46
|
-
pyright .
|
|
47
|
-
mypy .
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
**Pass condition:** Exit code 0, no type errors.
|
|
51
|
-
|
|
52
|
-
### 4. Run Tests
|
|
53
|
-
```
|
|
54
|
-
# Find test command from package.json scripts or common conventions
|
|
55
|
-
|
|
56
|
-
# Node
|
|
57
|
-
npm test # or npm run test
|
|
58
|
-
|
|
59
|
-
# Rust
|
|
60
|
-
cargo test
|
|
61
|
-
|
|
62
|
-
# Python
|
|
63
|
-
pytest # or python -m pytest
|
|
64
|
-
|
|
65
|
-
# Go
|
|
66
|
-
go test ./...
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
**Pass condition:** All tests pass.
|
|
70
|
-
**Fail:** Record which tests failed and their output.
|
|
71
|
-
|
|
72
|
-
### 5. Run Build (if applicable)
|
|
73
|
-
```
|
|
74
|
-
# Node
|
|
75
|
-
npm run build # or npm run build:prod
|
|
76
|
-
|
|
77
|
-
# Rust
|
|
78
|
-
cargo build
|
|
79
|
-
|
|
80
|
-
# Go
|
|
81
|
-
go build ./...
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
**Pass condition:** Exit code 0, build succeeds.
|
|
85
|
-
|
|
86
|
-
### 6. Output Handoff
|
|
87
|
-
|
|
88
|
-
Write to `.handoffs/dev-flow/verify.md`:
|
|
89
|
-
|
|
90
|
-
```markdown
|
|
91
|
-
# Verification: <title>
|
|
92
|
-
|
|
93
|
-
## Results
|
|
94
|
-
|
|
95
|
-
| Check | Status | Details |
|
|
96
|
-
|-------|--------|---------|
|
|
97
|
-
| Lint | ✅ Pass / ❌ Fail | <details> |
|
|
98
|
-
| Typecheck | ✅ Pass / ❌ Fail / ⏭ Skip | <details> |
|
|
99
|
-
| Tests | ✅ Pass / ❌ Fail | <details> |
|
|
100
|
-
| Build | ✅ Pass / ❌ Fail / ⏭ Skip | <details> |
|
|
101
|
-
|
|
102
|
-
## Overall Verdict
|
|
103
|
-
|
|
104
|
-
**PASS** — All checks passed. Changes are ready.
|
|
105
|
-
|
|
106
|
-
or
|
|
107
|
-
|
|
108
|
-
**NEEDS FIX** — <summary of failures, max 3 bullet points>
|
|
109
|
-
|
|
110
|
-
## Fix Loop Info
|
|
111
|
-
- Attempt: <1/3, 2/3, 3/3>
|
|
112
|
-
- Previous failures: <list>
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Fix Loop
|
|
116
|
-
|
|
117
|
-
If verification fails:
|
|
118
|
-
1. Read `verify.md` to understand failures
|
|
119
|
-
2. Return to Code phase to fix
|
|
120
|
-
3. Re-verify after fixes
|
|
121
|
-
4. Max 3 fix attempts total
|
|
122
|
-
|
|
123
|
-
## Anti-Patterns
|
|
124
|
-
|
|
125
|
-
- ❌ Skipping verification for "trivial" changes
|
|
126
|
-
- ❌ Not running the actual test command (guessing)
|
|
127
|
-
- ❌ Ignoring test failures that seem unrelated
|
|
128
|
-
- ❌ Exceeding max fix loops without asking user
|
|
129
|
-
- ❌ Not detecting the correct project type
|
|
1
|
+
# Verify Phase — Detailed Workflow
|
|
2
|
+
|
|
3
|
+
## Entry Conditions
|
|
4
|
+
|
|
5
|
+
- Code handoff exists at `.handoffs/dev-flow/code.md`
|
|
6
|
+
- Code changes have been implemented
|
|
7
|
+
|
|
8
|
+
## Process
|
|
9
|
+
|
|
10
|
+
Run verification steps in order. Stop at first failure and report.
|
|
11
|
+
|
|
12
|
+
### 1. Detect Project Type
|
|
13
|
+
- Look for `package.json` → Node.js project
|
|
14
|
+
- Look for `Cargo.toml` → Rust project
|
|
15
|
+
- Look for `pyproject.toml` / `requirements.txt` → Python project
|
|
16
|
+
- Look for `go.mod` → Go project
|
|
17
|
+
- Use `ls` on project root to detect
|
|
18
|
+
|
|
19
|
+
### 2. Run Lint
|
|
20
|
+
```
|
|
21
|
+
# Node
|
|
22
|
+
npm run lint # or yarn lint, pnpm lint
|
|
23
|
+
|
|
24
|
+
# Rust
|
|
25
|
+
cargo clippy
|
|
26
|
+
|
|
27
|
+
# Python
|
|
28
|
+
ruff check . # or flake8, pylint
|
|
29
|
+
|
|
30
|
+
# Go
|
|
31
|
+
go vet ./...
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Pass condition:** Exit code 0, no errors.
|
|
35
|
+
**Fail:** Record lint errors in handoff.
|
|
36
|
+
|
|
37
|
+
### 3. Run Typecheck (if applicable)
|
|
38
|
+
```
|
|
39
|
+
# TypeScript
|
|
40
|
+
npx tsc --noEmit # or npm run typecheck
|
|
41
|
+
|
|
42
|
+
# Rust
|
|
43
|
+
cargo check
|
|
44
|
+
|
|
45
|
+
# Python (pyright/mypy)
|
|
46
|
+
pyright .
|
|
47
|
+
mypy .
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Pass condition:** Exit code 0, no type errors.
|
|
51
|
+
|
|
52
|
+
### 4. Run Tests
|
|
53
|
+
```
|
|
54
|
+
# Find test command from package.json scripts or common conventions
|
|
55
|
+
|
|
56
|
+
# Node
|
|
57
|
+
npm test # or npm run test
|
|
58
|
+
|
|
59
|
+
# Rust
|
|
60
|
+
cargo test
|
|
61
|
+
|
|
62
|
+
# Python
|
|
63
|
+
pytest # or python -m pytest
|
|
64
|
+
|
|
65
|
+
# Go
|
|
66
|
+
go test ./...
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Pass condition:** All tests pass.
|
|
70
|
+
**Fail:** Record which tests failed and their output.
|
|
71
|
+
|
|
72
|
+
### 5. Run Build (if applicable)
|
|
73
|
+
```
|
|
74
|
+
# Node
|
|
75
|
+
npm run build # or npm run build:prod
|
|
76
|
+
|
|
77
|
+
# Rust
|
|
78
|
+
cargo build
|
|
79
|
+
|
|
80
|
+
# Go
|
|
81
|
+
go build ./...
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Pass condition:** Exit code 0, build succeeds.
|
|
85
|
+
|
|
86
|
+
### 6. Output Handoff
|
|
87
|
+
|
|
88
|
+
Write to `.handoffs/dev-flow/verify.md`:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
# Verification: <title>
|
|
92
|
+
|
|
93
|
+
## Results
|
|
94
|
+
|
|
95
|
+
| Check | Status | Details |
|
|
96
|
+
|-------|--------|---------|
|
|
97
|
+
| Lint | ✅ Pass / ❌ Fail | <details> |
|
|
98
|
+
| Typecheck | ✅ Pass / ❌ Fail / ⏭ Skip | <details> |
|
|
99
|
+
| Tests | ✅ Pass / ❌ Fail | <details> |
|
|
100
|
+
| Build | ✅ Pass / ❌ Fail / ⏭ Skip | <details> |
|
|
101
|
+
|
|
102
|
+
## Overall Verdict
|
|
103
|
+
|
|
104
|
+
**PASS** — All checks passed. Changes are ready.
|
|
105
|
+
|
|
106
|
+
or
|
|
107
|
+
|
|
108
|
+
**NEEDS FIX** — <summary of failures, max 3 bullet points>
|
|
109
|
+
|
|
110
|
+
## Fix Loop Info
|
|
111
|
+
- Attempt: <1/3, 2/3, 3/3>
|
|
112
|
+
- Previous failures: <list>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Fix Loop
|
|
116
|
+
|
|
117
|
+
If verification fails:
|
|
118
|
+
1. Read `verify.md` to understand failures
|
|
119
|
+
2. Return to Code phase to fix
|
|
120
|
+
3. Re-verify after fixes
|
|
121
|
+
4. Max 3 fix attempts total
|
|
122
|
+
|
|
123
|
+
## Anti-Patterns
|
|
124
|
+
|
|
125
|
+
- ❌ Skipping verification for "trivial" changes
|
|
126
|
+
- ❌ Not running the actual test command (guessing)
|
|
127
|
+
- ❌ Ignoring test failures that seem unrelated
|
|
128
|
+
- ❌ Exceeding max fix loops without asking user
|
|
129
|
+
- ❌ Not detecting the correct project type
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# dev-flow Scripts
|
|
2
|
-
|
|
3
|
-
Utility scripts for the dev-flow skill. Currently empty — scripts will be added as needed (e.g., handoff management, project type detection).
|
|
1
|
+
# dev-flow Scripts
|
|
2
|
+
|
|
3
|
+
Utility scripts for the dev-flow skill. Currently empty — scripts will be added as needed (e.g., handoff management, project type detection).
|