@damian87/omp 0.1.0 → 0.3.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/.github/copilot-instructions.md +15 -0
- package/.github/skills/caveman/SKILL.md +22 -11
- package/.github/skills/code-review/SKILL.md +27 -13
- package/.github/skills/debug/SKILL.md +29 -13
- package/.github/skills/grill-me/SKILL.md +19 -7
- package/.github/skills/jira-ticket/SKILL.md +34 -12
- package/.github/skills/omp-autopilot/SKILL.md +67 -12
- package/.github/skills/prototype/SKILL.md +30 -12
- package/.github/skills/ralph/SKILL.md +62 -13
- package/.github/skills/ralplan/SKILL.md +21 -12
- package/.github/skills/research-codebase/SKILL.md +58 -0
- package/.github/skills/research-codebase/reference/agent-prompts.md +38 -0
- package/.github/skills/research-codebase/reference/follow-up.md +21 -0
- package/.github/skills/research-codebase/reference/permalink.md +26 -0
- package/.github/skills/research-codebase/reference/template.md +75 -0
- package/.github/skills/tdd/SKILL.md +27 -10
- package/.github/skills/team/SKILL.md +95 -13
- package/.github/skills/team/scripts/team-launch.sh +132 -0
- package/.github/skills/ultraqa/SKILL.md +55 -11
- package/.github/skills/ultrawork/SKILL.md +66 -13
- package/.github/skills/verify/SKILL.md +29 -11
- package/.github/skills/worktree/SKILL.md +51 -0
- package/README.md +28 -14
- package/catalog/capabilities.json +104 -12
- package/catalog/skills-general.json +62 -10
- package/dist/src/cli.js +30 -3
- package/dist/src/cli.js.map +1 -1
- package/dist/src/copilot/launch.js +42 -2
- package/dist/src/copilot/launch.js.map +1 -1
- package/dist/src/mode-state/paths.d.ts +6 -0
- package/dist/src/mode-state/paths.js +12 -0
- package/dist/src/mode-state/paths.js.map +1 -1
- package/dist/src/team/api.d.ts +60 -1
- package/dist/src/team/api.js +101 -0
- package/dist/src/team/api.js.map +1 -1
- package/dist/src/team/config.d.ts +7 -0
- package/dist/src/team/config.js +16 -0
- package/dist/src/team/config.js.map +1 -0
- package/dist/src/team/mailbox.d.ts +30 -0
- package/dist/src/team/mailbox.js +188 -0
- package/dist/src/team/mailbox.js.map +1 -0
- package/dist/src/team/runtime.d.ts +9 -1
- package/dist/src/team/runtime.js +18 -12
- package/dist/src/team/runtime.js.map +1 -1
- package/dist/src/team/types.d.ts +25 -0
- package/dist/src/team/worker-bootstrap.js +29 -0
- package/dist/src/team/worker-bootstrap.js.map +1 -1
- package/dist/test/catalog.test.d.ts +1 -0
- package/dist/test/catalog.test.js +21 -0
- package/dist/test/catalog.test.js.map +1 -0
- package/dist/test/jira.test.d.ts +1 -0
- package/dist/test/jira.test.js +26 -0
- package/dist/test/jira.test.js.map +1 -0
- package/dist/test/lint.test.d.ts +1 -0
- package/dist/test/lint.test.js +9 -0
- package/dist/test/lint.test.js.map +1 -0
- package/dist/test/sync.test.d.ts +1 -0
- package/dist/test/sync.test.js +15 -0
- package/dist/test/sync.test.js.map +1 -0
- package/docs/general-skills.md +5 -4
- package/docs/plans/2026-05-29-team-messaging-and-nudge-gating-design.md +170 -0
- package/docs/self-evolve.md +2 -2
- package/package.json +1 -1
- package/scripts/lib/version-check.mjs +82 -0
- package/scripts/session-start.mjs +8 -2
- package/.github/skills/codebase-research/SKILL.md +0 -20
|
@@ -18,3 +18,18 @@ Slash commands under `.github/skills/<name>/SKILL.md` are auto-discovered by Cop
|
|
|
18
18
|
|
|
19
19
|
## Hooks
|
|
20
20
|
Lifecycle hooks declared in `hooks/hooks.json` invoke scripts in `scripts/`. Run `omp doctor` to verify discovery.
|
|
21
|
+
|
|
22
|
+
## Session lifecycle: self-evolve
|
|
23
|
+
|
|
24
|
+
Before ending a session, invoke `/self-evolve` to capture mistake patterns.
|
|
25
|
+
|
|
26
|
+
Trigger when any of these apply:
|
|
27
|
+
|
|
28
|
+
- The user says "done", "bye", "thanks", "wrapping up", "ship it", or types `/exit`.
|
|
29
|
+
- You finish the user's last task with no pending todos and they have not requested follow-up.
|
|
30
|
+
|
|
31
|
+
Skip when the session was fewer than 3 turns or contained no user corrections.
|
|
32
|
+
|
|
33
|
+
Invoke `/self-evolve` **at most once per session.** After it reports back, do not invoke it again — even if the user replies "thanks" or "done" to the report itself. Just acknowledge and end the session.
|
|
34
|
+
|
|
35
|
+
The skill lives at `.github/skills/self-evolve/SKILL.md`. It is self-contained: it tells you which signals count as corrections, where to log them, and when a recurring pattern should become a draft skill.
|
|
@@ -7,14 +7,25 @@ description: Ultra-compact response mode with no filler. Use with /caveman when
|
|
|
7
7
|
|
|
8
8
|
Use `/caveman` when user wants fewer tokens.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
10
|
+
## Mode
|
|
11
|
+
|
|
12
|
+
Once activated, all responses until deactivated follow caveman rules.
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
|
|
16
|
+
- Short words. No filler. No pleasantries.
|
|
17
|
+
- Bullets over paragraphs.
|
|
18
|
+
- Keep facts exact — paths, commands, numbers, error messages.
|
|
19
|
+
- Do not drop warnings, errors, or test evidence.
|
|
20
|
+
- Code blocks over prose when showing changes.
|
|
21
|
+
- One-word answers when one word is enough.
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
**Normal**: "I've reviewed the file and found that the authentication middleware is missing a check for expired tokens. I'll add a validation step."
|
|
26
|
+
|
|
27
|
+
**Caveman**: "Auth middleware missing token expiry check. Adding validation."
|
|
28
|
+
|
|
29
|
+
## Deactivate
|
|
30
|
+
|
|
31
|
+
Say "normal mode" or "/caveman off" to return to standard responses.
|
|
@@ -7,16 +7,30 @@ description: Review completed changes for blockers, regressions, security, and s
|
|
|
7
7
|
|
|
8
8
|
Use `/code-review` before merge or final handoff.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- Changes are complete and ready for review
|
|
13
|
+
- You need a second opinion before shipping
|
|
14
|
+
- You want to catch regressions, security issues, or scope drift
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
1. **Read the diff** — `git diff` for unstaged, `git diff --staged` for staged, or `git diff main...HEAD` for branch diff
|
|
19
|
+
2. **Check for blockers** — bugs, logic errors, missing error handling, broken contracts
|
|
20
|
+
3. **Check for security** — secrets in code, injection risks, auth gaps, unsafe defaults
|
|
21
|
+
4. **Check for regressions** — does the change break existing tests or documented behaviour?
|
|
22
|
+
5. **Check for scope drift** — does the change do more or less than requested?
|
|
23
|
+
6. **Run tests** if they exist and haven't been run
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- Only flag issues that genuinely matter — no style nits, no formatting opinions
|
|
28
|
+
- If the code works, tests pass, and scope is right, say so clearly
|
|
29
|
+
- Flag anything you'd reject in a PR review
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
- `Verdict` — PASS / NEEDS_CHANGES / BLOCKER
|
|
34
|
+
- `Blocking` — issues that must be fixed before merge
|
|
35
|
+
- `Non-blocking` — suggestions or observations
|
|
36
|
+
- `Evidence reviewed` — what was checked (diff, tests, build)
|
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: debug
|
|
3
3
|
description: Reproduce, minimize, diagnose, fix, and regression-test a bug. Use with /debug for broken, failing, slow, or confusing behavior.
|
|
4
|
+
argument-hint: "<symptom or error message>"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Debug
|
|
7
8
|
|
|
8
9
|
Use `/debug` for broken, failing, slow, or confusing behavior.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
## When to use
|
|
12
|
+
|
|
13
|
+
- Tests are failing
|
|
14
|
+
- Something is broken or throwing errors
|
|
15
|
+
- Performance is unexpectedly slow
|
|
16
|
+
- Behaviour is confusing or inconsistent
|
|
17
|
+
|
|
18
|
+
## Steps (follow in order)
|
|
19
|
+
|
|
20
|
+
1. **Reproduce** — get the failure to happen reliably. If you can't reproduce, that's important information.
|
|
21
|
+
2. **Minimise** — find the smallest case that still fails. Strip away unrelated code/config.
|
|
22
|
+
3. **Hypothesise** — form 2–3 ranked theories about the cause. Start with the most likely.
|
|
23
|
+
4. **Inspect** — gather evidence for/against each hypothesis. Read code, add logging, check state.
|
|
24
|
+
5. **Fix** — address the root cause, not just the symptom. If the fix is in the wrong layer, note it.
|
|
25
|
+
6. **Regression test** — add or run a test that would have caught this bug. Verify it passes now.
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- Never guess-and-check without a hypothesis
|
|
30
|
+
- If the first fix doesn't work, don't keep patching — re-examine the hypothesis
|
|
31
|
+
- Document what you tried and why it did/didn't work
|
|
32
|
+
|
|
33
|
+
## Output
|
|
34
|
+
|
|
35
|
+
- `Repro` — steps to reproduce the issue
|
|
36
|
+
- `Cause` — root cause with file:line evidence
|
|
37
|
+
- `Fix` — what was changed and why
|
|
38
|
+
- `Regression test` — test that proves the fix and prevents recurrence
|
|
@@ -5,12 +5,24 @@ description: Ask one sharp clarification question after codebase research when a
|
|
|
5
5
|
|
|
6
6
|
# Grill Me
|
|
7
7
|
|
|
8
|
-
Use `/grill-me` after `/codebase
|
|
8
|
+
Use `/grill-me` after `/research-codebase` when one decision blocks safe progress.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
- State current understanding in 1-2 bullets.
|
|
12
|
-
- Ask exactly one question.
|
|
13
|
-
- Include a recommended answer.
|
|
14
|
-
- Explain what the answer unlocks.
|
|
10
|
+
## When to use
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
- Research is done but ambiguity remains
|
|
13
|
+
- A design decision could go either way
|
|
14
|
+
- You need the user's input before committing to an approach
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
1. **State** current understanding in 1–2 bullets — show you've done the homework
|
|
19
|
+
2. **Ask exactly one question** — the most important one that blocks progress
|
|
20
|
+
3. **Include a recommended answer** — your best guess based on evidence
|
|
21
|
+
4. **Explain what the answer unlocks** — what you can do once you know
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- One question at a time. Never batch questions.
|
|
26
|
+
- Always include a recommended answer — make it easy to say "yes"
|
|
27
|
+
- Stop grilling when enough is known for `/ralplan` or direct implementation
|
|
28
|
+
- If the codebase can answer the question, answer it yourself instead of asking
|
|
@@ -7,15 +7,37 @@ description: Prepare Jira create, comment, and safe-update payloads with safe dr
|
|
|
7
7
|
|
|
8
8
|
Use `/jira-ticket` when work tracking is requested.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- A plan or completed work needs a Jira ticket
|
|
13
|
+
- You need to comment on or update an existing ticket
|
|
14
|
+
- The user wants a ticket draft without actually creating it
|
|
15
|
+
|
|
16
|
+
## Operations
|
|
17
|
+
|
|
18
|
+
### Create
|
|
19
|
+
- Build from an approved plan or implementation slice
|
|
20
|
+
- Include: Summary, Description, Acceptance Criteria
|
|
21
|
+
- If Jira config is available, create via API; otherwise output a dry-run payload
|
|
22
|
+
|
|
23
|
+
### Comment
|
|
24
|
+
- Add implementation evidence, verification results, or status updates
|
|
25
|
+
- Format for readability (use Jira wiki markup, not Markdown)
|
|
26
|
+
|
|
27
|
+
### Safe update
|
|
28
|
+
- Only update known simple fields (summary, description, labels)
|
|
29
|
+
- Do not guess transitions, issue links, project keys, or secrets
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
- If Jira config is missing, always output a **dry-run payload** — never fail silently
|
|
34
|
+
- Do not guess project keys, transitions, or credentials
|
|
35
|
+
- Keep acceptance criteria testable and specific
|
|
36
|
+
- Include file paths and evidence when commenting with implementation details
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
|
|
40
|
+
- `Operation` — create / comment / update
|
|
41
|
+
- `Target` — ticket key or "new"
|
|
42
|
+
- `Payload` — the Jira-formatted content
|
|
43
|
+
- `Human action` — what the user needs to do (e.g. "paste into Jira" if dry-run)
|
|
@@ -1,20 +1,75 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: omp-autopilot
|
|
3
3
|
description: Full lightweight flow from research to plan, execution, review, and verification. Use with /omp-autopilot only for clear autonomous work. (Renamed from /autopilot to avoid collision with the Copilot CLI built-in.)
|
|
4
|
+
argument-hint: "<task description>"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
#
|
|
7
|
+
# OMP Autopilot
|
|
7
8
|
|
|
8
|
-
Use `/omp-autopilot` only for clear autonomous work.
|
|
9
|
+
Use `/omp-autopilot` only for clear autonomous work where the goal is unambiguous.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
1. `/codebase-research`
|
|
12
|
-
2. `/grill-me` if ambiguity remains
|
|
13
|
-
3. `/ralplan`
|
|
14
|
-
4. `/team`, `/ralph`, or `/ultrawork`
|
|
15
|
-
5. `/code-review`
|
|
16
|
-
6. `/verify` or `/ultraqa`
|
|
17
|
-
7. `/jira-ticket` if tracking is needed
|
|
11
|
+
## When to use
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
- The task is well-defined and can be completed without human input
|
|
14
|
+
- You have enough context to proceed end-to-end
|
|
15
|
+
- The work is not destructive or credential-dependent
|
|
16
|
+
|
|
17
|
+
## Do not use when
|
|
18
|
+
|
|
19
|
+
- The request is vague or underspecified — use `/grill-me` first
|
|
20
|
+
- The change is a single file fix — use `/ralph` directly
|
|
21
|
+
- You need human decisions at multiple points — use `/ralplan` then manual execution
|
|
22
|
+
|
|
23
|
+
## Phases
|
|
24
|
+
|
|
25
|
+
### Phase 0 — Gate check
|
|
26
|
+
|
|
27
|
+
If the request is vague (no clear deliverable, multiple interpretations), redirect to `/grill-me` and stop. Do not guess intent.
|
|
28
|
+
|
|
29
|
+
### Phase 1 — Research
|
|
30
|
+
|
|
31
|
+
Run `/research-codebase` to understand current state. Skip if you already have full context from the conversation.
|
|
32
|
+
|
|
33
|
+
### Phase 2 — Plan
|
|
34
|
+
|
|
35
|
+
Run `/ralplan` to produce an implementation plan with acceptance criteria. If a consensus plan already exists from a prior `/ralplan`, skip this phase.
|
|
36
|
+
|
|
37
|
+
### Phase 3 — Execute
|
|
38
|
+
|
|
39
|
+
Route based on plan shape:
|
|
40
|
+
- **Independent parallel tasks** → `/team` (tmux panes)
|
|
41
|
+
- **Single linear task** → `/ralph` (persistence loop)
|
|
42
|
+
- **Many mechanical items** → `/ultrawork` (batch execution)
|
|
43
|
+
|
|
44
|
+
### Phase 4 — Review
|
|
45
|
+
|
|
46
|
+
Run `/code-review` on the diff. Fix any issues found before proceeding.
|
|
47
|
+
|
|
48
|
+
### Phase 5 — Verify
|
|
49
|
+
|
|
50
|
+
Run `/verify` or `/ultraqa` to prove the work is done. This phase is **mandatory** — never skip it.
|
|
51
|
+
|
|
52
|
+
## Stop conditions
|
|
53
|
+
|
|
54
|
+
- **Vague input** → redirect to `/grill-me`, do not proceed
|
|
55
|
+
- **Phase fails 3 times** → stop, report the blocker
|
|
56
|
+
- **Scope expands beyond original plan** → pause, report new scope, ask whether to continue
|
|
57
|
+
- **Destructive or credentialed action needed** → stop and ask
|
|
58
|
+
|
|
59
|
+
## Composition
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
/omp-autopilot wraps:
|
|
63
|
+
/research-codebase → /ralplan → /ralph or /team or /ultrawork → /code-review → /verify
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Each inner skill can be invoked independently. Autopilot chains them.
|
|
67
|
+
|
|
68
|
+
## Final checklist
|
|
69
|
+
|
|
70
|
+
Before claiming done:
|
|
71
|
+
- [ ] Every acceptance criterion from the plan is met
|
|
72
|
+
- [ ] Tests pass (if applicable)
|
|
73
|
+
- [ ] Lint clean (if applicable)
|
|
74
|
+
- [ ] `/verify` or `/ultraqa` produced PASS evidence
|
|
75
|
+
- [ ] No uncommitted work left behind
|
|
@@ -7,15 +7,33 @@ description: Build a disposable experiment to answer one design, UI, state, or d
|
|
|
7
7
|
|
|
8
8
|
Use `/prototype` when a cheap experiment beats guessing.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- You're unsure about a design choice and need to try it
|
|
13
|
+
- A UI layout, state shape, or API contract is unclear
|
|
14
|
+
- "Let me try it" is faster than "let me think about it"
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
1. **State the question** — what are you trying to learn? (e.g. "Does a tree or flat list work better for this state?")
|
|
19
|
+
2. **Build the smallest throwaway version** — prefer:
|
|
20
|
+
- Isolated routes or pages
|
|
21
|
+
- Hardcoded fixtures instead of real data
|
|
22
|
+
- Terminal demos for backend logic
|
|
23
|
+
- Standalone scripts for API experiments
|
|
24
|
+
3. **Mark as disposable** — prefix files with `prototype-` or put in a `prototype/` directory
|
|
25
|
+
4. **Run it** — actually test the prototype, don't just write it
|
|
26
|
+
5. **Decide** — keep (graduate to real code), revise (iterate), or discard (delete)
|
|
27
|
+
|
|
28
|
+
## Rules
|
|
29
|
+
|
|
30
|
+
- Prototypes are not production code — speed over polish
|
|
31
|
+
- Delete prototypes that aren't kept — don't let them linger
|
|
32
|
+
- One question per prototype — don't scope-creep
|
|
33
|
+
|
|
34
|
+
## Output
|
|
35
|
+
|
|
36
|
+
- `Question` — what was being tested
|
|
37
|
+
- `Prototype` — what was built and where
|
|
38
|
+
- `What we learned` — concrete findings
|
|
39
|
+
- `Decision` — keep, revise, or discard
|
|
@@ -5,16 +5,65 @@ description: Single-owner execute-fix-verify loop for one clear task. Use with /
|
|
|
5
5
|
|
|
6
6
|
# Ralph
|
|
7
7
|
|
|
8
|
-
Use `/ralph` when one owner should complete one clear task.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- `
|
|
19
|
-
- `
|
|
20
|
-
- `
|
|
8
|
+
Use `/ralph` when one owner should complete one clear task end-to-end.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- A plan or concrete task already exists
|
|
13
|
+
- The work is a single logical unit (not parallelisable)
|
|
14
|
+
- You need persistent execution until done or blocked
|
|
15
|
+
|
|
16
|
+
## Do not use when
|
|
17
|
+
|
|
18
|
+
- Work has independent parallel lanes — use `/team`
|
|
19
|
+
- 5+ mechanical tasks — use `/ultrawork`
|
|
20
|
+
- No plan exists yet — use `/ralplan` first
|
|
21
|
+
|
|
22
|
+
## Input
|
|
23
|
+
|
|
24
|
+
Accept a plan from `/ralplan`, a ticket, or a concrete task description. If a `/ralplan` consensus plan exists, use its acceptance criteria as your definition of done.
|
|
25
|
+
|
|
26
|
+
## Steps
|
|
27
|
+
|
|
28
|
+
1. **Start** from the plan or task. State what "done" looks like before writing code.
|
|
29
|
+
2. **Implement** one slice at a time, in plan order.
|
|
30
|
+
3. **Verify after each slice** — run tests, lint, type-check. Do not batch verification to the end.
|
|
31
|
+
4. **Fix** any failures immediately before moving to the next slice.
|
|
32
|
+
5. **Repeat** until all slices complete with evidence, or a blocker is hit.
|
|
33
|
+
6. **Final verification** — run the full test suite one last time after all slices.
|
|
34
|
+
|
|
35
|
+
## Circuit breaker
|
|
36
|
+
|
|
37
|
+
If the same issue fails **3 times** after 3 different fix attempts, **stop**. Report:
|
|
38
|
+
- What was tried
|
|
39
|
+
- Why each attempt failed
|
|
40
|
+
- What information is missing
|
|
41
|
+
|
|
42
|
+
Do not keep trying the same approach. Escalate the blocker.
|
|
43
|
+
|
|
44
|
+
## Scope freeze
|
|
45
|
+
|
|
46
|
+
If you discover work outside the original plan:
|
|
47
|
+
- **Note it** in your output under "Known gaps"
|
|
48
|
+
- **Do not chase it** — finish the planned work first
|
|
49
|
+
- If it blocks the plan, stop and report
|
|
50
|
+
|
|
51
|
+
## Rules
|
|
52
|
+
|
|
53
|
+
- Never claim "done" without running verification
|
|
54
|
+
- Commit working increments — don't batch everything into one commit
|
|
55
|
+
- Read test output — don't assume green means pass
|
|
56
|
+
|
|
57
|
+
## Final checklist
|
|
58
|
+
|
|
59
|
+
Before claiming done:
|
|
60
|
+
- [ ] Every plan slice implemented and verified individually
|
|
61
|
+
- [ ] Full test suite passes after all slices
|
|
62
|
+
- [ ] No lint or type errors introduced
|
|
63
|
+
- [ ] Evidence of completion attached (test output, build log)
|
|
64
|
+
|
|
65
|
+
## Output
|
|
66
|
+
|
|
67
|
+
- `Done` — what was completed
|
|
68
|
+
- `Evidence` — test output, build logs, or behaviour proof
|
|
69
|
+
- `Known gaps` — anything intentionally left or discovered but out of scope
|
|
@@ -7,15 +7,24 @@ description: Produce an implementation-ready plan with risks, acceptance criteri
|
|
|
7
7
|
|
|
8
8
|
Use `/ralplan` when the task needs planning before edits.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- The change touches multiple files or components
|
|
13
|
+
- There are unclear trade-offs or risks
|
|
14
|
+
- You need alignment before implementation
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
1. **Summarise** the target result and constraints in 2–3 sentences
|
|
19
|
+
2. **List implementation slices** in execution order — each slice should be independently verifiable
|
|
20
|
+
3. **Define acceptance criteria** — what must be true when done
|
|
21
|
+
4. **Define test shape** — which tests to write or run, what they cover
|
|
22
|
+
5. **Call out risks** — what could go wrong, tradeoffs chosen, alternatives rejected
|
|
23
|
+
6. **Stop at the plan** unless the user explicitly asked to implement
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
|
|
27
|
+
- `Plan` — ordered implementation slices with file-level specificity
|
|
28
|
+
- `Tests` — acceptance criteria and test shape for each slice
|
|
29
|
+
- `Risks` — tradeoffs, concerns, and what was deliberately not done
|
|
30
|
+
- `Ready for` — recommended next skill: `/team`, `/ralph`, `/ultrawork`, or direct edit
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research-codebase
|
|
3
|
+
description: Comprehensive codebase research that scales effort to task complexity, synthesises findings, and writes a timestamped document to docs/research/. Use when user says /research-codebase, asks to research or document a codebase area, or wants a deep-dive into how something works.
|
|
4
|
+
argument-hint: "<area or question to research>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Research Codebase
|
|
8
|
+
|
|
9
|
+
Read-only codebase research. Documents what EXISTS — no recommendations or critiques unless explicitly asked.
|
|
10
|
+
|
|
11
|
+
## Contract (stated once)
|
|
12
|
+
|
|
13
|
+
- ONLY describe what exists, where it exists, how it works, and how components interact
|
|
14
|
+
- Do NOT suggest improvements, critique implementation, or propose changes
|
|
15
|
+
- You are creating a technical map of the existing system
|
|
16
|
+
|
|
17
|
+
## When invoked without a query
|
|
18
|
+
|
|
19
|
+
Respond: "I'm ready to research the codebase. What area or question should I investigate?" — then wait.
|
|
20
|
+
|
|
21
|
+
## Steps
|
|
22
|
+
|
|
23
|
+
### 1. Read mentioned files
|
|
24
|
+
|
|
25
|
+
If the user references specific files, read them with `view` in the **main context** before anything else.
|
|
26
|
+
|
|
27
|
+
### 2. Scope the tech stack
|
|
28
|
+
|
|
29
|
+
Detect from `package.json`, config files, directory structure, and project conventions. This determines which reference files are relevant — do NOT load unrelated framework guidance.
|
|
30
|
+
|
|
31
|
+
### 3. Size the task → choose effort tier
|
|
32
|
+
|
|
33
|
+
| Tier | When | Agent strategy |
|
|
34
|
+
|------|------|----------------|
|
|
35
|
+
| **Small** | Single file/component, narrow question | Main agent reads directly. No subagents. |
|
|
36
|
+
| **Medium** | Cross-file, single area (e.g. "how does auth work") | 1–2 `explore` agents for locate + analyse |
|
|
37
|
+
| **Large** | Cross-cutting, multi-area (e.g. "map the entire API layer") | Parallel locator → analyser → pattern-finder (see `reference/agent-prompts.md`) |
|
|
38
|
+
|
|
39
|
+
### 4. Research
|
|
40
|
+
|
|
41
|
+
- Track subtasks via SQL `todos` table
|
|
42
|
+
- For medium/large: read `reference/agent-prompts.md` for subagent prompt templates
|
|
43
|
+
- **MUST GATE**: Before writing findings, show file:line evidence for every claim
|
|
44
|
+
|
|
45
|
+
### 5. Synthesise & write document
|
|
46
|
+
|
|
47
|
+
- Read `reference/template.md` for output format and frontmatter
|
|
48
|
+
- Read `reference/permalink.md` if GitHub permalinks are applicable
|
|
49
|
+
- Gather git metadata: `date`, `user`, `commit`, `branch`, `repo`
|
|
50
|
+
- Write to `docs/research/YYYY-MM-DD-description.md`
|
|
51
|
+
|
|
52
|
+
### 6. Present findings
|
|
53
|
+
|
|
54
|
+
Show concise summary to user with key file references. Ask if they have follow-up questions.
|
|
55
|
+
|
|
56
|
+
### 7. Follow-ups
|
|
57
|
+
|
|
58
|
+
If the user has follow-ups, read `reference/follow-up.md` for the append protocol.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Subagent Prompt Templates
|
|
2
|
+
|
|
3
|
+
Use these templates when spawning `explore` agents via the `task` tool. Only used for **medium** and **large** research tasks.
|
|
4
|
+
|
|
5
|
+
## Agent roles
|
|
6
|
+
|
|
7
|
+
### Locator — find WHERE files and components live
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Find all files and components related to [topic] in the codebase.
|
|
11
|
+
Return file paths, directory structure, and a brief note on what each file contains.
|
|
12
|
+
Do not evaluate or suggest improvements — only document what exists.
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Analyser — understand HOW specific code works
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Read and document how [component] works.
|
|
19
|
+
Describe the data flow, key functions, and how it connects to other components.
|
|
20
|
+
Include file paths and line numbers.
|
|
21
|
+
Do not critique or suggest improvements — only describe what exists.
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Pattern finder — find examples of existing patterns
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Find all examples of [pattern] across the codebase.
|
|
28
|
+
List each occurrence with file path, line number, and a brief description of how it's used.
|
|
29
|
+
Do not evaluate consistency or suggest changes — only document occurrences.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Guidelines
|
|
33
|
+
|
|
34
|
+
- Each agent is stateless — provide complete context in the prompt
|
|
35
|
+
- Remind every agent: "You are documenting, not evaluating"
|
|
36
|
+
- Run independent explorations in parallel
|
|
37
|
+
- For web research (only if user explicitly asks), use a `research` agent instead of `explore`
|
|
38
|
+
- **Wait for ALL agents to complete before synthesising**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Follow-up Research Protocol
|
|
2
|
+
|
|
3
|
+
When the user has follow-up questions after initial research:
|
|
4
|
+
|
|
5
|
+
1. **Append** to the same research document — do not create a new file
|
|
6
|
+
2. **Update frontmatter**:
|
|
7
|
+
- `last_updated: YYYY-MM-DD`
|
|
8
|
+
- `last_updated_by: [git user.name]`
|
|
9
|
+
- Add `last_updated_note: "Added follow-up research for [brief description]"`
|
|
10
|
+
3. **Add a new section** at the end:
|
|
11
|
+
```markdown
|
|
12
|
+
## Follow-up Research [ISO timestamp]
|
|
13
|
+
|
|
14
|
+
### Question
|
|
15
|
+
[User's follow-up question]
|
|
16
|
+
|
|
17
|
+
### Findings
|
|
18
|
+
[New findings with file:line evidence]
|
|
19
|
+
```
|
|
20
|
+
4. **Spawn new agents** as needed (same tier sizing rules apply)
|
|
21
|
+
5. **Connect** new findings to existing sections where relevant
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# GitHub Permalinks
|
|
2
|
+
|
|
3
|
+
When the research is on `main`/`master` or the commit is pushed, replace local file references with GitHub permalinks.
|
|
4
|
+
|
|
5
|
+
## Get repo info
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Permalink format
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
https://github.com/{owner}/{repo}/blob/{commit}/{file}#L{line}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For line ranges:
|
|
18
|
+
```
|
|
19
|
+
https://github.com/{owner}/{repo}/blob/{commit}/{file}#L{start}-L{end}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## When to use
|
|
23
|
+
|
|
24
|
+
- Only when on `main`/`master` or the commit is known to be pushed
|
|
25
|
+
- Replace `path/to/file.ts:42` with the full permalink
|
|
26
|
+
- Keep the local path as descriptive text: `[path/to/file.ts:42](permalink)`
|