opencodekit 0.20.6 → 0.20.8
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 +48 -0
- package/dist/template/.opencode/agent/build.md +3 -2
- package/dist/template/.opencode/agent/explore.md +14 -14
- package/dist/template/.opencode/agent/general.md +1 -1
- package/dist/template/.opencode/agent/plan.md +1 -1
- package/dist/template/.opencode/agent/review.md +1 -1
- package/dist/template/.opencode/agent/vision.md +0 -9
- package/dist/template/.opencode/command/compound.md +102 -28
- package/dist/template/.opencode/command/curate.md +299 -0
- package/dist/template/.opencode/command/lfg.md +1 -0
- package/dist/template/.opencode/command/ship.md +1 -0
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +0 -5
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/pnpm-lock.yaml +791 -9
- package/dist/template/.opencode/skill/api-and-interface-design/SKILL.md +162 -0
- package/dist/template/.opencode/skill/beads/SKILL.md +10 -9
- package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +10 -10
- package/dist/template/.opencode/skill/ci-cd-and-automation/SKILL.md +202 -0
- package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +253 -0
- package/dist/template/.opencode/skill/code-simplification/SKILL.md +211 -0
- package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +12 -0
- package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +16 -6
- package/dist/template/.opencode/skill/deprecation-and-migration/SKILL.md +189 -0
- package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +12 -48
- package/dist/template/.opencode/skill/documentation-and-adrs/SKILL.md +220 -0
- package/dist/template/.opencode/skill/incremental-implementation/SKILL.md +191 -0
- package/dist/template/.opencode/skill/performance-optimization/SKILL.md +236 -0
- package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +11 -0
- package/dist/template/.opencode/skill/reflection-checkpoints/SKILL.md +183 -0
- package/dist/template/.opencode/skill/security-and-hardening/SKILL.md +296 -0
- package/dist/template/.opencode/skill/structured-edit/SKILL.md +10 -0
- package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +66 -1
- package/package.json +1 -1
- package/dist/template/.opencode/skill/beads-bridge/SKILL.md +0 -321
- package/dist/template/.opencode/skill/code-navigation/SKILL.md +0 -130
- package/dist/template/.opencode/skill/mqdh/SKILL.md +0 -171
- package/dist/template/.opencode/skill/obsidian/SKILL.md +0 -192
- package/dist/template/.opencode/skill/obsidian/mcp.json +0 -22
- package/dist/template/.opencode/skill/pencil/SKILL.md +0 -72
- package/dist/template/.opencode/skill/ralph/SKILL.md +0 -296
- package/dist/template/.opencode/skill/tilth-cli/SKILL.md +0 -207
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +0 -299
package/dist/index.js
CHANGED
|
@@ -22,6 +22,20 @@ When instructions conflict:
|
|
|
22
22
|
|
|
23
23
|
1. **Security** — never expose or invent credentials
|
|
24
24
|
2. **Anti-hallucination** — verify before asserting; if context is missing, prefer lookup over guessing; if you must proceed without full context, label assumptions explicitly and choose a reversible action
|
|
25
|
+
|
|
26
|
+
### Source Hierarchy
|
|
27
|
+
|
|
28
|
+
When verifying facts or API usage, rank sources by authority:
|
|
29
|
+
|
|
30
|
+
| Tier | Source | Trust Level |
|
|
31
|
+
| --------------------- | ------------------------------------------------------------ | ------------------------------------- |
|
|
32
|
+
| **1 (Authoritative)** | Official documentation, type definitions, source code | High — use directly |
|
|
33
|
+
| **2 (Supportive)** | Official blog posts, changelogs, web standards specs | Medium — cross-reference |
|
|
34
|
+
| **3 (Contextual)** | Browser compat tables, release notes, migration guides | Medium — verify currency |
|
|
35
|
+
| **4 (Unreliable)** | Stack Overflow, blog posts, AI-generated docs, training data | Low — never cite without verification |
|
|
36
|
+
|
|
37
|
+
If a source from Tier 4 conflicts with Tier 1-2, the higher tier wins. If Tier 1-2 sources conflict with each other, state the conflict explicitly.
|
|
38
|
+
|
|
25
39
|
3. **User intent** — do what was asked, simply and directly
|
|
26
40
|
4. **Agency preservation** — "likely difficult" ≠ "impossible" ≠ "don't try"
|
|
27
41
|
5. This `AGENTS.md`
|
|
@@ -45,6 +59,7 @@ If a newer user instruction conflicts with an earlier one, follow the newer inst
|
|
|
45
59
|
- Stay in scope; no speculative refactors
|
|
46
60
|
- Read files before editing
|
|
47
61
|
- Delegate when work is large, uncertain, or cross-domain
|
|
62
|
+
- When you notice something that should be improved but isn't part of the current task, log it as **"NOTICED BUT NOT TOUCHING: [description]"** and continue with the current task. This makes scope-creep visible and auditable without derailing the work.
|
|
48
63
|
|
|
49
64
|
### Simplicity First
|
|
50
65
|
|
|
@@ -318,6 +333,39 @@ For major tracked work:
|
|
|
318
333
|
- **Agent prompts** stay role-focused; don't duplicate long checklists
|
|
319
334
|
- **Load skills on demand**, not by default
|
|
320
335
|
|
|
336
|
+
### Intent → Skill Mapping
|
|
337
|
+
|
|
338
|
+
When user intent is clear, load the appropriate skills:
|
|
339
|
+
|
|
340
|
+
| Intent | Phase | Skills to Load |
|
|
341
|
+
| ------------------------- | -------------- | ---------------------------------------------------------------------------------- |
|
|
342
|
+
| "Build a feature" | Define → Build | `prd` → `writing-plans` → `incremental-implementation` + `test-driven-development` |
|
|
343
|
+
| "Fix a bug" | Verify | `systematic-debugging` → `root-cause-tracing` |
|
|
344
|
+
| "Review code" | Review | `receiving-code-review` or `requesting-code-review` |
|
|
345
|
+
| "Simplify / refactor" | Review | `code-simplification` |
|
|
346
|
+
| "Ship it" | Ship | `verification-before-completion` → `finishing-a-development-branch` |
|
|
347
|
+
| "Plan this" | Plan | `brainstorming` → `prd` → `writing-plans` |
|
|
348
|
+
| "Execute a plan" | Build | `executing-plans` + `subagent-driven-development` |
|
|
349
|
+
| "Debug flaky tests" | Verify | `condition-based-waiting` + `systematic-debugging` |
|
|
350
|
+
| "Debug in browser" | Verify | `chrome-devtools` or `playwright` |
|
|
351
|
+
| "Write / fix tests" | Verify | `test-driven-development` + `testing-anti-patterns` |
|
|
352
|
+
| "Build UI" | Build | `frontend-design` + `design-taste-frontend` |
|
|
353
|
+
| "Build UI from mockup" | Build | `mockup-to-code` + `frontend-design` |
|
|
354
|
+
| "Redesign existing UI" | Build | `redesign-existing-projects` + `design-taste-frontend` |
|
|
355
|
+
| "Review UI / UX" | Review | `web-design-guidelines` + `visual-analysis` + `accessibility-audit` |
|
|
356
|
+
| "Audit accessibility" | Verify | `accessibility-audit` |
|
|
357
|
+
| "Build React / Next.js" | Build | `react-best-practices` + `frontend-design` |
|
|
358
|
+
| "Research X" | Define | `deep-research` or `opensrc` |
|
|
359
|
+
| "Design an API" | Build | `api-and-interface-design` + `documentation-and-adrs` |
|
|
360
|
+
| "Set up CI/CD" | Ship | `ci-cd-and-automation` + `verification-gates` |
|
|
361
|
+
| "Deploy app" | Ship | `vercel-deploy-claimable` |
|
|
362
|
+
| "Deprecate / migrate" | Ship | `deprecation-and-migration` + `incremental-implementation` |
|
|
363
|
+
| "Write docs / record ADR" | Define | `documentation-and-adrs` |
|
|
364
|
+
| "Optimize performance" | Verify | `performance-optimization` |
|
|
365
|
+
| "Harden security" | Verify | `security-and-hardening` + `defense-in-depth` |
|
|
366
|
+
| "Verify before merge" | Ship | `reconcile` + `verification-gates` |
|
|
367
|
+
| "Create a skill" | Build | `skill-creator` + `writing-skills` |
|
|
368
|
+
|
|
321
369
|
---
|
|
322
370
|
|
|
323
371
|
## Context Management
|
|
@@ -92,6 +92,7 @@ Every diff you produce must meet these standards:
|
|
|
92
92
|
- **Strong typing** — no `as any`, no `@ts-ignore` unless documented with a reason
|
|
93
93
|
- **Reuse existing interfaces** — extend or compose existing types before creating new ones
|
|
94
94
|
- **Minimal tests** — if the file you're editing has adjacent tests, add coverage for your change
|
|
95
|
+
|
|
95
96
|
## Ritual Structure
|
|
96
97
|
|
|
97
98
|
Each task follows a five-phase ritual. Constraints create the container; the ritual transforms intent into output.
|
|
@@ -181,9 +182,9 @@ Load contextually when needed:
|
|
|
181
182
|
| Debug/bug work | `systematic-debugging`, `root-cause-tracing` |
|
|
182
183
|
| Test-heavy work | `test-driven-development`, `testing-anti-patterns` |
|
|
183
184
|
| UI work | `frontend-design`, `react-best-practices` |
|
|
184
|
-
| Parallel orchestration | `swarm-coordination
|
|
185
|
+
| Parallel orchestration | `swarm-coordination` |
|
|
185
186
|
| Before completion | `requesting-code-review`, `finishing-a-development-branch` |
|
|
186
|
-
| Codebase exploration | `code-
|
|
187
|
+
| Codebase exploration | `code-search-patterns` |
|
|
187
188
|
|
|
188
189
|
## Execution Mode
|
|
189
190
|
|
|
@@ -43,20 +43,20 @@ Find relevant files, symbols, and usage paths quickly for the caller.
|
|
|
43
43
|
|
|
44
44
|
## Tools — Use These for Local Code Search
|
|
45
45
|
|
|
46
|
-
**Prefer tilth CLI** (`npx -y tilth`) for symbol search and file reading — it combines grep + tree-sitter + cat into one call. See `
|
|
47
|
-
|
|
48
|
-
| Tool
|
|
49
|
-
|
|
50
|
-
| `tilth` (symbol)
|
|
51
|
-
| `tilth` (read)
|
|
52
|
-
| `tilth` (glob)
|
|
53
|
-
| `tilth` (map)
|
|
54
|
-
| `grep`
|
|
55
|
-
| `glob`
|
|
56
|
-
| `lsp` (goToDefinition) | Jump to symbol definition
|
|
57
|
-
| `lsp` (findReferences) | Find all usages of a symbol
|
|
58
|
-
| `lsp` (hover)
|
|
59
|
-
| `read`
|
|
46
|
+
**Prefer tilth CLI** (`npx -y tilth`) for symbol search and file reading — it combines grep + tree-sitter + cat into one call. See `code-search-patterns` skill for full syntax.
|
|
47
|
+
|
|
48
|
+
| Tool | Use For | Example |
|
|
49
|
+
| ---------------------- | ----------------------------------------------- | -------------------------------------------------------------------------- |
|
|
50
|
+
| `tilth` (symbol) | AST-aware symbol search (definitions + usages) | `npx -y tilth handleAuth --scope src/` |
|
|
51
|
+
| `tilth` (read) | Smart file reading with outline for large files | `npx -y tilth src/auth.ts --section 44-89` |
|
|
52
|
+
| `tilth` (glob) | Find files by pattern with token estimates | `npx -y tilth "*.test.ts" --scope src/` |
|
|
53
|
+
| `tilth` (map) | Codebase structural overview | `npx -y tilth --map --scope src/` |
|
|
54
|
+
| `grep` | Find text/regex patterns in files | `grep(pattern: "PatchEntry", include: "*.ts")` |
|
|
55
|
+
| `glob` | Find files by name/pattern | `glob(pattern: "src/**/*.ts")` |
|
|
56
|
+
| `lsp` (goToDefinition) | Jump to symbol definition | `lsp(operation: "goToDefinition", filePath: "...", line: N, character: N)` |
|
|
57
|
+
| `lsp` (findReferences) | Find all usages of a symbol | `lsp(operation: "findReferences", ...)` |
|
|
58
|
+
| `lsp` (hover) | Get type info and docs | `lsp(operation: "hover", ...)` |
|
|
59
|
+
| `read` | Read file content | `read(filePath: "src/utils/patch.ts")` |
|
|
60
60
|
|
|
61
61
|
**NEVER** use `websearch`, `webfetch`, or `codesearch` — those search the internet, not your project.
|
|
62
62
|
**NEVER** modify files or run destructive commands — bash is for tilth CLI and read-only operations only.
|
|
@@ -157,7 +157,7 @@ Before claiming task done:
|
|
|
157
157
|
4. Run validation (lint/typecheck/tests as applicable)
|
|
158
158
|
5. Report changed files with `file:line` references
|
|
159
159
|
|
|
160
|
-
**Code navigation:** Use tilth CLI for AST-aware search when available — see `
|
|
160
|
+
**Code navigation:** Use tilth CLI for AST-aware search when available — see `code-search-patterns` skill for syntax. Prefer `npx -y tilth <symbol> --scope <dir>` over grep for symbol definitions.
|
|
161
161
|
|
|
162
162
|
## Progress Updates
|
|
163
163
|
|
|
@@ -386,7 +386,7 @@ When planning under constraint:
|
|
|
386
386
|
4. **Release**: Write actionable plan with exact file paths, commands, and verification
|
|
387
387
|
5. **Reset**: End with a concrete next command (`/ship <id>`, `/start <child-id>`, etc.)
|
|
388
388
|
|
|
389
|
-
**Code navigation:** Use tilth CLI for AST-aware search and `--map` for structural overview — see `
|
|
389
|
+
**Code navigation:** Use tilth CLI for AST-aware search and `--map` for structural overview — see `code-search-patterns` skill.
|
|
390
390
|
|
|
391
391
|
## Output
|
|
392
392
|
|
|
@@ -178,7 +178,7 @@ return <div>No messages</div> // State exists but not used
|
|
|
178
178
|
3. For each finding: explain why, when it happens, and impact
|
|
179
179
|
4. If no qualifying findings exist, say so explicitly
|
|
180
180
|
|
|
181
|
-
**Code navigation:** Use tilth CLI for AST-aware symbol search when tracing cross-file dependencies — see `
|
|
181
|
+
**Code navigation:** Use tilth CLI for AST-aware symbol search when tracing cross-file dependencies — see `code-search-patterns` skill. Prefer `npx -y tilth <symbol> --scope <dir>` over grep for understanding call chains.
|
|
182
182
|
|
|
183
183
|
## Output
|
|
184
184
|
|
|
@@ -71,7 +71,6 @@ Route by need:
|
|
|
71
71
|
| Mockup-to-implementation mapping | `mockup-to-code` |
|
|
72
72
|
| Distinctive UI direction / anti-slop guidance | `frontend-design` |
|
|
73
73
|
| Figma design data (read/write via MCP) | `figma-go` |
|
|
74
|
-
| OpenPencil design-as-code workflow | `pencil` |
|
|
75
74
|
| Brand identity extraction from URLs | `webclaw` |
|
|
76
75
|
|
|
77
76
|
### Taste-Skill Variants (installed)
|
|
@@ -108,14 +107,6 @@ If Figma is available, request MCP access via `figma-go` and ground feedback in
|
|
|
108
107
|
2. Use `figma-go` to pull `get_design_context` or `get_node`
|
|
109
108
|
3. Reference node IDs in findings for traceability
|
|
110
109
|
|
|
111
|
-
## OpenPencil Workflow (when no Figma)
|
|
112
|
-
|
|
113
|
-
If design must be created or iterated quickly, use OpenPencil via the legacy `pencil` skill:
|
|
114
|
-
|
|
115
|
-
1. Create/modify `.op` via `op` CLI
|
|
116
|
-
2. Export PNGs or code for review
|
|
117
|
-
3. Provide audit with node-level critique where possible
|
|
118
|
-
|
|
119
110
|
## Brand Extraction Workflow (when auditing existing sites)
|
|
120
111
|
|
|
121
112
|
Use `webclaw` MCP to extract brand identity from live sites:
|
|
@@ -8,10 +8,17 @@ agent: build
|
|
|
8
8
|
|
|
9
9
|
Capture what was learned. This is the flywheel step — each cycle makes the next cycle faster.
|
|
10
10
|
|
|
11
|
-
> **Workflow:** `/plan` → `/ship` →
|
|
11
|
+
> **Workflow:** `/plan` → `/ship` → **`/compound`** → `/pr`
|
|
12
12
|
>
|
|
13
13
|
> Run after every completed task, review, or PR merge. The value compounds over time.
|
|
14
14
|
|
|
15
|
+
## Load Skills
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
skill({ name: "memory-system" });
|
|
19
|
+
skill({ name: "verification-before-completion" });
|
|
20
|
+
```
|
|
21
|
+
|
|
15
22
|
## What This Does
|
|
16
23
|
|
|
17
24
|
Extracts learnings from the just-completed work and stores them as structured observations in memory,
|
|
@@ -47,7 +54,7 @@ For each finding, assign a type:
|
|
|
47
54
|
| `pattern` | A reusable approach confirmed to work in this codebase | "Always use X pattern for Y type of component" |
|
|
48
55
|
| `bugfix` | A non-obvious bug and its root cause | "Bun doesn't support X, use Y instead" |
|
|
49
56
|
| `decision` | An architectural or design choice with rationale | "Chose JWT over sessions because..." |
|
|
50
|
-
| `
|
|
57
|
+
| `warning` | A footgun, constraint, or thing that looks wrong but isn't | "Don't modify dist/ directly, build overwrites" |
|
|
51
58
|
| `discovery` | A non-obvious fact about the codebase or its dependencies | "Build copies .opencode/ to dist/template/" |
|
|
52
59
|
| `warning` | Something that will break if not followed | "Always run lint:fix before commit" |
|
|
53
60
|
|
|
@@ -60,19 +67,60 @@ For each learning worth keeping, create an observation:
|
|
|
60
67
|
|
|
61
68
|
```typescript
|
|
62
69
|
observation({
|
|
63
|
-
type: "pattern", // or bugfix, decision,
|
|
70
|
+
type: "pattern", // or bugfix, decision, discovery, warning, learning
|
|
64
71
|
title: "[Concise, searchable title — what someone would search for]",
|
|
65
72
|
narrative: "[What happened, why it matters, how to apply it]",
|
|
66
73
|
facts: "[comma, separated, key, facts]",
|
|
67
74
|
concepts: "[searchable, keywords, for, future, retrieval]",
|
|
68
75
|
files_modified: "[relevant/file.ts if applicable]",
|
|
69
76
|
confidence: "high", // high=verified, medium=likely, low=speculative
|
|
77
|
+
// ByteRover-inspired quality fields:
|
|
78
|
+
subtitle: "[One-line semantic summary — WHY this matters for future work]",
|
|
70
79
|
});
|
|
71
80
|
```
|
|
72
81
|
|
|
73
82
|
**Minimum viable:** title + narrative. Everything else is bonus.
|
|
74
83
|
|
|
75
|
-
|
|
84
|
+
**Quality enrichment:** Add `subtitle` (WHY it matters) for high-impact observations. Skip for routine findings.
|
|
85
|
+
|
|
86
|
+
## Phase 4: Structural Loss Prevention
|
|
87
|
+
|
|
88
|
+
When superseding an older observation, prevent accidental knowledge loss.
|
|
89
|
+
|
|
90
|
+
**Trigger:** Only runs when `supersedes: "ID"` is set on a new observation.
|
|
91
|
+
|
|
92
|
+
### Step 1: Read the old observation
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
const old = memory_get({ ids: "<superseded-id>" });
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Step 2: Detect structural loss
|
|
99
|
+
|
|
100
|
+
Compare the new observation against the old one:
|
|
101
|
+
|
|
102
|
+
| Field | Loss Detection |
|
|
103
|
+
| ---------------- | --------------------------------------------------------------- |
|
|
104
|
+
| `facts` | Old facts not present in new facts (comma-separated comparison) |
|
|
105
|
+
| `concepts` | Old concepts not present in new concepts |
|
|
106
|
+
| `narrative` | New narrative significantly shorter than old (< 50% length) |
|
|
107
|
+
| `files_modified` | Old file paths not present in new list |
|
|
108
|
+
|
|
109
|
+
### Step 3: Auto-merge if loss detected
|
|
110
|
+
|
|
111
|
+
- **Array fields** (facts, concepts): Union merge — keep all old items, add new items, deduplicate
|
|
112
|
+
- **Scalar fields** (narrative): If new is shorter, append `\n\n[Preserved from superseded observation #ID:]\n` + old narrative section
|
|
113
|
+
- **File paths**: Union merge all paths
|
|
114
|
+
|
|
115
|
+
### Step 4: Flag for review if high-impact
|
|
116
|
+
|
|
117
|
+
If the old observation had `confidence: "high"` and the new one has `confidence: "medium"` or `confidence: "low"`, flag with a warning:
|
|
118
|
+
|
|
119
|
+
> ⚠️ Confidence downgrade detected: superseding a high-confidence observation (#ID) with lower confidence. Verify this is intentional.
|
|
120
|
+
|
|
121
|
+
**Principle:** Knowledge should accumulate, not be replaced. Merging is safer than overwriting.
|
|
122
|
+
|
|
123
|
+
## Phase 5: Check AGENTS.md / Skill Updates
|
|
76
124
|
|
|
77
125
|
Ask: does this learning belong as a permanent rule?
|
|
78
126
|
|
|
@@ -88,18 +136,18 @@ If MAYBE (it's a pattern, not a rule):
|
|
|
88
136
|
|
|
89
137
|
**Rule:** AGENTS.md changes require user confirmation. Observations are automatic.
|
|
90
138
|
|
|
91
|
-
## Phase
|
|
139
|
+
## Phase 6: Update Living Documentation
|
|
92
140
|
|
|
93
141
|
Check if the shipped work changed architecture, APIs, conventions, or tech stack. If so, update the relevant project docs.
|
|
94
142
|
|
|
95
143
|
**Check each:**
|
|
96
144
|
|
|
97
|
-
| Doc
|
|
98
|
-
|
|
|
99
|
-
| `tech-stack.md`
|
|
100
|
-
| `project.md`
|
|
101
|
-
| `gotchas.md`
|
|
102
|
-
| `AGENTS.md` (project) | New convention established, boundary rule needed
|
|
145
|
+
| Doc | Update When | What to Update |
|
|
146
|
+
| --------------------- | --------------------------------------------------------- | --------------------------------------------------- |
|
|
147
|
+
| `tech-stack.md` | New dependency added, build tool changed, runtime updated | Dependencies list, build tools, constraints |
|
|
148
|
+
| `project.md` | Architecture changed, new key files, success criteria met | Architecture section, key files table, phase status |
|
|
149
|
+
| `gotchas.md` | New footgun discovered, constraint found | Add the gotcha with context |
|
|
150
|
+
| `AGENTS.md` (project) | New convention established, boundary rule needed | Boundaries, gotchas, code example sections |
|
|
103
151
|
|
|
104
152
|
```typescript
|
|
105
153
|
// Check what changed
|
|
@@ -110,7 +158,8 @@ memory_update({ file: "project/gotchas", content: "...", mode: "append" });
|
|
|
110
158
|
```
|
|
111
159
|
|
|
112
160
|
**Rule:** Only update docs when the change is structural (new pattern, new dep, new constraint). Don't update for routine bug fixes or small features. Ask user before modifying `AGENTS.md`.
|
|
113
|
-
|
|
161
|
+
|
|
162
|
+
## Phase 7: Search for Related Past Observations
|
|
114
163
|
|
|
115
164
|
```typescript
|
|
116
165
|
// Check if this updates or supersedes an older observation
|
|
@@ -128,24 +177,48 @@ observation({
|
|
|
128
177
|
});
|
|
129
178
|
```
|
|
130
179
|
|
|
131
|
-
## Phase
|
|
180
|
+
## Phase 8: Output Summary
|
|
132
181
|
|
|
133
|
-
|
|
182
|
+
Present extracted learnings for user review before finalizing:
|
|
134
183
|
|
|
135
184
|
```
|
|
136
|
-
## Compound
|
|
185
|
+
## Compound Review
|
|
137
186
|
|
|
138
187
|
**Work reviewed:** [brief description]
|
|
139
|
-
**Learnings
|
|
188
|
+
**Learnings extracted:** [N] observations
|
|
189
|
+
|
|
190
|
+
| # | Type | Title | Impact | Action |
|
|
191
|
+
|---|------|-------|--------|--------|
|
|
192
|
+
| 1 | pattern | ... | high | ✅ Store |
|
|
193
|
+
| 2 | warning | ... | medium | ✅ Store |
|
|
194
|
+
| 3 | bugfix | ... | low | ⏭️ Skip (routine) |
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
question({
|
|
199
|
+
questions: [
|
|
200
|
+
{
|
|
201
|
+
header: "Approve Learnings",
|
|
202
|
+
question: "Review extracted learnings. Store all approved observations?",
|
|
203
|
+
options: [
|
|
204
|
+
{ label: "Store all (Recommended)", description: "Persist all marked ✅" },
|
|
205
|
+
{ label: "Let me adjust", description: "I'll modify before storing" },
|
|
206
|
+
{ label: "Skip compound", description: "Nothing worth persisting" },
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
});
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**After approval:** Store observations and report final summary:
|
|
140
214
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
| 1 | pattern | ... | auth, jwt |
|
|
144
|
-
| 2 | gotcha | ... | node, build |
|
|
145
|
-
| 3 | bugfix | ... | typecheck, strict-mode |
|
|
215
|
+
```
|
|
216
|
+
## Compound Summary
|
|
146
217
|
|
|
218
|
+
**Observations stored:** [N]
|
|
219
|
+
**Superseded:** [N] older observations updated
|
|
147
220
|
**AGENTS.md updates suggested:** [yes/no - describe if yes]
|
|
148
|
-
**Next recommended:** /pr
|
|
221
|
+
**Next recommended:** /pr (or /plan <next-bead-id>)
|
|
149
222
|
```
|
|
150
223
|
|
|
151
224
|
## When Nothing to Compound
|
|
@@ -158,9 +231,10 @@ Don't force observations. Quality over quantity.
|
|
|
158
231
|
|
|
159
232
|
## Related Commands
|
|
160
233
|
|
|
161
|
-
| Need
|
|
162
|
-
|
|
|
163
|
-
| Full chain
|
|
164
|
-
| Review
|
|
165
|
-
| Ship the work
|
|
166
|
-
|
|
|
234
|
+
| Need | Command |
|
|
235
|
+
| --------------- | ------------------ |
|
|
236
|
+
| Full chain | `/lfg` |
|
|
237
|
+
| Review codebase | `/review-codebase` |
|
|
238
|
+
| Ship the work | `/ship` |
|
|
239
|
+
| Curate memory | `/curate` |
|
|
240
|
+
| Create PR | `/pr` |
|