nightralph 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/.claude/settings.local.json +5 -0
  2. package/AGENTS.md +60 -0
  3. package/CLAUDE.md +1 -0
  4. package/PROMPT.md +95 -0
  5. package/README.md +138 -0
  6. package/WIP.md +5 -0
  7. package/dist/docs-templates/domain.md +36 -0
  8. package/dist/docs-templates/issue-tracker-github.md +228 -0
  9. package/dist/docs-templates/issue-tracker.md +30 -0
  10. package/dist/docs-templates/triage-labels.md +15 -0
  11. package/dist/index.js +154 -0
  12. package/dist/index.js.map +7 -0
  13. package/dist/meta.json +207 -0
  14. package/dist/orchestrator.js +273 -0
  15. package/dist/orchestrator.js.map +7 -0
  16. package/dist/resolve.js +71 -0
  17. package/dist/resolve.js.map +7 -0
  18. package/dist/setup.js +151 -0
  19. package/dist/setup.js.map +7 -0
  20. package/dist/skills/domain-modeling/ADR-FORMAT.md +47 -0
  21. package/dist/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  22. package/dist/skills/domain-modeling/SKILL.md +74 -0
  23. package/dist/skills/domain-modeling/agents/openai.yaml +3 -0
  24. package/dist/skills/grill/SKILL.md +7 -0
  25. package/dist/skills/grill/agents/openai.yaml +5 -0
  26. package/dist/skills/grilling/SKILL.md +28 -0
  27. package/dist/skills/grilling/agents/openai.yaml +3 -0
  28. package/dist/skills/tdd/SKILL.md +38 -0
  29. package/dist/skills/tdd/agents/openai.yaml +3 -0
  30. package/dist/skills/tdd/mocking.md +59 -0
  31. package/dist/skills/tdd/tests.md +77 -0
  32. package/dist/skills/to-spec/SKILL.md +75 -0
  33. package/dist/skills/to-spec/agents/openai.yaml +5 -0
  34. package/dist/skills/to-tickets/SKILL.md +105 -0
  35. package/dist/skills/to-tickets/agents/openai.yaml +5 -0
  36. package/dist/skills/upstream.json +5 -0
  37. package/dist/src/index.d.ts +4 -0
  38. package/dist/src/index.d.ts.map +1 -0
  39. package/dist/src/orchestrator.d.ts +31 -0
  40. package/dist/src/orchestrator.d.ts.map +1 -0
  41. package/dist/src/resolve.d.ts +10 -0
  42. package/dist/src/resolve.d.ts.map +1 -0
  43. package/dist/src/setup.d.ts +13 -0
  44. package/dist/src/setup.d.ts.map +1 -0
  45. package/dist/test/integration.test.js +848 -0
  46. package/dist/test/integration.test.js.map +7 -0
  47. package/dist/test/orchestrator.test.js +749 -0
  48. package/dist/test/orchestrator.test.js.map +7 -0
  49. package/dist/test/setup.test.js +574 -0
  50. package/dist/test/setup.test.js.map +7 -0
  51. package/docs/README.md +12 -0
  52. package/docs/agents/domain.md +36 -0
  53. package/docs/agents/issue-tracker.md +30 -0
  54. package/docs/agents/triage-labels.md +15 -0
  55. package/docs/implementation-plans/2026-08-27-issue-tracker-choice/phase-2-future-work.md +144 -0
  56. package/docs/implementation-plans/2026-08-27-issue-tracker-choice/phase_01.md +292 -0
  57. package/docs/implementation-plans/2026-08-27-issue-tracker-choice/phase_02.md +212 -0
  58. package/docs/implementation-plans/2026-08-27-issue-tracker-choice/test-requirements.md +203 -0
  59. package/docs/skills.md +58 -0
  60. package/docs/test-plans/2026-08-27-issue-tracker-choice.md +95 -0
  61. package/eslint.config.js +142 -0
  62. package/lib.es5.d.ts +19 -0
  63. package/package.json +36 -0
  64. package/progress.log +190 -0
  65. package/ralph_claude.sh +263 -0
  66. package/scripts/clone-skills.sh +52 -0
  67. package/specs/prd.json +172 -0
  68. package/src/docs-templates/domain.md +36 -0
  69. package/src/docs-templates/issue-tracker-github.md +228 -0
  70. package/src/docs-templates/issue-tracker.md +30 -0
  71. package/src/docs-templates/triage-labels.md +15 -0
  72. package/src/index.ts +184 -0
  73. package/src/orchestrator.ts +324 -0
  74. package/src/resolve.ts +73 -0
  75. package/src/setup.ts +157 -0
  76. package/src/skills/domain-modeling/ADR-FORMAT.md +47 -0
  77. package/src/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  78. package/src/skills/domain-modeling/SKILL.md +74 -0
  79. package/src/skills/domain-modeling/agents/openai.yaml +3 -0
  80. package/src/skills/grill/SKILL.md +7 -0
  81. package/src/skills/grill/agents/openai.yaml +5 -0
  82. package/src/skills/grilling/SKILL.md +28 -0
  83. package/src/skills/grilling/agents/openai.yaml +3 -0
  84. package/src/skills/tdd/SKILL.md +38 -0
  85. package/src/skills/tdd/agents/openai.yaml +3 -0
  86. package/src/skills/tdd/mocking.md +59 -0
  87. package/src/skills/tdd/tests.md +77 -0
  88. package/src/skills/to-spec/SKILL.md +75 -0
  89. package/src/skills/to-spec/agents/openai.yaml +5 -0
  90. package/src/skills/to-tickets/SKILL.md +105 -0
  91. package/src/skills/to-tickets/agents/openai.yaml +5 -0
  92. package/src/skills/upstream.json +5 -0
  93. package/tasks/prd-integration-test-coverage.md +243 -0
  94. package/test/integration.test.ts +636 -0
  95. package/test/mock-agent-echo-args.js +4 -0
  96. package/test/mock-agent-fail.js +3 -0
  97. package/test/mock-agent-pass.js +3 -0
  98. package/test/orchestrator.test.ts +609 -0
  99. package/test/setup.test.ts +417 -0
  100. package/tsconfig.build.json +7 -0
  101. package/tsconfig.json +31 -0
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ REPO="https://github.com/mattpocock/skills.git"
5
+ SKILLS_DIR="./src/skills"
6
+ TMP_DIR=$(mktemp -d)
7
+ trap 'rm -rf "$TMP_DIR"' EXIT
8
+
9
+ git clone --depth 1 --quiet "$REPO" "$TMP_DIR"
10
+ COMMIT=$(git -C "$TMP_DIR" rev-parse --short HEAD)
11
+
12
+ copy_skill () {
13
+ local upstream_path="$1"
14
+ local local_name="$2"
15
+ local src="$TMP_DIR/$upstream_path"
16
+ local dest="$SKILLS_DIR/$local_name"
17
+
18
+ rm -rf "$dest"
19
+ mkdir -p "$dest"
20
+
21
+ find "$src" -maxdepth 1 -type f -exec cp {} "$dest/" \;
22
+
23
+ if [ -d "$src/agents" ]; then
24
+ cp -r "$src/agents" "$dest/"
25
+ fi
26
+
27
+ echo " $local_name/ <- $upstream_path"
28
+ }
29
+
30
+ echo "Cloning skills from mattpocock/skills..."
31
+
32
+ copy_skill "skills/engineering/grill-with-docs" "grill"
33
+ copy_skill "skills/productivity/grilling" "grilling"
34
+ copy_skill "skills/engineering/domain-modeling" "domain-modeling"
35
+ copy_skill "skills/engineering/to-spec" "to-spec"
36
+ copy_skill "skills/engineering/to-tickets" "to-tickets"
37
+ copy_skill "skills/engineering/tdd" "tdd"
38
+
39
+ # grill-with-docs is exposed as /grill
40
+ sed -i '' 's/^name: grill-with-docs$/name: grill/' \
41
+ "$SKILLS_DIR/grill/SKILL.md"
42
+
43
+ cat > "$SKILLS_DIR/upstream.json" <<EOF
44
+ {
45
+ "repo": "mattpocock/skills",
46
+ "commit": "$COMMIT",
47
+ "pulledAt": "$(date +%Y-%m-%d)"
48
+ }
49
+ EOF
50
+
51
+ echo ""
52
+ echo "Done. Commit: $COMMIT"
package/specs/prd.json ADDED
@@ -0,0 +1,172 @@
1
+ {
2
+ "project": "nightralph",
3
+ "branchName": "ralph/integration-test-coverage",
4
+ "description": "Integration tests for the CLI layer, validating subprocess execution, argument forwarding, dry-run output, edge cases, and setup-to-execute composition",
5
+ "userStories": [
6
+ {
7
+ "id": "US-001",
8
+ "title": "Unit tests for findFeatureDirs",
9
+ "description": "As a developer, I want direct tests for findFeatureDirs so that feature directory discovery is validated independently.",
10
+ "acceptanceCriteria": [
11
+ "Create test/integration.test.ts with findFeatureDirs tests",
12
+ "Test: returns empty array when .scratch/ does not exist",
13
+ "Test: returns empty array when .scratch/ has directories without issues/ subdirs",
14
+ "Test: returns entries with correct name, dir, and spec paths for valid feature dirs",
15
+ "Test: ignores non-directory entries in .scratch/",
16
+ "Each test creates and cleans up its own temp directory",
17
+ "Typecheck passes",
18
+ "Tests pass"
19
+ ],
20
+ "priority": 1,
21
+ "passes": true,
22
+ "notes": "findFeatureDirs is already exported from src/index.ts -- import it directly"
23
+ },
24
+ {
25
+ "id": "US-002",
26
+ "title": "Unit tests for resolveIssuesDir with explicit flags",
27
+ "description": "As a developer, I want to verify that when both --dir and --spec are provided, resolveIssuesDir returns them directly without scanning .scratch/.",
28
+ "acceptanceCriteria": [
29
+ "Add resolveIssuesDir tests to test/integration.test.ts",
30
+ "Test: returns { dir, spec } exactly as given when both flags are provided",
31
+ "No filesystem scanning occurs (the temp dir has no .scratch/)",
32
+ "Typecheck passes",
33
+ "Tests pass"
34
+ ],
35
+ "priority": 2,
36
+ "passes": true,
37
+ "notes": "resolveIssuesDir is already exported from src/index.ts"
38
+ },
39
+ {
40
+ "id": "US-003",
41
+ "title": "Subprocess CLI smoke test for execute",
42
+ "description": "As a developer, I want a test that spawns node dist/index.js <provider> as a child process so that I know the yargs wiring, argument parsing, and file resolution work end-to-end.",
43
+ "acceptanceCriteria": [
44
+ "Test spawns the built CLI with --dir, --spec, and --timeout-secs pointing at a temp directory with ticket files",
45
+ "Uses the existing mock-agent-pass.js as the provider argument",
46
+ "Asserts exit code 0",
47
+ "Asserts ticket files on disk are updated to **Status:** done",
48
+ "Asserts log files are created in the expected location",
49
+ "Typecheck passes",
50
+ "Tests pass"
51
+ ],
52
+ "priority": 3,
53
+ "passes": true,
54
+ "notes": "Use short --timeout-secs (e.g. 10) to avoid hanging"
55
+ },
56
+ {
57
+ "id": "US-004",
58
+ "title": "Create mock-agent-echo-args and test --model flag",
59
+ "description": "As a developer, I want to verify that --model (or -m) is passed through to the spawned agent process so that running npx nightralph claude -m claude-sonnet-4-6 actually forwards the model argument.",
60
+ "acceptanceCriteria": [
61
+ "Create test/mock-agent-echo-args.js that writes process.argv to stdout, then exits 0",
62
+ "Test spawns the CLI with -m test-model using this mock agent",
63
+ "Asserts the log file contains --model and test-model in the captured argv",
64
+ "Typecheck passes",
65
+ "Tests pass"
66
+ ],
67
+ "priority": 4,
68
+ "passes": true,
69
+ "notes": ""
70
+ },
71
+ {
72
+ "id": "US-005",
73
+ "title": "Subprocess CLI test for --dry-run",
74
+ "description": "As a developer, I want a test that runs the CLI with --dry-run so that I know the dry-run path works through yargs and produces the expected output.",
75
+ "acceptanceCriteria": [
76
+ "Test spawns the built CLI with --dry-run, --dir, and --spec",
77
+ "Captures stdout",
78
+ "Asserts output contains Wave 1: with the expected ticket filenames",
79
+ "Asserts output contains AGENT INSTRUCTIONS (prompt preview)",
80
+ "Asserts ticket files on disk are NOT modified",
81
+ "Typecheck passes",
82
+ "Tests pass"
83
+ ],
84
+ "priority": 5,
85
+ "passes": true,
86
+ "notes": ""
87
+ },
88
+ {
89
+ "id": "US-006",
90
+ "title": "CLI exits gracefully when no tickets found",
91
+ "description": "As a developer, I want to verify the CLI handles the empty-directory edge case gracefully.",
92
+ "acceptanceCriteria": [
93
+ "Test points --dir at an empty directory with a valid --spec",
94
+ "Asserts stdout contains No ticket files found",
95
+ "Asserts exit code 0 (graceful, not a crash)",
96
+ "Typecheck passes",
97
+ "Tests pass"
98
+ ],
99
+ "priority": 6,
100
+ "passes": true,
101
+ "notes": ""
102
+ },
103
+ {
104
+ "id": "US-007",
105
+ "title": "CLI exits with error for missing dir/spec",
106
+ "description": "As a developer, I want the CLI to fail clearly when --dir or --spec point to nonexistent paths.",
107
+ "acceptanceCriteria": [
108
+ "Test passes --dir /nonexistent/path with a valid --spec",
109
+ "Asserts exit code is non-zero",
110
+ "Asserts stderr contains not found",
111
+ "Test passes valid --dir with --spec /nonexistent/spec.md",
112
+ "Asserts exit code is non-zero",
113
+ "Asserts stderr contains not found",
114
+ "Typecheck passes",
115
+ "Tests pass"
116
+ ],
117
+ "priority": 7,
118
+ "passes": true,
119
+ "notes": ""
120
+ },
121
+ {
122
+ "id": "US-008",
123
+ "title": "Unknown blocker warning and stripping",
124
+ "description": "As a developer, I want to verify that runExecute warns about blockers referencing nonexistent ticket numbers and strips them so execution proceeds.",
125
+ "acceptanceCriteria": [
126
+ "Test creates a ticket with **Blocked by:** 99 where ticket 99 does not exist",
127
+ "Spawns the CLI as a subprocess",
128
+ "Asserts stderr/stdout contains a warning mentioning blocker 99",
129
+ "Asserts the ticket still completes (blocker was stripped)",
130
+ "Typecheck passes",
131
+ "Tests pass"
132
+ ],
133
+ "priority": 8,
134
+ "passes": true,
135
+ "notes": ""
136
+ },
137
+ {
138
+ "id": "US-009",
139
+ "title": "Dry-run deadlock detection",
140
+ "description": "As a developer, I want the dry-run to report deadlocked tickets (circular dependencies) so users can fix their ticket graph before running real agents.",
141
+ "acceptanceCriteria": [
142
+ "Test creates two tickets that block each other (1 blocks 2, 2 blocks 1)",
143
+ "Spawns the CLI with --dry-run",
144
+ "Asserts output contains Deadlocked tickets with both filenames",
145
+ "Typecheck passes",
146
+ "Tests pass"
147
+ ],
148
+ "priority": 9,
149
+ "passes": true,
150
+ "notes": ""
151
+ },
152
+ {
153
+ "id": "US-010",
154
+ "title": "Setup-then-execute composition test",
155
+ "description": "As a developer, I want a test that runs setup, then creates issue files in the expected .scratch/ layout, then runs execute -- proving the two commands compose correctly.",
156
+ "acceptanceCriteria": [
157
+ "Test calls setup() with tracker:'local' in a temp project dir",
158
+ "Creates .scratch/<feature>/issues/ with 2 ticket files and a spec.md",
159
+ "Spawns the CLI as a subprocess pointing at that project dir (using the mock agent)",
160
+ "Asserts tickets are marked done",
161
+ "Asserts logs are written to .scratch/<feature>/logs/",
162
+ "Asserts docs/agents/issue-tracker.md exists (from setup)",
163
+ "Asserts .agents/skills/ directories exist (from setup)",
164
+ "Typecheck passes",
165
+ "Tests pass"
166
+ ],
167
+ "priority": 10,
168
+ "passes": true,
169
+ "notes": "Most complex test -- calls setup() as a library function, then spawns CLI for execute"
170
+ }
171
+ ]
172
+ }
@@ -0,0 +1,36 @@
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
+ ## Use the glossary's vocabulary
27
+
28
+ 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.
29
+
30
+ 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`).
31
+
32
+ ## Flag ADR conflicts
33
+
34
+ If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
35
+
36
+ > _Contradicts ADR-0007 (event-sourced orders), but worth reopening because..._
@@ -0,0 +1,228 @@
1
+ # Issue tracker: GitHub
2
+
3
+ Issues and specs for this repo live as GitHub Issues, managed via the `gh` CLI.
4
+
5
+ ## Conventions
6
+
7
+ - One feature per GitHub issue milestone (optional, for grouping)
8
+ - Specs are tracked as issues with label `spec`
9
+ - Implementation issues are tracked as GitHub issues, one per task
10
+ - Triage state is recorded via issue labels (see `triage-labels.md` for the role strings)
11
+ - Comments and conversation history are on the GitHub issue thread
12
+ - Use task lists in issue bodies for sub-tasks that don't warrant separate issues
13
+
14
+ ## Prerequisites
15
+
16
+ Install the `gh` CLI: https://cli.github.com
17
+
18
+ Authenticate with your GitHub account:
19
+
20
+ ```bash
21
+ gh auth login
22
+ ```
23
+
24
+ Verify authentication:
25
+
26
+ ```bash
27
+ gh auth status
28
+ ```
29
+
30
+ ## Basic Operations
31
+
32
+ ### Create an issue (publish to tracker)
33
+
34
+ ```bash
35
+ gh issue create --title "Issue title" --body "Issue description"
36
+ ```
37
+
38
+ For an issue with labels:
39
+
40
+ ```bash
41
+ gh issue create --title "Fix login bug" --body "Users see 404 on login page" --label "bug,p0"
42
+ ```
43
+
44
+ ### View an issue (fetch the relevant ticket)
45
+
46
+ ```bash
47
+ gh issue view <number>
48
+ ```
49
+
50
+ Example:
51
+
52
+ ```bash
53
+ gh issue view 42
54
+ ```
55
+
56
+ ### List issues
57
+
58
+ Show all open issues:
59
+
60
+ ```bash
61
+ gh issue list
62
+ ```
63
+
64
+ Show issues with a specific label:
65
+
66
+ ```bash
67
+ gh issue list --label "bug"
68
+ ```
69
+
70
+ Show issues assigned to you:
71
+
72
+ ```bash
73
+ gh issue list --assignee "@me"
74
+ ```
75
+
76
+ ### Add a comment
77
+
78
+ ```bash
79
+ gh issue comment <number> --body "Comment text"
80
+ ```
81
+
82
+ ### Close an issue
83
+
84
+ ```bash
85
+ gh issue close <number>
86
+ ```
87
+
88
+ To close with a comment:
89
+
90
+ ```bash
91
+ gh issue close <number> --comment "Resolved in PR #99"
92
+ ```
93
+
94
+ ### Reopen an issue
95
+
96
+ ```bash
97
+ gh issue reopen <number>
98
+ ```
99
+
100
+ ## Label Management
101
+
102
+ ### Apply labels
103
+
104
+ Add a label to an existing issue:
105
+
106
+ ```bash
107
+ gh issue edit <number> --add-label "in-progress"
108
+ ```
109
+
110
+ ### Remove labels
111
+
112
+ Remove a label from an issue:
113
+
114
+ ```bash
115
+ gh issue edit <number> --remove-label "blocked"
116
+ ```
117
+
118
+ ### View available labels
119
+
120
+ ```bash
121
+ gh label list
122
+ ```
123
+
124
+ ## When a skill says "publish to the issue tracker"
125
+
126
+ Create a new GitHub issue:
127
+
128
+ ```bash
129
+ gh issue create --title "..." --body "..." --label "..."
130
+ ```
131
+
132
+ Then note the issue number for reference.
133
+
134
+ ## When a skill says "fetch the relevant ticket"
135
+
136
+ View the issue:
137
+
138
+ ```bash
139
+ gh issue view <number>
140
+ ```
141
+
142
+ The user will normally pass the issue number.
143
+
144
+ ## Wayfinding Operations
145
+
146
+ Used by `/wayfinder` and similar domain-driven agents. GitHub Issues uses native features for navigation:
147
+
148
+ - **Map**: A pinned issue or GitHub project that lists related issues as task items
149
+ - **Child issues**: Related issues linked via GitHub issue dependencies (see below)
150
+ - **Blocking**: Use GitHub issue dependencies to mark blocking relationships
151
+ - **Frontier**: Query with `gh issue list --state open --assignee "" --label "available"`
152
+ - **Claim**: Assign the issue to yourself with `gh issue edit <number> --add-assignee "@me"`
153
+ - **Resolve**: Close the issue and link to context (PR, gist, decision record) in the final comment
154
+
155
+ ## Blocking and Dependencies
156
+
157
+ ### Mark as blocked
158
+
159
+ Add the `blocked` label and optionally a comment referencing the blocking issue:
160
+
161
+ ```bash
162
+ gh issue edit <number> --add-label "blocked"
163
+ gh issue comment <number> --body "Blocked by #42"
164
+ ```
165
+
166
+ ### Link related issues
167
+
168
+ Use issue references in comments and body text. GitHub auto-links:
169
+
170
+ ```bash
171
+ # In an issue comment or body, write:
172
+ Relates to #123
173
+ Depends on #456
174
+ Blocks #789
175
+ Fixed in #999
176
+ ```
177
+
178
+ These create bidirectional links visible in the issue UI.
179
+
180
+ ### Check if unblocked
181
+
182
+ Query the blocking issues referenced in the issue's comments or description. An issue is unblocked when no blocking issues remain open.
183
+
184
+ ## Frontier Query and Workflow
185
+
186
+ ### Find available issues
187
+
188
+ Query for open, unassigned issues:
189
+
190
+ ```bash
191
+ gh issue list --state open --assignee "" --label "available,p0" --json number,title
192
+ ```
193
+
194
+ ### Claim an issue
195
+
196
+ Assign to yourself when starting work:
197
+
198
+ ```bash
199
+ gh issue edit <number> --add-assignee "@me"
200
+ ```
201
+
202
+ Optionally add `in-progress` label:
203
+
204
+ ```bash
205
+ gh issue edit <number> --add-label "in-progress"
206
+ ```
207
+
208
+ ### Resolve an issue
209
+
210
+ Work through the issue in a PR. When done, close the issue and link the PR:
211
+
212
+ ```bash
213
+ gh issue close <number> --comment "Resolved in PR #999"
214
+ ```
215
+
216
+ Alternatively, create a closing comment with a reference:
217
+
218
+ ```bash
219
+ gh issue comment <number> --body "Fixed in PR #999"
220
+ gh issue close <number>
221
+ ```
222
+
223
+ ## Tips
224
+
225
+ - Use GitHub milestones to group related features
226
+ - Use `gh issue create --web` to open the issue creation form in your browser
227
+ - Use `gh issue edit <number> --web` to open an issue in the browser for complex edits
228
+ - Save frequently-used queries as saved views in the GitHub web UI
@@ -0,0 +1,30 @@
1
+ # Issue tracker: Local Markdown
2
+
3
+ Issues and specs for this repo live as markdown files in `.scratch/`.
4
+
5
+ ## Conventions
6
+
7
+ - One feature per directory: `.scratch/<feature-slug>/`
8
+ - The spec is `.scratch/<feature-slug>/spec.md`
9
+ - Implementation issues are one file per ticket at `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01`, never a single combined tickets file
10
+ - Triage state is recorded as a `Status:` line near the top of each issue file (see `triage-labels.md` for the role strings)
11
+ - Comments and conversation history append to the bottom of the file under a `## Comments` heading
12
+
13
+ ## When a skill says "publish to the issue tracker"
14
+
15
+ Create a new file under `.scratch/<feature-slug>/` (creating the directory if needed).
16
+
17
+ ## When a skill says "fetch the relevant ticket"
18
+
19
+ Read the file at the referenced path. The user will normally pass the path or the issue number directly.
20
+
21
+ ## Wayfinding operations
22
+
23
+ Used by `/wayfinder`. The **map** is a file with one **child** file per ticket.
24
+
25
+ - **Map**: `.scratch/<effort>/map.md` (the Notes / Decisions-so-far / Fog body).
26
+ - **Child ticket**: `.scratch/<effort>/issues/NN-<slug>.md`, numbered from `01`, with the question in the body. A `Type:` line records the ticket type (`research`/`prototype`/`grilling`/`task`); a `Status:` line records `claimed`/`resolved`.
27
+ - **Blocking**: a `Blocked by: NN, NN` line near the top. A ticket is unblocked when every file it lists is `resolved`.
28
+ - **Frontier**: scan `.scratch/<effort>/issues/` for files that are open, unblocked, and unclaimed; first by number wins.
29
+ - **Claim**: set `Status: claimed` and save before any work.
30
+ - **Resolve**: append the answer under an `## Answer` heading, set `Status: resolved`, then append a context pointer (gist + link) to the map's Decisions-so-far in `map.md`.
@@ -0,0 +1,15 @@
1
+ # Triage Labels
2
+
3
+ The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
4
+
5
+ | Label in mattpocock/skills | Label in our tracker | Meaning |
6
+ | -------------------------- | -------------------- | ---------------------------------------- |
7
+ | `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8
+ | `needs-info` | `needs-info` | Waiting on reporter for more information |
9
+ | `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10
+ | `ready-for-human` | `ready-for-human` | Requires human implementation |
11
+ | `wontfix` | `wontfix` | Will not be actioned |
12
+
13
+ When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
14
+
15
+ Edit the right-hand column to match whatever vocabulary you actually use.