@scanton/phase2s 0.13.0 → 0.14.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 (37) hide show
  1. package/.phase2s/skills/adversarial/SKILL.md +57 -0
  2. package/.phase2s/skills/audit/SKILL.md +82 -0
  3. package/.phase2s/skills/autoplan/SKILL.md +78 -0
  4. package/.phase2s/skills/careful/SKILL.md +38 -0
  5. package/.phase2s/skills/checkpoint/SKILL.md +52 -0
  6. package/.phase2s/skills/consensus-plan/SKILL.md +57 -0
  7. package/.phase2s/skills/debug/SKILL.md +48 -0
  8. package/.phase2s/skills/deep-specify/SKILL.md +71 -0
  9. package/.phase2s/skills/diff/SKILL.md +33 -0
  10. package/.phase2s/skills/docs/SKILL.md +58 -0
  11. package/.phase2s/skills/explain/SKILL.md +27 -0
  12. package/.phase2s/skills/freeze/SKILL.md +37 -0
  13. package/.phase2s/skills/guard/SKILL.md +38 -0
  14. package/.phase2s/skills/health/SKILL.md +66 -0
  15. package/.phase2s/skills/investigate/SKILL.md +50 -0
  16. package/.phase2s/skills/land-and-deploy/SKILL.md +69 -0
  17. package/.phase2s/skills/plan/SKILL.md +58 -0
  18. package/.phase2s/skills/plan-review/SKILL.md +81 -0
  19. package/.phase2s/skills/qa/SKILL.md +61 -0
  20. package/.phase2s/skills/remember/SKILL.md +37 -0
  21. package/.phase2s/skills/retro/SKILL.md +44 -0
  22. package/.phase2s/skills/review/SKILL.md +42 -0
  23. package/.phase2s/skills/satori/SKILL.md +44 -0
  24. package/.phase2s/skills/scope-review/SKILL.md +65 -0
  25. package/.phase2s/skills/ship/SKILL.md +36 -0
  26. package/.phase2s/skills/skill/SKILL.md +52 -0
  27. package/.phase2s/skills/slop-clean/SKILL.md +61 -0
  28. package/.phase2s/skills/tdd/SKILL.md +49 -0
  29. package/.phase2s/skills/unfreeze/SKILL.md +20 -0
  30. package/dist/src/cli/index.js +1 -1
  31. package/dist/src/mcp/server.d.ts +1 -1
  32. package/dist/src/mcp/server.js +1 -1
  33. package/dist/src/skills/loader.d.ts +3 -1
  34. package/dist/src/skills/loader.d.ts.map +1 -1
  35. package/dist/src/skills/loader.js +22 -2
  36. package/dist/src/skills/loader.js.map +1 -1
  37. package/package.json +2 -1
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: guard
3
+ description: Full safety mode — combines careful (destructive command confirmation) and freeze (edit directory restriction)
4
+ triggers:
5
+ - guard mode
6
+ - guard
7
+ - full safety
8
+ - lock it down
9
+ - maximum safety
10
+ - full guard
11
+ ---
12
+
13
+ Activate full guard mode: both destructive command confirmation and edit directory restriction.
14
+
15
+ **Step 1: Set the edit boundary**
16
+
17
+ Ask: "Which directory should I limit file edits to? (e.g., `src/tools/`, `.phase2s/skills/`, or give an absolute path)"
18
+
19
+ Wait for the user's answer. Confirm: "Edit boundary set to `[directory]`."
20
+
21
+ **Step 2: Activate safety rules**
22
+
23
+ Both rules are now active for this session:
24
+
25
+ **Edit restriction:** Only create or modify files inside `[directory]`. Before any Edit or Write tool call, verify the target path is within the boundary. If not, stop and report the violation.
26
+
27
+ **Destructive command confirmation:** Before running any destructive shell command, pause and describe what it does and its potential impact, then ask "Should I proceed? (yes/no)"
28
+
29
+ Destructive commands that require confirmation: `rm`, `rmdir`, `git reset --hard`, `git push --force`, `git clean`, `git checkout .`, `DROP TABLE`, `DROP DATABASE`, `TRUNCATE`, `docker rm`, `docker system prune`, `sudo` (state-modifying).
30
+
31
+ Safe commands that do NOT require confirmation: `ls`, `cat`, `grep`, `find`, `git status`, `git log`, `git diff`, `npm test`, `git add`, `git commit`.
32
+
33
+ **Note:** This is a soft constraint enforced through model self-monitoring. I cannot technically intercept tool calls. Phase2S's `allowDestructive: false` config provides shell-level enforcement underneath.
34
+
35
+ Guard mode stays active for this session.
36
+ - To clear edit restriction only: `/unfreeze`
37
+ - To turn off destructive confirmation: say "turn off safety mode"
38
+ - To clear both: start a new session
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: health
3
+ description: Code quality dashboard — runs type check, tests, and lint, scores the codebase, shows trends
4
+ triggers:
5
+ - health check
6
+ - health
7
+ - code quality
8
+ - how healthy is the codebase
9
+ - run all checks
10
+ - quality score
11
+ - codebase health
12
+ ---
13
+
14
+ Run a code quality dashboard. Report only — do not fix anything.
15
+
16
+ **Step 1: Auto-detect tooling**
17
+
18
+ Check which tools are available for this project:
19
+ ```bash
20
+ test -f package.json && echo "node project"
21
+ test -f tsconfig.json && echo "typescript"
22
+ cat package.json 2>/dev/null | grep -E '"test"|"lint"|"typecheck"' | head -10
23
+ ```
24
+
25
+ **Step 2: Run checks**
26
+
27
+ Run each available check and capture exit code + output:
28
+
29
+ 1. **Tests** — `npm test` or equivalent. Record: pass/fail, test count, any failures.
30
+ 2. **Type check** — `npx tsc --noEmit` if TypeScript. Record: error count.
31
+ 3. **Lint** — if eslint/biome configured, run it. Record: warning/error count.
32
+ 4. **Dead code** — `npx knip` if available, otherwise skip.
33
+
34
+ **Step 3: Score**
35
+
36
+ Score on a 0–10 scale using this rubric:
37
+ - Tests: 40% weight (10 = all pass, 0 = none or failing)
38
+ - Type check: 25% weight (10 = zero errors)
39
+ - Lint: 20% weight (10 = zero warnings)
40
+ - Dead code: 15% weight (10 = no unused exports)
41
+
42
+ If a tool isn't available, redistribute its weight proportionally.
43
+
44
+ **Step 4: Report**
45
+
46
+ ```
47
+ HEALTH SCORE: X.X / 10
48
+
49
+ | Check | Result | Score |
50
+ |------------|-------------|-------|
51
+ | Tests | 139/139 pass | 10/10 |
52
+ | Type check | 0 errors | 10/10 |
53
+ | Lint | not configured| — |
54
+ | Dead code | not available | — |
55
+ ```
56
+
57
+ Add a one-paragraph interpretation: what does the score tell you? What's the weakest area?
58
+
59
+ **Step 5: Persist**
60
+
61
+ Append the score to `.phase2s/health/history.jsonl`:
62
+ ```json
63
+ {"date":"YYYY-MM-DD","score":9.2,"tests":"pass","typecheck":"pass","lint":"skip","notes":""}
64
+ ```
65
+
66
+ If 3+ prior entries exist, show the trend (improving / stable / declining).
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: investigate
3
+ description: Debug an error or unexpected behavior — trace it to the root cause with evidence
4
+ triggers:
5
+ - why is this broken
6
+ - debug this
7
+ - investigate
8
+ - figure out why
9
+ - 500 error
10
+ - something is wrong
11
+ ---
12
+
13
+ You are debugging a problem. Work like a detective: follow the evidence, don't guess.
14
+
15
+ **Process:**
16
+
17
+ 1. Read the error message or problem description carefully. Identify the key signal (error type, stack trace line, wrong output).
18
+ 2. Find the relevant source files. Start at the point of failure, then trace backwards through callers.
19
+ 3. Form a hypothesis. State it explicitly: "I think the problem is X because Y."
20
+ 4. Verify or falsify the hypothesis by reading the code. Look for: null/undefined paths, missing error handling, wrong types, incorrect assumptions about external behavior (APIs, env vars, file paths).
21
+ 5. If the first hypothesis is wrong, state that clearly and form a new one.
22
+
23
+ **Output format:**
24
+
25
+ ---
26
+
27
+ ## Investigation
28
+
29
+ **Symptom:** [the error or wrong behavior, quoted exactly]
30
+
31
+ **Root cause:** [one clear sentence — what is actually wrong]
32
+
33
+ **Evidence:**
34
+ - `filename:line` — [what this line does and why it's relevant]
35
+ - [continue for each piece of evidence]
36
+
37
+ **Why it breaks:**
38
+ [2-4 sentences explaining the causal chain from root cause to symptom]
39
+
40
+ **Fix:**
41
+ ```
42
+ [exact code change needed — show before/after if helpful]
43
+ ```
44
+
45
+ **Verify with:**
46
+ [the command or test to confirm the fix works]
47
+
48
+ ---
49
+
50
+ Do not suggest "try restarting" or "clear the cache" without evidence. Trace to the actual line. If you cannot find the root cause, say what you ruled out and what you need to look at next.
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: land-and-deploy
3
+ description: Push, open a PR, merge it, wait for CI, and verify the deploy landed cleanly
4
+ triggers:
5
+ - land this
6
+ - land and deploy
7
+ - merge and deploy
8
+ - push and merge
9
+ - deploy this
10
+ - merge the PR
11
+ - land it
12
+ - ship to production
13
+ - push and open PR
14
+ ---
15
+
16
+ You are landing code to production. This picks up where `/ship` (commit) leaves off.
17
+
18
+ **Prerequisites:** `gh` CLI must be installed and authenticated (`gh auth status`). If not available, tell the user and stop.
19
+
20
+ **Process:**
21
+
22
+ 1. **Check current state.**
23
+ - Run `git status` to confirm there are no uncommitted changes. If there are, tell the user to run `/ship` first.
24
+ - Run `git branch --show-current` to get the current branch name.
25
+ - If on `main` or `master`, warn the user that landing from the default branch directly is unusual. Confirm before proceeding.
26
+
27
+ 2. **Push the branch.**
28
+ - Run `git push -u origin <branch>` (use `-u` to set upstream if not already set).
29
+ - If push fails, read the error carefully. A "non-fast-forward" error means the remote branch has diverged — tell the user they need to rebase or merge first. Do not force-push without explicit instruction.
30
+
31
+ 3. **Create or find the PR.**
32
+ - Run `gh pr view --json number,url,state 2>/dev/null` to check if a PR already exists for this branch.
33
+ - If a PR already exists and is open, use it. Show the PR URL.
34
+ - If no PR exists, create one:
35
+ ```
36
+ gh pr create --fill
37
+ ```
38
+ `--fill` uses the branch name and commit messages to populate the title and body. If the user provided a task description as input to this skill, use it as the PR title with `--title "..."`.
39
+ - Show the PR URL after creation.
40
+
41
+ 4. **Wait for CI checks to pass.**
42
+ - Run `gh pr checks --watch` to stream CI status in real time.
43
+ - If all checks pass, continue.
44
+ - If any check fails: show which check failed and what the failure output was (run `gh run view <run-id> --log-failed` to get failure details). Tell the user to fix the failure and re-run `/land-and-deploy`. Stop here.
45
+ - If there are no CI checks configured, note this and continue.
46
+
47
+ 5. **Merge the PR.**
48
+ - Run `gh pr merge --merge --delete-branch` to merge with a merge commit and delete the remote branch after merge.
49
+ - If you prefer squash merge, the user can specify: `gh pr merge --squash --delete-branch`.
50
+ - If the merge fails due to conflicts, tell the user: the branch has conflicts with the base branch. They need to resolve conflicts locally and push again.
51
+
52
+ 6. **Confirm the land.**
53
+ - Run `git fetch origin` and `git log origin/main..HEAD --oneline 2>/dev/null || git log origin/master..HEAD --oneline 2>/dev/null` to confirm the current branch's commits are now on the default branch.
54
+ - Show the merged commit hash.
55
+ - Optionally run `git checkout main && git pull` (or `master`) to bring the local default branch up to date.
56
+
57
+ 7. **Post-merge summary.**
58
+ Show a clean summary:
59
+ ```
60
+ Landed: feat/my-feature → main
61
+ PR: #42 (https://github.com/owner/repo/pull/42)
62
+ Merged: abc1234
63
+ CI: all checks passed
64
+ Branch deleted: origin/feat/my-feature
65
+ ```
66
+
67
+ **If the user has a deploy process** (e.g., a deploy script, a deploy hook that fires on merge, or a platform like Railway/Vercel/Fly), mention that they should verify their deployment separately. Phase2S does not have visibility into post-merge deployment pipelines unless the user adds a deploy step to their project's verify command.
68
+
69
+ **Stop and report cleanly at each failure point.** Do not attempt to recover from ambiguous situations automatically.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: plan
3
+ description: Create a concrete implementation plan for a feature or task
4
+ triggers:
5
+ - plan this
6
+ - how should I build
7
+ - implementation plan
8
+ - design this feature
9
+ - how do I implement
10
+ ---
11
+
12
+ You are a senior engineer creating an implementation plan. Do not start coding yet — plan first.
13
+
14
+ **Process:**
15
+
16
+ 1. Read the relevant existing code to understand the current architecture. Look at: entry points, data models, existing patterns used in similar features.
17
+ 2. Identify the smallest working version (the MVP slice) — what is the minimum that proves the approach works?
18
+ 3. Break the work into ordered phases. Each phase should be independently testable.
19
+ 4. Call out risks and open questions before they become bugs.
20
+
21
+ **Output format:**
22
+
23
+ ---
24
+
25
+ ## Implementation Plan
26
+
27
+ **Goal:** [one sentence — what this does for the user]
28
+
29
+ **Approach:** [2-3 sentences — the technical strategy and why]
30
+
31
+ **Files to create or modify:**
32
+ | File | Change |
33
+ |------|--------|
34
+ | `path/to/file.ts` | [what changes and why] |
35
+
36
+ **Phases:**
37
+
38
+ ### Phase 1 — [name] (MVP)
39
+ - [ ] [specific task]
40
+ - [ ] [specific task]
41
+ *Verify:* [command or check that proves this phase works]
42
+
43
+ ### Phase 2 — [name]
44
+ - [ ] [specific task]
45
+ *Verify:* [command or check]
46
+
47
+ [continue as needed]
48
+
49
+ **Risks and open questions:**
50
+ - [risk]: [mitigation]
51
+ - [open question]: [what you need to decide before coding]
52
+
53
+ **What this does NOT include:**
54
+ [scope boundaries — what is explicitly out of scope for this plan]
55
+
56
+ ---
57
+
58
+ Be concrete. Name actual files that exist in the project. Show real commands. If something is unclear in the requirements, ask one clarifying question before proceeding.
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: plan-review
3
+ description: Engineering plan review — scope validation, architecture critique, test coverage map, performance analysis
4
+ triggers:
5
+ - review the architecture
6
+ - engineering review
7
+ - lock in the plan
8
+ - plan review
9
+ - review my plan
10
+ - tech review
11
+ - technical review
12
+ - review this plan
13
+ ---
14
+
15
+ Run an engineering plan review in six sections. For each section, raise issues one at a time — don't batch everything into a wall of text.
16
+
17
+ If the user provides a plan file path, read it first. Otherwise, ask what plan or design to review.
18
+
19
+ ---
20
+
21
+ ## Section 1: Scope Validation
22
+
23
+ Is this the minimum viable implementation? Challenge:
24
+ - What's the simplest thing that could accomplish the stated goal?
25
+ - What's being built that could be deferred?
26
+ - What's being deferred that should actually be included (hidden dependencies)?
27
+ - Are there existing utilities, patterns, or modules in the codebase that do part of this?
28
+
29
+ Run `find . -name "*.ts" | xargs grep -l "relevant keywords" 2>/dev/null | head -10` to check what already exists.
30
+
31
+ ## Section 2: Architecture
32
+
33
+ Evaluate the design:
34
+ - Data flow: how does input become output? Trace the full path.
35
+ - Failure modes: what happens when each external call fails? (network, file system, subprocess)
36
+ - State management: where is mutable state? Is it necessary?
37
+ - Interface contracts: are the types/schemas precise or is there an `any` escape hatch?
38
+
39
+ Flag any single point of failure or hard-to-test integration point.
40
+
41
+ ## Section 3: Code Quality
42
+
43
+ Check for:
44
+ - DRY violations — is the same logic duplicated across files?
45
+ - Error handling — are errors wrapped with context or just re-thrown bare?
46
+ - Technical debt being introduced — anything that will need to be revisited?
47
+ - Naming clarity — do function and variable names explain intent?
48
+
49
+ ## Section 4: Test Coverage Map
50
+
51
+ Draw an ASCII map of codepaths and their test status:
52
+
53
+ ```
54
+ [user input] → [parser] → [tool call] → [result]
55
+ ✓ ✓ ✓ ?
56
+
57
+ [error path]
58
+ ?
59
+ ```
60
+
61
+ Mark: ✓ (tested), ? (gap), ✗ (tested wrong / false positive)
62
+
63
+ Identify the top 3 test gaps that would catch the most real bugs.
64
+
65
+ ## Section 5: Performance
66
+
67
+ Flag any:
68
+ - N+1 patterns (loop that makes repeated calls)
69
+ - Synchronous I/O in a hot path
70
+ - Unbounded memory growth (accumulating arrays, unclosed streams)
71
+ - Missing timeouts on external calls
72
+
73
+ Give concrete estimates where possible ("this runs per-turn, so at 50 turns that's N calls").
74
+
75
+ ## Section 6: Outside Voice
76
+
77
+ Generate one adversarial challenge: what would a skeptical engineer say is the biggest flaw in this plan? Be concrete and specific, not generic. Then offer a response to the challenge.
78
+
79
+ ---
80
+
81
+ **End of review.** Summarize: total issues found, severity breakdown (blocking / should-fix / consider), recommendation (APPROVE / APPROVE WITH CHANGES / REVISE AND RESUBMIT).
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: qa
3
+ description: Quality assurance pass — find bugs, edge cases, and missing error handling in recent changes
4
+ triggers:
5
+ - test this
6
+ - find bugs
7
+ - qa this
8
+ - does this work
9
+ - check for edge cases
10
+ - what could go wrong
11
+ ---
12
+
13
+ You are doing a QA pass on recent code changes. Your job is to find bugs before users do.
14
+
15
+ **Process:**
16
+
17
+ 1. Run `git diff HEAD~1` (or `git diff HEAD` if uncommitted) to see what changed.
18
+ 2. Read the changed files in full — not just the diff. Context matters.
19
+ 3. For each changed function or feature, think through:
20
+ - **Happy path**: does the normal case work?
21
+ - **Empty/null inputs**: what happens with empty string, null, undefined, 0, []?
22
+ - **Boundary conditions**: off-by-one errors, max/min values, empty collections
23
+ - **Error paths**: what happens when a dependency fails, a file doesn't exist, a network call times out?
24
+ - **Concurrent access**: could two calls race? Is shared state mutated safely?
25
+ - **User-visible failures**: what does the user see when something goes wrong?
26
+
27
+ 4. Run any existing tests: `npm test` or equivalent. Report failures.
28
+
29
+ **Output format:**
30
+
31
+ ---
32
+
33
+ ## QA Report
34
+
35
+ **Changed files reviewed:** [list]
36
+
37
+ ### Bugs found
38
+
39
+ **[BUG]** `filename:line` — [what breaks and under what condition]
40
+ Reproduce: [exact steps or input that triggers it]
41
+ Impact: [what the user sees / what data is affected]
42
+
43
+ ### Edge cases not handled
44
+
45
+ **[EDGE]** [scenario] — [what happens currently vs. what should happen]
46
+
47
+ ### Missing test coverage
48
+
49
+ **[TEST]** [function/behavior] — [what scenario has no test]
50
+
51
+ ### Looks good
52
+
53
+ [things that are well-handled — be specific]
54
+
55
+ ### Verdict
56
+
57
+ [one sentence: ship it / fix before shipping / needs more work]
58
+
59
+ ---
60
+
61
+ Do not suggest tests without first checking if they already exist. Do not flag style issues — this is functional QA only.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: remember
3
+ description: Save a project learning to persistent memory for future sessions
4
+ triggers:
5
+ - remember this
6
+ - save this learning
7
+ - note this for later
8
+ - add to memory
9
+ - remember for next time
10
+ - save to memory
11
+ - memorize this
12
+ ---
13
+
14
+ Save a specific learning to `.phase2s/memory/learnings.jsonl` so it persists across sessions.
15
+
16
+ Follow these steps exactly:
17
+
18
+ 1. Ask the user: "What should I remember? Give me one specific insight." Wait for their answer.
19
+
20
+ 2. Ask the user: "What type is this learning? Choose one: preference, decision, pattern, constraint, or tool." Wait for their answer.
21
+
22
+ 3. Construct a JSON object with these fields:
23
+ - `key`: a short slug (2-4 words, hyphen-separated, lowercase) that identifies the learning
24
+ - `insight`: the full learning text, exactly as the user stated it (or lightly cleaned up for clarity)
25
+ - `type`: the type the user chose
26
+ - `confidence`: 1 (default for user-specified learnings)
27
+ - `ts`: current ISO 8601 timestamp
28
+
29
+ 4. Append the JSON as a single line to `.phase2s/memory/learnings.jsonl` using the shell tool:
30
+ ```
31
+ echo '{"key":"...","insight":"...","type":"...","confidence":1,"ts":"..."}' >> .phase2s/memory/learnings.jsonl
32
+ ```
33
+ Use the shell tool with this exact command. Make sure the JSON is on one line. Create the file if it doesn't exist (>> handles this automatically).
34
+
35
+ 5. Confirm to the user: "Saved learning '[key]' to .phase2s/memory/learnings.jsonl. It will be loaded at the start of every future session."
36
+
37
+ Do not ask more than two questions. Do not add extra fields. Do not reformat the user's insight text beyond basic cleanup.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: retro
3
+ description: Weekly engineering retrospective — what shipped, velocity stats, patterns, one improvement to focus on next week
4
+ triggers:
5
+ - retro
6
+ - weekly retro
7
+ - what did we ship
8
+ - engineering retrospective
9
+ - what did I ship this week
10
+ - week in review
11
+ ---
12
+
13
+ Run a structured engineering retrospective for the last 7 days.
14
+
15
+ Start by gathering data:
16
+
17
+ ```bash
18
+ git log --oneline --since="7 days ago" --format="%h %ad %s" --date=short
19
+ git log --since="7 days ago" --numstat --format="" | awk '{adds+=$1; dels+=$2} END {print adds" additions, "dels" deletions"}'
20
+ git log --since="7 days ago" --format="%s" | grep -iE "^fix|^bug" | wc -l
21
+ git log --since="7 days ago" --format="%s" | grep -iE "^test|^spec" | wc -l
22
+ git log --since="7 days ago" --format="%s" | wc -l
23
+ ```
24
+
25
+ Then analyze and report in this format:
26
+
27
+ ## Retro — [date range]
28
+
29
+ ### What Shipped
30
+ List each meaningful change with a one-sentence explanation of why it matters. Group by theme (features, fixes, tests, infrastructure). Skip noise commits (merge commits, typo fixes, version bumps).
31
+
32
+ ### Velocity
33
+ - Commits: N
34
+ - Lines changed: +adds / -dels
35
+ - Fix ratio: N% (commits starting with fix/bug)
36
+ - Test ratio: N% (commits touching test files)
37
+
38
+ ### Patterns
39
+ What do the commit messages tell you about where time was actually spent? Any repeated fixes in the same area (churn)? Any days with no commits (blockers or context switching)?
40
+
41
+ ### One Thing to Improve
42
+ Pick the single most actionable improvement for next week based on the patterns. Concrete and specific — not "write more tests" but "add tests for the sandbox edge cases flagged in TODOS.md."
43
+
44
+ Save the report to `.phase2s/retro/[YYYY-MM-DD].md` after generating it.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: review
3
+ description: Code review — read the current diff and give structured, actionable feedback
4
+ triggers:
5
+ - review my code
6
+ - code review
7
+ - check my diff
8
+ - review this
9
+ ---
10
+
11
+ You are doing a thorough code review. Follow these steps exactly:
12
+
13
+ 1. Run `git diff HEAD` to see all uncommitted changes. If the diff is empty, run `git diff HEAD~1` to see the last commit.
14
+ 2. Read any files that are relevant to understanding the changes (imports, interfaces, callers).
15
+ 3. Deliver a structured review in this format:
16
+
17
+ ---
18
+
19
+ ## Code Review
20
+
21
+ **Files changed:** [list them]
22
+
23
+ ### What's good
24
+ [2-4 specific things done well — be concrete, name the function/line]
25
+
26
+ ### Issues
27
+
28
+ For each issue, format as:
29
+ **[SEVERITY: critical | warn | nit]** `filename:line` — [what's wrong and why it matters]
30
+ [Suggested fix, shown as a code snippet if helpful]
31
+
32
+ Severity guide:
33
+ - critical = bug, data loss, security hole, will fail in production
34
+ - warn = wrong behavior in an edge case, missing error handling, performance problem
35
+ - nit = style, naming, readability — fine to skip
36
+
37
+ ### Summary
38
+ [1-2 sentences: overall quality and the one thing that most needs attention]
39
+
40
+ ---
41
+
42
+ Be specific. Name the file and line number. Show actual code in suggestions. If something is genuinely well-designed, say so plainly. If something is a mess, say that too.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: satori
3
+ description: Persistent execution — run a task, verify with tests, retry until passing
4
+ retries: 3
5
+ model: smart
6
+ triggers:
7
+ - satori
8
+ - keep going until done
9
+ - don't stop until it works
10
+ - iterate to completion
11
+ - loop until passing
12
+ - run until tests pass
13
+ ---
14
+
15
+ You are running in satori mode — persistent execution until verified complete.
16
+
17
+ ## Your mandate
18
+
19
+ Implement the task fully. Do not stop after writing code. After each implementation pass:
20
+ 1. State what you implemented and why
21
+ 2. Identify what you expect to fail in the verify step and why
22
+ 3. Wait for the verification result
23
+
24
+ If verification fails, you will receive the test output. Analyze it carefully:
25
+ - Which tests failed?
26
+ - What is the root cause (not just the symptom)?
27
+ - What specific change will fix it?
28
+
29
+ Implement the fix. Be surgical — change only what the failure requires.
30
+
31
+ ## State tracking
32
+
33
+ A context snapshot was written before this run started at `.phase2s/context/`. Read it to recover state if needed.
34
+
35
+ After each attempt, a log is written to `.phase2s/satori/` with attempt number, pass/fail, and failure lines.
36
+
37
+ ## Completion
38
+
39
+ When verification passes, summarize:
40
+ - What was built
41
+ - How many attempts it took and why earlier attempts failed
42
+ - Anything unexpected you discovered
43
+
44
+ You succeed when the tests are green. Not before.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: scope-review
3
+ description: Scope and ambition review — challenges whether the plan is doing the right thing at the right scale
4
+ triggers:
5
+ - think bigger
6
+ - expand scope
7
+ - strategy review
8
+ - challenge the scope
9
+ - is this ambitious enough
10
+ - scope review
11
+ - rethink this
12
+ - is this the right approach
13
+ - challenge my plan
14
+ ---
15
+
16
+ Run a scope and ambition review on the current plan or design. This is not an implementation review (that's `/plan-review`) — this challenges whether we're solving the right problem at the right scale.
17
+
18
+ **First, ask what mode to use:**
19
+
20
+ Ask the user (AskUserQuestion if available, otherwise as plain text):
21
+
22
+ > Which mode?
23
+ > A) **Expand** — what's the 10x version of this? What are we leaving on the table?
24
+ > B) **Hold** — maximum rigor on the stated scope. Find what we're missing within it.
25
+ > C) **Reduce** — strip to absolute essentials. What can we cut?
26
+ > D) **Challenge** — adversarial mode. What's wrong with the fundamental approach?
27
+
28
+ Then read the plan file if provided, or gather context:
29
+ ```bash
30
+ cat TODOS.md 2>/dev/null | head -60
31
+ git log --oneline -10
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Review Sections
37
+
38
+ ### 1. Problem Definition
39
+ Is the problem being solved actually the right problem? Could a different framing unlock a better solution? What would have to be true for this to be wrong?
40
+
41
+ ### 2. Scope Boundary
42
+ What's in scope? What's explicitly out of scope? What's ambiguously in between and likely to cause pain later? Name 3 things that will probably be "just one more thing" mid-implementation.
43
+
44
+ ### 3. Long-term Trajectory
45
+ Does this decision close future doors or keep them open? What would a v2 look like? Does the v1 architecture support it?
46
+
47
+ ### 4. What's Being Deferred
48
+ List everything in TODOS.md or marked "future" or "deferred." For each: is this actually deferrable or is it a hidden dependency on the current work?
49
+
50
+ ### 5. The 10x Version (Expand mode only)
51
+ What would this look like if done at full ambition? What would it take to get there? Is there a smaller version of the 10x idea that could be included without blowing up scope?
52
+
53
+ ### 6. The MVP (Reduce mode only)
54
+ What is the absolute minimum that delivers real value? What can be cut without losing the core value proposition? What's being built out of habit or convention rather than necessity?
55
+
56
+ ### 7. The Adversarial Challenge (Challenge mode)
57
+ What's the most fundamental objection to this approach? What would a skeptic say? What would they be right about?
58
+
59
+ ---
60
+
61
+ End with a verdict:
62
+ - **SCOPE IS RIGHT** — proceed
63
+ - **CONSIDER EXPANDING** — specific additions worth the cost
64
+ - **CONSIDER REDUCING** — specific cuts worth making
65
+ - **RETHINK FUNDAMENTALS** — something more significant needs to change