bigpowers 1.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 (96) hide show
  1. package/.gitmessage +5 -0
  2. package/.releaserc.json +17 -0
  3. package/CHANGELOG.md +61 -0
  4. package/CLAUDE.md +61 -0
  5. package/CONVENTIONS.md +140 -0
  6. package/GEMINI.md +53 -0
  7. package/LICENSE +21 -0
  8. package/README.md +116 -0
  9. package/RELEASE.md +108 -0
  10. package/SKILL-INDEX.md +146 -0
  11. package/assess-impact/SKILL.md +76 -0
  12. package/audit-code/HEURISTICS.md +43 -0
  13. package/audit-code/SKILL.md +81 -0
  14. package/bin/bigpowers.js +27 -0
  15. package/change-request/REFERENCE.md +60 -0
  16. package/change-request/SKILL.md +42 -0
  17. package/commit-message/REFERENCE.md +81 -0
  18. package/commit-message/SKILL.md +39 -0
  19. package/countable-story-format.md +293 -0
  20. package/craft-skill/REFERENCE.md +88 -0
  21. package/craft-skill/SKILL.md +55 -0
  22. package/deepen-architecture/DEEPENING.md +37 -0
  23. package/deepen-architecture/INTERFACE-DESIGN.md +44 -0
  24. package/deepen-architecture/LANGUAGE.md +53 -0
  25. package/deepen-architecture/SKILL.md +76 -0
  26. package/define-language/SKILL.md +75 -0
  27. package/define-success/SKILL.md +60 -0
  28. package/delegate-task/SKILL.md +70 -0
  29. package/design-interface/SKILL.md +94 -0
  30. package/develop-tdd/SKILL.md +160 -0
  31. package/develop-tdd/deep-modules.md +33 -0
  32. package/develop-tdd/interface-design.md +31 -0
  33. package/develop-tdd/mocking.md +59 -0
  34. package/develop-tdd/refactoring.md +10 -0
  35. package/develop-tdd/tests.md +71 -0
  36. package/dispatch-agents/SKILL.md +72 -0
  37. package/edit-document/SKILL.md +14 -0
  38. package/elaborate-spec/SKILL.md +79 -0
  39. package/enforce-first/SKILL.md +75 -0
  40. package/execute-plan/SKILL.md +84 -0
  41. package/grill-me/REFERENCE.md +63 -0
  42. package/grill-me/SKILL.md +25 -0
  43. package/guard-git/REFERENCE.md +136 -0
  44. package/guard-git/SKILL.md +39 -0
  45. package/guard-git/scripts/block-dangerous-git.sh +41 -0
  46. package/guard-git/scripts/lib/git-guardrails-core.sh +29 -0
  47. package/hook-commits/SKILL.md +91 -0
  48. package/hooks/pre-tool-use.sh +130 -0
  49. package/index.js +6 -0
  50. package/inspect-quality/SKILL.md +101 -0
  51. package/investigate-bug/SKILL.md +111 -0
  52. package/kickoff-branch/SKILL.md +87 -0
  53. package/map-codebase/SKILL.md +66 -0
  54. package/migrate-spec/REFERENCE-GSD.md +137 -0
  55. package/migrate-spec/REFERENCE.md +186 -0
  56. package/migrate-spec/SKILL.md +150 -0
  57. package/model-domain/ADR-FORMAT.md +47 -0
  58. package/model-domain/CONTEXT-FORMAT.md +77 -0
  59. package/model-domain/SKILL.md +82 -0
  60. package/opencode.json +4 -0
  61. package/orchestrate-project/REFERENCE.md +89 -0
  62. package/orchestrate-project/SKILL.md +59 -0
  63. package/organize-workspace/REFERENCE.md +80 -0
  64. package/organize-workspace/SKILL.md +74 -0
  65. package/package.json +45 -0
  66. package/plan-refactor/SKILL.md +75 -0
  67. package/plan-release/SKILL.md +75 -0
  68. package/plan-work/SKILL.md +124 -0
  69. package/playwright.config.ts +56 -0
  70. package/release-branch/SKILL.md +116 -0
  71. package/request-review/SKILL.md +70 -0
  72. package/respond-review/SKILL.md +68 -0
  73. package/scripts/audit-compliance.sh +256 -0
  74. package/scripts/cleanup-worktrees.sh +44 -0
  75. package/scripts/install-cursor-skills-local.sh +13 -0
  76. package/scripts/install-cursor-skills.sh +34 -0
  77. package/scripts/install.sh +240 -0
  78. package/scripts/project-survey.sh +54 -0
  79. package/scripts/sync-skills.sh +110 -0
  80. package/seed-conventions/SKILL.md +185 -0
  81. package/session-state/SKILL.md +69 -0
  82. package/skills-lock.json +157 -0
  83. package/spike-prototype/SKILL.md +92 -0
  84. package/survey-context/SKILL.md +93 -0
  85. package/terse-mode/SKILL.md +35 -0
  86. package/trace-requirement/SKILL.md +68 -0
  87. package/using-bigpowers/SKILL.md +65 -0
  88. package/validate-fix/SKILL.md +93 -0
  89. package/visual-dashboard/SKILL.md +49 -0
  90. package/visual-dashboard/scripts/frame-template.html +189 -0
  91. package/visual-dashboard/scripts/helper.js +83 -0
  92. package/visual-dashboard/scripts/server.cjs +345 -0
  93. package/visual-dashboard/scripts/start-server.sh +121 -0
  94. package/visual-dashboard/scripts/stop-server.sh +46 -0
  95. package/wire-observability/SKILL.md +90 -0
  96. package/write-document/SKILL.md +63 -0
@@ -0,0 +1,89 @@
1
+ # Orchestrate Reference: Phases, Modes, and Workflows
2
+
3
+ Detailed documentation for the `orchestrate-project` meta-skill.
4
+
5
+ ## The 6-Phase Core Loop
6
+
7
+ ### PHASE 1: DISCOVER
8
+ - **Goal**: Understand the problem completely and map existing context.
9
+ - **Deliverables**: `PROJECT.md`, `CONTEXT.md`.
10
+ - **Skills**: `survey-context`, `elaborate-spec`, `grill-me`.
11
+ - **Gate**: Confirm ("Is the problem clear?").
12
+
13
+ ### PHASE 2: ELABORATE
14
+ - **Goal**: Research solutions and lock architectural design.
15
+ - **Deliverables**: `RESEARCH.md`, ADRs (Architecture Decision Records).
16
+ - **Skills**: `model-domain`, `define-language`, `challenge-design`.
17
+ - **Gate**: Quality ≥94% (via `request-review`) + Confirm ("Are decisions locked?").
18
+
19
+ ### PHASE 3: PLAN
20
+ - **Goal**: Write a verifiable implementation plan with success criteria.
21
+ - **Deliverables**: `PLAN.md` with `verify:` commands.
22
+ - **Skills**: `scope-work`, `slice-tasks`, `define-success`, `plan-work`.
23
+ - **Gate**: Quality (request-review ≥94%) + slopcheck [SUS]/[SLOP].
24
+
25
+ ### PHASE 4: BUILD
26
+ - **Goal**: Execute the plan step-by-step using TDD and vertical slices.
27
+ - **Deliverables**: Code, `SUMMARY.md`.
28
+ - **Skills**: `kickoff-branch`, `develop-tdd`, `delegate-task`, `execute-plan`.
29
+ - **Gate**: Integration tests PASS.
30
+
31
+ ### PHASE 5: VERIFY
32
+ - **Goal**: Validate success criteria and ensure production readiness.
33
+ - **Deliverables**: `VERIFICATION.md`, audit results.
34
+ - **Skills**: `validate-fix`, `audit-code`, `request-review`.
35
+ - **Gate**: Quality ≥94%, coverage ≥95%, audits ≥93%.
36
+
37
+ ### PHASE 6: RELEASE
38
+ - **Goal**: Ship to production with full traceability.
39
+ - **Deliverables**: Release tag (vX.Y.Z), release notes.
40
+ - **Skills**: `commit-message`, `release-branch`.
41
+ - **Gate**: Safety ("About to push to main. Confirm?").
42
+
43
+ ---
44
+
45
+ ## Orchestration Modes
46
+
47
+ ### Mode 1: Standard (Enforce All Gates)
48
+ **Use Case**: New features, major refactors, architectural changes.
49
+ **Behavior**:
50
+ - All Confirm gates require explicit user approval.
51
+ - All Quality gates are hard stops if threshold is not met.
52
+ - No shortcuts or phase skipping.
53
+
54
+ ### Mode 2: Fast-Track (Skip Negotiable Gates)
55
+ **Use Case**: Hotfixes, minor improvements, refactors on well-tested code.
56
+ **Behavior**:
57
+ - Skip Discover if `PROJECT.md` exists.
58
+ - Skip Elaborate if design decisions are already locked.
59
+ - Skip Verify if coverage ≥95% + all tests PASS.
60
+ - Soft gates auto-approve if baseline conditions are met.
61
+
62
+ ### Mode 3: Ad-Hoc (Legacy, Warnings Only)
63
+ **Use Case**: Exploration, prototyping, spikes (NOT for production).
64
+ **Behavior**:
65
+ - Gates emit warnings but do not block execution.
66
+ - User can manually skip any phase.
67
+ - No enforced quality thresholds.
68
+
69
+ ---
70
+
71
+ ## Gate & Checkpoint Types
72
+ *See `docs/references/gates.md` and `docs/references/checkpoints.md` for full specs.*
73
+
74
+ - **Confirm**: Requires human "yes/no" decision.
75
+ - **Quality**: Automated threshold check (e.g., coverage, audit score).
76
+ - **Safety**: Destructive actions require risk acknowledgment.
77
+ - **Transition**: Mandatory artifact presence check.
78
+ - **slopcheck**: Identification of [SUS] (Suspicious) or [SLOP] (High-risk) packages.
79
+
80
+ ---
81
+
82
+ ## Error Recovery & State
83
+ Orchestrate maintains `specs/STATE.md` to track:
84
+ - **Current Phase**: Position in the loop.
85
+ - **Artifacts**: Checklist of completed deliverables.
86
+ - **Decisions**: Audit trail of architectural choices.
87
+ - **Risks**: Active project risks and mitigation status.
88
+
89
+ In the event of a crash or exit, run `claude /orchestrate --resume` to pick up exactly where the session left off.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: orchestrate-project
3
+ description: Meta-skill that enforces the 6-phase core loop (discover → elaborate → plan → build → verify → release) with hard gates. Use to coordinate multi-phase projects with guaranteed quality checkpoints. One-time command for the entire project lifecycle.
4
+ ---
5
+
6
+ # Orchestrate
7
+
8
+ The orchestrate skill coordinates projects through a prescriptive 6-phase core loop with hard gates, ensuring consistent quality and preventing scope creep.
9
+
10
+ ## Quick Start
11
+
12
+ ```bash
13
+ # Start a new project (creates PROJECT.md and begins discover phase)
14
+ claude /orchestrate --mode standard
15
+
16
+ # Or resume an existing project at the current phase
17
+ claude /orchestrate --mode standard --resume
18
+
19
+ # For low-risk scenarios (hotfixes, refactors on well-tested code)
20
+ claude /orchestrate --mode fast-track
21
+ ```
22
+
23
+ ## The 6-Phase Core Loop
24
+
25
+ 1. **DISCOVER** (3-6 hours): Understand problem. Deliverables: PROJECT.md, CONTEXT.md.
26
+ 2. **ELABORATE** (3-6 hours): Research solutions. Deliverables: RESEARCH.md.
27
+ 3. **PLAN** (2-4 hours): Write verifiable plan. Deliverables: PLAN.md.
28
+ 4. **BUILD** (1-8 hours): Execute plan. Deliverables: Code, SUMMARY.md.
29
+ 5. **VERIFY** (1-3 hours): Validate success criteria. Deliverables: VERIFICATION.md.
30
+ 6. **RELEASE** (30 min - 2 hours): Ship to production. Deliverables: Release tag.
31
+
32
+ See [REFERENCE.md](REFERENCE.md) for detailed phase specifications and gate types.
33
+
34
+ ## How Orchestrate Works
35
+
36
+ 1. **Maintains STATE.md** — Tracks current phase, artifacts, decisions, risks.
37
+ 2. **Spawns appropriate skills** — Calls survey-context, elaborate-spec, plan-work, etc.
38
+ 3. **Enforces gates** — Hard stops if success criteria not met.
39
+ 4. **The Gatekeeper** (v1.19.0) — Between every Story implementation in PHASE 4:
40
+ - READ `specs/RELEASE-PLAN.md` to verify completion.
41
+ - REQUIRE that the previous Story is marked `[x] Done`.
42
+ - REFUSE to call `update_topic` for a new Story until the previous one is physically evidenced as complete.
43
+ 5. **Pauses for confirmation** — After each phase, asks "Ready to proceed?".
44
+ 6. **Archives history** — Saves PLAN.md as specs/PLAN-vX.Y.Z.md.
45
+
46
+ ## Orchestration Modes
47
+
48
+ - **Standard**: Enforce all gates. Use for new features and major refactors.
49
+ - **Fast-Track**: Skip negotiable gates. Use for hotfixes and minor improvements.
50
+ - **Ad-Hoc**: Warnings only. Use for prototyping and spikes (non-production).
51
+
52
+ See [REFERENCE.md](REFERENCE.md) for full mode behaviors.
53
+
54
+ ## Verification
55
+
56
+ All phases complete with artifacts:
57
+ ```bash
58
+ verify: test -f specs/PROJECT.md && test -f specs/PLAN.md && test -f specs/VERIFICATION.md && echo "✅ All phases complete"
59
+ ```
@@ -0,0 +1,80 @@
1
+ # clean-my-room — reference patterns
2
+
3
+ Optional commands for the agent. Adapt paths; **dry-run** before bulk delete.
4
+
5
+ ## Discover large top-level entries
6
+
7
+ ```sh
8
+ du -sh ./* .[!.]* 2>/dev/null | sort -hr | head -30
9
+ ```
10
+
11
+ ## Find common logs (respect `.gitignore` when using fd)
12
+
13
+ ```sh
14
+ fd -t f '\.log$' . 2>/dev/null
15
+ fd 'npm-debug' . 2>/dev/null
16
+ ```
17
+
18
+ ## Find build-like dirs (review list before `rm -rf`)
19
+
20
+ ```sh
21
+ fd -t d '^(dist|build|out|target|\.next|coverage)$' . --max-depth 3 2>/dev/null
22
+ ```
23
+
24
+ ## Stray markdown at repo root (heuristic)
25
+
26
+ ```sh
27
+ ls -1 ./*.md 2>/dev/null
28
+ fd -t f '^(draft|scratch|untitled|TODO|notes)' . --max-depth 1 2>/dev/null
29
+ ```
30
+
31
+ ## Git-safe moves
32
+
33
+ ```sh
34
+ git status -sb
35
+ git check-ignore -v <path> # was ignored?
36
+ # Tracked: git mv old new
37
+ # Untracked: mkdir -p … && mv old new
38
+ ```
39
+
40
+ ## `.gitignore` revision (after cleanup)
41
+
42
+ **Goal:** stop regenerated junk from polluting `git status`, without hiding real source.
43
+
44
+ 1. **Read** root `.gitignore` and, in monorepos, `apps/*/.gitignore` / `packages/*/.gitignore` as needed. Check **`.git/info/exclude`** for machine-only rules that should *not* be committed (keep personal noise there; don’t copy into shared `.gitignore` unless the team agrees).
45
+ 2. **Per-path checks** (last match wins; shows which file defined the rule):
46
+
47
+ ```sh
48
+ git check-ignore -v path/to/artifact
49
+ git status -u --ignored # optional: see ignored names (noisy)
50
+ ```
51
+
52
+ 3. **Pattern style**
53
+ - Leading `/` = relative to the `.gitignore`’s directory (e.g. `/dist/` = only that folder at that level, not all nested `dist` unless intended).
54
+ - `**` for deep trees, e.g. `**/*.log`, when noise appears at many depths.
55
+ - **Negation** (`!`) is tricky: later rules, parent dirs, and `git add -f` interact—prefer narrow positive ignores over `!` unless you already use negation in that file.
56
+ 4. **Do not** add rules that would ignore: application source, small JSON/YAML config the repo tracks, or `!important` assets. When unsure, run `git check-ignore -v` on a *known good* file that must stay tracked.
57
+ 5. **Tracked but should be ignored** (user already committed `build/` once): this skill does not silently fix history; flag `git rm -r --cached <path>` + `.gitignore` as a **separate** explicit step the user must approve.
58
+ 6. **Global excludes** (optional heads-up for “why is this still ignored?”):
59
+
60
+ ```sh
61
+ git config --get core.excludesfile
62
+ ```
63
+
64
+ ## Safety: never pass through these in automated deletes
65
+
66
+ - `.git/`, `.svn/`, `.hg/`
67
+ - `node_modules/`, `vendor/`, `venv/`, `.venv/`, `__pypackages__/`
68
+ - Files matching `.env`, `.env.*` (except `.env.example` if intentional)
69
+ - `~/.ssh`, `id_rsa*`, `*.pem` inside project trees
70
+
71
+ ## Post-deploy / server-ish extras (name buckets to stack)
72
+
73
+ - Docker: dangling images/volumes (only if user asked for Docker cleanup; requires `docker` context).
74
+ - CI: `*.log` under `build/`, artifact dirs from previous runs.
75
+ - K8s: local `*.kube`, tmp kubeconfigs—list only; do not delete without confirmation.
76
+
77
+ ## Inspiration
78
+
79
+ - Same **inventory → plan → confirm → act** flow as [post-deploy environment cleanup](https://mcpmarket.com/tools/skills/post-deploy-environment-cleanup) style workflows.
80
+ - [Agent template public](https://github.com/matsuni-kk/agent_template_public): honor **Flow** (draft) vs **Stock** (stable); do not “clean” user drafts from Flow without explicit approval.
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: organize-workspace
3
+ description: Scans the active workspace for disposable artifacts—logs, caches, stale build output, and stray draft markdown—and proposes consolidation of scattered assets. Produces a reviewable list, asks for explicit confirmation before any delete or move, and optionally revises .gitignore. Use when the user says "clean my room", "organize workspace", "workspace cleanup", "remove temp files", "organize assets", "gitignore", or wants a safe tidy pass.
4
+ ---
5
+
6
+ # Organize Workspace
7
+
8
+ ## Principles
9
+
10
+ - **Read-only first**: inventory and size (`du`, `ls -la`) before any change.
11
+ - **Never delete or move** without a numbered list and **explicit user approval** (item-level or "approve all").
12
+ - **Prefer `fd` / `ripgrep` / `find`** in that order; avoid blind `rm -rf` on vague globs.
13
+ - **Do not** touch `.git/`, `node_modules/`, `venv/`, `.env*`, or SSH keys; flag them only if the user asked about them.
14
+ - Confirm prompts in the **user's language** if they are not writing in English.
15
+
16
+ ## 1. Establish scope
17
+
18
+ - Default: **current project root** (where the user is working) or the path they name.
19
+ - Record OS (macOS vs Linux) for ignore patterns (e.g. `.DS_Store`).
20
+
21
+ ## 2. Classify candidates (scan)
22
+
23
+ Group findings under these **buckets**:
24
+
25
+ | Bucket | Examples | Typical action |
26
+ |--------|----------|----------------|
27
+ | **Logs & temp** | `*.log`, `logs/`, `tmp/`, `temp/`, `*.pid` | Delete after confirm |
28
+ | **Build / cache** | `dist/`, `build/`, `.next/`, `coverage/`, `.turbo/` | Delete if rebuildable |
29
+ | **Package caches** | root `.cache/`, `__pycache__/` | Offer delete |
30
+ | **Stray drafts** | root-level `*.md` named `draft`, `scratch`, `temp` | User picks: delete, move to `specs/`, or keep |
31
+ | **Duplicate / dump dirs** | `old/`, `backup/`, `copy/`, `*_backup` | List + ask |
32
+
33
+ Use quick size hints: `du -sh` per top-level dir; sort large items first.
34
+
35
+ ## 3. Assets & data (organize, not only delete)
36
+
37
+ If the user wants **organization**:
38
+
39
+ 1. Propose a **single convention**, e.g.:
40
+ - `assets/` — images, fonts, static media
41
+ - `data/` — JSON, CSV, fixtures, samples
42
+ - `specs/` — all planning and domain documents
43
+ 2. For each cluster of loose files, suggest **one target path** and a short rationale.
44
+ 3. Use **git-aware moves** when in a repo: `git mv` if tracked; otherwise `mv` and report.
45
+ 4. Never move secrets or production DB dumps into `docs/` or public `assets/`.
46
+
47
+ ## 4. Present the plan
48
+
49
+ Output a table or numbered list:
50
+
51
+ - Path
52
+ - Kind (log / build / draft / asset / other)
53
+ - Approx size
54
+ - Proposed action: **delete** | **move to …** | **keep**
55
+
56
+ Ask: *"Delete items 1–3? Move 4–5? Skip 6?"*
57
+
58
+ ## 5. Execute after approval
59
+
60
+ - Deletes: on macOS, prefer a Trash-capable tool (e.g. `trash` from Homebrew) if installed; else `rm` with paths echoed back.
61
+ - Moves: create dirs with `mkdir -p` first; one batch at a time.
62
+ - **Verify**: re-run listing on affected parents; if anything failed, report stderr.
63
+
64
+ ## 6. Post-cleanup and `.gitignore` revision
65
+
66
+ Do this when the repo is under Git and the cleanup surfaced **untracked** noise:
67
+
68
+ 1. **Inventory ignore sources**: root `.gitignore`, `.git/info/exclude`, any subpackage `.gitignore` files.
69
+ 2. **Map findings to rules**: for each deleted or recurring artifact class, check whether a pattern already exists; note gaps.
70
+ 3. **Propose a patch**: list only **concrete** changes — `+` add / `-` remove / `~` reword — with one-line why.
71
+ 4. **User must approve** the exact diff before editing the file.
72
+ 5. **Verify**: run `git check-ignore -v <path>` on 2–3 representative paths.
73
+
74
+ See [REFERENCE.md](REFERENCE.md) for shell patterns, `.gitignore` mechanics, and safety checks.
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "bigpowers",
3
+ "version": "1.0.0",
4
+ "description": "44 agent skills for spec-driven, test-first software development by solo developers",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "sync": "bash scripts/sync-skills.sh",
8
+ "install": "bash scripts/install.sh",
9
+ "postinstall": "bash scripts/sync-skills.sh && bash scripts/install.sh",
10
+ "release": "semantic-release"
11
+ },
12
+ "keywords": [
13
+ "skills",
14
+ "agents",
15
+ "claude",
16
+ "development",
17
+ "spec-driven",
18
+ "test-first"
19
+ ],
20
+ "author": "Daniel",
21
+ "license": "MIT",
22
+ "homepage": "https://github.com/danielvm-git/bigpowers#readme",
23
+ "bugs": {
24
+ "url": "https://github.com/danielvm-git/bigpowers/issues"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/danielvm-git/bigpowers.git"
29
+ },
30
+ "bin": {
31
+ "bigpowers": "./bin/bigpowers.js"
32
+ },
33
+ "engines": {
34
+ "node": ">=14.0.0"
35
+ },
36
+ "devDependencies": {
37
+ "@semantic-release/changelog": "^6.0.3",
38
+ "@semantic-release/commit-analyzer": "^11.1.0",
39
+ "@semantic-release/git": "^10.0.1",
40
+ "@semantic-release/github": "^9.2.6",
41
+ "@semantic-release/npm": "^11.0.3",
42
+ "@semantic-release/release-notes-generator": "^12.1.0",
43
+ "semantic-release": "^22.0.12"
44
+ }
45
+ }
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: plan-refactor
3
+ description: Create a detailed refactor plan with tiny commits via user interview, then save it as specs/REFACTOR.md. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.
4
+ ---
5
+
6
+ # Plan Refactor
7
+
8
+ Create a detailed refactor plan through a user interview. Save output to `specs/REFACTOR.md`.
9
+
10
+ ## Steps
11
+
12
+ 1. Ask the user for a long, detailed description of the problem they want to solve and any potential ideas for solutions.
13
+
14
+ 2. Explore the repo to verify their assertions and understand the current state of the codebase.
15
+
16
+ 3. Ask whether they have considered other options, and present other options to them.
17
+
18
+ 4. Interview the user about the implementation. Be extremely detailed and thorough.
19
+
20
+ 5. Hammer out the exact scope of the implementation. Work out what you plan to change and what you plan not to change.
21
+
22
+ 6. Look in the codebase to check for test coverage of this area. If there is insufficient test coverage, ask the user what their plans for testing are.
23
+
24
+ 7. Break the implementation into a plan of tiny commits. Remember Martin Fowler's advice: "make each refactoring step as small as possible, so that you can always see the program working."
25
+
26
+ 8. Save the refactor plan to `specs/REFACTOR.md`. Create the `specs/` directory if it doesn't exist.
27
+
28
+ <refactor-plan-template>
29
+
30
+ ## Problem Statement
31
+
32
+ The problem that the developer is facing, from the developer's perspective.
33
+
34
+ ## Solution
35
+
36
+ The solution to the problem, from the developer's perspective.
37
+
38
+ ## Commits
39
+
40
+ A LONG, detailed implementation plan. Write the plan in plain English, breaking down the implementation into the tiniest commits possible. Each commit should leave the codebase in a working state.
41
+
42
+ Each commit entry follows this format:
43
+ ```
44
+ N. <commit description> → verify: <runnable command>
45
+ ```
46
+
47
+ ## Decision Document
48
+
49
+ A list of implementation decisions that were made:
50
+
51
+ - The modules that will be built/modified
52
+ - The interfaces of those modules that will be modified
53
+ - Technical clarifications from the developer
54
+ - Architectural decisions
55
+ - Schema changes, API contracts, specific interactions
56
+
57
+ Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
58
+
59
+ ## Testing Decisions
60
+
61
+ - A description of what makes a good test (only test external behavior, not implementation details)
62
+ - Which modules will be tested
63
+ - Prior art for the tests (i.e. similar types of tests in the codebase)
64
+
65
+ ## Out of Scope
66
+
67
+ A description of the things that are out of scope for this refactor.
68
+
69
+ ## Further Notes (optional)
70
+
71
+ Any further notes about the refactor.
72
+
73
+ </refactor-plan-template>
74
+
75
+ After writing `specs/REFACTOR.md`, suggest running `kickoff-branch` next to create a refactor branch.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: plan-release
3
+ description: Convert elaborated specs into a structured release plan with Gherkin acceptance criteria and WSJF-sorted epics. Produces specs/RELEASE-PLAN.md. Use when a spec is clear and ready to plan, after elaborate-spec, or when the user wants a release plan broken into epics and stories.
4
+ ---
5
+
6
+ # Plan Release
7
+
8
+ > **HARD GATE** — Do NOT run this skill unless `elaborate-spec` has produced a clear spec or the user has already defined the feature in detail. If the problem is still fuzzy, run `elaborate-spec` first.
9
+
10
+ Synthesize the conversation context into `specs/RELEASE-PLAN.md`. No new interview — only clarify if something is genuinely ambiguous.
11
+
12
+ ## Process
13
+
14
+ ### 1. Draft epics and stories
15
+
16
+ From the conversation context, define:
17
+ - **Epics** — major capability areas (Priority: P1/P2/P3 | Value: High/Med/Low | Effort: S/M/L)
18
+ - **Stories** — "As a [actor], I want [feature] so that [benefit]"
19
+
20
+ WSJF-sort epics: score = (Business Value + Time Criticality + Risk Reduction) / Job Size. Highest score first.
21
+
22
+ ### 2. Write acceptance criteria (Gherkin)
23
+
24
+ For each story, write at least one happy-path and one edge-case scenario:
25
+
26
+ ```
27
+ Acceptance Criteria:
28
+ Feature: [name]
29
+ Scenario: [happy path]
30
+ Given [initial state]
31
+ When [user action]
32
+ Then [observable outcome]
33
+ Scenario: [edge case]
34
+ Given ...
35
+ When ...
36
+ Then ...
37
+ ```
38
+
39
+ ### 3. Write tasks with verify commands
40
+
41
+ Under each story, list implementation tasks:
42
+
43
+ ```
44
+ Tasks:
45
+ - [ ] Write failing test for scenario 1 → verify: <cmd>
46
+ - [ ] Implement [module/function] → verify: <cmd>
47
+ - [ ] Integrate and smoke-test → verify: <cmd>
48
+ ```
49
+
50
+ Every task must have a `verify:` command. No verify command = not a task.
51
+
52
+ ### 4. Save specs/RELEASE-PLAN.md
53
+
54
+ ```
55
+ ## Epic 1: [Name]
56
+ Priority: P1 | Value: High | Effort: M | WSJF: [score]
57
+
58
+ ### Story 1.1: As a [actor], I want [feature] so that [benefit]
59
+ Status: [ ] Not started
60
+
61
+ Acceptance Criteria:
62
+ Feature: ...
63
+ Scenario: ...
64
+
65
+ Tasks:
66
+ - [ ] ... → verify: <cmd>
67
+ ```
68
+
69
+ → verify: `grep -c "Scenario:" specs/RELEASE-PLAN.md`
70
+
71
+ ### 5. Suggest next steps
72
+
73
+ - Run `assess-impact` before `plan-work` for any story touching existing modules.
74
+ - Run `plan-work` per story to produce the detailed step-by-step plan.
75
+ - Run `change-request` if a new requirement arrives mid-flight.
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: plan-work
3
+ description: Write a detailed implementation plan to specs/RELEASE-PLAN.md. Every step must include a runnable verify command (Karpathy verification template). Use when user has a task to implement and needs a step-by-step plan with evidence checkpoints, or after plan-release produces specs/RELEASE-PLAN.md.
4
+ ---
5
+
6
+ # Plan Work
7
+
8
+ Produce a detailed, verifiable implementation plan in `specs/RELEASE-PLAN.md`. Every step must be paired with a runnable verify command — "I think it works" is not a step.
9
+
10
+ > **HARD GATE** — Do NOT proceed with a plan until the task's success criteria are clear. If success is ambiguous, run `define-success` first to convert the task into "step → verify: <cmd>" pairs.
11
+ >
12
+ > **RECURSIVE DISCIPLINE** — This lifecycle apply to EVERY task, including updating these skills. Never skip planning because a task is "meta" or "just documentation."
13
+
14
+ ## Pre-flight
15
+
16
+ Before writing the plan, check if `define-success` has been run. If the task's success criteria are unclear, run `define-success` first to convert the task into "step → verify: <cmd>" pairs.
17
+
18
+ Read any existing `specs/` files: RELEASE-PLAN.md, SCOPE.md, TASKS.md, CONTEXT.md, UBIQUITOUS_LANGUAGE.md.
19
+
20
+ > **ZOOM-OUT MANDATE** (v1.17.0 Guardrails) — If this plan modifies an existing module, function, or behavior:
21
+ > 1. State the module's **purpose** — what is it responsible for?
22
+ > 2. Name the **callers** — who depends on it?
23
+ > 3. List the **contracts** — what invariants or interfaces must be preserved?
24
+ >
25
+ > If you cannot answer all three without deep code archaeology, the scope is misunderstood. Stop and clarify with the user before writing steps.
26
+
27
+ If this plan touches an existing module or symbol, run `assess-impact` first to understand the blast radius before writing steps.
28
+
29
+ > **DISCOVERY MANDATE** (v1.18.0 Guardrails) — For any step involving external API integration (e.g., macOS CGEventTap, AWS SDK, Third-party libraries):
30
+ > 1. You MUST perform a `google_web_search` or `grep_search` of local documentation to verify the API signature and constraints.
31
+ > 2. You MUST quote at least one technical detail (method name, parameter, or error case) from your discovery in the step's context.
32
+ >
33
+ > Plans that skip discovery for complex integrations are [SUS] and should be rejected.
34
+
35
+ > **MULTIPLE INTERPRETATIONS (HARD GATE)** — If the task statement admits ≥2 valid interpretations, you must list them and get a decision from the user before drafting any steps. Do not assume intent.
36
+
37
+ > **COMPLEXITY PUSHBACK (HARD GATE)** — Every step introducing a new abstraction (class, interface, helper, layer) MUST include a one-sentence "Reason for Depth": _"This abstraction is needed because [forcing function]..."_. If the sentence cannot be filled with a non-trivial reason, the abstraction is premature. Delete it and use inline code instead.
38
+
39
+ ## Process
40
+
41
+ ### 1. Explore the codebase
42
+
43
+ Use the Agent tool with subagent_type=Explore to understand:
44
+ - Affected modules and their current interfaces
45
+ - Existing test patterns to follow
46
+ - Any similar features already implemented (prior art)
47
+ - Dependencies that will be needed
48
+
49
+ ### 2. Draft steps
50
+
51
+ Break the implementation into the smallest possible steps where each step:
52
+ - Leaves the codebase in a working state (tests pass)
53
+ - Has exactly one observable outcome
54
+ - Can be verified with a single runnable command
55
+
56
+ **Red-flag check**: before moving to Step 3, name any rationalization you caught yourself making — skipping a gate, adding out-of-scope steps, omitting a verify command. Write them out; do not suppress them.
57
+
58
+ ### 3. Write specs/RELEASE-PLAN.md
59
+
60
+ Append the detailed steps under the relevant story in `specs/RELEASE-PLAN.md`. Create the `specs/` directory if it doesn't exist.
61
+
62
+ <plan-template>
63
+
64
+ ### Story [X.Y]: [title] — Implementation Steps
65
+
66
+ **Context**: [One paragraph: what this story implements and why]
67
+
68
+ ## Steps
69
+
70
+ 1. [Step description] → verify: `<runnable command>`
71
+
72
+ 2. [Step description] → verify: `<runnable command>`
73
+
74
+ 3. [Step description] → verify: `<runnable command>`
75
+
76
+ ...
77
+
78
+ ## Verification Script (Step-by-Step)
79
+
80
+ [A human-readable, step-by-step script for the user to verify the story's outcome. Focus on user-observable behavior.]
81
+
82
+ 1. [Action 1: e.g. Start the server]
83
+ 2. [Action 2: e.g. Open browser to http://localhost:3000]
84
+ 3. [Action 3: e.g. Click 'Login']
85
+ 4. [Observation: e.g. Verify that the login modal appears]
86
+
87
+ ## Out of scope
88
+
89
+ - [Explicit exclusions]
90
+
91
+ ## Risks
92
+
93
+ - [Anything that could go wrong and how to detect it early]
94
+
95
+ </plan-template>
96
+
97
+ ### 4. Verify step format rules
98
+
99
+ Every step MUST follow this exact format:
100
+ ```
101
+ N. <What to do> → verify: <runnable command that proves it worked>
102
+ ```
103
+
104
+ Good examples:
105
+ ```
106
+ 1. Add User model with email and name fields → verify: npm test -- user.test.ts
107
+ 2. Add POST /users endpoint → verify: curl -s -X POST http://localhost:3000/users -d '{"email":"a@b.com"}' | jq .id
108
+ 3. Add email uniqueness constraint → verify: npm test -- user-uniqueness.test.ts
109
+ ```
110
+
111
+ Bad examples (no verify command):
112
+ ```
113
+ 1. Implement the user creation flow
114
+ 2. Write tests for the API
115
+ ```
116
+
117
+ ### 5. Review with user
118
+
119
+ Before finalizing, confirm:
120
+ - Does the step order make sense?
121
+ - Is the granularity right (not too coarse, not too fine)?
122
+ - Are the verify commands actually runnable in this project?
123
+
124
+ After writing `specs/RELEASE-PLAN.md`, suggest `kickoff-branch` (if not already on a feature branch) then `execute-plan` or `develop-tdd`.
@@ -0,0 +1,56 @@
1
+ import { defineConfig, devices } from '@playwright/test';
2
+
3
+ /**
4
+ * See https://playwright.dev/docs/test-configuration.
5
+ */
6
+ export default defineConfig({
7
+ testDir: './tests/e2e',
8
+ /* Run tests in files in parallel */
9
+ fullyParallel: true,
10
+ /* Fail the build on CI if you accidentally left test.only in the source code. */
11
+ forbidOnly: !!process.env.CI,
12
+ /* Retry on CI only */
13
+ retries: process.env.CI ? 2 : 0,
14
+ /* Opt out of parallel tests on CI. */
15
+ workers: process.env.CI ? 1 : undefined,
16
+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
17
+ reporter: [
18
+ ['list'],
19
+ ['html', { outputFolder: 'playwright-report', open: 'never' }],
20
+ ['junit', { outputFile: 'test-results/results.xml' }]
21
+ ],
22
+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
23
+ use: {
24
+ /* Base URL to use in actions like `await page.goto('/')`. */
25
+ baseURL: process.env.BASE_URL || 'http://localhost:3000',
26
+
27
+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
28
+ trace: 'retain-on-failure-and-retries',
29
+ screenshot: 'only-on-failure',
30
+ video: 'retain-on-failure',
31
+
32
+ actionTimeout: 15000,
33
+ navigationTimeout: 30000,
34
+ },
35
+
36
+ /* Configure projects for major browsers */
37
+ projects: [
38
+ {
39
+ name: 'chromium',
40
+ use: { ...devices['Desktop Chrome'] },
41
+ },
42
+ ],
43
+
44
+ /* Run your local dev server before starting the tests */
45
+ // webServer: {
46
+ // command: 'npm run start',
47
+ // url: 'http://127.0.0.1:3000',
48
+ // reuseExistingServer: !process.env.CI,
49
+ // },
50
+
51
+ expect: {
52
+ timeout: 10000,
53
+ },
54
+
55
+ timeout: 60000,
56
+ });