opencodekit 0.21.9 → 0.22.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/dist/index.js +1 -1
- package/dist/template/.opencode/AGENTS.md +116 -499
- package/dist/template/.opencode/README.md +1 -1
- package/dist/template/.opencode/agent/build.md +56 -396
- package/dist/template/.opencode/agent/explore.md +15 -16
- package/dist/template/.opencode/agent/general.md +2 -2
- package/dist/template/.opencode/agent/plan.md +3 -3
- package/dist/template/.opencode/agent/review.md +2 -3
- package/dist/template/.opencode/agent/scout.md +34 -16
- package/dist/template/.opencode/agent/vision.md +0 -1
- package/dist/template/.opencode/command/clarify.md +48 -0
- package/dist/template/.opencode/command/commit.md +53 -0
- package/dist/template/.opencode/command/design.md +4 -4
- package/dist/template/.opencode/command/fix.md +56 -0
- package/dist/template/.opencode/command/improve-architecture.md +55 -0
- package/dist/template/.opencode/command/init.md +88 -68
- package/dist/template/.opencode/command/refactor.md +66 -0
- package/dist/template/.opencode/command/review-codebase.md +1 -1
- package/dist/template/.opencode/command/ship.md +1 -1
- package/dist/template/.opencode/command/test.md +66 -0
- package/dist/template/.opencode/dcp.jsonc +29 -46
- package/dist/template/.opencode/memory/README.md +3 -5
- package/dist/template/.opencode/memory/_templates/adr.md +45 -0
- package/dist/template/.opencode/memory/project/gotchas.md +1 -1
- package/dist/template/.opencode/memory/project/user.md +1 -2
- package/dist/template/.opencode/memory/session-context.md +1 -1
- package/dist/template/.opencode/opencode.json +10 -332
- package/dist/template/.opencode/plugin/README.md +1 -1
- package/dist/template/.opencode/plugin/guard.ts +62 -0
- package/dist/template/.opencode/plugin/{lib/memory-admin-tools.ts → memory/admin.ts} +4 -4
- package/dist/template/.opencode/plugin/{lib → memory}/capture.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/compile.ts +2 -2
- package/dist/template/.opencode/plugin/{lib → memory}/context.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/curator.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/db/observations.ts +102 -3
- package/dist/template/.opencode/plugin/{lib → memory}/db/schema.ts +43 -1
- package/dist/template/.opencode/plugin/{lib → memory}/db/types.ts +22 -0
- package/dist/template/.opencode/plugin/{lib/memory-db.ts → memory/db.ts} +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/distill.ts +1 -1
- package/dist/template/.opencode/plugin/{lib/memory-helpers.ts → memory/helpers.ts} +5 -1
- package/dist/template/.opencode/plugin/{lib/memory-hooks.ts → memory/hooks.ts} +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/index-generator.ts +2 -2
- package/dist/template/.opencode/plugin/{lib → memory}/inject.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/lint.ts +2 -2
- package/dist/template/.opencode/plugin/memory/tools.ts +322 -0
- package/dist/template/.opencode/plugin/{lib → memory}/validate.ts +2 -2
- package/dist/template/.opencode/plugin/memory.ts +7 -17
- package/dist/template/.opencode/plugin/srcwalk.ts +721 -0
- package/dist/template/.opencode/skill/agent-code-quality-gate/SKILL.md +98 -0
- package/dist/template/.opencode/skill/behavioral-kernel/SKILL.md +52 -0
- package/dist/template/.opencode/skill/browser-testing-with-devtools/SKILL.md +85 -0
- package/dist/template/.opencode/skill/code-cleanup/SKILL.md +114 -0
- package/dist/template/.opencode/skill/code-navigation/SKILL.md +142 -0
- package/dist/template/.opencode/skill/code-review-and-quality/SKILL.md +131 -0
- package/dist/template/.opencode/skill/debugging-and-error-recovery/SKILL.md +109 -0
- package/dist/template/.opencode/skill/deep-module-design/SKILL.md +207 -0
- package/dist/template/.opencode/skill/git-workflow-and-versioning/SKILL.md +77 -0
- package/dist/template/.opencode/skill/grill-me/SKILL.md +140 -0
- package/dist/template/.opencode/skill/memory-system/SKILL.md +9 -10
- package/dist/template/.opencode/skill/planning-and-task-breakdown/SKILL.md +116 -0
- package/dist/template/.opencode/skill/shipping-and-launch/SKILL.md +95 -0
- package/dist/template/.opencode/skill/source-driven-development/SKILL.md +103 -0
- package/dist/template/.opencode/skill/spec-driven-development/SKILL.md +121 -0
- package/dist/template/.opencode/skill/srcwalk/SKILL.md +161 -0
- package/dist/template/.opencode/skill/ubiquitous-language/SKILL.md +184 -0
- package/dist/template/.opencode/tool/context7.ts +1 -1
- package/dist/template/.opencode/tool/grepsearch.ts +1 -1
- package/package.json +1 -1
- package/dist/template/.opencode/AGENT_ALIGNMENT.md +0 -564
- package/dist/template/.opencode/agent/painter.md +0 -83
- package/dist/template/.opencode/command/compound.md +0 -240
- package/dist/template/.opencode/command/curate.md +0 -299
- package/dist/template/.opencode/command/handoff.md +0 -149
- package/dist/template/.opencode/command/health.md +0 -356
- package/dist/template/.opencode/command/init-context.md +0 -297
- package/dist/template/.opencode/command/init-user.md +0 -125
- package/dist/template/.opencode/command/iterate.md +0 -200
- package/dist/template/.opencode/command/lfg.md +0 -173
- package/dist/template/.opencode/command/resume.md +0 -78
- package/dist/template/.opencode/command/status.md +0 -126
- package/dist/template/.opencode/command/ui-slop-check.md +0 -169
- package/dist/template/.opencode/plugin/lib/memory-tools.ts +0 -535
- package/dist/template/.opencode/skill/agent-evals/SKILL.md +0 -208
- package/dist/template/.opencode/skill/anti-ai-slop/SKILL.md +0 -76
- package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +0 -122
- package/dist/template/.opencode/skill/augment-context-engine/mcp.json +0 -6
- package/dist/template/.opencode/skill/brand-asset-protocol/SKILL.md +0 -222
- package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +0 -253
- package/dist/template/.opencode/skill/code-simplification/SKILL.md +0 -211
- package/dist/template/.opencode/skill/context-condensation/SKILL.md +0 -149
- package/dist/template/.opencode/skill/context-initialization/SKILL.md +0 -69
- package/dist/template/.opencode/skill/context-management/SKILL.md +0 -390
- package/dist/template/.opencode/skill/deep-research/SKILL.md +0 -384
- package/dist/template/.opencode/skill/design-direction-advisor/SKILL.md +0 -139
- package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +0 -191
- package/dist/template/.opencode/skill/executing-plans/SKILL.md +0 -247
- package/dist/template/.opencode/skill/figma-go/SKILL.md +0 -65
- package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +0 -357
- package/dist/template/.opencode/skill/full-output-enforcement/SKILL.md +0 -62
- package/dist/template/.opencode/skill/gh-address-comments/SKILL.md +0 -29
- package/dist/template/.opencode/skill/gh-address-comments/scripts/fetch_comments.py +0 -237
- package/dist/template/.opencode/skill/gh-fix-ci/SKILL.md +0 -38
- package/dist/template/.opencode/skill/gh-fix-ci/scripts/inspect_pr_checks.py +0 -509
- package/dist/template/.opencode/skill/hi-fi-prototype-html/SKILL.md +0 -253
- package/dist/template/.opencode/skill/html-deck-export/SKILL.md +0 -189
- package/dist/template/.opencode/skill/index-knowledge/SKILL.md +0 -413
- package/dist/template/.opencode/skill/memory-grounding/SKILL.md +0 -68
- package/dist/template/.opencode/skill/playwriter/SKILL.md +0 -158
- package/dist/template/.opencode/skill/portless/SKILL.md +0 -109
- package/dist/template/.opencode/skill/prd/SKILL.md +0 -146
- package/dist/template/.opencode/skill/prd-task/SKILL.md +0 -182
- package/dist/template/.opencode/skill/prd-task/references/prd-schema.json +0 -124
- package/dist/template/.opencode/skill/prompt-leverage/SKILL.md +0 -90
- package/dist/template/.opencode/skill/prompt-leverage/references/framework.md +0 -91
- package/dist/template/.opencode/skill/prompt-leverage/scripts/augment_prompt.py +0 -157
- package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +0 -263
- package/dist/template/.opencode/skill/reconcile/SKILL.md +0 -183
- package/dist/template/.opencode/skill/reflection-checkpoints/SKILL.md +0 -183
- package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +0 -443
- package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md +0 -108
- package/dist/template/.opencode/skill/requesting-code-review/review.md +0 -160
- package/dist/template/.opencode/skill/rtk-command-compression/SKILL.md +0 -134
- package/dist/template/.opencode/skill/screenshot/SKILL.md +0 -48
- package/dist/template/.opencode/skill/screenshot/scripts/ensure_macos_permissions.sh +0 -54
- package/dist/template/.opencode/skill/screenshot/scripts/macos_display_info.swift +0 -22
- package/dist/template/.opencode/skill/screenshot/scripts/macos_permissions.swift +0 -40
- package/dist/template/.opencode/skill/screenshot/scripts/macos_window_info.swift +0 -126
- package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.ps1 +0 -163
- package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.py +0 -585
- package/dist/template/.opencode/skill/security-threat-model/SKILL.md +0 -36
- package/dist/template/.opencode/skill/security-threat-model/references/prompt-template.md +0 -255
- package/dist/template/.opencode/skill/security-threat-model/references/security-controls-and-assets.md +0 -32
- package/dist/template/.opencode/skill/sharing-skills/SKILL.md +0 -214
- package/dist/template/.opencode/skill/skill-creator/SKILL.md +0 -181
- package/dist/template/.opencode/skill/skill-installer/SKILL.md +0 -58
- package/dist/template/.opencode/skill/skill-installer/scripts/github_utils.py +0 -21
- package/dist/template/.opencode/skill/skill-installer/scripts/install-skill-from-github.py +0 -313
- package/dist/template/.opencode/skill/skill-installer/scripts/list-skills.py +0 -106
- package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +0 -244
- package/dist/template/.opencode/skill/swarm-coordination/references/architecture.md +0 -39
- package/dist/template/.opencode/skill/swarm-coordination/references/delegation-worker-protocol.md +0 -145
- package/dist/template/.opencode/skill/swarm-coordination/references/dependency-graph.md +0 -50
- package/dist/template/.opencode/skill/swarm-coordination/references/drift-check.md +0 -90
- package/dist/template/.opencode/skill/swarm-coordination/references/integration-beads.md +0 -20
- package/dist/template/.opencode/skill/swarm-coordination/references/launch-flow.md +0 -186
- package/dist/template/.opencode/skill/swarm-coordination/references/reconciler.md +0 -172
- package/dist/template/.opencode/skill/swarm-coordination/references/tier-enforcement.md +0 -78
- package/dist/template/.opencode/skill/swarm-coordination/references/tmux-integration.md +0 -134
- package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +0 -402
- package/dist/template/.opencode/skill/terse-output-mode/SKILL.md +0 -95
- package/dist/template/.opencode/skill/think-in-code/SKILL.md +0 -136
- package/dist/template/.opencode/skill/ux-quality-gates/SKILL.md +0 -137
- package/dist/template/.opencode/skill/v1-run/SKILL.md +0 -175
- package/dist/template/.opencode/skill/v1-run/mcp.json +0 -6
- package/dist/template/.opencode/skill/verification-gates/SKILL.md +0 -63
- package/dist/template/.opencode/skill/visual-analysis/SKILL.md +0 -154
- package/dist/template/.opencode/skill/web-design-guidelines/SKILL.md +0 -46
- package/dist/template/.opencode/skill/workspace-setup/SKILL.md +0 -76
- package/dist/template/.opencode/skill/writing-plans/SKILL.md +0 -320
- /package/dist/template/.opencode/plugin/{lib → memory}/compact.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/db/graph.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/db/maintenance.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/db/pipeline.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/notify.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/operation-log.ts +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planning-and-task-breakdown
|
|
3
|
+
description: Decomposes a spec into small verifiable tasks with dependencies and acceptance checks. Use when a feature/change has a spec or clear goal and needs an executable implementation plan.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [workflow, planning, agent-coordination]
|
|
6
|
+
dependencies: [spec-driven-development]
|
|
7
|
+
agent_types: [planner]
|
|
8
|
+
tools: [TaskCreate, TaskUpdate, memory, srcwalk_search]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Planning & Task Breakdown
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
A good plan creates leverage for builders. It says what must become true, where to work, what not to touch, and how to prove success.
|
|
16
|
+
|
|
17
|
+
Core principle: plan backward from observable truths into artifacts, wiring, tasks, dependencies, and verification.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- A spec or clear goal exists and implementation is non-trivial.
|
|
22
|
+
- Work spans multiple files, phases, or agents.
|
|
23
|
+
- Tasks need dependency ordering or parallelization decisions.
|
|
24
|
+
- You need a handoff artifact for worker agents.
|
|
25
|
+
|
|
26
|
+
## When NOT to Use
|
|
27
|
+
|
|
28
|
+
- Single-file fixes that can be implemented directly.
|
|
29
|
+
- Requirements are still unclear; use `spec-driven-development` first.
|
|
30
|
+
- You are debugging an active failure; use `debugging-and-error-recovery`.
|
|
31
|
+
|
|
32
|
+
## Workflow
|
|
33
|
+
|
|
34
|
+
1. Restate the goal and constraints.
|
|
35
|
+
2. Convert observable truths into required artifacts.
|
|
36
|
+
3. Identify required wiring between artifacts.
|
|
37
|
+
4. Mark key links most likely to break.
|
|
38
|
+
5. Decompose into vertical slices, not horizontal layers.
|
|
39
|
+
6. Limit each task to a small scope with exact files when known.
|
|
40
|
+
7. Add acceptance checks and verification commands to every task.
|
|
41
|
+
8. Build a dependency graph and execution order.
|
|
42
|
+
9. Create tracked tasks or write a plan artifact.
|
|
43
|
+
|
|
44
|
+
## Task Packet Template
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
## Task N: [Name]
|
|
48
|
+
|
|
49
|
+
Goal: [one sentence]
|
|
50
|
+
Files in scope:
|
|
51
|
+
- [path]
|
|
52
|
+
Acceptance checks:
|
|
53
|
+
- [behavior] -> verify with [command/check]
|
|
54
|
+
Non-goals:
|
|
55
|
+
- [explicit exclusion]
|
|
56
|
+
Dependencies:
|
|
57
|
+
- [task id/name or none]
|
|
58
|
+
Review depth: targeted|standard|full
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Slicing Rules
|
|
62
|
+
|
|
63
|
+
- Prefer vertical slices that produce end-to-end behavior.
|
|
64
|
+
- Put risky unknowns first.
|
|
65
|
+
- Do not mix refactors with feature behavior unless the refactor is required.
|
|
66
|
+
- If one task touches more than five files, split it.
|
|
67
|
+
- If a task needs architectural judgment, route to `planner`, not `worker`.
|
|
68
|
+
|
|
69
|
+
## Common Rationalizations
|
|
70
|
+
|
|
71
|
+
| Rationalization | Rebuttal |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| "I'll make tasks as I go" | Hidden dependencies appear too late. Plan the graph first. |
|
|
74
|
+
| "Layer-by-layer is cleaner" | Horizontal layers delay integration and hide broken wiring. |
|
|
75
|
+
| "Acceptance criteria are obvious" | Workers need objective checks, not intent. |
|
|
76
|
+
| "One big task is simpler" | Big tasks are hard to review, rollback, and verify. |
|
|
77
|
+
|
|
78
|
+
## Red Flags
|
|
79
|
+
|
|
80
|
+
- Tasks named after vague activities like "update backend".
|
|
81
|
+
- No verification command/check per task.
|
|
82
|
+
- UI, API, and data work split so nothing works until the end.
|
|
83
|
+
- Multiple agents assigned to overlapping files without sequencing.
|
|
84
|
+
- Plan omits non-goals or rollback considerations.
|
|
85
|
+
|
|
86
|
+
## Verification
|
|
87
|
+
|
|
88
|
+
- Every task has goal, scope, acceptance checks, non-goals, dependencies.
|
|
89
|
+
- Execution order respects dependencies.
|
|
90
|
+
- Key links are identified for reviewer verification.
|
|
91
|
+
- The first task can be implemented without further planning.
|
|
92
|
+
|
|
93
|
+
## Skill Result Contract
|
|
94
|
+
|
|
95
|
+
```xml
|
|
96
|
+
<skill_result>
|
|
97
|
+
<skill>planning-and-task-breakdown</skill>
|
|
98
|
+
<status>success|partial|blocked|failure</status>
|
|
99
|
+
<evidence>Plan/task packets include scope, dependencies, and verification</evidence>
|
|
100
|
+
<artifacts>Task ids or plan file path</artifacts>
|
|
101
|
+
<risks>Large tasks, unresolved dependencies, or none</risks>
|
|
102
|
+
</skill_result>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## Consolidated Planning Workflow
|
|
107
|
+
|
|
108
|
+
This is the canonical active planning skill. It absorbs PRD-to-plan and writing-plans responsibilities. Use spec-driven-development first when requirements are still unclear.
|
|
109
|
+
|
|
110
|
+
Plans should include:
|
|
111
|
+
- scope and non-goals;
|
|
112
|
+
- ordered tasks with dependencies;
|
|
113
|
+
- exact files or search targets when known;
|
|
114
|
+
- acceptance checks per task;
|
|
115
|
+
- review and verification gates;
|
|
116
|
+
- handoff details for subagents with zero assumed context.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shipping-and-launch
|
|
3
|
+
description: Guides final readiness checks, rollback planning, documentation, and release handoff. Use when preparing to merge, deploy, release, or declare a development branch complete.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [shipping, workflow, release]
|
|
6
|
+
dependencies: [verification-before-completion, documentation-and-adrs]
|
|
7
|
+
agent_types: [planner, reviewer]
|
|
8
|
+
tools: [bash, ask_user_question, memory]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Shipping & Launch
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Shipping should be boring because risk was removed earlier. The ship phase verifies readiness, documents what changed, and makes rollback possible.
|
|
16
|
+
|
|
17
|
+
Core principle: do not ship work that cannot be verified, explained, or rolled back.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- User says ship, merge, deploy, release, or finish.
|
|
22
|
+
- Before closing tracked work as complete.
|
|
23
|
+
- Before creating a PR or release notes.
|
|
24
|
+
- After build/review/QA phases pass.
|
|
25
|
+
|
|
26
|
+
## When NOT to Use
|
|
27
|
+
|
|
28
|
+
- Work is still being implemented.
|
|
29
|
+
- Critical review findings are open.
|
|
30
|
+
- Verification cannot run and no user-approved exception exists.
|
|
31
|
+
|
|
32
|
+
## Workflow
|
|
33
|
+
|
|
34
|
+
1. Check worktree state and identify intended changes.
|
|
35
|
+
2. Confirm spec/plan acceptance criteria are met.
|
|
36
|
+
3. Run required verification or use a fresh valid verification stamp.
|
|
37
|
+
4. Run phantom completion checks for stubs, placeholders, and disconnected wiring.
|
|
38
|
+
5. Review security/secrets/configuration risk in the diff.
|
|
39
|
+
6. Confirm docs/ADRs/changelog updates are sufficient.
|
|
40
|
+
7. Define rollback path: revert commit, feature flag, migration rollback, or manual procedure.
|
|
41
|
+
8. Present ship options when action is irreversible: PR, merge, deploy, hold.
|
|
42
|
+
9. Record handoff/memory when useful.
|
|
43
|
+
|
|
44
|
+
## Pre-Ship Checklist
|
|
45
|
+
|
|
46
|
+
- Tests relevant to changed behavior pass.
|
|
47
|
+
- Build/typecheck/lint pass or exceptions are documented.
|
|
48
|
+
- No high-severity review findings remain.
|
|
49
|
+
- No secrets or local-only paths in diff.
|
|
50
|
+
- User-facing/API behavior is documented.
|
|
51
|
+
- Rollback path is clear.
|
|
52
|
+
- User approval exists for irreversible actions.
|
|
53
|
+
|
|
54
|
+
## Common Rationalizations
|
|
55
|
+
|
|
56
|
+
| Rationalization | Rebuttal |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| "Tests passed earlier" | Fresh changes require fresh evidence or a valid unchanged-state stamp. |
|
|
59
|
+
| "Rollback is just git revert" | Migrations, flags, queues, and external state may need more. |
|
|
60
|
+
| "Docs can wait" | Shipped behavior without docs becomes support debt. |
|
|
61
|
+
| "Small release, no checklist" | Small releases still leak secrets and break config. |
|
|
62
|
+
|
|
63
|
+
## Red Flags
|
|
64
|
+
|
|
65
|
+
- Completion claim without verification evidence.
|
|
66
|
+
- Unresolved P0/P1 findings.
|
|
67
|
+
- No rollback plan for data or API changes.
|
|
68
|
+
- Changelog omits user-visible behavior changes.
|
|
69
|
+
- Deployment/merge attempted without explicit user approval.
|
|
70
|
+
- Placeholder/stub patterns remain in modified code.
|
|
71
|
+
|
|
72
|
+
## Verification
|
|
73
|
+
|
|
74
|
+
- Verification commands and outputs are recorded.
|
|
75
|
+
- Acceptance criteria are checked line-by-line.
|
|
76
|
+
- Phantom completion scan is clean or exceptions are explained.
|
|
77
|
+
- Rollback plan is documented.
|
|
78
|
+
- Final action is approved when irreversible.
|
|
79
|
+
|
|
80
|
+
## Skill Result Contract
|
|
81
|
+
|
|
82
|
+
```xml
|
|
83
|
+
<skill_result>
|
|
84
|
+
<skill>shipping-and-launch</skill>
|
|
85
|
+
<status>success|partial|blocked|failure</status>
|
|
86
|
+
<evidence>Verification commands, acceptance audit, review status, rollback plan</evidence>
|
|
87
|
+
<artifacts>Changelog, PR, release notes, handoff, or none</artifacts>
|
|
88
|
+
<risks>Open findings, skipped checks, deployment risk, or none</risks>
|
|
89
|
+
</skill_result>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## Consolidated Branch Completion
|
|
94
|
+
|
|
95
|
+
`finishing-a-development-branch` was removed as a separate optional skill. Keep merge/PR/cleanup choices, release handoff, rollback planning, and completion evidence in this canonical shipping workflow.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: source-driven-development
|
|
3
|
+
description: Grounds implementation decisions in official docs, source code, and cited references. Use when using unfamiliar libraries, external APIs, framework behavior, or current ecosystem guidance.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [research, implementation, verification]
|
|
6
|
+
dependencies: []
|
|
7
|
+
agent_types: [scout, planner, worker]
|
|
8
|
+
tools: [context7, websearch, web_fetch, webclaw_scrape, grepsearch, codesearch]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Source-Driven Development
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Framework guesses become bugs. Source-driven work verifies behavior against authoritative references before implementation.
|
|
16
|
+
|
|
17
|
+
Core principle: cite the source for non-trivial external API decisions, or mark the decision as unverified.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- New or unfamiliar library/framework/API.
|
|
22
|
+
- Version-specific behavior matters.
|
|
23
|
+
- Choosing between packages or integration patterns.
|
|
24
|
+
- Error suggests external API misuse.
|
|
25
|
+
- User asks to research current best practice.
|
|
26
|
+
|
|
27
|
+
## When NOT to Use
|
|
28
|
+
|
|
29
|
+
- Pure local codebase questions; use code search/explore.
|
|
30
|
+
- Stable project conventions already cover the behavior.
|
|
31
|
+
- Trivial syntax you can verify from existing code.
|
|
32
|
+
|
|
33
|
+
## Source Hierarchy
|
|
34
|
+
|
|
35
|
+
1. Official docs, specs, release notes.
|
|
36
|
+
2. Maintained source code and examples.
|
|
37
|
+
3. Maintainer-authored articles.
|
|
38
|
+
4. Community posts only when higher sources are absent.
|
|
39
|
+
|
|
40
|
+
Higher-ranked sources win on conflicts.
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
1. State the question precisely.
|
|
45
|
+
2. Check memory/local docs for prior decisions.
|
|
46
|
+
3. Retrieve authoritative sources.
|
|
47
|
+
4. Verify version compatibility with the project.
|
|
48
|
+
5. Compare sources if guidance conflicts.
|
|
49
|
+
6. Extract only the implementation-relevant facts.
|
|
50
|
+
7. Cite URLs or source refs in the recommendation.
|
|
51
|
+
8. Mark unresolved uncertainty explicitly.
|
|
52
|
+
|
|
53
|
+
## Common Rationalizations
|
|
54
|
+
|
|
55
|
+
| Rationalization | Rebuttal |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| "I know this API" | APIs change; verify version-specific behavior. |
|
|
58
|
+
| "A blog said so" | Blogs lose to official docs/source. |
|
|
59
|
+
| "The package name is obvious" | Similar packages differ in security and maintenance. |
|
|
60
|
+
| "Citations slow us down" | A bad integration costs more than a source check. |
|
|
61
|
+
|
|
62
|
+
## Red Flags
|
|
63
|
+
|
|
64
|
+
- Unfamiliar API used without citation or local precedent.
|
|
65
|
+
- Community answer conflicts with official docs.
|
|
66
|
+
- Version in docs differs from package version.
|
|
67
|
+
- Agent invents options, flags, or imports.
|
|
68
|
+
- Research dump has no recommendation.
|
|
69
|
+
|
|
70
|
+
## Verification
|
|
71
|
+
|
|
72
|
+
- Key claims cite authoritative sources.
|
|
73
|
+
- Project/library versions are considered.
|
|
74
|
+
- Implementation recommendation is specific.
|
|
75
|
+
- Unverified assumptions are labeled.
|
|
76
|
+
|
|
77
|
+
## Skill Result Contract
|
|
78
|
+
|
|
79
|
+
```xml
|
|
80
|
+
<skill_result>
|
|
81
|
+
<skill>source-driven-development</skill>
|
|
82
|
+
<status>success|partial|blocked|failure</status>
|
|
83
|
+
<evidence>Sources consulted and version checks</evidence>
|
|
84
|
+
<artifacts>Research notes, citations, implementation recommendation</artifacts>
|
|
85
|
+
<risks>Unverified claims, stale docs, conflicting sources, or none</risks>
|
|
86
|
+
</skill_result>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## Consolidated Research Workflow
|
|
91
|
+
|
|
92
|
+
This is the canonical active source-grounding skill. It absorbs deep-research and source-code-research for normal work. Use opensrc, webclaw, context7, grepsearch, or gemini-large-context as tool-specific companions only when the source demands them.
|
|
93
|
+
|
|
94
|
+
Evidence hierarchy:
|
|
95
|
+
1. local code and tests;
|
|
96
|
+
2. official docs and source;
|
|
97
|
+
3. maintained examples from reputable repos;
|
|
98
|
+
4. blog posts or issues with dates and caveats.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## Removed Optional Companion
|
|
102
|
+
|
|
103
|
+
`v1-run` was removed as an optional package-health skill. Use source-grounded package evaluation, official advisories, lockfile inspection, and package-manager audit commands instead.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-driven-development
|
|
3
|
+
description: Guides agents from vague request to concrete specification before implementation. Use when starting a new feature, significant change, product idea, or when requirements are ambiguous.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [workflow, planning, product]
|
|
6
|
+
dependencies: []
|
|
7
|
+
agent_types: [planner, scout]
|
|
8
|
+
tools: [ask_user_question, TaskCreate, memory]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Spec-Driven Development
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
A spec converts intent into testable truth. Code written before the target is clear becomes rework.
|
|
16
|
+
|
|
17
|
+
Core principle: define observable outcomes, constraints, non-goals, and verification before planning implementation.
|
|
18
|
+
|
|
19
|
+
**Define the vocabulary first.** Every concept in the spec should have one name — that name must match what the code will call it. This is Evans' "ubiquitous language": a shared vocabulary between developers, domain experts, code, and AI context files. Ambiguous language in the spec causes the "AI does the wrong thing" failure mode: the LLM implements what the words say, not what you meant.
|
|
20
|
+
|
|
21
|
+
After writing the spec, extract a glossary of terms. Every capitalized concept in the spec should correspond to exactly one code symbol (type, class, module, function, file). If two terms mean the same thing, pick one. If one term means two things, split it.
|
|
22
|
+
|
|
23
|
+
## When to Use
|
|
24
|
+
|
|
25
|
+
- User asks for a new feature or significant behavior change.
|
|
26
|
+
- Requirements are vague, conflicting, or missing edge cases.
|
|
27
|
+
- Multiple files/systems will be affected.
|
|
28
|
+
- The work needs acceptance criteria or user-visible behavior.
|
|
29
|
+
|
|
30
|
+
## When NOT to Use
|
|
31
|
+
|
|
32
|
+
- Tiny mechanical edits with obvious expected behavior.
|
|
33
|
+
- Emergency bug fixes where reproduction is already clear; use `debugging-and-error-recovery`.
|
|
34
|
+
- Pure research with no implementation decision; use `source-driven-development`.
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
|
|
38
|
+
1. State the goal as an outcome, not a task.
|
|
39
|
+
2. **Establish vocabulary**: define the key terms and map them to code concepts.
|
|
40
|
+
3. Derive 3-7 observable truths from the user's perspective.
|
|
41
|
+
4. Identify constraints: technical, UX, security, performance, compatibility.
|
|
42
|
+
5. Define non-goals to prevent scope creep.
|
|
43
|
+
6. List affected surfaces: files, APIs, commands, UI screens, data models.
|
|
44
|
+
7. Define acceptance criteria with verification methods.
|
|
45
|
+
8. **Check vocabulary consistency**: does every spec term map to exactly one code symbol? Are any terms overloaded?
|
|
46
|
+
9. Ask at most 1-4 focused questions only if missing information changes the design.
|
|
47
|
+
10. Hand off to `planning-and-task-breakdown` when the spec is stable.
|
|
48
|
+
|
|
49
|
+
## Spec Template
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
# Spec: [Name]
|
|
53
|
+
|
|
54
|
+
## Goal
|
|
55
|
+
[Outcome in one sentence]
|
|
56
|
+
|
|
57
|
+
## Vocabulary
|
|
58
|
+
| Term | Definition | Code symbol |
|
|
59
|
+
|------|------------|-------------|
|
|
60
|
+
| ... | ... | ... |
|
|
61
|
+
|
|
62
|
+
Every concept should have one name. If two terms mean the same thing, consolidate. If one term means two things, split it.
|
|
63
|
+
|
|
64
|
+
## Observable Truths
|
|
65
|
+
- [User/system can observe X]
|
|
66
|
+
|
|
67
|
+
## Constraints
|
|
68
|
+
- [Hard constraint]
|
|
69
|
+
|
|
70
|
+
## Non-Goals
|
|
71
|
+
- [Explicitly out of scope]
|
|
72
|
+
|
|
73
|
+
## Affected Surfaces
|
|
74
|
+
- [File/API/UI/data area]
|
|
75
|
+
|
|
76
|
+
## Acceptance Criteria
|
|
77
|
+
- [Criterion] -> verify with [command/check/manual observation]
|
|
78
|
+
|
|
79
|
+
## Open Questions
|
|
80
|
+
- [Question or none]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Common Rationalizations
|
|
84
|
+
|
|
85
|
+
| Rationalization | Rebuttal |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| "The user already explained it" | Explanation is not acceptance criteria. Write the target down. |
|
|
88
|
+
| "I'll discover requirements while coding" | Discovery during coding causes churn and hidden scope expansion. |
|
|
89
|
+
| "This is obvious" | Obvious to you is not a contract for the next agent or reviewer. |
|
|
90
|
+
| "The AI will figure out what I mean" | The AI will implement exactly what the spec says. Ambiguous language = wrong implementation. |
|
|
91
|
+
| "Questions slow us down" | One precise question is cheaper than implementing the wrong behavior. |
|
|
92
|
+
|
|
93
|
+
## Red Flags
|
|
94
|
+
|
|
95
|
+
- No explicit non-goals for a broad feature.
|
|
96
|
+
- Acceptance criteria are phrased as implementation tasks.
|
|
97
|
+
- Edge cases are deferred without user agreement.
|
|
98
|
+
- The plan starts before observable truths are defined.
|
|
99
|
+
- User-visible behavior has no verification method.
|
|
100
|
+
- **No vocabulary section** — missing ubiquitous language means AI will guess term meanings.
|
|
101
|
+
- **Same term used for different concepts** — e.g. "Order" means creation flow in one place and fulfillment in another.
|
|
102
|
+
- **Different terms for the same concept** — e.g. "User" vs "Account" vs "Profile" used interchangeably.
|
|
103
|
+
|
|
104
|
+
## Verification
|
|
105
|
+
|
|
106
|
+
- Goal is outcome-shaped.
|
|
107
|
+
- Observable truths are human-verifiable.
|
|
108
|
+
- Acceptance criteria include commands/checks where possible.
|
|
109
|
+
- Ambiguities that affect implementation are resolved or marked as assumptions.
|
|
110
|
+
|
|
111
|
+
## Skill Result Contract
|
|
112
|
+
|
|
113
|
+
```xml
|
|
114
|
+
<skill_result>
|
|
115
|
+
<skill>spec-driven-development</skill>
|
|
116
|
+
<status>success|partial|blocked|failure</status>
|
|
117
|
+
<evidence>Spec sections completed and questions/assumptions recorded</evidence>
|
|
118
|
+
<artifacts>Spec path or inline spec summary</artifacts>
|
|
119
|
+
<risks>Unresolved assumptions or none</risks>
|
|
120
|
+
</skill_result>
|
|
121
|
+
```
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: srcwalk
|
|
3
|
+
compatible_srcwalk: ">=1.0.0"
|
|
4
|
+
description: Use when navigating code with srcwalk — repo maps, large-file reads, symbol search, callers/callees, flow slices, impact checks, and precise drill-ins.
|
|
5
|
+
version: 2.1.0
|
|
6
|
+
tags: [code-intelligence, search, cli, srcwalk]
|
|
7
|
+
dependencies: []
|
|
8
|
+
agent_types: [planner, worker, reviewer, explorer]
|
|
9
|
+
tools: [bash, srcwalk_search, srcwalk_read, srcwalk_files, srcwalk_deps, srcwalk_map, srcwalk_callers, srcwalk_callees, srcwalk_flow, srcwalk_impact]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Srcwalk — Code Navigation
|
|
13
|
+
|
|
14
|
+
Srcwalk is the project's code navigation engine (v1.0.0+). All Pi tools are backed by the installed `srcwalk` binary.
|
|
15
|
+
|
|
16
|
+
Run the embedded guide before non-trivial use — it is the version-matched source of truth:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
srcwalk guide
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Do not pipe, truncate, or summarize `srcwalk guide`.
|
|
23
|
+
|
|
24
|
+
## When to Use
|
|
25
|
+
|
|
26
|
+
- Any code navigation task: symbol search, large-file reading, repo maps
|
|
27
|
+
- Tracing call graphs (callers, callees, transitive chains)
|
|
28
|
+
- Checking blast radius before breaking changes
|
|
29
|
+
- Understanding repo shape and token budgets
|
|
30
|
+
- Quick function orientation (flow slice)
|
|
31
|
+
- Heuristic impact triage
|
|
32
|
+
|
|
33
|
+
## When NOT to Use
|
|
34
|
+
|
|
35
|
+
- Non-code files where tree-sitter has no grammar → use `read` directly
|
|
36
|
+
- Simple one-off reads of small known files → use built-in `read`
|
|
37
|
+
|
|
38
|
+
## Pi Tool Surface
|
|
39
|
+
|
|
40
|
+
### Core navigation tools
|
|
41
|
+
|
|
42
|
+
| Tool | Srcwalk command | Purpose |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `srcwalk_search` | `srcwalk discover` / `srcwalk trace callers` | AST-aware symbol/content/regex/callers search |
|
|
45
|
+
| `srcwalk_read` | `srcwalk <path>` | Smart file reading: outline or full with sections |
|
|
46
|
+
| `srcwalk_files` | `srcwalk discover --as file` | Glob file finding with token estimates, grouped by dir |
|
|
47
|
+
| `srcwalk_deps` | `srcwalk deps` + exact import scan | Blast-radius: importers + dep-aware dependents (v1.0.0) |
|
|
48
|
+
|
|
49
|
+
### Extended analysis tools
|
|
50
|
+
|
|
51
|
+
| Tool | Srcwalk command | Purpose |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| `srcwalk_map` | `srcwalk overview` | Token-annotated directory skeleton + dep groups (v1.0.0) |
|
|
54
|
+
| `srcwalk_callers` | `srcwalk trace callers` | Reverse call graph with BFS depth + filters |
|
|
55
|
+
| `srcwalk_callees` | `srcwalk trace callees` | Forward call graph with `--detailed` ordered call sites |
|
|
56
|
+
| `srcwalk_flow` | `srcwalk context` | Compact orientation slice |
|
|
57
|
+
| `srcwalk_impact` | `srcwalk assess` | Heuristic blast-radius triage |
|
|
58
|
+
|
|
59
|
+
## Command Routing
|
|
60
|
+
|
|
61
|
+
| Intent | Use first |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Understand repo shape | `srcwalk_map` |
|
|
64
|
+
| Read or inspect a large file | `srcwalk_read` |
|
|
65
|
+
| Jump to exact line | `srcwalk_read({ path: "file:42" })` |
|
|
66
|
+
| Read a line range | `srcwalk_read({ path: "file:44-89" })` — v1.0.0 shortcut |
|
|
67
|
+
| Read by symbol name | `srcwalk_read({ section: "symbolName" })` |
|
|
68
|
+
| Find definition/usages/text/glob | `srcwalk_search` |
|
|
69
|
+
| Find files by glob | `srcwalk_files` |
|
|
70
|
+
| Multi-symbol search | `srcwalk_search({ query: "A, B, C" })` |
|
|
71
|
+
| Who directly calls this? | `srcwalk_callers` |
|
|
72
|
+
| Who reaches this transitively? | `srcwalk_callers({ depth: 2 })` |
|
|
73
|
+
| What does this call? | `srcwalk_callees` |
|
|
74
|
+
| Ordered calls + arg slots | `srcwalk_callees({ detailed: true })` |
|
|
75
|
+
| Quick orientation slice | `srcwalk_flow` |
|
|
76
|
+
| File imports and dependents | `srcwalk_deps` |
|
|
77
|
+
| Heuristic blast-radius | `srcwalk_impact` (verify with callers) |
|
|
78
|
+
|
|
79
|
+
## Default Workflows
|
|
80
|
+
|
|
81
|
+
### Explore unfamiliar code
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
srcwalk_map({ scope: "." })
|
|
85
|
+
srcwalk_search({ query: "likely_symbol", scope: "src" })
|
|
86
|
+
srcwalk_read({ path: "src/file.ts:42" }) // jump to line
|
|
87
|
+
srcwalk_read({ path: "src/file.ts:44-89" }) // range shortcut (v1.0.0)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Read a large file
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
srcwalk_read({ path: "src/file.ts" }) // structural outline
|
|
94
|
+
srcwalk_read({ path: "src/file.ts", section: "handleAuth" }) // drill into symbol
|
|
95
|
+
srcwalk_read({ path: "src/file.ts", section: "44-89" }) // exact range
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Prefer outline/section reads before `full: true`.
|
|
99
|
+
|
|
100
|
+
### Find and drill into symbols
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
srcwalk_search({ query: "handleAuth", scope: "src" })
|
|
104
|
+
srcwalk_search({ query: "A, B, C", scope: "src" }) // multi-symbol
|
|
105
|
+
srcwalk_search({ query: "handleAuth", expand: 2 }) // inline source
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Trace call graph
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
// upstream
|
|
112
|
+
srcwalk_callers({ symbol: "handleAuth", scope: "src" })
|
|
113
|
+
srcwalk_callers({ symbol: "handleAuth", depth: 2, scope: "src" }) // transitive
|
|
114
|
+
srcwalk_callers({ symbol: "handleAuth", filter: "args:3", scope: "src" })
|
|
115
|
+
srcwalk_callers({ symbol: "handleAuth", countBy: "file", scope: "src" })
|
|
116
|
+
|
|
117
|
+
// downstream
|
|
118
|
+
srcwalk_callees({ symbol: "handleAuth", scope: "src" })
|
|
119
|
+
srcwalk_callees({ symbol: "handleAuth", detailed: true, scope: "src" }) // ordered sites
|
|
120
|
+
srcwalk_callees({ symbol: "handleAuth", depth: 2, scope: "src" }) // transitive
|
|
121
|
+
|
|
122
|
+
// quick orientation
|
|
123
|
+
srcwalk_flow({ symbol: "handleAuth", scope: "src" })
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Use `srcwalk_search({ kind: "callers" })` for quick single-hop. Use `srcwalk_callers` when you need depth, filters, or aggregation.
|
|
127
|
+
|
|
128
|
+
> Note: `--count-by` and `--depth` are mutually exclusive in `srcwalk_callers` — use one or the other, not both.
|
|
129
|
+
|
|
130
|
+
### Check file blast radius
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
srcwalk_deps({ path: "src/auth.ts" })
|
|
134
|
+
srcwalk_impact({ symbol: "handleAuth", scope: "src" }) // heuristic; follow up with callers
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## v1.0.0 Features
|
|
138
|
+
|
|
139
|
+
- **Path range shortcut**: `srcwalk_read({ path: "file:start-end" })` reads a line range directly — no need to pass `section` separately
|
|
140
|
+
- **Dependency-aware map**: `srcwalk_map` now shows local relation groups and outbound dependency previews for narrowed scopes
|
|
141
|
+
- **JS/TS artifact navigation**: bundle anchors, artifact reads, artifact search snippets, and artifact caller/callee support
|
|
142
|
+
- **Improved UX**: more compact semantic rows, directory grouping, footer tips, and clearer scope/depth wording across all commands
|
|
143
|
+
|
|
144
|
+
## Critical Rules
|
|
145
|
+
|
|
146
|
+
- **Do NOT** use built-in `read`/`grep`/`find` when srcwalk_* tools can answer
|
|
147
|
+
- **Do NOT** re-read files already shown in expanded `srcwalk_search` results
|
|
148
|
+
- `srcwalk_impact` is heuristic, not proof — verify with `srcwalk_callers` or exact reads
|
|
149
|
+
- `srcwalk_flow` may collapse nested/fluent chains — drill with `srcwalk_callees({ detailed: true })` when inner calls matter
|
|
150
|
+
- Follow `> Next:` footers in output — they suggest the best next command
|
|
151
|
+
- Scope paths are **relative to Pi's CWD** (`.pi/` in this project). Use `scope: "extensions"` not `scope: ".pi/extensions"`
|
|
152
|
+
|
|
153
|
+
## Supported Languages
|
|
154
|
+
|
|
155
|
+
Rust, TypeScript, TSX, JavaScript, Python, Go, Java, Scala, C, C++, Ruby, PHP, C#, Swift, Elixir, Kotlin. Unsupported files still get smart text/outline reads.
|
|
156
|
+
|
|
157
|
+
## Setup
|
|
158
|
+
|
|
159
|
+
The srcwalk plugin is auto-discovered from `.opencode/plugin/srcwalk.ts`. No registration needed.
|
|
160
|
+
|
|
161
|
+
All scope paths are relative to the **project root directory**. The default scope resolves from the project root.
|