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.
- package/.claude/settings.local.json +5 -0
- package/AGENTS.md +60 -0
- package/CLAUDE.md +1 -0
- package/PROMPT.md +95 -0
- package/README.md +138 -0
- package/WIP.md +5 -0
- package/dist/docs-templates/domain.md +36 -0
- package/dist/docs-templates/issue-tracker-github.md +228 -0
- package/dist/docs-templates/issue-tracker.md +30 -0
- package/dist/docs-templates/triage-labels.md +15 -0
- package/dist/index.js +154 -0
- package/dist/index.js.map +7 -0
- package/dist/meta.json +207 -0
- package/dist/orchestrator.js +273 -0
- package/dist/orchestrator.js.map +7 -0
- package/dist/resolve.js +71 -0
- package/dist/resolve.js.map +7 -0
- package/dist/setup.js +151 -0
- package/dist/setup.js.map +7 -0
- package/dist/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/dist/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/dist/skills/domain-modeling/SKILL.md +74 -0
- package/dist/skills/domain-modeling/agents/openai.yaml +3 -0
- package/dist/skills/grill/SKILL.md +7 -0
- package/dist/skills/grill/agents/openai.yaml +5 -0
- package/dist/skills/grilling/SKILL.md +28 -0
- package/dist/skills/grilling/agents/openai.yaml +3 -0
- package/dist/skills/tdd/SKILL.md +38 -0
- package/dist/skills/tdd/agents/openai.yaml +3 -0
- package/dist/skills/tdd/mocking.md +59 -0
- package/dist/skills/tdd/tests.md +77 -0
- package/dist/skills/to-spec/SKILL.md +75 -0
- package/dist/skills/to-spec/agents/openai.yaml +5 -0
- package/dist/skills/to-tickets/SKILL.md +105 -0
- package/dist/skills/to-tickets/agents/openai.yaml +5 -0
- package/dist/skills/upstream.json +5 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/orchestrator.d.ts +31 -0
- package/dist/src/orchestrator.d.ts.map +1 -0
- package/dist/src/resolve.d.ts +10 -0
- package/dist/src/resolve.d.ts.map +1 -0
- package/dist/src/setup.d.ts +13 -0
- package/dist/src/setup.d.ts.map +1 -0
- package/dist/test/integration.test.js +848 -0
- package/dist/test/integration.test.js.map +7 -0
- package/dist/test/orchestrator.test.js +749 -0
- package/dist/test/orchestrator.test.js.map +7 -0
- package/dist/test/setup.test.js +574 -0
- package/dist/test/setup.test.js.map +7 -0
- package/docs/README.md +12 -0
- package/docs/agents/domain.md +36 -0
- package/docs/agents/issue-tracker.md +30 -0
- package/docs/agents/triage-labels.md +15 -0
- package/docs/implementation-plans/2026-08-27-issue-tracker-choice/phase-2-future-work.md +144 -0
- package/docs/implementation-plans/2026-08-27-issue-tracker-choice/phase_01.md +292 -0
- package/docs/implementation-plans/2026-08-27-issue-tracker-choice/phase_02.md +212 -0
- package/docs/implementation-plans/2026-08-27-issue-tracker-choice/test-requirements.md +203 -0
- package/docs/skills.md +58 -0
- package/docs/test-plans/2026-08-27-issue-tracker-choice.md +95 -0
- package/eslint.config.js +142 -0
- package/lib.es5.d.ts +19 -0
- package/package.json +36 -0
- package/progress.log +190 -0
- package/ralph_claude.sh +263 -0
- package/scripts/clone-skills.sh +52 -0
- package/specs/prd.json +172 -0
- package/src/docs-templates/domain.md +36 -0
- package/src/docs-templates/issue-tracker-github.md +228 -0
- package/src/docs-templates/issue-tracker.md +30 -0
- package/src/docs-templates/triage-labels.md +15 -0
- package/src/index.ts +184 -0
- package/src/orchestrator.ts +324 -0
- package/src/resolve.ts +73 -0
- package/src/setup.ts +157 -0
- package/src/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/src/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/src/skills/domain-modeling/SKILL.md +74 -0
- package/src/skills/domain-modeling/agents/openai.yaml +3 -0
- package/src/skills/grill/SKILL.md +7 -0
- package/src/skills/grill/agents/openai.yaml +5 -0
- package/src/skills/grilling/SKILL.md +28 -0
- package/src/skills/grilling/agents/openai.yaml +3 -0
- package/src/skills/tdd/SKILL.md +38 -0
- package/src/skills/tdd/agents/openai.yaml +3 -0
- package/src/skills/tdd/mocking.md +59 -0
- package/src/skills/tdd/tests.md +77 -0
- package/src/skills/to-spec/SKILL.md +75 -0
- package/src/skills/to-spec/agents/openai.yaml +5 -0
- package/src/skills/to-tickets/SKILL.md +105 -0
- package/src/skills/to-tickets/agents/openai.yaml +5 -0
- package/src/skills/upstream.json +5 -0
- package/tasks/prd-integration-test-coverage.md +243 -0
- package/test/integration.test.ts +636 -0
- package/test/mock-agent-echo-args.js +4 -0
- package/test/mock-agent-fail.js +3 -0
- package/test/mock-agent-pass.js +3 -0
- package/test/orchestrator.test.ts +609 -0
- package/test/setup.test.ts +417 -0
- package/tsconfig.build.json +7 -0
- package/tsconfig.json +31 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# nightralph
|
|
2
|
+
|
|
3
|
+
Last verified: 2026-08-27
|
|
4
|
+
|
|
5
|
+
Small orchestrator that runs a single-agent session per issue.
|
|
6
|
+
|
|
7
|
+
## Tech Stack
|
|
8
|
+
- TypeScript, Node >= 18, ESM
|
|
9
|
+
- CLI: yargs + @inquirer/prompts
|
|
10
|
+
- Testing: @substrate-system/tapzero
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
- `npm run build` -- build to dist/
|
|
14
|
+
- `npm test` -- build and run tests
|
|
15
|
+
- `npm run lint` -- eslint
|
|
16
|
+
|
|
17
|
+
## Project Structure
|
|
18
|
+
- `src/index.ts` -- CLI entry point (yargs commands)
|
|
19
|
+
- `src/setup.ts` -- project scaffolding module
|
|
20
|
+
- `src/orchestrator.ts` -- ticket scanning and wave execution
|
|
21
|
+
- `src/skills/` -- bundled skill definitions
|
|
22
|
+
- `src/docs-templates/` -- doc templates copied to target projects
|
|
23
|
+
|
|
24
|
+
## Contracts
|
|
25
|
+
|
|
26
|
+
### setup module (`src/setup.ts`)
|
|
27
|
+
- **Exposes**: `setup(opts)`, `checkGhAuth()`,
|
|
28
|
+
`TrackerKind`, `SetupOpts`, `SKILL_DIRS`, `DOC_TEMPLATES`
|
|
29
|
+
- **TrackerKind**: `'github'|'local'`
|
|
30
|
+
- **SetupOpts.tracker**: required -- selects which
|
|
31
|
+
issue-tracker template is installed and what AGENTS.md
|
|
32
|
+
content is generated in the target project
|
|
33
|
+
- **checkGhAuth()**: returns true when
|
|
34
|
+
`gh auth status` succeeds
|
|
35
|
+
- **DOC_TEMPLATES**: `['triage-labels.md', 'domain.md']` --
|
|
36
|
+
issue-tracker.md is handled separately via tracker selection
|
|
37
|
+
- **Guarantees**: `setup()` always overwrites
|
|
38
|
+
`issue-tracker.md` (not skip-if-exists like other
|
|
39
|
+
templates); always writes AGENTS.md to the target project
|
|
40
|
+
|
|
41
|
+
### CLI (`src/index.ts`)
|
|
42
|
+
- `nightralph setup [--claude]` -- prompts for tracker
|
|
43
|
+
format, then scaffolds skills and docs
|
|
44
|
+
- `nightralph <provider> [options]` -- executes tickets
|
|
45
|
+
|
|
46
|
+
## Agent skills
|
|
47
|
+
|
|
48
|
+
### Issue tracker
|
|
49
|
+
|
|
50
|
+
Issues are tracked as local markdown files under
|
|
51
|
+
`.scratch/`. See `docs/agents/issue-tracker.md`.
|
|
52
|
+
|
|
53
|
+
### Triage labels
|
|
54
|
+
|
|
55
|
+
Default label vocabulary.
|
|
56
|
+
See `docs/agents/triage-labels.md`.
|
|
57
|
+
|
|
58
|
+
### Domain docs
|
|
59
|
+
|
|
60
|
+
Single-context layout. See `docs/agents/domain.md`.
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Read @./AGENTS.md and treat its contents as if they were in CLAUDE.md
|
package/PROMPT.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# MISSION
|
|
2
|
+
|
|
3
|
+
Build and maintain nightralph -- a small orchestrator CLI that runs
|
|
4
|
+
single-agent sessions per issue.
|
|
5
|
+
|
|
6
|
+
# Role
|
|
7
|
+
You are an expert TypeScript/Node.js engineer specializing in CLI tools,
|
|
8
|
+
process orchestration, and test automation.
|
|
9
|
+
|
|
10
|
+
# Objective
|
|
11
|
+
|
|
12
|
+
Develop and test a CLI orchestrator using:
|
|
13
|
+
|
|
14
|
+
- Runtime: Node >= 18, ESM
|
|
15
|
+
- CLI: yargs for command parsing, @inquirer/prompts for interactive input
|
|
16
|
+
- Build: esbuild (ESM output to dist/)
|
|
17
|
+
- Testing: @substrate-system/tapzero
|
|
18
|
+
|
|
19
|
+
## META INSTRUCTION
|
|
20
|
+
|
|
21
|
+
Before performing any tool call or code change, emit a short, one-line status
|
|
22
|
+
update in the terminal starting with 'LOG: [Action]'. This helps me track your
|
|
23
|
+
progress in the Ralph Loop.
|
|
24
|
+
|
|
25
|
+
## EXECUTION RULES
|
|
26
|
+
|
|
27
|
+
1. READ: At the start of EVERY session, read `specs/prd.json` and `progress.log`.
|
|
28
|
+
2. SCOPE: Pick the highest-priority task where `passes: false` (or missing).
|
|
29
|
+
Work ONLY on that one task. Do not touch or mark any other story.
|
|
30
|
+
3. WRITE TESTS FIRST: Write failing tests for the feature/bug, then implement
|
|
31
|
+
until they pass.
|
|
32
|
+
4. TARGETED TESTING WHILE WORKING:
|
|
33
|
+
- DO NOT run the full suite (`npm test`) for every minor change.
|
|
34
|
+
- DO run only the tests relevant to the file you are editing
|
|
35
|
+
(e.g., `npx vitest run path/to/file.spec.ts`).
|
|
36
|
+
5. VERIFY BEFORE COMMIT (and only then run the full suite):
|
|
37
|
+
- Run `npm run lint`.
|
|
38
|
+
- Run the FULL suite `npm test` ONCE, when you believe the task is complete.
|
|
39
|
+
- If lint or the full suite fails, fix it before committing.
|
|
40
|
+
(Rules 4 and 5 are complementary: targeted tests during the work, one full
|
|
41
|
+
suite run as the final gate. Never run the full suite after every edit.)
|
|
42
|
+
6. DOCUMENT: Append to `progress.log` what changed and any new patterns or
|
|
43
|
+
gotchas discovered (these become context for future sessions).
|
|
44
|
+
7. UPDATE PRD: In `specs/prd.json`, set `passes: true` for the completed story
|
|
45
|
+
ONLY. Leave every other story untouched.
|
|
46
|
+
8. COMMIT: After the full suite passes, commit with a descriptive message like
|
|
47
|
+
`FEATURE: [TaskID] - [Description]`. ALWAYS COMMIT AFTER COMPLETING A TASK —
|
|
48
|
+
an uncommitted change does not count as progress.
|
|
49
|
+
9. ATOMICITY: Complete EXACTLY ONE task per session, then STOP.
|
|
50
|
+
|
|
51
|
+
## CRITICAL: NON-INTERACTIVE MODE
|
|
52
|
+
|
|
53
|
+
This is an autonomous session. You must NEVER:
|
|
54
|
+
- Ask clarifying questions.
|
|
55
|
+
- Wait for user input.
|
|
56
|
+
- Output questions like 'What would you like me to work on?'
|
|
57
|
+
If a detail is genuinely ambiguous, make the most reasonable assumption,
|
|
58
|
+
record it in `progress.log`, and proceed.
|
|
59
|
+
|
|
60
|
+
## Strict Constraints
|
|
61
|
+
|
|
62
|
+
- Do NOT add new dependencies. If you believe one is truly required, do not
|
|
63
|
+
install it -- document the need in `progress.log` and proceed without it.
|
|
64
|
+
- Prefer standard Node.js APIs over third-party alternatives wherever possible.
|
|
65
|
+
- Stay within the tech stack above. Do not introduce other test runners or
|
|
66
|
+
build tools.
|
|
67
|
+
|
|
68
|
+
# Technical Constraints
|
|
69
|
+
|
|
70
|
+
- CLI entry point: `src/index.ts` (yargs commands)
|
|
71
|
+
- Project scaffolding: `src/setup.ts`
|
|
72
|
+
- Ticket scanning and wave execution: `src/orchestrator.ts`
|
|
73
|
+
- Bundled skills: `src/skills/`
|
|
74
|
+
- Doc templates: `src/docs-templates/`
|
|
75
|
+
- Build: `npm run build` (esbuild to dist/)
|
|
76
|
+
- Test: `npm test` (esbuild + node to run tapzero tests)
|
|
77
|
+
- Lint: `npm run lint` (eslint)
|
|
78
|
+
|
|
79
|
+
# Error Handling
|
|
80
|
+
|
|
81
|
+
If you hit a bug you cannot fix this session, document the failure and what you
|
|
82
|
+
tried in `progress.log`, then stop. Do not loop on the same failing approach --
|
|
83
|
+
a future session (with stronger reasoning hints) will pick it up.
|
|
84
|
+
|
|
85
|
+
## STOP CONDITION
|
|
86
|
+
|
|
87
|
+
Once ALL tasks in `specs/prd.json` have `passes: true`, output the EXACT string
|
|
88
|
+
on its own line, as your final message, after the work is verified:
|
|
89
|
+
|
|
90
|
+
<promise>COMPLETE</promise>
|
|
91
|
+
|
|
92
|
+
Do not emit that string in any other context (e.g., while planning or
|
|
93
|
+
explaining) -- the loop treats it as a completion signal only when the PRD also
|
|
94
|
+
shows zero pending tasks, so emitting it early just wastes a check. Do not
|
|
95
|
+
perform any further work once all tasks are verified.
|
package/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# `nightralph`
|
|
2
|
+
|
|
3
|
+
This is a minimal Node-based AI orchestrator. It reads local markdown tickets
|
|
4
|
+
produced by
|
|
5
|
+
[`to-tickets` skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/to-tickets/SKILL.md),
|
|
6
|
+
resolves their dependency graph, and runs agents in parallel as much as possible,
|
|
7
|
+
honoring the ticket dependencies.
|
|
8
|
+
|
|
9
|
+
This is inspired by [nightshift](https://github.com/Shaurya-Sethi/nightshift/).
|
|
10
|
+
I made it because I noticed that the API in `nightshift` had already drifted
|
|
11
|
+
from the skill definitions. This module bundles its skill dependencies,
|
|
12
|
+
so they can't drift as long as you install the skills with this package.
|
|
13
|
+
(See [the section on the `setup` command](#install-dependency-skills).)
|
|
14
|
+
|
|
15
|
+
<!-- toc -->
|
|
16
|
+
|
|
17
|
+
- [Install](#install)
|
|
18
|
+
* [Install Dependency Skills](#install-dependency-skills)
|
|
19
|
+
* [Create Issues](#create-issues)
|
|
20
|
+
* [Execute Issues](#execute-issues)
|
|
21
|
+
- [Workflow](#workflow)
|
|
22
|
+
* [`nightralph` command](#nightralph-command)
|
|
23
|
+
|
|
24
|
+
<!-- tocstop -->
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm i -S nightralph
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Install Dependency Skills
|
|
33
|
+
|
|
34
|
+
Use a subcommand in this package to add the required
|
|
35
|
+
[Pocock skills](https://github.com/mattpocock/skills) to your repo.
|
|
36
|
+
This command will copy some files in this package to a specific directory
|
|
37
|
+
in the consumer's repo. The upstream
|
|
38
|
+
[`grill-with-docs`](https://github.com/mattpocock/skills/blob/main/skills/engineering/grill-with-docs/SKILL.md)
|
|
39
|
+
skill is exposed as `/grill`, along with its sub-skills
|
|
40
|
+
`grilling` and `domain-modeling`.
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
npx nightralph setup
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The Pocock skills are bundled with this git repo, at `./skills`.
|
|
47
|
+
They are cloned with some metadata, visible in
|
|
48
|
+
[skill/upstream.json](skills/upstream.json).
|
|
49
|
+
That's how we prevent skill vs API drift.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Create Issues
|
|
53
|
+
|
|
54
|
+
First create issues.
|
|
55
|
+
|
|
56
|
+
This package bundles the skill files with the CLI, to
|
|
57
|
+
**prevent version drift**. After installing this package,
|
|
58
|
+
there is an `npx` command that will add the required skills to your
|
|
59
|
+
local `./claude/skills/` folder.
|
|
60
|
+
|
|
61
|
+
**The expected flow is**
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
grill -> to-spec -> to-tickets -> tdd
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`to-tickets` will create issues in local markdown files.
|
|
68
|
+
|
|
69
|
+
### Execute Issues
|
|
70
|
+
|
|
71
|
+
`to-tickets` produces markdown files at
|
|
72
|
+
`.scratch/<feature>/issues/<NN>-<slug>.md`.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Auto-discover .scratch features and run with claude
|
|
76
|
+
npx nightralph claude -m claude-opus-4-6
|
|
77
|
+
|
|
78
|
+
# Dry run to inspect the dependency graph and prompt
|
|
79
|
+
npx nightralph claude --dry-run
|
|
80
|
+
|
|
81
|
+
# Explicit paths (skips auto-discovery)
|
|
82
|
+
npx nightralph claude -m claude-opus-4-6 \
|
|
83
|
+
--dir .scratch/my-feature/issues \
|
|
84
|
+
--spec .scratch/my-feature/spec.md
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Flags:
|
|
88
|
+
|
|
89
|
+
| Flag | Required | Default | Description |
|
|
90
|
+
|------|----------|---------|-------------|
|
|
91
|
+
| `<provider>` | yes | -- | Agent CLI to spawn (e.g. `claude`, `codex`) |
|
|
92
|
+
| `-m`, `--model` | no | -- | Model flag passed to the agent |
|
|
93
|
+
| `--dir` | no | auto | Path to the issues directory |
|
|
94
|
+
| `--spec` | no | auto | Path to the spec file |
|
|
95
|
+
| `--dry-run` | no | -- | Show wave order and prompt without running |
|
|
96
|
+
| `--timeout-secs` | no | `300` | Kill agent after N seconds |
|
|
97
|
+
|
|
98
|
+
Notes:
|
|
99
|
+
|
|
100
|
+
* When `--dir` and `--spec` are omitted, the CLI looks for
|
|
101
|
+
`.scratch/<feature>/issues/` directories. If multiple features exist,
|
|
102
|
+
**it prompts you to pick one** with an interactive selector.
|
|
103
|
+
* Tickets are selected by `**Status:** ready-for-agent` in the file body.
|
|
104
|
+
* Dependencies are read from the `**Blocked by:**` field; the orchestrator
|
|
105
|
+
skips tickets whose blockers haven't completed.
|
|
106
|
+
* Unblocked tickets run in parallel. After a wave finishes, newly unblocked
|
|
107
|
+
tickets start in the next wave.
|
|
108
|
+
* On success (agent exit 0), the ticket's status is updated to `done`
|
|
109
|
+
in-place. Failed tickets keep their status and block dependents.
|
|
110
|
+
* Agent logs are written to `<dir>/../logs/<ticket>.log`.
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## Workflow
|
|
114
|
+
|
|
115
|
+
Need to use several skills, in order:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
grill -> to-spec -> to-tickets
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
At that point you will have a number of tickets, which are markdown files
|
|
122
|
+
in your local repo. This tool handles the last step, implementing the tickets,
|
|
123
|
+
which normally is done with the `tdd` skill. This tool will work in a loop,
|
|
124
|
+
aiming to complete 1 task per session, then restarting (a classic Ralph loop).
|
|
125
|
+
|
|
126
|
+
### `nightralph` command
|
|
127
|
+
|
|
128
|
+
After you have the tickets, you can use the `nightralph` loop to execute.
|
|
129
|
+
|
|
130
|
+
```sh
|
|
131
|
+
npx nightralph claude -m claude-opus-4-6
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Or with a different provider:
|
|
135
|
+
|
|
136
|
+
```sh
|
|
137
|
+
npx nightralph codex -m gpt-5.6-terra
|
|
138
|
+
```
|
package/WIP.md
ADDED
|
@@ -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.
|