opencode-ship 0.8.0 → 0.10.0-rc.17
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/CHANGELOG.md +108 -0
- package/README.md +5 -3
- package/THIRD_PARTY_NOTICES.md +77 -18
- package/assets/agents/ship-controller.md +122 -0
- package/assets/agents/ship-final-spec-reviewer.md +87 -0
- package/assets/agents/ship-final-standards-reviewer.md +83 -0
- package/assets/agents/ship-planner.md +78 -0
- package/assets/agents/ship-task-builder.md +91 -0
- package/assets/agents/ship-task-reviewer.md +78 -0
- package/assets/commands/ship-deliver.md +30 -0
- package/assets/commands/ship-resume.md +28 -0
- package/assets/commands/ship-status.md +25 -0
- package/assets/skills/brainstorming/SKILL.md +160 -0
- package/assets/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/assets/skills/brainstorming/visual-companion.md +298 -0
- package/assets/skills/code-review/SKILL.md +98 -0
- package/assets/skills/codebase-design/DEEPENING.md +37 -0
- package/assets/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/assets/skills/codebase-design/SKILL.md +123 -0
- package/assets/skills/dispatching-parallel-agents/SKILL.md +176 -0
- package/assets/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/assets/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/assets/skills/domain-modeling/SKILL.md +83 -0
- package/assets/skills/engineering-workflow/SKILL.md +125 -0
- package/assets/skills/engineering-workflow/domain.md +51 -0
- package/assets/skills/engineering-workflow/issue-tracker-github.md +45 -0
- package/assets/skills/engineering-workflow/issue-tracker-gitlab.md +46 -0
- package/assets/skills/engineering-workflow/issue-tracker-local.md +30 -0
- package/assets/skills/engineering-workflow/triage-labels.md +15 -0
- package/assets/skills/executing-plans/SKILL.md +73 -0
- package/assets/skills/grill-with-docs/SKILL.md +10 -14
- package/assets/skills/grilling/SKILL.md +21 -0
- package/assets/skills/handoff/SKILL.md +25 -0
- package/assets/skills/prototype/LOGIC.md +79 -0
- package/assets/skills/prototype/SKILL.md +35 -0
- package/assets/skills/prototype/UI.md +112 -0
- package/assets/skills/receiving-code-review/SKILL.md +214 -0
- package/assets/skills/requesting-code-review/SKILL.md +104 -0
- package/assets/skills/requesting-code-review/code-reviewer.md +172 -0
- package/assets/skills/research/SKILL.md +21 -0
- package/assets/skills/setup-engineering-workflow/SKILL.md +125 -0
- package/assets/skills/setup-engineering-workflow/domain.md +51 -0
- package/assets/skills/setup-engineering-workflow/issue-tracker-github.md +45 -0
- package/assets/skills/setup-engineering-workflow/issue-tracker-gitlab.md +46 -0
- package/assets/skills/setup-engineering-workflow/issue-tracker-local.md +30 -0
- package/assets/skills/setup-engineering-workflow/triage-labels.md +15 -0
- package/assets/skills/subagent-driven-development/SKILL.md +512 -0
- package/assets/skills/subagent-driven-development/implementer-prompt.md +142 -0
- package/assets/skills/subagent-driven-development/re-review-prompt.md +106 -0
- package/assets/skills/subagent-driven-development/task-reviewer-prompt.md +185 -0
- package/assets/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/assets/skills/systematic-debugging/SKILL.md +292 -0
- package/assets/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/assets/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/assets/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/assets/skills/systematic-debugging/find-polluter.sh +72 -0
- package/assets/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/assets/skills/systematic-debugging/test-academic.md +14 -0
- package/assets/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/assets/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/assets/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/assets/skills/test-driven-development/SKILL.md +329 -0
- package/assets/skills/test-driven-development/writing-good-tests.md +198 -0
- package/assets/skills/to-spec/SKILL.md +84 -0
- package/assets/skills/to-tickets/SKILL.md +114 -0
- package/assets/skills/triage/AGENT-BRIEF.md +207 -0
- package/assets/skills/triage/OUT-OF-SCOPE.md +105 -0
- package/assets/skills/triage/SKILL.md +114 -15
- package/assets/skills/verification-before-completion/SKILL.md +129 -0
- package/assets/skills/wayfinder/SKILL.md +137 -0
- package/assets/skills/writing-plans/SKILL.md +177 -0
- package/assets/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/dist/cli.js +1146 -435
- package/dist/core.js +210 -61
- package/dist/plugin.js +2368 -230
- package/package.json +3 -1
- package/schema/ship-config.schema.json +63 -2
- package/schema/ship-lock.schema.json +5 -3
- package/tests/plugin/plugin-load.test.mjs +85 -0
- package/vendor/mattpocock/LICENSE +30 -0
- package/vendor/obra/LICENSE +30 -0
- package/vendor/sources.json +976 -0
- package/vendor/superpowers/LICENSE +30 -0
- package/vendor/upstreams/mattpocock/skills/engineering/code-review/SKILL.md +89 -0
- package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/DEEPENING.md +37 -0
- package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/SKILL.md +114 -0
- package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/ADR-FORMAT.md +47 -0
- package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/SKILL.md +74 -0
- package/vendor/upstreams/mattpocock/skills/engineering/grill-with-docs/SKILL.md +7 -0
- package/vendor/upstreams/mattpocock/skills/engineering/prototype/LOGIC.md +79 -0
- package/vendor/upstreams/mattpocock/skills/engineering/prototype/SKILL.md +26 -0
- package/vendor/upstreams/mattpocock/skills/engineering/prototype/UI.md +112 -0
- package/vendor/upstreams/mattpocock/skills/engineering/research/SKILL.md +12 -0
- package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/SKILL.md +116 -0
- package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/domain.md +51 -0
- package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md +45 -0
- package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
- package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
- package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/triage-labels.md +15 -0
- package/vendor/upstreams/mattpocock/skills/engineering/to-spec/SKILL.md +75 -0
- package/vendor/upstreams/mattpocock/skills/engineering/to-tickets/SKILL.md +105 -0
- package/vendor/upstreams/mattpocock/skills/engineering/triage/AGENT-BRIEF.md +207 -0
- package/vendor/upstreams/mattpocock/skills/engineering/triage/OUT-OF-SCOPE.md +105 -0
- package/vendor/upstreams/mattpocock/skills/engineering/triage/SKILL.md +112 -0
- package/vendor/upstreams/mattpocock/skills/engineering/wayfinder/SKILL.md +128 -0
- package/vendor/upstreams/mattpocock/skills/productivity/grilling/SKILL.md +12 -0
- package/vendor/upstreams/mattpocock/skills/productivity/handoff/SKILL.md +16 -0
- package/vendor/upstreams/obra/skills/brainstorming/SKILL.md +151 -0
- package/vendor/upstreams/obra/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/vendor/upstreams/obra/skills/brainstorming/visual-companion.md +298 -0
- package/vendor/upstreams/obra/skills/dispatching-parallel-agents/SKILL.md +167 -0
- package/vendor/upstreams/obra/skills/executing-plans/SKILL.md +64 -0
- package/vendor/upstreams/obra/skills/receiving-code-review/SKILL.md +205 -0
- package/vendor/upstreams/obra/skills/requesting-code-review/SKILL.md +95 -0
- package/vendor/upstreams/obra/skills/requesting-code-review/code-reviewer.md +172 -0
- package/vendor/upstreams/obra/skills/subagent-driven-development/SKILL.md +503 -0
- package/vendor/upstreams/obra/skills/subagent-driven-development/implementer-prompt.md +142 -0
- package/vendor/upstreams/obra/skills/subagent-driven-development/re-review-prompt.md +106 -0
- package/vendor/upstreams/obra/skills/subagent-driven-development/task-reviewer-prompt.md +185 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/SKILL.md +283 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/find-polluter.sh +72 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/test-academic.md +14 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/vendor/upstreams/obra/skills/test-driven-development/SKILL.md +320 -0
- package/vendor/upstreams/obra/skills/test-driven-development/writing-good-tests.md +198 -0
- package/vendor/upstreams/obra/skills/verification-before-completion/SKILL.md +120 -0
- package/vendor/upstreams/obra/skills/writing-plans/SKILL.md +168 -0
- package/vendor/upstreams/obra/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dispatching-parallel-agents
|
|
3
|
+
description: Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dispatching Parallel Agents
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
|
|
11
|
+
|
|
12
|
+
When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.
|
|
13
|
+
|
|
14
|
+
**Core principle:** Dispatch one agent per independent problem domain. Let them work concurrently.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
```dot
|
|
19
|
+
digraph when_to_use {
|
|
20
|
+
"Multiple failures?" [shape=diamond];
|
|
21
|
+
"Are they independent?" [shape=diamond];
|
|
22
|
+
"Single agent investigates all" [shape=box];
|
|
23
|
+
"One agent per problem domain" [shape=box];
|
|
24
|
+
"Can they work in parallel?" [shape=diamond];
|
|
25
|
+
"Sequential agents" [shape=box];
|
|
26
|
+
"Parallel dispatch" [shape=box];
|
|
27
|
+
|
|
28
|
+
"Multiple failures?" -> "Are they independent?" [label="yes"];
|
|
29
|
+
"Are they independent?" -> "Single agent investigates all" [label="no - related"];
|
|
30
|
+
"Are they independent?" -> "Can they work in parallel?" [label="yes"];
|
|
31
|
+
"Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
|
|
32
|
+
"Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Use when:**
|
|
37
|
+
- 3+ test files failing with different root causes
|
|
38
|
+
- Multiple subsystems broken independently
|
|
39
|
+
- Each problem can be understood without context from others
|
|
40
|
+
- No shared state between investigations
|
|
41
|
+
|
|
42
|
+
**Don't use when:**
|
|
43
|
+
- Failures are related (fix one might fix others)
|
|
44
|
+
- Need to understand full system state
|
|
45
|
+
- Agents would interfere with each other
|
|
46
|
+
|
|
47
|
+
## The Pattern
|
|
48
|
+
|
|
49
|
+
### 1. Identify Independent Domains
|
|
50
|
+
|
|
51
|
+
Group failures by what's broken:
|
|
52
|
+
- File A tests: Tool approval flow
|
|
53
|
+
- File B tests: Batch completion behavior
|
|
54
|
+
- File C tests: Abort functionality
|
|
55
|
+
|
|
56
|
+
Each domain is independent - fixing tool approval doesn't affect abort tests.
|
|
57
|
+
|
|
58
|
+
### 2. Create Focused Agent Tasks
|
|
59
|
+
|
|
60
|
+
Each agent gets:
|
|
61
|
+
- **Specific scope:** One test file or subsystem
|
|
62
|
+
- **Clear goal:** Make these tests pass
|
|
63
|
+
- **Constraints:** Don't change other code
|
|
64
|
+
- **Expected output:** Summary of what you found and fixed
|
|
65
|
+
|
|
66
|
+
### 3. Dispatch in Parallel
|
|
67
|
+
|
|
68
|
+
Issue all three subagent dispatches in the same response — they run in parallel:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
Subagent (general-purpose): "Fix agent-tool-abort.test.ts failures"
|
|
72
|
+
Subagent (general-purpose): "Fix batch-completion-behavior.test.ts failures"
|
|
73
|
+
Subagent (general-purpose): "Fix tool-approval-race-conditions.test.ts failures"
|
|
74
|
+
# All three run concurrently.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Multiple dispatch calls in one response = parallel execution. One per response = sequential.
|
|
78
|
+
|
|
79
|
+
### 4. Review and Integrate
|
|
80
|
+
|
|
81
|
+
When agents return:
|
|
82
|
+
- Read each summary
|
|
83
|
+
- Verify fixes don't conflict
|
|
84
|
+
- Run full test suite
|
|
85
|
+
- Integrate all changes
|
|
86
|
+
|
|
87
|
+
## Agent Prompt Structure
|
|
88
|
+
|
|
89
|
+
Good agent prompts are:
|
|
90
|
+
1. **Focused** - One clear problem domain
|
|
91
|
+
2. **Self-contained** - All context needed to understand the problem
|
|
92
|
+
3. **Specific about output** - What should the agent return?
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
|
|
96
|
+
|
|
97
|
+
1. "should abort tool with partial output capture" - expects 'interrupted at' in message
|
|
98
|
+
2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
|
|
99
|
+
3. "should properly track pendingToolCount" - expects 3 results but gets 0
|
|
100
|
+
|
|
101
|
+
These are timing/race condition issues. Your task:
|
|
102
|
+
|
|
103
|
+
1. Read the test file and understand what each test verifies
|
|
104
|
+
2. Identify root cause - timing issues or actual bugs?
|
|
105
|
+
3. Fix by:
|
|
106
|
+
- Replacing arbitrary timeouts with event-based waiting
|
|
107
|
+
- Fixing bugs in abort implementation if found
|
|
108
|
+
- Adjusting test expectations if testing changed behavior
|
|
109
|
+
|
|
110
|
+
Do NOT just increase timeouts - find the real issue.
|
|
111
|
+
|
|
112
|
+
Return: Summary of what you found and what you fixed.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Common Mistakes
|
|
116
|
+
|
|
117
|
+
**❌ Too broad:** "Fix all the tests" - agent gets lost
|
|
118
|
+
**✅ Specific:** "Fix agent-tool-abort.test.ts" - focused scope
|
|
119
|
+
|
|
120
|
+
**❌ No context:** "Fix the race condition" - agent doesn't know where
|
|
121
|
+
**✅ Context:** Paste the error messages and test names
|
|
122
|
+
|
|
123
|
+
**❌ No constraints:** Agent might refactor everything
|
|
124
|
+
**✅ Constraints:** "Do NOT change production code" or "Fix tests only"
|
|
125
|
+
|
|
126
|
+
**❌ Vague output:** "Fix it" - you don't know what changed
|
|
127
|
+
**✅ Specific:** "Return summary of root cause and changes"
|
|
128
|
+
|
|
129
|
+
## When NOT to Use
|
|
130
|
+
|
|
131
|
+
**Related failures:** Fixing one might fix others - investigate together first
|
|
132
|
+
**Need full context:** Understanding requires seeing entire system
|
|
133
|
+
**Exploratory debugging:** You don't know what's broken yet
|
|
134
|
+
**Shared state:** Agents would interfere (editing same files, using same resources)
|
|
135
|
+
|
|
136
|
+
## Real Example from Session
|
|
137
|
+
|
|
138
|
+
**Scenario:** 6 test failures across 3 files after major refactoring
|
|
139
|
+
|
|
140
|
+
**Failures:**
|
|
141
|
+
- agent-tool-abort.test.ts: 3 failures (timing issues)
|
|
142
|
+
- batch-completion-behavior.test.ts: 2 failures (tools not executing)
|
|
143
|
+
- tool-approval-race-conditions.test.ts: 1 failure (execution count = 0)
|
|
144
|
+
|
|
145
|
+
**Decision:** Independent domains - abort logic separate from batch completion separate from race conditions
|
|
146
|
+
|
|
147
|
+
**Dispatch:**
|
|
148
|
+
```
|
|
149
|
+
Agent 1 → Fix agent-tool-abort.test.ts
|
|
150
|
+
Agent 2 → Fix batch-completion-behavior.test.ts
|
|
151
|
+
Agent 3 → Fix tool-approval-race-conditions.test.ts
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Results:**
|
|
155
|
+
- Agent 1: Replaced timeouts with event-based waiting
|
|
156
|
+
- Agent 2: Fixed event structure bug (threadId in wrong place)
|
|
157
|
+
- Agent 3: Added wait for async tool execution to complete
|
|
158
|
+
|
|
159
|
+
**Integration:** All fixes independent, no conflicts, full suite green
|
|
160
|
+
|
|
161
|
+
## Verification
|
|
162
|
+
|
|
163
|
+
After agents return:
|
|
164
|
+
1. **Review each summary** - Understand what changed
|
|
165
|
+
2. **Check for conflicts** - Did agents edit same code?
|
|
166
|
+
3. **Run full suite** - Verify all fixes work together
|
|
167
|
+
4. **Spot check** - Agents can make systematic errors
|
|
168
|
+
|
|
169
|
+
## Ship integration
|
|
170
|
+
|
|
171
|
+
This skill is part of the engineering profile shipped by
|
|
172
|
+
`opencode-ship@1.0`. Execution is driven by the deterministic
|
|
173
|
+
Ship controller; the cheap builder (`minimax/MiniMax-M3`) cannot
|
|
174
|
+
commit, push, mutate GitHub, mark Ready, or merge. The
|
|
175
|
+
verification-before-completion rule is enforced by
|
|
176
|
+
`delivery_verify`, not by the model self-asserting completion.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# ADR Format
|
|
2
|
+
|
|
3
|
+
ADRs live in `docs/adr/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc.
|
|
4
|
+
|
|
5
|
+
Create the `docs/adr/` directory lazily — only when the first ADR is needed.
|
|
6
|
+
|
|
7
|
+
## Template
|
|
8
|
+
|
|
9
|
+
```md
|
|
10
|
+
# {Short title of the decision}
|
|
11
|
+
|
|
12
|
+
{1-3 sentences: what's the context, what did we decide, and why.}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
That's it. An ADR can be a single paragraph. The value is in recording *that* a decision was made and *why* — not in filling out sections.
|
|
16
|
+
|
|
17
|
+
## Optional sections
|
|
18
|
+
|
|
19
|
+
Only include these when they add genuine value. Most ADRs won't need them.
|
|
20
|
+
|
|
21
|
+
- **Status** frontmatter (`proposed | accepted | deprecated | superseded by ADR-NNNN`) — useful when decisions are revisited
|
|
22
|
+
- **Considered Options** — only when the rejected alternatives are worth remembering
|
|
23
|
+
- **Consequences** — only when non-obvious downstream effects need to be called out
|
|
24
|
+
|
|
25
|
+
## Numbering
|
|
26
|
+
|
|
27
|
+
Scan `docs/adr/` for the highest existing number and increment by one.
|
|
28
|
+
|
|
29
|
+
## When to offer an ADR
|
|
30
|
+
|
|
31
|
+
All three of these must be true:
|
|
32
|
+
|
|
33
|
+
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
34
|
+
2. **Surprising without context** — a future reader will look at the code and wonder "why on earth did they do it this way?"
|
|
35
|
+
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
36
|
+
|
|
37
|
+
If a decision is easy to reverse, skip it — you'll just reverse it. If it's not surprising, nobody will wonder why. If there was no real alternative, there's nothing to record beyond "we did the obvious thing."
|
|
38
|
+
|
|
39
|
+
### What qualifies
|
|
40
|
+
|
|
41
|
+
- **Architectural shape.** "We're using a monorepo." "The write model is event-sourced, the read model is projected into Postgres."
|
|
42
|
+
- **Integration patterns between contexts.** "Ordering and Billing communicate via domain events, not synchronous HTTP."
|
|
43
|
+
- **Technology choices that carry lock-in.** Database, message bus, auth provider, deployment target. Not every library — just the ones that would take a quarter to swap out.
|
|
44
|
+
- **Boundary and scope decisions.** "Customer data is owned by the Customer context; other contexts reference it by ID only." The explicit no-s are as valuable as the yes-s.
|
|
45
|
+
- **Deliberate deviations from the obvious path.** "We're using manual SQL instead of an ORM because X." Anything where a reasonable reader would assume the opposite. These stop the next engineer from "fixing" something that was deliberate.
|
|
46
|
+
- **Constraints not visible in the code.** "We can't use AWS because of compliance requirements." "Response times must be under 200ms because of the partner API contract."
|
|
47
|
+
- **Rejected alternatives when the rejection is non-obvious.** If you considered GraphQL and picked REST for subtle reasons, record it — otherwise someone will suggest GraphQL again in six months.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# CONTEXT.md Format
|
|
2
|
+
|
|
3
|
+
## Structure
|
|
4
|
+
|
|
5
|
+
```md
|
|
6
|
+
# {Context Name}
|
|
7
|
+
|
|
8
|
+
{One or two sentence description of what this context is and why it exists.}
|
|
9
|
+
|
|
10
|
+
## Language
|
|
11
|
+
|
|
12
|
+
**Order**:
|
|
13
|
+
{A one or two sentence description of the term}
|
|
14
|
+
_Avoid_: Purchase, transaction
|
|
15
|
+
|
|
16
|
+
**Invoice**:
|
|
17
|
+
A request for payment sent to a customer after delivery.
|
|
18
|
+
_Avoid_: Bill, payment request
|
|
19
|
+
|
|
20
|
+
**Customer**:
|
|
21
|
+
A person or organization that places orders.
|
|
22
|
+
_Avoid_: Client, buyer, account
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
|
|
28
|
+
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
|
|
29
|
+
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
|
|
30
|
+
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
31
|
+
|
|
32
|
+
## Single vs multi-context repos
|
|
33
|
+
|
|
34
|
+
**Single context (most repos):** One `CONTEXT.md` at the repo root.
|
|
35
|
+
|
|
36
|
+
**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
37
|
+
|
|
38
|
+
```md
|
|
39
|
+
# Context Map
|
|
40
|
+
|
|
41
|
+
## Contexts
|
|
42
|
+
|
|
43
|
+
- [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
|
|
44
|
+
- [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
|
|
45
|
+
- [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping
|
|
46
|
+
|
|
47
|
+
## Relationships
|
|
48
|
+
|
|
49
|
+
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
50
|
+
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
51
|
+
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The skill infers which structure applies:
|
|
55
|
+
|
|
56
|
+
- If `CONTEXT-MAP.md` exists, read it to find contexts
|
|
57
|
+
- If only a root `CONTEXT.md` exists, single context
|
|
58
|
+
- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
|
|
59
|
+
|
|
60
|
+
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: domain-modeling
|
|
3
|
+
description: Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Domain Modeling
|
|
7
|
+
|
|
8
|
+
Actively build and sharpen the project's domain model as you design. This is the *active* discipline — challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely *reading* `CONTEXT.md` for vocabulary is not this skill — that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
|
|
9
|
+
|
|
10
|
+
## File structure
|
|
11
|
+
|
|
12
|
+
Most repos have a single context:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/
|
|
16
|
+
├── CONTEXT.md
|
|
17
|
+
├── docs/
|
|
18
|
+
│ └── adr/
|
|
19
|
+
│ ├── 0001-event-sourced-orders.md
|
|
20
|
+
│ └── 0002-postgres-for-write-model.md
|
|
21
|
+
└── src/
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
/
|
|
28
|
+
├── CONTEXT-MAP.md
|
|
29
|
+
├── docs/
|
|
30
|
+
│ └── adr/ ← system-wide decisions
|
|
31
|
+
├── src/
|
|
32
|
+
│ ├── ordering/
|
|
33
|
+
│ │ ├── CONTEXT.md
|
|
34
|
+
│ │ └── docs/adr/ ← context-specific decisions
|
|
35
|
+
│ └── billing/
|
|
36
|
+
│ ├── CONTEXT.md
|
|
37
|
+
│ └── docs/adr/
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
|
|
41
|
+
|
|
42
|
+
## During the session
|
|
43
|
+
|
|
44
|
+
### Challenge against the glossary
|
|
45
|
+
|
|
46
|
+
When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"
|
|
47
|
+
|
|
48
|
+
### Sharpen fuzzy language
|
|
49
|
+
|
|
50
|
+
When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account' — do you mean the Customer or the User? Those are different things."
|
|
51
|
+
|
|
52
|
+
### Discuss concrete scenarios
|
|
53
|
+
|
|
54
|
+
When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
|
|
55
|
+
|
|
56
|
+
### Cross-reference with code
|
|
57
|
+
|
|
58
|
+
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"
|
|
59
|
+
|
|
60
|
+
### Update CONTEXT.md inline
|
|
61
|
+
|
|
62
|
+
When a term is resolved, update `CONTEXT.md` right there. Don't batch these up — capture them as they happen. Use the format in [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md).
|
|
63
|
+
|
|
64
|
+
`CONTEXT.md` should be totally devoid of implementation details. Do not treat `CONTEXT.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
|
|
65
|
+
|
|
66
|
+
### Offer ADRs sparingly
|
|
67
|
+
|
|
68
|
+
Only offer to create an ADR when all three are true:
|
|
69
|
+
|
|
70
|
+
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
71
|
+
2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
|
|
72
|
+
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
73
|
+
|
|
74
|
+
If any of the three is missing, skip the ADR. Use the format in [ADR-FORMAT.md](./ADR-FORMAT.md).
|
|
75
|
+
|
|
76
|
+
## Ship integration
|
|
77
|
+
|
|
78
|
+
This skill is part of the engineering profile shipped by
|
|
79
|
+
`opencode-ship@1.0`. The strong planner child session is
|
|
80
|
+
configured with `openai/gpt-5.6-sol` and the durable workflow
|
|
81
|
+
state lives under `<git-common-dir>/opencode-ship/`. All
|
|
82
|
+
GitHub mutations go through Ship's typed tools; never use
|
|
83
|
+
`gh api` or raw shell.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-matt-pocock-skills
|
|
3
|
+
description: Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Setup Matt Pocock's Skills
|
|
8
|
+
|
|
9
|
+
Scaffold the per-repo configuration that the engineering skills assume:
|
|
10
|
+
|
|
11
|
+
- **Issue tracker** — where issues live (GitHub by default; local markdown is also supported out of the box)
|
|
12
|
+
- **Triage labels** — the strings used for the five canonical triage roles
|
|
13
|
+
- **Domain docs** — where `CONTEXT.md` and ADRs live, and the consumer rules for reading them
|
|
14
|
+
|
|
15
|
+
This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
|
|
19
|
+
### 1. Explore
|
|
20
|
+
|
|
21
|
+
Look at the current repo to understand its starting state. Read whatever exists; don't assume:
|
|
22
|
+
|
|
23
|
+
- `git remote -v` and `.git/config` — is this a GitHub repo? Which one?
|
|
24
|
+
- `AGENTS.md` and `CLAUDE.md` at the repo root — does either exist? Is there already an `## Agent skills` section in either?
|
|
25
|
+
- `CONTEXT.md` and `CONTEXT-MAP.md` at the repo root
|
|
26
|
+
- `docs/adr/` and any `src/*/docs/adr/` directories
|
|
27
|
+
- `docs/agents/` — does this skill's prior output already exist?
|
|
28
|
+
- `.scratch/` — sign that a local-markdown issue tracker convention is already in use
|
|
29
|
+
- Is the `triage` skill installed? (a `triage` skill folder alongside this one, or `triage` in your available skills.) This decides whether Section B runs at all.
|
|
30
|
+
- Monorepo signals — a `pnpm-workspace.yaml`, a `workspaces` field in `package.json`, or a populated `packages/*` with its own `src/`. Present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo.
|
|
31
|
+
|
|
32
|
+
### 2. Present findings and ask
|
|
33
|
+
|
|
34
|
+
Summarise what's present and what's missing. Then take the sections in order — one section, one answer, then the next.
|
|
35
|
+
|
|
36
|
+
Lead each section with the recommended answer so the user can accept it in a word. Give a one-line explainer only when the choice genuinely branches; skip the section entirely when exploration already settled it (Section B when `triage` isn't installed, Section C when there's no monorepo).
|
|
37
|
+
|
|
38
|
+
**Section A — Issue tracker.**
|
|
39
|
+
|
|
40
|
+
> Explainer: The "issue tracker" is where issues live for this repo. Skills like `to-tickets`, `triage`, `to-spec`, and `qa` read from and write to it — they need to know whether to call `gh issue create`, write a markdown file under `.scratch/`, or follow some other workflow you describe. Pick the place you actually track work for this repo.
|
|
41
|
+
|
|
42
|
+
Default posture: these skills were designed for GitHub. If a `git remote` points at GitHub, propose that. If a `git remote` points at GitLab (`gitlab.com` or a self-hosted host), propose GitLab. Otherwise (or if the user prefers), offer:
|
|
43
|
+
|
|
44
|
+
- **GitHub** — issues live in the repo's GitHub Issues (uses the `gh` CLI)
|
|
45
|
+
- **GitLab** — issues live in the repo's GitLab Issues (uses the [`glab`](https://gitlab.com/gitlab-org/cli) CLI)
|
|
46
|
+
- **Local markdown** — issues live as files under `.scratch/<feature>/` in this repo (good for solo projects or repos without a remote)
|
|
47
|
+
- **Other** (Jira, Linear, etc.) — ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
|
|
48
|
+
|
|
49
|
+
Record the choice in `docs/agents/issue-tracker.md`. The GitHub and GitLab templates carry a "PRs as a request surface" flag, defaulted **off** — leave it off and don't raise it; a user who wants external PRs in the triage queue can flip the flag in the file later.
|
|
50
|
+
|
|
51
|
+
**Section B — Triage label vocabulary.** Skip this section entirely if the `triage` skill isn't installed (exploration told you) — an uninstalled skill needs no labels.
|
|
52
|
+
|
|
53
|
+
If it is installed, ask exactly one question:
|
|
54
|
+
|
|
55
|
+
> Do you want to keep the default triage labels? (recommended: **yes**)
|
|
56
|
+
|
|
57
|
+
The defaults are the five canonical roles, each label string equal to its name: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`. On **yes**, write them as-is. Only if the user says no — usually because their tracker already uses other names (e.g. `bug:triage` for `needs-triage`) — collect the overrides so `triage` applies existing labels instead of creating duplicates.
|
|
58
|
+
|
|
59
|
+
**Section C — Domain docs.** Default to **single-context** — one `CONTEXT.md` + `docs/adr/` at the repo root. This fits almost every repo; write it without asking.
|
|
60
|
+
|
|
61
|
+
Offer **multi-context** — a root `CONTEXT-MAP.md` pointing to per-context `CONTEXT.md` files — only when exploration found monorepo signals. Then confirm which layout they want.
|
|
62
|
+
|
|
63
|
+
### 3. Confirm and edit
|
|
64
|
+
|
|
65
|
+
Show the user a draft of:
|
|
66
|
+
|
|
67
|
+
- The `## Agent skills` block to add to whichever of `CLAUDE.md` / `AGENTS.md` is being edited (see step 4 for selection rules)
|
|
68
|
+
- The contents of `docs/agents/issue-tracker.md`, `docs/agents/domain.md`, and `docs/agents/triage-labels.md` (the last only when `triage` is installed)
|
|
69
|
+
|
|
70
|
+
Let them edit before writing.
|
|
71
|
+
|
|
72
|
+
### 4. Write
|
|
73
|
+
|
|
74
|
+
**Pick the file to edit:**
|
|
75
|
+
|
|
76
|
+
- If `CLAUDE.md` exists, edit it.
|
|
77
|
+
- Else if `AGENTS.md` exists, edit it.
|
|
78
|
+
- If neither exists, ask the user which one to create — don't pick for them.
|
|
79
|
+
|
|
80
|
+
Never create `AGENTS.md` when `CLAUDE.md` already exists (or vice versa) — always edit the one that's already there.
|
|
81
|
+
|
|
82
|
+
If an `## Agent skills` block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.
|
|
83
|
+
|
|
84
|
+
The block:
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
## Agent skills
|
|
88
|
+
|
|
89
|
+
### Issue tracker
|
|
90
|
+
|
|
91
|
+
[one-line summary of where issues are tracked]. See `docs/agents/issue-tracker.md`.
|
|
92
|
+
|
|
93
|
+
### Triage labels
|
|
94
|
+
|
|
95
|
+
[one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.
|
|
96
|
+
|
|
97
|
+
### Domain docs
|
|
98
|
+
|
|
99
|
+
[one-line summary of layout — "single-context" or "multi-context"]. See `docs/agents/domain.md`.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Include the `### Triage labels` sub-block, and write `docs/agents/triage-labels.md`, only when `triage` is installed and Section B ran. When it isn't, both are omitted.
|
|
103
|
+
|
|
104
|
+
Then write the docs files using the seed templates in this skill folder as a starting point:
|
|
105
|
+
|
|
106
|
+
- [issue-tracker-github.md](./issue-tracker-github.md) — GitHub issue tracker
|
|
107
|
+
- [issue-tracker-gitlab.md](./issue-tracker-gitlab.md) — GitLab issue tracker
|
|
108
|
+
- [issue-tracker-local.md](./issue-tracker-local.md) — local-markdown issue tracker
|
|
109
|
+
- [triage-labels.md](./triage-labels.md) — label mapping (only if `triage` is installed)
|
|
110
|
+
- [domain.md](./domain.md) — domain doc consumer rules + layout
|
|
111
|
+
|
|
112
|
+
For "other" issue trackers, write `docs/agents/issue-tracker.md` from scratch using the user's description.
|
|
113
|
+
|
|
114
|
+
### 5. Done
|
|
115
|
+
|
|
116
|
+
Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit `docs/agents/*.md` directly later — re-running this skill is only necessary if they want to switch issue trackers or restart from scratch.
|
|
117
|
+
|
|
118
|
+
## Ship integration
|
|
119
|
+
|
|
120
|
+
This skill is part of the engineering profile shipped by
|
|
121
|
+
`opencode-ship@1.0`. The strong planner child session is
|
|
122
|
+
configured with `openai/gpt-5.6-sol` and the durable workflow
|
|
123
|
+
state lives under `<git-common-dir>/opencode-ship/`. All
|
|
124
|
+
GitHub mutations go through Ship's typed tools; never use
|
|
125
|
+
`gh api` or raw shell.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Domain Docs
|
|
2
|
+
|
|
3
|
+
How the engineering skills should consume this repo's domain documentation when exploring the codebase.
|
|
4
|
+
|
|
5
|
+
## Before exploring, read these
|
|
6
|
+
|
|
7
|
+
- **`CONTEXT.md`** at the repo root, or
|
|
8
|
+
- **`CONTEXT-MAP.md`** at the repo root if it exists — it points at one `CONTEXT.md` per context. Read each one relevant to the topic.
|
|
9
|
+
- **`docs/adr/`** — read ADRs that touch the area you're about to work in. In multi-context repos, also check `src/<context>/docs/adr/` for context-scoped decisions.
|
|
10
|
+
|
|
11
|
+
If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved.
|
|
12
|
+
|
|
13
|
+
## File structure
|
|
14
|
+
|
|
15
|
+
Single-context repo (most repos):
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/
|
|
19
|
+
├── CONTEXT.md
|
|
20
|
+
├── docs/adr/
|
|
21
|
+
│ ├── 0001-event-sourced-orders.md
|
|
22
|
+
│ └── 0002-postgres-for-write-model.md
|
|
23
|
+
└── src/
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Multi-context repo (presence of `CONTEXT-MAP.md` at the root):
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/
|
|
30
|
+
├── CONTEXT-MAP.md
|
|
31
|
+
├── docs/adr/ ← system-wide decisions
|
|
32
|
+
└── src/
|
|
33
|
+
├── ordering/
|
|
34
|
+
│ ├── CONTEXT.md
|
|
35
|
+
│ └── docs/adr/ ← context-specific decisions
|
|
36
|
+
└── billing/
|
|
37
|
+
├── CONTEXT.md
|
|
38
|
+
└── docs/adr/
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Use the glossary's vocabulary
|
|
42
|
+
|
|
43
|
+
When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids.
|
|
44
|
+
|
|
45
|
+
If the concept you need isn't in the glossary yet, that's a signal — either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`).
|
|
46
|
+
|
|
47
|
+
## Flag ADR conflicts
|
|
48
|
+
|
|
49
|
+
If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
|
|
50
|
+
|
|
51
|
+
> _Contradicts ADR-0007 (event-sourced orders) — but worth reopening because…_
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Issue tracker: GitHub
|
|
2
|
+
|
|
3
|
+
Issues and PRDs for this repo live as GitHub issues. Use the `gh` CLI for all operations.
|
|
4
|
+
|
|
5
|
+
## Conventions
|
|
6
|
+
|
|
7
|
+
- **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
|
|
8
|
+
- **Read an issue**: `gh issue view <number> --comments`, filtering comments by `jq` and also fetching labels.
|
|
9
|
+
- **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
|
|
10
|
+
- **Comment on an issue**: `gh issue comment <number> --body "..."`
|
|
11
|
+
- **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
|
|
12
|
+
- **Close**: `gh issue close <number> --comment "..."`
|
|
13
|
+
|
|
14
|
+
Infer the repo from `git remote -v` — `gh` does this automatically when run inside a clone.
|
|
15
|
+
|
|
16
|
+
## Pull requests as a triage surface
|
|
17
|
+
|
|
18
|
+
**PRs as a request surface: no.** _(Set to `yes` if this repo treats external PRs as feature requests; `/triage` reads this flag.)_
|
|
19
|
+
|
|
20
|
+
When set to `yes`, PRs run through the same labels and states as issues, using the `gh pr` equivalents:
|
|
21
|
+
|
|
22
|
+
- **Read a PR**: `gh pr view <number> --comments` and `gh pr diff <number>` for the diff.
|
|
23
|
+
- **List external PRs for triage**: `gh pr list --state open --json number,title,body,labels,author,authorAssociation,comments` then keep only `authorAssociation` of `CONTRIBUTOR`, `FIRST_TIME_CONTRIBUTOR`, or `NONE` (drop `OWNER`/`MEMBER`/`COLLABORATOR`).
|
|
24
|
+
- **Comment / label / close**: `gh pr comment`, `gh pr edit --add-label`/`--remove-label`, `gh pr close`.
|
|
25
|
+
|
|
26
|
+
GitHub shares one number space across issues and PRs, so a bare `#42` may be either — resolve with `gh pr view 42` and fall back to `gh issue view 42`.
|
|
27
|
+
|
|
28
|
+
## When a skill says "publish to the issue tracker"
|
|
29
|
+
|
|
30
|
+
Create a GitHub issue.
|
|
31
|
+
|
|
32
|
+
## When a skill says "fetch the relevant ticket"
|
|
33
|
+
|
|
34
|
+
Run `gh issue view <number> --comments`.
|
|
35
|
+
|
|
36
|
+
## Wayfinding operations
|
|
37
|
+
|
|
38
|
+
Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
|
|
39
|
+
|
|
40
|
+
- **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `gh issue create --label wayfinder:map`.
|
|
41
|
+
- **Child ticket**: an issue linked to the map as a GitHub sub-issue (`gh api` on the sub-issues endpoint). Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #<map>` at the top of the child body. Labels: `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
|
|
42
|
+
- **Blocking**: GitHub's **native issue dependencies** — the canonical, UI-visible representation. Add an edge with `gh api --method POST repos/<owner>/<repo>/issues/<child>/dependencies/blocked_by -F issue_id=<blocker-db-id>`, where `<blocker-db-id>` is the blocker's numeric **database id** (`gh api repos/<owner>/<repo>/issues/<n> --jq .id`, _not_ the `#number` or `node_id`). GitHub reports `issue_dependencies_summary.blocked_by` (open blockers only — the live gate). Where dependencies aren't available, fall back to a `Blocked by: #<n>, #<n>` line at the top of the child body. A ticket is unblocked when every blocker is closed.
|
|
43
|
+
- **Frontier query**: list the map's open children (`gh issue list --state open`, scoped to the map's sub-issues / task list), drop any with an open blocker (`issue_dependencies_summary.blocked_by > 0`, or an open issue in the `Blocked by` line) or an assignee; first in map order wins.
|
|
44
|
+
- **Claim**: `gh issue edit <n> --add-assignee @me` — the session's first write.
|
|
45
|
+
- **Resolve**: `gh issue comment <n> --body "<answer>"`, then `gh issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Issue tracker: GitLab
|
|
2
|
+
|
|
3
|
+
Issues and PRDs for this repo live as GitLab issues. Use the [`glab`](https://gitlab.com/gitlab-org/cli) CLI for all operations.
|
|
4
|
+
|
|
5
|
+
## Conventions
|
|
6
|
+
|
|
7
|
+
- **Create an issue**: `glab issue create --title "..." --description "..."`. Use a heredoc for multi-line descriptions. Pass `--description -` to open an editor.
|
|
8
|
+
- **Read an issue**: `glab issue view <number> --comments`. Use `-F json` for machine-readable output.
|
|
9
|
+
- **List issues**: `glab issue list -F json` with appropriate `--label` filters.
|
|
10
|
+
- **Comment on an issue**: `glab issue note <number> --message "..."`. GitLab calls comments "notes".
|
|
11
|
+
- **Apply / remove labels**: `glab issue update <number> --label "..."` / `--unlabel "..."`. Multiple labels can be comma-separated or by repeating the flag.
|
|
12
|
+
- **Close**: `glab issue close <number>`. `glab issue close` does not accept a closing comment, so post the explanation first with `glab issue note <number> --message "..."`, then close.
|
|
13
|
+
- **Merge requests**: GitLab calls PRs "merge requests". Use `glab mr create`, `glab mr view`, `glab mr note`, etc. — the same shape as `gh pr ...` with `mr` in place of `pr` and `note`/`--message` in place of `comment`/`--body`.
|
|
14
|
+
|
|
15
|
+
Infer the repo from `git remote -v` — `glab` does this automatically when run inside a clone.
|
|
16
|
+
|
|
17
|
+
## Merge requests as a triage surface
|
|
18
|
+
|
|
19
|
+
**MRs as a request surface: no.** _(Set to `yes` if this repo treats external merge requests as feature requests; `/triage` reads this flag.)_
|
|
20
|
+
|
|
21
|
+
When set to `yes`, MRs run through the same labels and states as issues, using the `glab mr` equivalents:
|
|
22
|
+
|
|
23
|
+
- **Read an MR**: `glab mr view <number> --comments` and `glab mr diff <number>` for the diff.
|
|
24
|
+
- **List external MRs for triage**: `glab mr list -F json`, then keep only MRs whose author is not a project member/owner (a contributor's MR, not a maintainer's in-flight work).
|
|
25
|
+
- **Comment / label / close**: `glab mr note`, `glab mr update --label`/`--unlabel`, `glab mr close`.
|
|
26
|
+
|
|
27
|
+
Unlike GitHub, GitLab numbers issues and MRs separately, so `#42` is unambiguous once you know which surface the maintainer means.
|
|
28
|
+
|
|
29
|
+
## When a skill says "publish to the issue tracker"
|
|
30
|
+
|
|
31
|
+
Create a GitLab issue.
|
|
32
|
+
|
|
33
|
+
## When a skill says "fetch the relevant ticket"
|
|
34
|
+
|
|
35
|
+
Run `glab issue view <number> --comments`.
|
|
36
|
+
|
|
37
|
+
## Wayfinding operations
|
|
38
|
+
|
|
39
|
+
Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
|
|
40
|
+
|
|
41
|
+
- **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `glab issue create --label wayfinder:map`. (On GitLab tiers with native epics, an epic may hold the map instead; a labelled issue works everywhere.)
|
|
42
|
+
- **Child ticket**: an issue carrying `Part of #<map>` at the top of its description and labels `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
|
|
43
|
+
- **Blocking**: GitLab's **native blocking link** — the canonical, UI-visible representation. Add it with the `/blocked_by #<n>` quick action, posted as a note (`glab issue note <child> --message "/blocked_by #<blocker>"`). Native blocking links are a Premium/Ultimate feature; on the free tier (or where unavailable) fall back to a `Blocked by: #<n>, #<n>` line at the top of the description. A ticket is unblocked when every blocker is closed.
|
|
44
|
+
- **Frontier query**: `glab issue list -F json` scoped to the map's children, drop any with an open blocker — a native `blocked_by` link to an open issue (`glab api projects/:id/issues/:iid/links`), or an open issue in the `Blocked by` line — or an assignee; first in map order wins.
|
|
45
|
+
- **Claim**: `glab issue update <n> --assignee @me` — the session's first write.
|
|
46
|
+
- **Resolve**: `glab issue note <n> --message "<answer>"`, then `glab issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
|