opencastle 0.1.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/LICENSE +21 -0
- package/README.md +215 -0
- package/bin/cli.mjs +69 -0
- package/dist/cli/adapters/claude-code.d.ts +22 -0
- package/dist/cli/adapters/claude-code.d.ts.map +1 -0
- package/dist/cli/adapters/claude-code.js +237 -0
- package/dist/cli/adapters/claude-code.js.map +1 -0
- package/dist/cli/adapters/cursor.d.ts +20 -0
- package/dist/cli/adapters/cursor.d.ts.map +1 -0
- package/dist/cli/adapters/cursor.js +231 -0
- package/dist/cli/adapters/cursor.js.map +1 -0
- package/dist/cli/adapters/vscode.d.ts +20 -0
- package/dist/cli/adapters/vscode.d.ts.map +1 -0
- package/dist/cli/adapters/vscode.js +132 -0
- package/dist/cli/adapters/vscode.js.map +1 -0
- package/dist/cli/copy.d.ts +14 -0
- package/dist/cli/copy.d.ts.map +1 -0
- package/dist/cli/copy.js +62 -0
- package/dist/cli/copy.js.map +1 -0
- package/dist/cli/dashboard.d.ts +3 -0
- package/dist/cli/dashboard.d.ts.map +1 -0
- package/dist/cli/dashboard.js +183 -0
- package/dist/cli/dashboard.js.map +1 -0
- package/dist/cli/diff.d.ts +3 -0
- package/dist/cli/diff.d.ts.map +1 -0
- package/dist/cli/diff.js +27 -0
- package/dist/cli/diff.js.map +1 -0
- package/dist/cli/eject.d.ts +3 -0
- package/dist/cli/eject.d.ts.map +1 -0
- package/dist/cli/eject.js +27 -0
- package/dist/cli/eject.js.map +1 -0
- package/dist/cli/init.d.ts +3 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +92 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/manifest.d.ts +14 -0
- package/dist/cli/manifest.d.ts.map +1 -0
- package/dist/cli/manifest.js +34 -0
- package/dist/cli/manifest.js.map +1 -0
- package/dist/cli/mcp.d.ts +14 -0
- package/dist/cli/mcp.d.ts.map +1 -0
- package/dist/cli/mcp.js +35 -0
- package/dist/cli/mcp.js.map +1 -0
- package/dist/cli/prompt.d.ts +12 -0
- package/dist/cli/prompt.d.ts.map +1 -0
- package/dist/cli/prompt.js +104 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/run/adapters/claude-code.d.ts +16 -0
- package/dist/cli/run/adapters/claude-code.d.ts.map +1 -0
- package/dist/cli/run/adapters/claude-code.js +82 -0
- package/dist/cli/run/adapters/claude-code.js.map +1 -0
- package/dist/cli/run/adapters/copilot.d.ts +16 -0
- package/dist/cli/run/adapters/copilot.d.ts.map +1 -0
- package/dist/cli/run/adapters/copilot.js +84 -0
- package/dist/cli/run/adapters/copilot.js.map +1 -0
- package/dist/cli/run/adapters/cursor.d.ts +16 -0
- package/dist/cli/run/adapters/cursor.d.ts.map +1 -0
- package/dist/cli/run/adapters/cursor.js +81 -0
- package/dist/cli/run/adapters/cursor.js.map +1 -0
- package/dist/cli/run/adapters/index.d.ts +14 -0
- package/dist/cli/run/adapters/index.d.ts.map +1 -0
- package/dist/cli/run/adapters/index.js +35 -0
- package/dist/cli/run/adapters/index.js.map +1 -0
- package/dist/cli/run/executor.d.ts +15 -0
- package/dist/cli/run/executor.d.ts.map +1 -0
- package/dist/cli/run/executor.js +249 -0
- package/dist/cli/run/executor.js.map +1 -0
- package/dist/cli/run/reporter.d.ts +10 -0
- package/dist/cli/run/reporter.d.ts.map +1 -0
- package/dist/cli/run/reporter.js +112 -0
- package/dist/cli/run/reporter.js.map +1 -0
- package/dist/cli/run/schema.d.ts +28 -0
- package/dist/cli/run/schema.d.ts.map +1 -0
- package/dist/cli/run/schema.js +511 -0
- package/dist/cli/run/schema.js.map +1 -0
- package/dist/cli/run.d.ts +6 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +123 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/stack-config.d.ts +12 -0
- package/dist/cli/stack-config.d.ts.map +1 -0
- package/dist/cli/stack-config.js +146 -0
- package/dist/cli/stack-config.js.map +1 -0
- package/dist/cli/types.d.ts +169 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/update.d.ts +3 -0
- package/dist/cli/update.d.ts.map +1 -0
- package/dist/cli/update.js +50 -0
- package/dist/cli/update.js.map +1 -0
- package/package.json +48 -0
- package/src/cli/adapters/claude-code.ts +287 -0
- package/src/cli/adapters/cursor.ts +377 -0
- package/src/cli/adapters/vscode.ts +168 -0
- package/src/cli/copy.ts +79 -0
- package/src/cli/dashboard.ts +225 -0
- package/src/cli/diff.ts +44 -0
- package/src/cli/eject.ts +39 -0
- package/src/cli/init.ts +120 -0
- package/src/cli/manifest.ts +45 -0
- package/src/cli/mcp.ts +49 -0
- package/src/cli/prompt.ts +115 -0
- package/src/cli/run/adapters/claude-code.ts +95 -0
- package/src/cli/run/adapters/copilot.ts +97 -0
- package/src/cli/run/adapters/cursor.ts +94 -0
- package/src/cli/run/adapters/index.ts +40 -0
- package/src/cli/run/executor.ts +292 -0
- package/src/cli/run/reporter.ts +129 -0
- package/src/cli/run/schema.ts +595 -0
- package/src/cli/run.ts +137 -0
- package/src/cli/stack-config.ts +180 -0
- package/src/cli/types.ts +207 -0
- package/src/cli/update.ts +75 -0
- package/src/dashboard/astro.config.mjs +6 -0
- package/src/dashboard/package-lock.json +5455 -0
- package/src/dashboard/package.json +14 -0
- package/src/dashboard/public/data/delegations.ndjson +35 -0
- package/src/dashboard/public/data/panels.ndjson +13 -0
- package/src/dashboard/public/data/sessions.ndjson +50 -0
- package/src/dashboard/public/icon-192.png +0 -0
- package/src/dashboard/scripts/generate-seed-data.ts +355 -0
- package/src/dashboard/src/layouts/Layout.astro +25 -0
- package/src/dashboard/src/pages/index.astro +1070 -0
- package/src/dashboard/src/styles/dashboard.css +1078 -0
- package/src/dashboard/tsconfig.json +6 -0
- package/src/orchestrator/agent-workflows/README.md +22 -0
- package/src/orchestrator/agent-workflows/bug-fix.md +128 -0
- package/src/orchestrator/agent-workflows/data-pipeline.md +145 -0
- package/src/orchestrator/agent-workflows/database-migration.md +159 -0
- package/src/orchestrator/agent-workflows/feature-implementation.md +223 -0
- package/src/orchestrator/agent-workflows/performance-optimization.md +125 -0
- package/src/orchestrator/agent-workflows/refactoring.md +142 -0
- package/src/orchestrator/agent-workflows/schema-changes.md +164 -0
- package/src/orchestrator/agent-workflows/security-audit.md +148 -0
- package/src/orchestrator/agent-workflows/shared-delivery-phase.md +33 -0
- package/src/orchestrator/agents/api-designer.agent.md +68 -0
- package/src/orchestrator/agents/architect.agent.md +129 -0
- package/src/orchestrator/agents/content-engineer.agent.md +57 -0
- package/src/orchestrator/agents/copywriter.agent.md +95 -0
- package/src/orchestrator/agents/data-expert.agent.md +63 -0
- package/src/orchestrator/agents/database-engineer.agent.md +62 -0
- package/src/orchestrator/agents/developer.agent.md +66 -0
- package/src/orchestrator/agents/devops-expert.agent.md +57 -0
- package/src/orchestrator/agents/documentation-writer.agent.md +60 -0
- package/src/orchestrator/agents/performance-expert.agent.md +58 -0
- package/src/orchestrator/agents/release-manager.agent.md +72 -0
- package/src/orchestrator/agents/researcher.agent.md +145 -0
- package/src/orchestrator/agents/reviewer.agent.md +62 -0
- package/src/orchestrator/agents/security-expert.agent.md +64 -0
- package/src/orchestrator/agents/seo-specialist.agent.md +67 -0
- package/src/orchestrator/agents/team-lead.agent.md +644 -0
- package/src/orchestrator/agents/testing-expert.agent.md +85 -0
- package/src/orchestrator/agents/ui-ux-expert.agent.md +63 -0
- package/src/orchestrator/copilot-instructions.md +3 -0
- package/src/orchestrator/customizations/AGENT-EXPERTISE.md +325 -0
- package/src/orchestrator/customizations/AGENT-FAILURES.md +69 -0
- package/src/orchestrator/customizations/AGENT-PERFORMANCE.md +58 -0
- package/src/orchestrator/customizations/DISPUTES.md +162 -0
- package/src/orchestrator/customizations/KNOWLEDGE-GRAPH.md +10 -0
- package/src/orchestrator/customizations/LESSONS-LEARNED.md +70 -0
- package/src/orchestrator/customizations/README.md +59 -0
- package/src/orchestrator/customizations/agents/agent-registry.md +46 -0
- package/src/orchestrator/customizations/agents/skill-matrix.md +142 -0
- package/src/orchestrator/customizations/logs/README.md +181 -0
- package/src/orchestrator/customizations/logs/delegations.ndjson +1 -0
- package/src/orchestrator/customizations/logs/panels.ndjson +1 -0
- package/src/orchestrator/customizations/logs/sessions.ndjson +1 -0
- package/src/orchestrator/customizations/project/docs-structure.md +23 -0
- package/src/orchestrator/customizations/project/tracker-config.md +45 -0
- package/src/orchestrator/customizations/project.instructions.md +64 -0
- package/src/orchestrator/customizations/stack/api-config.md +37 -0
- package/src/orchestrator/customizations/stack/cms-config.md +26 -0
- package/src/orchestrator/customizations/stack/data-pipeline-config.md +41 -0
- package/src/orchestrator/customizations/stack/database-config.md +44 -0
- package/src/orchestrator/customizations/stack/deployment-config.md +45 -0
- package/src/orchestrator/customizations/stack/testing-config.md +56 -0
- package/src/orchestrator/instructions/ai-optimization.instructions.md +143 -0
- package/src/orchestrator/instructions/general.instructions.md +194 -0
- package/src/orchestrator/mcp.json +55 -0
- package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +235 -0
- package/src/orchestrator/prompts/brainstorm.prompt.md +115 -0
- package/src/orchestrator/prompts/bug-fix.prompt.md +141 -0
- package/src/orchestrator/prompts/create-skill.prompt.md +103 -0
- package/src/orchestrator/prompts/generate-task-spec.prompt.md +154 -0
- package/src/orchestrator/prompts/implement-feature.prompt.md +124 -0
- package/src/orchestrator/prompts/metrics-report.prompt.md +142 -0
- package/src/orchestrator/prompts/quick-refinement.prompt.md +137 -0
- package/src/orchestrator/prompts/resolve-pr-comments.prompt.md +100 -0
- package/src/orchestrator/skills/accessibility-standards/SKILL.md +164 -0
- package/src/orchestrator/skills/agent-hooks/SKILL.md +147 -0
- package/src/orchestrator/skills/agent-memory/SKILL.md +144 -0
- package/src/orchestrator/skills/api-patterns/SKILL.md +106 -0
- package/src/orchestrator/skills/browser-testing/SKILL.md +203 -0
- package/src/orchestrator/skills/code-commenting/SKILL.md +133 -0
- package/src/orchestrator/skills/contentful-cms/SKILL.md +43 -0
- package/src/orchestrator/skills/context-map/SKILL.md +135 -0
- package/src/orchestrator/skills/convex-database/SKILL.md +80 -0
- package/src/orchestrator/skills/data-engineering/SKILL.md +99 -0
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +49 -0
- package/src/orchestrator/skills/documentation-standards/SKILL.md +85 -0
- package/src/orchestrator/skills/fast-review/SKILL.md +327 -0
- package/src/orchestrator/skills/frontend-design/SKILL.md +42 -0
- package/src/orchestrator/skills/jira-management/SKILL.md +168 -0
- package/src/orchestrator/skills/memory-merger/SKILL.md +123 -0
- package/src/orchestrator/skills/nextjs-patterns/SKILL.md +75 -0
- package/src/orchestrator/skills/nx-workspace/SKILL.md +192 -0
- package/src/orchestrator/skills/panel-majority-vote/SKILL.md +184 -0
- package/src/orchestrator/skills/panel-majority-vote/panel-report.template.md +38 -0
- package/src/orchestrator/skills/performance-optimization/SKILL.md +101 -0
- package/src/orchestrator/skills/react-development/SKILL.md +117 -0
- package/src/orchestrator/skills/sanity-cms/SKILL.md +18 -0
- package/src/orchestrator/skills/security-hardening/SKILL.md +118 -0
- package/src/orchestrator/skills/self-improvement/SKILL.md +137 -0
- package/src/orchestrator/skills/seo-patterns/SKILL.md +40 -0
- package/src/orchestrator/skills/session-checkpoints/SKILL.md +205 -0
- package/src/orchestrator/skills/slack-notifications/SKILL.md +211 -0
- package/src/orchestrator/skills/strapi-cms/SKILL.md +43 -0
- package/src/orchestrator/skills/supabase-database/SKILL.md +24 -0
- package/src/orchestrator/skills/task-management/SKILL.md +143 -0
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +317 -0
- package/src/orchestrator/skills/teams-notifications/SKILL.md +249 -0
- package/src/orchestrator/skills/testing-workflow/SKILL.md +134 -0
- package/src/orchestrator/skills/validation-gates/SKILL.md +100 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
````skill
|
|
2
|
+
---
|
|
3
|
+
name: fast-review
|
|
4
|
+
description: "Mandatory single-reviewer gate that runs after every agent delegation. Provides automatic retry with feedback and escalation to panel review after repeated failures. Essential for overnight/long-running autonomous sessions."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: Fast Review
|
|
8
|
+
|
|
9
|
+
Mandatory lightweight review that runs after **every** agent delegation. Inspired by the [Steroids CLI](https://github.com/UnlikeOtherAI/steroids-cli) coder/reviewer separation pattern.
|
|
10
|
+
|
|
11
|
+
## Why Fast Review Exists
|
|
12
|
+
|
|
13
|
+
Panel reviews (3 reviewers, majority vote) are thorough but expensive and slow. Running them after every step is impractical. Without any review, agent output ships unchecked — risky for overnight runs where no human is watching.
|
|
14
|
+
|
|
15
|
+
Fast review fills the gap: **a single reviewer sub-agent that validates every delegation output before acceptance**, with automatic retry and escalation.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
┌─────────────────────────────────┐
|
|
19
|
+
│ Agent completes │
|
|
20
|
+
└────────────┬────────────────────┘
|
|
21
|
+
│
|
|
22
|
+
┌────────────▼────────────────────┐
|
|
23
|
+
│ Fast Review (mandatory) │
|
|
24
|
+
│ Single reviewer sub-agent │
|
|
25
|
+
└────────────┬────────────────────┘
|
|
26
|
+
│
|
|
27
|
+
┌────────────▼────────────────────┐
|
|
28
|
+
│ PASS? │
|
|
29
|
+
├── YES ──▶ Accept & continue │
|
|
30
|
+
├── FAIL ──▶ Retry (up to 2x) │
|
|
31
|
+
└── 3x FAIL ──▶ Escalate to panel │
|
|
32
|
+
│
|
|
33
|
+
┌─────────────────────────────────┐
|
|
34
|
+
│ Panel Review (escalation) │
|
|
35
|
+
│ 3 reviewers, majority vote │
|
|
36
|
+
├── PASS ──▶ Accept │
|
|
37
|
+
├── BLOCK ──▶ Re-delegate + retry │
|
|
38
|
+
└── 3x BLOCK ──▶ Dispute record │
|
|
39
|
+
│
|
|
40
|
+
┌──────────────────▼──────────────┐
|
|
41
|
+
│ Dispute (human decision) │
|
|
42
|
+
│ Both perspectives + options │
|
|
43
|
+
│ → Human picks resolution │
|
|
44
|
+
└─────────────────────────────────┘
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## When to Use
|
|
48
|
+
|
|
49
|
+
| Scenario | Use Fast Review | Use Panel Review |
|
|
50
|
+
|----------|----------------|-----------------|
|
|
51
|
+
| Any agent delegation output | **Always** (mandatory) | — |
|
|
52
|
+
| Security changes (auth, RLS, headers) | ✅ then also → | **Always** |
|
|
53
|
+
| DB migrations | ✅ then also → | **Always** |
|
|
54
|
+
| Architecture decisions | ✅ then also → | **Always** |
|
|
55
|
+
| Complex business logic without tests | ✅ then also → | **Recommended** |
|
|
56
|
+
| Feature implementation with tests | ✅ | Only if fast review flags concerns |
|
|
57
|
+
| Config changes, docs, simple fixes | ✅ | No |
|
|
58
|
+
|
|
59
|
+
Fast review is **never skipped**. Panel review remains opt-in for high-stakes work, or triggers as escalation when fast review fails repeatedly.
|
|
60
|
+
|
|
61
|
+
## Contract
|
|
62
|
+
|
|
63
|
+
- Runs **after every delegation** — no exceptions.
|
|
64
|
+
- Single reviewer sub-agent (not 3).
|
|
65
|
+
- Uses Economy/Standard tier models (cost-efficient).
|
|
66
|
+
- Produces PASS or FAIL with structured feedback.
|
|
67
|
+
- On FAIL: automatic retry with reviewer feedback (up to 2 retries).
|
|
68
|
+
- On 3rd FAIL: auto-escalates to panel review.
|
|
69
|
+
- Total review time budget: ~2-5 minutes per review.
|
|
70
|
+
|
|
71
|
+
## Reviewer Model Selection
|
|
72
|
+
|
|
73
|
+
| Implementation Agent Tier | Reviewer Model | Rationale |
|
|
74
|
+
|--------------------------|---------------|-----------|
|
|
75
|
+
| Economy (GPT-5 mini) | GPT-5 mini | Peer-level review is sufficient |
|
|
76
|
+
| Utility (GPT-5.3-Codex) | GPT-5 mini | One tier lower for cost savings |
|
|
77
|
+
| Standard (Gemini 3.1 Pro) | GPT-5 mini | Economy is enough for structured checks |
|
|
78
|
+
| Premium (Claude Opus 4.6) | Gemini 3.1 Pro | Premium work deserves Standard review |
|
|
79
|
+
|
|
80
|
+
**Override:** If the task touches security, auth, or data integrity, upgrade the reviewer to Standard regardless of the implementation tier.
|
|
81
|
+
|
|
82
|
+
## Procedure
|
|
83
|
+
|
|
84
|
+
### Step 1: Collect Review Context
|
|
85
|
+
|
|
86
|
+
Before spawning the reviewer, gather:
|
|
87
|
+
|
|
88
|
+
1. **Issue** — acceptance criteria from the tracked issue
|
|
89
|
+
2. **File diff** — list of changed files and their contents (or key sections)
|
|
90
|
+
3. **File partition** — the agent's assigned files (to check for boundary violations)
|
|
91
|
+
4. **Deterministic results** — lint, test, build output (already run as part of validation gates)
|
|
92
|
+
5. **Agent's self-report** — what the agent claims to have done
|
|
93
|
+
|
|
94
|
+
### Step 2: Spawn Reviewer Sub-Agent
|
|
95
|
+
|
|
96
|
+
Launch a single `runSubagent` with the review prompt (see § Reviewer Prompt Template below).
|
|
97
|
+
|
|
98
|
+
**Critical:** The reviewer runs in an isolated sub-agent context. It must NOT have access to the original delegation prompt — it reviews the *output*, not the *intent*. The acceptance criteria from the issue serve as the objective reference.
|
|
99
|
+
|
|
100
|
+
### Step 3: Parse Verdict
|
|
101
|
+
|
|
102
|
+
The reviewer must output this exact structure:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
VERDICT: PASS | FAIL
|
|
106
|
+
|
|
107
|
+
ISSUES:
|
|
108
|
+
- [severity:critical|major|minor] Description of issue
|
|
109
|
+
- [severity:critical|major|minor] Description of issue
|
|
110
|
+
|
|
111
|
+
FEEDBACK:
|
|
112
|
+
Specific, actionable feedback for the implementer if FAIL.
|
|
113
|
+
|
|
114
|
+
CONFIDENCE: low | medium | high
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Verdict rules:**
|
|
118
|
+
- **PASS** — No critical or major issues. Minor issues are noted but don't block.
|
|
119
|
+
- **FAIL** — At least one critical or major issue found.
|
|
120
|
+
|
|
121
|
+
**Auto-PASS conditions (skip reviewer):**
|
|
122
|
+
- The delegation was pure research/exploration with no code changes
|
|
123
|
+
- The delegation only modified documentation files (`.md`)
|
|
124
|
+
- All deterministic gates already passed AND the change is ≤10 lines across ≤2 files
|
|
125
|
+
|
|
126
|
+
### Step 4: Handle Verdict
|
|
127
|
+
|
|
128
|
+
#### On PASS
|
|
129
|
+
|
|
130
|
+
1. Accept the agent's output
|
|
131
|
+
2. Log the review result (see § Logging)
|
|
132
|
+
3. Continue orchestration
|
|
133
|
+
|
|
134
|
+
#### On FAIL (attempt 1 or 2)
|
|
135
|
+
|
|
136
|
+
1. Log the review result
|
|
137
|
+
2. Extract the reviewer's ISSUES and FEEDBACK
|
|
138
|
+
3. Re-delegate to the **same agent** with:
|
|
139
|
+
- Original task context
|
|
140
|
+
- Reviewer's feedback appended
|
|
141
|
+
- Instruction: "Address the following review feedback before resubmitting"
|
|
142
|
+
- Note: "This is retry attempt N/2 after fast review"
|
|
143
|
+
4. After the agent re-submits, run fast review again (go back to Step 1)
|
|
144
|
+
|
|
145
|
+
#### On FAIL (attempt 3 — escalation)
|
|
146
|
+
|
|
147
|
+
1. Log the review result with `escalated: true`
|
|
148
|
+
2. **Auto-escalate to panel review** — load the `panel-majority-vote` skill
|
|
149
|
+
3. Include all 3 fast review reports as context for the panel
|
|
150
|
+
4. The panel decides PASS/BLOCK with the standard majority vote protocol
|
|
151
|
+
5. If panel PASS → accept with a note that it required escalation
|
|
152
|
+
6. If panel BLOCK → follow the standard panel retry flow (max 3 panel attempts)
|
|
153
|
+
7. If panel BLOCKs 3 times → create a **dispute record** in `.github/customizations/DISPUTES.md` (see **team-lead-reference** skill § Dispute Protocol)
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
Fast Review Attempt 1: FAIL → retry
|
|
157
|
+
Fast Review Attempt 2: FAIL → retry
|
|
158
|
+
Fast Review Attempt 3: FAIL → escalate to panel
|
|
159
|
+
Panel Attempt 1: BLOCK → re-delegate with MUST-FIX
|
|
160
|
+
Panel Attempt 2: BLOCK → re-delegate with MUST-FIX
|
|
161
|
+
Panel Attempt 3: BLOCK → create dispute record for human resolution
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Reviewer Prompt Template
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
You are a code reviewer. Your job is to verify that a delegated task was
|
|
168
|
+
completed correctly. Be concise and specific. Focus on correctness, not style.
|
|
169
|
+
|
|
170
|
+
## Task Under Review
|
|
171
|
+
|
|
172
|
+
**Issue:** [ID] — [Title]
|
|
173
|
+
**Acceptance Criteria:**
|
|
174
|
+
- [ ] [Criterion 1]
|
|
175
|
+
- [ ] [Criterion 2]
|
|
176
|
+
- [ ] [Criterion 3]
|
|
177
|
+
|
|
178
|
+
## Agent's File Partition (allowed files)
|
|
179
|
+
[List of directories/files the agent was allowed to modify]
|
|
180
|
+
|
|
181
|
+
## Changed Files
|
|
182
|
+
[For each file: path, key sections of the diff or full new content]
|
|
183
|
+
|
|
184
|
+
## Deterministic Check Results
|
|
185
|
+
- Lint: [PASS/FAIL + details]
|
|
186
|
+
- Tests: [PASS/FAIL + details]
|
|
187
|
+
- Build: [PASS/FAIL + details]
|
|
188
|
+
|
|
189
|
+
## Review Checklist
|
|
190
|
+
|
|
191
|
+
Evaluate EACH item. Only flag issues you are confident about.
|
|
192
|
+
|
|
193
|
+
1. **Acceptance criteria met** — Does the implementation satisfy every criterion?
|
|
194
|
+
2. **File partition respected** — Were only allowed files modified?
|
|
195
|
+
3. **No regressions** — Could any change break existing functionality?
|
|
196
|
+
4. **Error handling** — Are errors surfaced clearly? No swallowed exceptions?
|
|
197
|
+
5. **Type safety** — Proper TypeScript types? No `as any` or unsafe casts?
|
|
198
|
+
6. **Security basics** — No exposed secrets, no injection vectors, no unsafe user input handling?
|
|
199
|
+
7. **Edge cases** — Are obvious edge cases handled (null, empty, overflow)?
|
|
200
|
+
|
|
201
|
+
## Previous Review Feedback (if retry)
|
|
202
|
+
[Include prior FAIL feedback so the reviewer can verify fixes]
|
|
203
|
+
|
|
204
|
+
## Output Format (MANDATORY — follow exactly)
|
|
205
|
+
|
|
206
|
+
VERDICT: PASS | FAIL
|
|
207
|
+
|
|
208
|
+
ISSUES:
|
|
209
|
+
- [severity:critical|major|minor] Description
|
|
210
|
+
|
|
211
|
+
FEEDBACK:
|
|
212
|
+
Actionable feedback for the implementer.
|
|
213
|
+
|
|
214
|
+
CONFIDENCE: low | medium | high
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Logging
|
|
218
|
+
|
|
219
|
+
Append a JSON line to `customizations/logs/reviews.ndjson` after each fast review:
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
{
|
|
223
|
+
"timestamp": "2026-02-28T14:30:00Z",
|
|
224
|
+
"linear_issue": "PRJ-42",
|
|
225
|
+
"agent": "Developer",
|
|
226
|
+
"reviewer_model": "gpt-5-mini",
|
|
227
|
+
"verdict": "pass",
|
|
228
|
+
"attempt": 1,
|
|
229
|
+
"issues_critical": 0,
|
|
230
|
+
"issues_major": 0,
|
|
231
|
+
"issues_minor": 2,
|
|
232
|
+
"confidence": "high",
|
|
233
|
+
"escalated": false,
|
|
234
|
+
"duration_sec": 45
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Integration with Existing Workflow
|
|
239
|
+
|
|
240
|
+
### Position in the Verification Loop
|
|
241
|
+
|
|
242
|
+
Fast review sits between the agent's output and the Team Lead's acceptance:
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
Agent completes work
|
|
246
|
+
│
|
|
247
|
+
▼
|
|
248
|
+
Deterministic checks (lint, test, build) ← validation-gates Gate 1
|
|
249
|
+
│
|
|
250
|
+
▼
|
|
251
|
+
Fast Review (this skill) ← validation-gates Gate 1.5
|
|
252
|
+
│
|
|
253
|
+
├── PASS → Accept, move to next task
|
|
254
|
+
├── FAIL → Retry loop (up to 2x)
|
|
255
|
+
└── 3x FAIL → Escalate to Panel (Gate 5)
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Relationship to on-post-delegate Hook
|
|
259
|
+
|
|
260
|
+
Fast review is executed as part of the `on-post-delegate` hook in the agent-hooks skill. The hook sequence is:
|
|
261
|
+
|
|
262
|
+
1. Verify output (file changes within partition)
|
|
263
|
+
2. Run deterministic checks (lint, test, build)
|
|
264
|
+
3. **Run fast review** ← inserted here
|
|
265
|
+
4. Check acceptance criteria (reviewer does this too, as cross-check)
|
|
266
|
+
5. Update issue
|
|
267
|
+
|
|
268
|
+
### Skipping Panel Review
|
|
269
|
+
|
|
270
|
+
When fast review passes, you can safely skip panel review for **non-high-stakes** tasks. The thresholds for mandatory panel review remain:
|
|
271
|
+
|
|
272
|
+
- Security-sensitive changes
|
|
273
|
+
- Database migrations
|
|
274
|
+
- Architecture decisions
|
|
275
|
+
- Complex business logic without test coverage
|
|
276
|
+
|
|
277
|
+
These tasks get **both** fast review AND panel review.
|
|
278
|
+
|
|
279
|
+
## Cost Impact
|
|
280
|
+
|
|
281
|
+
Estimated cost per fast review:
|
|
282
|
+
|
|
283
|
+
| Review Tier | Est. Tokens | Est. Duration |
|
|
284
|
+
|-------------|-------------|---------------|
|
|
285
|
+
| Economy reviewer | ~3K-8K tokens | 30-90 sec |
|
|
286
|
+
| Standard reviewer | ~5K-12K tokens | 60-180 sec |
|
|
287
|
+
|
|
288
|
+
For a typical 7-delegation session:
|
|
289
|
+
- **Without fast review:** 0 review tokens
|
|
290
|
+
- **With fast review:** ~20K-60K additional tokens (~5-15% overhead)
|
|
291
|
+
- **With panel on every step:** ~150K-450K additional tokens (prohibitive)
|
|
292
|
+
|
|
293
|
+
Fast review provides ~85% of the safety benefit of full panel review at ~15% of the cost.
|
|
294
|
+
|
|
295
|
+
## Overnight/Long-Run Mode
|
|
296
|
+
|
|
297
|
+
For autonomous overnight sessions, fast review is the primary quality gate. Additional considerations:
|
|
298
|
+
|
|
299
|
+
1. **Lower PASS threshold** — In overnight mode, consider upgrading the reviewer model one tier for extra safety (no human in the loop to catch issues).
|
|
300
|
+
2. **Stricter escalation** — Escalate to panel after 2 FAILs instead of 3 when running unattended.
|
|
301
|
+
3. **Checkpoint on escalation** — If fast review escalates to panel during an overnight run, save a session checkpoint before proceeding. This allows human review of the escalation decision.
|
|
302
|
+
4. **Aggregated review log** — At the end of an overnight session, generate a summary of all fast reviews (pass rate, common issues, escalations) as part of the session-end hook.
|
|
303
|
+
|
|
304
|
+
## Anti-Patterns
|
|
305
|
+
|
|
306
|
+
- **Skipping fast review** — Never. Not even for "trivial" changes. The cost is minimal, the risk of uncaught issues in overnight runs is high.
|
|
307
|
+
- **Using Panel as fast review** — Panel is 3 reviewers with majority vote. Using it for every step wastes ~3x the tokens and time.
|
|
308
|
+
- **Reviewer sees the delegation prompt** — The reviewer should evaluate output against acceptance criteria, not the prompt. This prevents rubber-stamping intent as completion.
|
|
309
|
+
- **Ignoring minor issues** — Minor issues get a PASS verdict but should be tracked. If the same minor issue appears 3+ times across reviews, create a ticket.
|
|
310
|
+
- **Manual override of FAIL** — The Team Lead should never force-accept a FAIL verdict. Either fix the issues through retry or escalate.
|
|
311
|
+
- **Skipping deterministic checks** — Fast review does NOT replace lint/test/build. Those run first. The reviewer focuses on semantic correctness beyond what tools can check.
|
|
312
|
+
|
|
313
|
+
## Metrics & Continuous Improvement
|
|
314
|
+
|
|
315
|
+
Track these metrics from `reviews.ndjson` to optimize the review process:
|
|
316
|
+
|
|
317
|
+
| Metric | Target | Action if Off-Target |
|
|
318
|
+
|--------|--------|---------------------|
|
|
319
|
+
| First-pass rate | > 80% | Improve delegation prompts with more specific acceptance criteria |
|
|
320
|
+
| Escalation rate | < 5% | Review why agents fail 3x — prompts may be ambiguous |
|
|
321
|
+
| False positive rate | < 10% | If reviewer FAILs work that's actually correct, adjust reviewer prompt |
|
|
322
|
+
| Avg review duration | < 120 sec | If too slow, reduce review context or use a faster model |
|
|
323
|
+
| Retry success rate | > 90% | If retries don't fix issues, the feedback isn't specific enough |
|
|
324
|
+
|
|
325
|
+
Review these metrics monthly (or after every 50 reviews) and adjust the reviewer prompt template accordingly.
|
|
326
|
+
|
|
327
|
+
````
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: "Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics."
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
|
|
8
|
+
|
|
9
|
+
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
|
|
10
|
+
|
|
11
|
+
## Design Thinking
|
|
12
|
+
|
|
13
|
+
Before coding, understand the context and commit to a BOLD aesthetic direction:
|
|
14
|
+
- **Purpose**: What problem does this interface solve? Who uses it?
|
|
15
|
+
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
|
|
16
|
+
- **Constraints**: Technical requirements (framework, performance, accessibility).
|
|
17
|
+
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
|
|
18
|
+
|
|
19
|
+
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
|
|
20
|
+
|
|
21
|
+
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
|
|
22
|
+
- Production-grade and functional
|
|
23
|
+
- Visually striking and memorable
|
|
24
|
+
- Cohesive with a clear aesthetic point-of-view
|
|
25
|
+
- Meticulously refined in every detail
|
|
26
|
+
|
|
27
|
+
## Frontend Aesthetics Guidelines
|
|
28
|
+
|
|
29
|
+
Focus on:
|
|
30
|
+
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
|
|
31
|
+
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
32
|
+
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
|
|
33
|
+
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
34
|
+
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
|
|
35
|
+
|
|
36
|
+
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
|
|
37
|
+
|
|
38
|
+
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
|
|
39
|
+
|
|
40
|
+
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
|
|
41
|
+
|
|
42
|
+
Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jira-management
|
|
3
|
+
description: "Jira board conventions for tracking feature work — issue naming, labels, priorities, status workflow, and session continuity via Atlassian Rovo MCP. Use when decomposing features into tasks or resuming interrupted sessions."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Task Management with Jira
|
|
7
|
+
|
|
8
|
+
Conventions for tracking feature work on Jira via the Atlassian Rovo MCP server. For project-specific project keys, workflow state IDs, and board configuration, see [jira-config.md](../../customizations/project/jira-config.md).
|
|
9
|
+
|
|
10
|
+
## Atlassian Rovo MCP Server
|
|
11
|
+
|
|
12
|
+
The Atlassian Rovo MCP server connects to Jira (and Confluence) via `https://mcp.atlassian.com/v2/sse`. It uses OAuth authentication — users authenticate through their Atlassian account when the MCP connection is first established.
|
|
13
|
+
|
|
14
|
+
**Available capabilities:**
|
|
15
|
+
- Search Jira issues with JQL
|
|
16
|
+
- Create and update issues
|
|
17
|
+
- Read issue details, comments, and attachments
|
|
18
|
+
- Search Confluence pages for context
|
|
19
|
+
- Create Confluence pages
|
|
20
|
+
|
|
21
|
+
**Rate limits** (per hour):
|
|
22
|
+
- Free: 500 calls
|
|
23
|
+
- Standard: 1,000 calls
|
|
24
|
+
- Premium/Enterprise: 1,000 + 20 per user (up to 10,000)
|
|
25
|
+
|
|
26
|
+
## Discovered Issues (Bug Tickets)
|
|
27
|
+
|
|
28
|
+
When an agent encounters a pre-existing bug or issue unrelated to the current task, it must be tracked. Follow this flow:
|
|
29
|
+
|
|
30
|
+
1. **Check** known issues docs and Jira (search for open bugs) to see if it's already tracked
|
|
31
|
+
2. **If tracked** — skip it, continue with current work
|
|
32
|
+
3. **If NOT tracked:**
|
|
33
|
+
- **Unfixable limitation** — add to known issues with Issue ID, Status, Severity, Evidence, Root Cause, Solution Options
|
|
34
|
+
- **Fixable bug** — create a Jira issue:
|
|
35
|
+
- **Summary:** `[Area] Short description of the symptom`
|
|
36
|
+
- **Type:** Bug
|
|
37
|
+
- **Priority:** High if it affects users, Medium if cosmetic or non-blocking
|
|
38
|
+
- **Description:** Include symptoms, reproduction steps, affected files, and any error messages or screenshots
|
|
39
|
+
- **Status:** Backlog (unless it's blocking current work, then To Do)
|
|
40
|
+
|
|
41
|
+
## Issue Naming
|
|
42
|
+
|
|
43
|
+
Use `[Area] Short description` format in the Summary field:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
[Schema] Add priceRange field to place type
|
|
47
|
+
[DB] Add price_range column and migration
|
|
48
|
+
[Query] Update query with priceRange filter
|
|
49
|
+
[UI] Build PriceRangeFilter component
|
|
50
|
+
[Page] Integrate price filter into /places
|
|
51
|
+
[Test] E2E test price range filtering
|
|
52
|
+
[Docs] Update data model documentation
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Area prefixes:** `[Schema]`, `[DB]`, `[Query]`, `[UI]`, `[Page]`, `[API]`, `[Auth]`, `[Test]`, `[Docs]`, `[Deploy]`, `[Data]`, `[Perf]`, `[Security]`
|
|
56
|
+
|
|
57
|
+
## Priority
|
|
58
|
+
|
|
59
|
+
| Jira Priority | Meaning | When to use |
|
|
60
|
+
|---------------|---------|-------------|
|
|
61
|
+
| Highest | Blocker | Blocks other tasks, critical path |
|
|
62
|
+
| High | Important | Core feature work, on critical path |
|
|
63
|
+
| Medium | Normal | Supporting tasks, can be parallelized |
|
|
64
|
+
| Low | Nice-to-have | Docs, cleanup, polish |
|
|
65
|
+
| Lowest | Backlog | Captured for future consideration |
|
|
66
|
+
|
|
67
|
+
## Status Workflow
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Backlog → To Do → In Progress → In Review → Done
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- **Backlog** — Captured but not yet planned
|
|
74
|
+
- **To Do** — Planned for current sprint/feature, ready to start
|
|
75
|
+
- **In Progress** — Actively being worked on by an agent
|
|
76
|
+
- **In Review** — PR opened, awaiting review/merge
|
|
77
|
+
- **Done** — Completed and verified
|
|
78
|
+
|
|
79
|
+
### Status Drivers
|
|
80
|
+
|
|
81
|
+
Issue status is driven by **two sources** — the Team Lead agent (via MCP) and the Jira automation/GitHub integration (automatically).
|
|
82
|
+
|
|
83
|
+
**Agent-driven transitions (via MCP):**
|
|
84
|
+
- **To Do → In Progress** — when the agent starts working on a task
|
|
85
|
+
- **In Progress → Done** — when non-PR tasks are verified (e.g., docs, config changes)
|
|
86
|
+
|
|
87
|
+
**Automation-driven transitions:**
|
|
88
|
+
If your Jira project has GitHub integration or automation rules configured, PR lifecycle events can auto-update issue status. Configure these in Jira under *Project settings → Automation*.
|
|
89
|
+
|
|
90
|
+
**Linking issues to PRs:** Include the Jira issue key (e.g., `PROJ-123`) in the branch name or PR title. Use the branch name format: `<type>/<issue-key>-<short-description>`.
|
|
91
|
+
|
|
92
|
+
## Issue Descriptions
|
|
93
|
+
|
|
94
|
+
Every issue must include:
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
**Objective:** One sentence describing the deliverable
|
|
98
|
+
|
|
99
|
+
**Files (partition):**
|
|
100
|
+
- `path/to/relevant/file.ts`
|
|
101
|
+
- `path/to/another/file.ts`
|
|
102
|
+
|
|
103
|
+
**Acceptance Criteria:**
|
|
104
|
+
- [ ] Specific, verifiable outcome 1
|
|
105
|
+
- [ ] Specific, verifiable outcome 2
|
|
106
|
+
|
|
107
|
+
**Dependencies:** PROJ-XX (if any)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The **Files (partition)** section defines which files this agent is allowed to modify. This prevents merge conflicts when multiple agents work in parallel — no two issues in the same phase should list overlapping files.
|
|
111
|
+
|
|
112
|
+
## Feature Grouping
|
|
113
|
+
|
|
114
|
+
- Use a **Jira Epic** for each major feature
|
|
115
|
+
- All related issues (Stories/Tasks) belong to that Epic
|
|
116
|
+
- Issues track individual subtasks within the feature
|
|
117
|
+
- Use components or labels for domain grouping (e.g., `frontend`, `backend`, `database`)
|
|
118
|
+
|
|
119
|
+
## Session Workflow
|
|
120
|
+
|
|
121
|
+
### Starting a new feature
|
|
122
|
+
|
|
123
|
+
1. Search the board (JQL) to check for existing in-progress work
|
|
124
|
+
2. Decompose the feature into issues following the conventions above
|
|
125
|
+
3. Create all issues in Jira with correct naming, type, priority, and descriptions
|
|
126
|
+
4. Link dependencies between issues using Jira issue links
|
|
127
|
+
5. Begin delegation
|
|
128
|
+
|
|
129
|
+
### During execution
|
|
130
|
+
|
|
131
|
+
- Move issue to **In Progress** before delegating to an agent
|
|
132
|
+
- Move issue to **Done** immediately after the agent completes and output is verified
|
|
133
|
+
- Add comments to the issue if a task is blocked, explaining the blocker
|
|
134
|
+
|
|
135
|
+
### Resuming an interrupted session
|
|
136
|
+
|
|
137
|
+
1. Search issues by status (In Progress, To Do) in the project
|
|
138
|
+
2. Read issue descriptions to restore context
|
|
139
|
+
3. Pick up where work left off — no need to re-analyze from scratch
|
|
140
|
+
|
|
141
|
+
### Completing a feature
|
|
142
|
+
|
|
143
|
+
1. Verify all issues in the Epic are **Done** or closed
|
|
144
|
+
2. Run final build/lint/test checks
|
|
145
|
+
3. Close the Epic
|
|
146
|
+
|
|
147
|
+
## JQL Quick Reference
|
|
148
|
+
|
|
149
|
+
Common queries for agent workflows:
|
|
150
|
+
|
|
151
|
+
```jql
|
|
152
|
+
# Find in-progress work
|
|
153
|
+
project = PROJ AND status = "In Progress" ORDER BY priority DESC
|
|
154
|
+
|
|
155
|
+
# Find planned work
|
|
156
|
+
project = PROJ AND status = "To Do" ORDER BY priority DESC
|
|
157
|
+
|
|
158
|
+
# Find bugs
|
|
159
|
+
project = PROJ AND type = Bug AND status != Done ORDER BY priority DESC
|
|
160
|
+
|
|
161
|
+
# Find work in current sprint
|
|
162
|
+
project = PROJ AND sprint in openSprints() ORDER BY priority DESC
|
|
163
|
+
|
|
164
|
+
# Find blockers
|
|
165
|
+
project = PROJ AND priority = Highest AND status != Done
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Replace `PROJ` with the actual project key from [jira-config.md](../../customizations/project/jira-config.md).
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-merger
|
|
3
|
+
description: "Protocol for graduating mature lessons from LESSONS-LEARNED.md into permanent instruction and skill files. Closes the self-improvement loop by codifying validated knowledge at the source level."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: Memory Merger
|
|
7
|
+
|
|
8
|
+
This skill automates the final step of the self-improvement cycle: promoting validated lessons into the instruction and skill files where they have structural, permanent impact.
|
|
9
|
+
|
|
10
|
+
## Why Merge?
|
|
11
|
+
|
|
12
|
+
`.github/customizations/LESSONS-LEARNED.md` is a flatfile that grows over time. Lessons buried in a 400+ line file lose their impact — agents skim past them or miss relevant entries. The most valuable lessons should **graduate** into the instruction/skill files where they're encountered naturally during every task.
|
|
13
|
+
|
|
14
|
+
## When to Run
|
|
15
|
+
|
|
16
|
+
Invoke a memory merge when:
|
|
17
|
+
|
|
18
|
+
- **LESSONS-LEARNED.md exceeds 50 entries** — periodic cleanup
|
|
19
|
+
- **A lesson has been cited 3+ times** — it's clearly a recurring pattern
|
|
20
|
+
- **A lesson is older than 60 days** — mature enough to be considered stable
|
|
21
|
+
- **After a major feature ships** — good checkpoint to extract patterns
|
|
22
|
+
- **Team Lead's discretion** — any time the lessons file feels stale
|
|
23
|
+
|
|
24
|
+
## Merge Protocol
|
|
25
|
+
|
|
26
|
+
### Step 1: Scan for Merge Candidates
|
|
27
|
+
|
|
28
|
+
Read `.github/customizations/LESSONS-LEARNED.md` and identify lessons that meet any of these criteria:
|
|
29
|
+
|
|
30
|
+
| Criterion | Signal |
|
|
31
|
+
|-----------|--------|
|
|
32
|
+
| **High frequency** | Cited or re-discovered 3+ times |
|
|
33
|
+
| **High severity** | Marked `high` severity |
|
|
34
|
+
| **Age** | Added more than 60 days ago and still relevant |
|
|
35
|
+
| **Category concentration** | 5+ lessons in the same category → extract a pattern |
|
|
36
|
+
| **Tool-specific** | Lesson about a specific MCP tool, NX command, or framework pattern |
|
|
37
|
+
|
|
38
|
+
### Step 2: Map Lessons to Target Files
|
|
39
|
+
|
|
40
|
+
Each lesson has a natural home in the instruction/skill hierarchy:
|
|
41
|
+
|
|
42
|
+
| Lesson Category | Target File |
|
|
43
|
+
|----------------|-------------|
|
|
44
|
+
| `linear` | `.github/skills/task-management/SKILL.md` |
|
|
45
|
+
| `mcp-tools` | The corresponding agent file or skill that uses the tool |
|
|
46
|
+
| `nx-commands` | `.github/skills/nx-workspace/SKILL.md` |
|
|
47
|
+
| `sanity` | `.github/skills/sanity-cms/SKILL.md` |
|
|
48
|
+
| `supabase` | `.github/skills/supabase-database/SKILL.md` |
|
|
49
|
+
| `browser-testing` | `.github/skills/browser-testing/SKILL.md` |
|
|
50
|
+
| `git-workflow` | `.github/instructions/general.instructions.md` |
|
|
51
|
+
| `deployment` | `.github/skills/deployment-infrastructure/SKILL.md` |
|
|
52
|
+
| `delegation` | `.github/agents/team-lead.agent.md` or `.github/skills/team-lead-reference/SKILL.md` |
|
|
53
|
+
| `testing` | `.github/skills/testing-workflow/SKILL.md` |
|
|
54
|
+
| `react` / `nextjs` | Corresponding global skill file |
|
|
55
|
+
| Cross-cutting pattern | `.github/instructions/general.instructions.md` |
|
|
56
|
+
|
|
57
|
+
### Step 3: Draft the Merge
|
|
58
|
+
|
|
59
|
+
For each candidate lesson, draft a concrete edit to the target file:
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
**Lesson:** LES-XXX — [title]
|
|
63
|
+
**Target:** [target file path]
|
|
64
|
+
**Section:** [which section to add to or modify]
|
|
65
|
+
**Edit:** [exact text to add or modify]
|
|
66
|
+
**Rationale:** [why this belongs here rather than staying in lessons]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### Merge Strategies
|
|
70
|
+
|
|
71
|
+
- **Add a rule** — if the lesson reveals a new "always do X" or "never do Y", add it to the target file's rules section
|
|
72
|
+
- **Add an anti-pattern** — if the lesson describes a common mistake, add it to an anti-patterns or "Common Mistakes" section
|
|
73
|
+
- **Add a code example** — if the lesson includes a correct approach with a code block, add it as a documented pattern
|
|
74
|
+
- **Expand existing rule** — if a rule already exists but the lesson adds nuance (edge case, exception), update the rule
|
|
75
|
+
- **Add a table row** — if the target has a reference table, add the lesson as a new row
|
|
76
|
+
|
|
77
|
+
### Step 4: Apply Edits
|
|
78
|
+
|
|
79
|
+
1. Edit each target file with the drafted changes
|
|
80
|
+
2. Add a comment or note attributing the source: `<!-- Merged from LES-XXX -->`
|
|
81
|
+
3. Verify the edit reads naturally in context (not just pasted in)
|
|
82
|
+
|
|
83
|
+
### Step 5: Archive the Merged Lessons
|
|
84
|
+
|
|
85
|
+
Move merged lessons from the main body of `LESSONS-LEARNED.md` to an `## Archived (Merged)` section at the bottom of the file:
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
## Archived (Merged)
|
|
89
|
+
|
|
90
|
+
Lessons below have been merged into instruction/skill files. They are kept here for historical reference.
|
|
91
|
+
|
|
92
|
+
### LES-XXX: [title] → Merged to `[target file]` on YYYY-MM-DD
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Do NOT delete lessons.** Archive them so they remain searchable and traceable.
|
|
96
|
+
|
|
97
|
+
### Step 6: Update the Index
|
|
98
|
+
|
|
99
|
+
Update the `## Index by Category` table in `LESSONS-LEARNED.md` to reflect which lessons are now archived.
|
|
100
|
+
|
|
101
|
+
## Quality Gates
|
|
102
|
+
|
|
103
|
+
Before finalizing a merge:
|
|
104
|
+
|
|
105
|
+
- [ ] The merged content reads naturally in the target file (not copy-pasted)
|
|
106
|
+
- [ ] The target file's structure and tone are preserved
|
|
107
|
+
- [ ] No duplicate information created (check if a similar rule already exists)
|
|
108
|
+
- [ ] The archived lesson references the target file
|
|
109
|
+
- [ ] The lesson's core insight is preserved — don't lose nuance when summarizing
|
|
110
|
+
|
|
111
|
+
## Anti-Patterns
|
|
112
|
+
|
|
113
|
+
- **Don't merge too eagerly** — a lesson needs to prove itself (3+ citations or 60+ days) before graduating
|
|
114
|
+
- **Don't copy verbatim** — lessons are written as incident reports; instruction files should read as rules/guidelines
|
|
115
|
+
- **Don't merge conflicting lessons** — if two lessons contradict, resolve the conflict first
|
|
116
|
+
- **Don't merge without context** — if the lesson only makes sense with the full story, either include enough context in the target file or keep it in LESSONS-LEARNED.md
|
|
117
|
+
- **Don't create new files for merged content** — merge INTO existing files; only create new skills if a genuinely new domain emerges
|
|
118
|
+
|
|
119
|
+
## Frequency
|
|
120
|
+
|
|
121
|
+
- **Quarterly review** — schedule a full scan of LESSONS-LEARNED.md every ~3 months
|
|
122
|
+
- **Post-feature review** — after major features ship, scan for relevant lessons
|
|
123
|
+
- **Ad-hoc** — any time an agent notices "this lesson should be a permanent rule"
|