opencastle 0.32.5 → 0.32.6
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/README.md +13 -3
- package/bin/cli.mjs +2 -0
- package/package.json +1 -1
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/orchestrator/agents/api-designer.agent.md +25 -34
- package/src/orchestrator/agents/architect.agent.md +40 -84
- package/src/orchestrator/agents/content-engineer.agent.md +29 -31
- package/src/orchestrator/agents/copywriter.agent.md +35 -60
- package/src/orchestrator/agents/data-expert.agent.md +24 -30
- package/src/orchestrator/agents/database-engineer.agent.md +26 -31
- package/src/orchestrator/agents/developer.agent.md +32 -34
- package/src/orchestrator/agents/devops-expert.agent.md +31 -26
- package/src/orchestrator/agents/documentation-writer.agent.md +29 -29
- package/src/orchestrator/agents/performance-expert.agent.md +36 -33
- package/src/orchestrator/agents/release-manager.agent.md +25 -34
- package/src/orchestrator/agents/researcher.agent.md +41 -95
- package/src/orchestrator/agents/reviewer.agent.md +24 -34
- package/src/orchestrator/agents/security-expert.agent.md +35 -39
- package/src/orchestrator/agents/seo-specialist.agent.md +25 -32
- package/src/orchestrator/agents/session-guard.agent.md +20 -79
- package/src/orchestrator/agents/team-lead.agent.md +50 -254
- package/src/orchestrator/agents/testing-expert.agent.md +37 -49
- package/src/orchestrator/agents/ui-ux-expert.agent.md +33 -39
- package/src/orchestrator/customizations/KNOWN-ISSUES.md +0 -1
- package/src/orchestrator/customizations/agents/skill-matrix.json +12 -0
- package/src/orchestrator/instructions/general.instructions.md +24 -84
- package/src/orchestrator/plugins/astro/SKILL.md +23 -179
- package/src/orchestrator/plugins/convex/SKILL.md +38 -12
- package/src/orchestrator/plugins/netlify/SKILL.md +17 -13
- package/src/orchestrator/plugins/nextjs/SKILL.md +55 -261
- package/src/orchestrator/plugins/nx/SKILL.md +20 -72
- package/src/orchestrator/plugins/playwright/SKILL.md +5 -17
- package/src/orchestrator/plugins/slack/SKILL.md +28 -190
- package/src/orchestrator/plugins/teams/SKILL.md +10 -140
- package/src/orchestrator/plugins/vitest/SKILL.md +2 -2
- package/src/orchestrator/prompts/bug-fix.prompt.md +25 -63
- package/src/orchestrator/prompts/implement-feature.prompt.md +29 -66
- package/src/orchestrator/prompts/quick-refinement.prompt.md +31 -66
- package/src/orchestrator/skills/accessibility-standards/SKILL.md +50 -105
- package/src/orchestrator/skills/agent-hooks/SKILL.md +60 -110
- package/src/orchestrator/skills/agent-memory/SKILL.md +44 -93
- package/src/orchestrator/skills/api-patterns/SKILL.md +20 -68
- package/src/orchestrator/skills/code-commenting/SKILL.md +49 -101
- package/src/orchestrator/skills/context-map/SKILL.md +47 -88
- package/src/orchestrator/skills/data-engineering/SKILL.md +27 -74
- package/src/orchestrator/skills/decomposition/SKILL.md +50 -98
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +44 -107
- package/src/orchestrator/skills/documentation-standards/SKILL.md +28 -89
- package/src/orchestrator/skills/fast-review/SKILL.md +51 -276
- package/src/orchestrator/skills/frontend-design/SKILL.md +53 -163
- package/src/orchestrator/skills/git-workflow/SKILL.md +18 -54
- package/src/orchestrator/skills/memory-merger/SKILL.md +51 -88
- package/src/orchestrator/skills/observability-logging/SKILL.md +29 -75
- package/src/orchestrator/skills/orchestration-protocols/SKILL.md +58 -117
- package/src/orchestrator/skills/panel-majority-vote/SKILL.md +65 -140
- package/src/orchestrator/skills/performance-optimization/SKILL.md +21 -85
- package/src/orchestrator/skills/project-consistency/SKILL.md +62 -281
- package/src/orchestrator/skills/react-development/SKILL.md +38 -86
- package/src/orchestrator/skills/security-hardening/SKILL.md +40 -84
- package/src/orchestrator/skills/self-improvement/SKILL.md +26 -60
- package/src/orchestrator/skills/seo-patterns/SKILL.md +40 -105
- package/src/orchestrator/skills/session-checkpoints/SKILL.md +26 -68
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +66 -206
- package/src/orchestrator/skills/testing-workflow/SKILL.md +42 -112
- package/src/orchestrator/skills/validation-gates/SKILL.md +39 -170
- package/src/orchestrator/snippets/base-output-contract.md +14 -0
- package/src/orchestrator/snippets/discovered-issues-policy.md +15 -0
- package/src/orchestrator/snippets/logging-mandatory.md +11 -0
- package/src/orchestrator/snippets/never-expose-secrets.md +22 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
2
|
-
|
|
3
1
|
````skill
|
|
4
2
|
---
|
|
5
3
|
name: fast-review
|
|
@@ -8,319 +6,96 @@ description: "Mandatory single-reviewer gate that runs after every agent delegat
|
|
|
8
6
|
|
|
9
7
|
# Skill: Fast Review
|
|
10
8
|
|
|
11
|
-
Mandatory lightweight review that runs after **every** agent delegation. Inspired by the [Steroids CLI](https://github.com/UnlikeOtherAI/steroids-cli) coder/reviewer separation pattern.
|
|
12
|
-
|
|
13
|
-
## Why Fast Review Exists
|
|
14
|
-
|
|
15
|
-
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.
|
|
16
|
-
|
|
17
|
-
Fast review fills the gap: **a single reviewer sub-agent that validates every delegation output before acceptance**, with automatic retry and escalation.
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
┌─────────────────────────────────┐
|
|
21
|
-
│ Agent completes │
|
|
22
|
-
└────────────┬────────────────────┘
|
|
23
|
-
│
|
|
24
|
-
┌────────────▼────────────────────┐
|
|
25
|
-
│ Fast Review (mandatory) │
|
|
26
|
-
│ Single reviewer sub-agent │
|
|
27
|
-
└────────────┬────────────────────┘
|
|
28
|
-
│
|
|
29
|
-
┌────────────▼────────────────────┐
|
|
30
|
-
│ PASS? │
|
|
31
|
-
├── YES ──▶ Accept & continue │
|
|
32
|
-
├── FAIL ──▶ Retry (up to 2x) │
|
|
33
|
-
└── 3x FAIL ──▶ Escalate to panel │
|
|
34
|
-
│
|
|
35
|
-
┌─────────────────────────────────┐
|
|
36
|
-
│ Panel Review (escalation) │
|
|
37
|
-
│ 3 reviewers, majority vote │
|
|
38
|
-
├── PASS ──▶ Accept │
|
|
39
|
-
├── BLOCK ──▶ Re-delegate + retry │
|
|
40
|
-
└── 3x BLOCK ──▶ Dispute record │
|
|
41
|
-
│
|
|
42
|
-
┌──────────────────▼──────────────┐
|
|
43
|
-
│ Dispute (human decision) │
|
|
44
|
-
│ Both perspectives + options │
|
|
45
|
-
│ → Human picks resolution │
|
|
46
|
-
└─────────────────────────────────┘
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## When to Use
|
|
50
|
-
|
|
51
|
-
| Scenario | Use Fast Review | Use Panel Review |
|
|
52
|
-
|----------|----------------|-----------------|
|
|
53
|
-
| Any agent delegation output | **Always** (mandatory) | — |
|
|
54
|
-
| Security changes (auth, RLS, headers) | ✅ then also → | **Always** |
|
|
55
|
-
| DB migrations | ✅ then also → | **Always** |
|
|
56
|
-
| Architecture decisions | ✅ then also → | **Always** |
|
|
57
|
-
| Complex business logic without tests | ✅ then also → | **Recommended** |
|
|
58
|
-
| Feature implementation with tests | ✅ | Only if fast review flags concerns |
|
|
59
|
-
| Config changes, docs, simple fixes | ✅ | No |
|
|
60
|
-
|
|
61
|
-
Fast review is **never skipped**. Panel review remains opt-in for high-stakes work, or triggers as escalation when fast review fails repeatedly.
|
|
62
|
-
|
|
63
9
|
## Contract
|
|
64
10
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
## Reviewer Model Selection
|
|
74
|
-
|
|
75
|
-
| Implementation Agent Tier | Reviewer Model | Rationale |
|
|
76
|
-
|--------------------------|---------------|-----------|
|
|
77
|
-
| Economy (GPT-5 mini) | GPT-5 mini | Peer-level review is sufficient |
|
|
78
|
-
| Fast (GPT-5.3-Codex) | GPT-5 mini | Economy is enough for structured checks |
|
|
79
|
-
| Standard (Gemini 3.1 Pro) | GPT-5 mini | Economy is enough for structured checks |
|
|
80
|
-
| Quality (Claude Sonnet 4.6) | GPT-5 mini | Economy is enough for structured checks |
|
|
81
|
-
| Premium (Claude Opus 4.6) | Gemini 3.1 Pro | Premium work deserves Standard review |
|
|
82
|
-
|
|
83
|
-
**Override:** If the task touches security, auth, or data integrity, upgrade the reviewer to Standard regardless of the implementation tier.
|
|
11
|
+
| Rule | Detail |
|
|
12
|
+
|------|--------|
|
|
13
|
+
| Trigger | After **every** delegation — no exceptions |
|
|
14
|
+
| Reviewer | Single sub-agent; Economy tier (Standard for premium/security work) |
|
|
15
|
+
| Verdict | PASS or FAIL with structured feedback |
|
|
16
|
+
| Retry | ≤2 retries on FAIL; 3rd FAIL → panel review |
|
|
17
|
+
| Budget | ~2–5 min |
|
|
84
18
|
|
|
85
19
|
## Procedure
|
|
86
20
|
|
|
87
|
-
###
|
|
88
|
-
|
|
89
|
-
Before spawning the reviewer, gather:
|
|
90
|
-
|
|
91
|
-
1. **Issue** — acceptance criteria from the tracked issue
|
|
92
|
-
2. **File diff** — list of changed files and their contents (or key sections)
|
|
93
|
-
3. **File partition** — the agent's assigned files (to check for boundary violations)
|
|
94
|
-
4. **Deterministic results** — lint, test, build output (already run as part of validation gates)
|
|
95
|
-
5. **Agent's self-report** — what the agent claims to have done
|
|
21
|
+
### 1 — Collect Context
|
|
96
22
|
|
|
97
|
-
|
|
23
|
+
Issue + acceptance criteria, file diff, file partition, deterministic results (lint/test/build), agent self-report.
|
|
98
24
|
|
|
99
|
-
|
|
25
|
+
### 2 — Spawn Reviewer
|
|
100
26
|
|
|
101
|
-
|
|
27
|
+
Single `runSubagent`. Context = acceptance criteria, diff, partition, deterministic results **only** — no session history, no delegation prompt.
|
|
102
28
|
|
|
103
|
-
###
|
|
104
|
-
|
|
105
|
-
The reviewer must output this exact structure:
|
|
29
|
+
### 3 — Parse Verdict
|
|
106
30
|
|
|
107
31
|
```
|
|
108
32
|
VERDICT: PASS | FAIL
|
|
109
|
-
|
|
110
33
|
ISSUES:
|
|
111
|
-
- [severity:critical|major|minor] Description
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
FEEDBACK:
|
|
115
|
-
Specific, actionable feedback for the implementer if FAIL.
|
|
116
|
-
|
|
34
|
+
- [severity:critical|major|minor] Description
|
|
35
|
+
FEEDBACK: Actionable feedback.
|
|
117
36
|
CONFIDENCE: low | medium | high
|
|
118
37
|
```
|
|
119
38
|
|
|
120
|
-
**
|
|
121
|
-
- **
|
|
122
|
-
- **FAIL** — At least one critical or major issue found.
|
|
123
|
-
|
|
124
|
-
**Auto-PASS conditions (skip reviewer):**
|
|
125
|
-
- The delegation was pure research/exploration with no code changes
|
|
126
|
-
- The delegation only modified documentation files (`.md`)
|
|
127
|
-
- All deterministic gates already passed AND the change is ≤10 lines across ≤2 files AND **no sensitive files were touched** (see validation-gates Gate 3 sensitive file list)
|
|
128
|
-
|
|
129
|
-
> **Sensitive file override:** Changes to auth/middleware files, database migrations, RLS policies, security headers, CSP configuration, environment variable schemas, or CI/CD configuration **always** require a reviewer — even for 1-line changes. Auto-PASS never applies to these files.
|
|
130
|
-
|
|
131
|
-
### Step 4: Handle Verdict
|
|
39
|
+
- **PASS** — no critical/major issues (minor noted, non-blocking).
|
|
40
|
+
- **FAIL** — any critical/major issue, or output format mismatch.
|
|
132
41
|
|
|
133
|
-
|
|
42
|
+
**Auto-PASS** (skip reviewer): pure research/no code changes; docs-only `.md` changes; ≤10 lines across ≤2 non-sensitive files with all deterministic gates passing.
|
|
134
43
|
|
|
135
|
-
|
|
136
|
-
2. Log the review result (see § Logging)
|
|
137
|
-
3. Continue orchestration
|
|
44
|
+
> **Sensitive override:** Auth/middleware, DB migrations, RLS policies, security headers, CSP, env var schemas, CI/CD config always require review — even 1-line changes.
|
|
138
45
|
|
|
139
|
-
|
|
46
|
+
### 4 — Handle Verdict
|
|
140
47
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
- Note: "This is retry attempt N/2 after fast review"
|
|
148
|
-
4. After the agent re-submits, run fast review again (go back to Step 1)
|
|
149
|
-
|
|
150
|
-
#### On FAIL (attempt 3 — escalation)
|
|
151
|
-
|
|
152
|
-
1. Log the review result with `escalated: true`
|
|
153
|
-
2. **Auto-escalate to panel review** — load the `panel-majority-vote` skill
|
|
154
|
-
3. Include all 3 fast review reports as context for the panel
|
|
155
|
-
4. The panel decides PASS/BLOCK with the standard majority vote protocol
|
|
156
|
-
5. If panel PASS → accept with a note that it required escalation
|
|
157
|
-
6. If panel BLOCK → follow the standard panel retry flow (max 3 panel attempts)
|
|
158
|
-
7. If panel BLOCKs 3 times → create a **dispute record** in `.opencastle/DISPUTES.md` (see **team-lead-reference** skill § Dispute Protocol)
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
Fast Review Attempt 1: FAIL → retry
|
|
162
|
-
Fast Review Attempt 2: FAIL → retry
|
|
163
|
-
Fast Review Attempt 3: FAIL → escalate to panel
|
|
164
|
-
Panel Attempt 1: BLOCK → re-delegate with MUST-FIX
|
|
165
|
-
Panel Attempt 2: BLOCK → re-delegate with MUST-FIX
|
|
166
|
-
Panel Attempt 3: BLOCK → create dispute record for human resolution
|
|
167
|
-
```
|
|
48
|
+
| Outcome | Action |
|
|
49
|
+
|---------|--------|
|
|
50
|
+
| PASS | Log review; continue |
|
|
51
|
+
| FAIL 1–2 | Log; re-delegate same agent: "Retry N/2 — address listed issues" |
|
|
52
|
+
| FAIL 3 | Log `escalated: true`; load **panel-majority-vote** skill |
|
|
53
|
+
| Panel BLOCK ×3 | Dispute in `.opencastle/DISPUTES.md` (see **team-lead-reference** § Dispute Protocol) |
|
|
168
54
|
|
|
169
55
|
## Reviewer Prompt Template
|
|
170
56
|
|
|
171
57
|
```markdown
|
|
172
|
-
You are a code reviewer.
|
|
173
|
-
completed correctly. Be concise and specific. Focus on correctness, not style.
|
|
174
|
-
|
|
175
|
-
## Task Under Review
|
|
176
|
-
|
|
177
|
-
**Issue:** [ID] — [Title]
|
|
178
|
-
**Acceptance Criteria:**
|
|
179
|
-
- [ ] [Criterion 1]
|
|
180
|
-
- [ ] [Criterion 2]
|
|
181
|
-
- [ ] [Criterion 3]
|
|
182
|
-
|
|
183
|
-
## Agent's File Partition (allowed files)
|
|
184
|
-
[List of directories/files the agent was allowed to modify]
|
|
58
|
+
You are a code reviewer. Be concise and specific.
|
|
185
59
|
|
|
186
|
-
##
|
|
187
|
-
|
|
60
|
+
## Task: [ID] — [Title]
|
|
61
|
+
Acceptance Criteria: [list]
|
|
188
62
|
|
|
189
|
-
##
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
- Build: [PASS/FAIL + details]
|
|
63
|
+
## File Partition: [allowed dirs/files]
|
|
64
|
+
## Changed Files: [path + key diff]
|
|
65
|
+
## Deterministic: Lint: [P/F] | Tests: [P/F] | Build: [P/F]
|
|
193
66
|
|
|
194
|
-
##
|
|
67
|
+
## Checklist
|
|
68
|
+
1. Acceptance criteria met?
|
|
69
|
+
2. Partition respected?
|
|
70
|
+
3. No regressions?
|
|
71
|
+
4. Errors surfaced (no swallowed exceptions)?
|
|
72
|
+
5. Type safety (no `as any`)?
|
|
73
|
+
6. No secrets/injection vectors?
|
|
74
|
+
7. Edge cases handled?
|
|
195
75
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
1. **Acceptance criteria met** — Does the implementation satisfy every criterion?
|
|
199
|
-
2. **File partition respected** — Were only allowed files modified?
|
|
200
|
-
3. **No regressions** — Could any change break existing functionality?
|
|
201
|
-
4. **Error handling** — Are errors surfaced clearly? No swallowed exceptions?
|
|
202
|
-
5. **Type safety** — Proper TypeScript types? No `as any` or unsafe casts?
|
|
203
|
-
6. **Security basics** — No exposed secrets, no injection vectors, no unsafe user input handling?
|
|
204
|
-
7. **Edge cases** — Are obvious edge cases handled (null, empty, overflow)?
|
|
205
|
-
|
|
206
|
-
## Previous Review Feedback (if retry)
|
|
207
|
-
[Include prior FAIL feedback so the reviewer can verify fixes]
|
|
208
|
-
|
|
209
|
-
## Output Format (MANDATORY — follow exactly)
|
|
76
|
+
## Prior Feedback (retry only): [previous FAIL]
|
|
210
77
|
|
|
211
78
|
VERDICT: PASS | FAIL
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
- [severity:critical|major|minor] Description
|
|
215
|
-
|
|
216
|
-
FEEDBACK:
|
|
217
|
-
Actionable feedback for the implementer.
|
|
218
|
-
|
|
79
|
+
ISSUES: - [severity:critical|major|minor] Description
|
|
80
|
+
FEEDBACK: [Actionable feedback.]
|
|
219
81
|
CONFIDENCE: low | medium | high
|
|
220
82
|
```
|
|
221
83
|
|
|
222
84
|
## Logging
|
|
223
85
|
|
|
224
|
-
> **⛔ HARD GATE —
|
|
225
|
-
|
|
226
|
-
After each fast review, log the result using the **observability-logging** skill's review record command. See the skill for the exact CLI syntax, required fields, and verify step. An unlogged review is a failed review.
|
|
227
|
-
|
|
228
|
-
## Integration with Existing Workflow
|
|
229
|
-
|
|
230
|
-
### Position in the Verification Loop
|
|
231
|
-
|
|
232
|
-
Fast review sits between the agent's output and the Team Lead's acceptance:
|
|
233
|
-
|
|
234
|
-
```
|
|
235
|
-
Agent completes work
|
|
236
|
-
│
|
|
237
|
-
▼
|
|
238
|
-
Secret Scanning ← validation-gates Gate 1
|
|
239
|
-
│
|
|
240
|
-
▼
|
|
241
|
-
Deterministic checks (lint, test, build) ← validation-gates Gate 2
|
|
242
|
-
│
|
|
243
|
-
▼
|
|
244
|
-
Blast Radius Check ← validation-gates Gate 3
|
|
245
|
-
│
|
|
246
|
-
▼
|
|
247
|
-
Dependency Audit (if packages changed) ← validation-gates Gate 4
|
|
248
|
-
│
|
|
249
|
-
▼
|
|
250
|
-
Fast Review (this skill) ← validation-gates Gate 5
|
|
251
|
-
│
|
|
252
|
-
├── PASS → Accept, move to next task
|
|
253
|
-
├── FAIL → Retry loop (up to 2x)
|
|
254
|
-
└── 3x FAIL → Escalate to Panel (Gate 9)
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
### Relationship to on-post-delegate Hook
|
|
86
|
+
> **⛔ HARD GATE — Log the review before proceeding.** Use **observability-logging** skill's review record command.
|
|
258
87
|
|
|
259
|
-
|
|
88
|
+
## Integration & Overnight Mode
|
|
260
89
|
|
|
261
|
-
1.
|
|
262
|
-
2. Run deterministic checks (lint, test, build)
|
|
263
|
-
3. **Run fast review** ← inserted here
|
|
264
|
-
4. Check acceptance criteria (reviewer does this too, as cross-check)
|
|
265
|
-
5. Update issue
|
|
266
|
-
|
|
267
|
-
### Skipping Panel Review
|
|
268
|
-
|
|
269
|
-
When fast review passes, you can safely skip panel review for **non-high-stakes** tasks. The thresholds for mandatory panel review remain:
|
|
270
|
-
|
|
271
|
-
- Security-sensitive changes
|
|
272
|
-
- Database migrations
|
|
273
|
-
- Architecture decisions
|
|
274
|
-
- Complex business logic without test coverage
|
|
275
|
-
|
|
276
|
-
These tasks get **both** fast review AND panel review.
|
|
277
|
-
|
|
278
|
-
## Cost Impact
|
|
279
|
-
|
|
280
|
-
Estimated cost per fast review:
|
|
281
|
-
|
|
282
|
-
| Review Tier | Est. Tokens | Est. Duration |
|
|
283
|
-
|-------------|-------------|---------------|
|
|
284
|
-
| Economy reviewer | ~3K-8K tokens | 30-90 sec |
|
|
285
|
-
| Standard reviewer | ~5K-12K tokens | 60-180 sec |
|
|
286
|
-
|
|
287
|
-
For a typical 7-delegation session:
|
|
288
|
-
- **Without fast review:** 0 review tokens
|
|
289
|
-
- **With fast review:** ~20K-60K additional tokens (~5-15% overhead)
|
|
290
|
-
- **With panel on every step:** ~150K-450K additional tokens (prohibitive)
|
|
291
|
-
|
|
292
|
-
Fast review provides ~85% of the safety benefit of full panel review at ~15% of the cost.
|
|
293
|
-
|
|
294
|
-
## Overnight/Long-Run Mode
|
|
295
|
-
|
|
296
|
-
For autonomous overnight sessions, fast review is the primary quality gate. Additional considerations:
|
|
297
|
-
|
|
298
|
-
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).
|
|
299
|
-
2. **Stricter escalation** — Escalate to panel after 2 FAILs instead of 3 when running unattended.
|
|
300
|
-
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.
|
|
301
|
-
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.
|
|
90
|
+
`on-post-delegate` Gate 5 (after deterministic Gates 1–4), ~5–15% token overhead. Overnight: upgrade one tier, escalate after 2 FAILs, checkpoint before panel.
|
|
302
91
|
|
|
303
92
|
## Anti-Patterns
|
|
304
93
|
|
|
305
|
-
- **Skipping fast review** —
|
|
306
|
-
- **
|
|
307
|
-
- **Reviewer sees
|
|
308
|
-
- **Ignoring minor issues** —
|
|
309
|
-
- **
|
|
310
|
-
- **Skipping deterministic checks** —
|
|
311
|
-
|
|
312
|
-
## Metrics & Continuous Improvement
|
|
313
|
-
|
|
314
|
-
Track these metrics from `events.ndjson` (filter by `"type":"review"`) to optimize the review process:
|
|
315
|
-
|
|
316
|
-
| Metric | Target | Action if Off-Target |
|
|
317
|
-
|--------|--------|---------------------|
|
|
318
|
-
| First-pass rate | > 80% | Improve delegation prompts with more specific acceptance criteria |
|
|
319
|
-
| Escalation rate | < 5% | Review why agents fail 3x — prompts may be ambiguous |
|
|
320
|
-
| False positive rate | < 10% | If reviewer FAILs work that's actually correct, adjust reviewer prompt |
|
|
321
|
-
| Avg review duration | < 120 sec | If too slow, reduce review context or use a faster model |
|
|
322
|
-
| Retry success rate | > 90% | If retries don't fix issues, the feedback isn't specific enough |
|
|
323
|
-
|
|
324
|
-
Review these metrics monthly (or after every 50 reviews) and adjust the reviewer prompt template accordingly.
|
|
94
|
+
- **Skipping fast review** — never, including "trivial" changes.
|
|
95
|
+
- **Panel as fast review** — wastes ~3× tokens.
|
|
96
|
+
- **Reviewer sees delegation prompt** — evaluate against acceptance criteria only.
|
|
97
|
+
- **Ignoring minor issues** — track; 3+ recurrences → ticket.
|
|
98
|
+
- **Force-accepting FAIL** — retry or escalate.
|
|
99
|
+
- **Skipping deterministic checks** — does NOT replace lint/test/build.
|
|
325
100
|
|
|
326
101
|
````
|
|
@@ -6,90 +6,48 @@ license: Complete terms in LICENSE.txt
|
|
|
6
6
|
|
|
7
7
|
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Design Principles
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
| Dimension | Rule |
|
|
12
|
+
|-----------|------|
|
|
13
|
+
| Direction | Pick an extreme aesthetic (brutally minimal, maximalist, retro-futuristic, luxury, brutalist, art deco, editorial…) and commit fully. Name it in 2–3 words. |
|
|
14
|
+
| Typography | Characterful display+body pair. No Inter/Roboto/Arial. `clamp()` fluid scale; heading lh ~1.1–1.2, body lh ~1.5–1.7; letter-spacing on uppercase/small. |
|
|
15
|
+
| Color | CSS vars only; dominant + sharp accent hierarchy; WCAG AA (4.5:1 body, 3:1 large); dark/light both intentional. |
|
|
16
|
+
| Motion | CSS-only for HTML; Motion library for React; staggered page entrance; custom easing; `prefers-reduced-motion` fallback. |
|
|
17
|
+
| Layout | Asymmetry, overlap, diagonal flow, grid-breaking. Consistent spacing tokens — no ad-hoc values. Holds at mobile/tablet/desktop. |
|
|
18
|
+
| Atmosphere | Gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows. No purple-on-white defaults. |
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Before coding, understand the context and commit to a BOLD aesthetic direction:
|
|
16
|
-
- **Purpose**: What problem does this interface solve? Who uses it?
|
|
17
|
-
- **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.
|
|
18
|
-
- **Constraints**: Technical requirements (framework, performance, accessibility).
|
|
19
|
-
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
|
|
20
|
-
|
|
21
|
-
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
|
|
22
|
-
|
|
23
|
-
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
|
|
24
|
-
- Production-grade and functional
|
|
25
|
-
- Visually striking and memorable
|
|
26
|
-
- Cohesive with a clear aesthetic point-of-view
|
|
27
|
-
- Meticulously refined in every detail
|
|
28
|
-
|
|
29
|
-
## Frontend Aesthetics Guidelines
|
|
30
|
-
|
|
31
|
-
Focus on:
|
|
32
|
-
- **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.
|
|
33
|
-
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
34
|
-
- **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.
|
|
35
|
-
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
36
|
-
- **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.
|
|
37
|
-
|
|
38
|
-
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.
|
|
39
|
-
|
|
40
|
-
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.
|
|
41
|
-
|
|
42
|
-
**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.
|
|
43
|
-
|
|
44
|
-
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.
|
|
20
|
+
**Every design must have one unforgettable detail.** No two designs should look alike.
|
|
45
21
|
|
|
46
22
|
## Design System Foundations
|
|
47
23
|
|
|
48
|
-
Every design starts with a token layer. Define CSS custom properties that encode the aesthetic direction — never scatter raw values through stylesheets. A well-structured variable system makes the entire interface feel cohesive even as complexity grows.
|
|
49
|
-
|
|
50
24
|
```css
|
|
51
|
-
/* --- Palette: warm editorial with a punch of citron --- */
|
|
52
25
|
:root {
|
|
53
|
-
--color-ink:
|
|
54
|
-
--color-
|
|
55
|
-
--color-
|
|
56
|
-
|
|
57
|
-
--color-surface: #eae3d8;
|
|
58
|
-
--color-border: rgba(26, 22, 20, 0.08);
|
|
59
|
-
|
|
60
|
-
/* Typography scale — modular ratio 1.25 (Major Third) */
|
|
26
|
+
--color-ink: #1a1614; --color-paper: #f5f0e8;
|
|
27
|
+
--color-accent: #c8e630; --color-muted: #9b9083;
|
|
28
|
+
--color-surface: #eae3d8; --color-border: rgba(26, 22, 20, 0.08);
|
|
29
|
+
|
|
61
30
|
--text-sm: clamp(0.875rem, 0.83rem + 0.22vw, 1rem);
|
|
62
31
|
--text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
|
|
63
32
|
--text-xl: clamp(1.563rem, 1.35rem + 1.06vw, 2rem);
|
|
64
33
|
--text-2xl: clamp(1.953rem, 1.6rem + 1.77vw, 2.75rem);
|
|
65
34
|
--text-hero: clamp(2.441rem, 1.8rem + 3.2vw, 4.5rem);
|
|
66
35
|
|
|
67
|
-
|
|
68
|
-
--space-
|
|
69
|
-
--space-6: 1.5rem; --space-8: 2rem;
|
|
70
|
-
--space-16: 4rem; --space-32: 8rem;
|
|
36
|
+
--space-2: 0.5rem; --space-4: 1rem; --space-6: 1.5rem;
|
|
37
|
+
--space-8: 2rem; --space-16: 4rem; --space-32: 8rem;
|
|
71
38
|
|
|
72
|
-
|
|
73
|
-
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
|
|
39
|
+
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
|
|
74
40
|
--ease-in-out-back: cubic-bezier(0.68, -0.6, 0.32, 1.6);
|
|
75
|
-
--duration-fast: 150ms;
|
|
76
|
-
--duration-normal: 300ms;
|
|
77
|
-
--duration-slow: 600ms;
|
|
41
|
+
--duration-fast: 150ms; --duration-normal: 300ms; --duration-slow: 600ms;
|
|
78
42
|
|
|
79
|
-
/* Elevation */
|
|
80
43
|
--shadow-md: 0 4px 16px rgba(26, 22, 20, 0.08);
|
|
81
44
|
--shadow-lg: 0 12px 48px rgba(26, 22, 20, 0.12);
|
|
82
45
|
}
|
|
83
46
|
```
|
|
84
47
|
|
|
85
|
-
**Anti-pattern:** Never scatter raw hex/px values through stylesheets. Every value should trace back to a token. Change the palette once and the entire interface follows.
|
|
86
|
-
|
|
87
48
|
## Component Patterns
|
|
88
49
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
A card should never look like a Bootstrap default. Give it tension — an unexpected border treatment, an oversized label, or a hover that reveals hidden depth.
|
|
92
|
-
|
|
50
|
+
**Card:**
|
|
93
51
|
```css
|
|
94
52
|
.card {
|
|
95
53
|
position: relative;
|
|
@@ -100,122 +58,54 @@ A card should never look like a Bootstrap default. Give it tension — an unexpe
|
|
|
100
58
|
transition: transform var(--duration-normal) var(--ease-out-expo),
|
|
101
59
|
box-shadow var(--duration-normal) var(--ease-out-expo);
|
|
102
60
|
}
|
|
103
|
-
|
|
104
|
-
.card:hover {
|
|
105
|
-
transform: translateY(-3px);
|
|
106
|
-
box-shadow: var(--shadow-lg);
|
|
107
|
-
}
|
|
108
|
-
|
|
61
|
+
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
|
|
109
62
|
.card__label {
|
|
110
|
-
position: absolute;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
color: var(--color-ink);
|
|
115
|
-
font-size: var(--text-xs);
|
|
116
|
-
font-weight: 700;
|
|
117
|
-
letter-spacing: 0.08em;
|
|
118
|
-
text-transform: uppercase;
|
|
63
|
+
position: absolute; top: calc(-1 * var(--space-3)); left: var(--space-4);
|
|
64
|
+
background: var(--color-accent); color: var(--color-ink);
|
|
65
|
+
font-size: var(--text-xs); font-weight: 700;
|
|
66
|
+
letter-spacing: 0.08em; text-transform: uppercase;
|
|
119
67
|
padding: var(--space-1) var(--space-3);
|
|
120
68
|
}
|
|
121
69
|
```
|
|
122
70
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
Orchestrate entrance animations with `animation-delay` for a cinematic first impression. One coordinated sequence beats a dozen scattered `fadeIn`s.
|
|
126
|
-
|
|
71
|
+
**Hero staggered reveal:**
|
|
127
72
|
```css
|
|
128
73
|
@keyframes rise {
|
|
129
74
|
from { opacity: 0; transform: translateY(24px); }
|
|
130
75
|
to { opacity: 1; transform: translateY(0); }
|
|
131
76
|
}
|
|
132
|
-
|
|
133
|
-
.
|
|
134
|
-
.
|
|
135
|
-
.
|
|
136
|
-
.
|
|
137
|
-
.hero__cta { animation: rise var(--duration-slow) var(--ease-out-expo) both; animation-delay: 550ms; }
|
|
77
|
+
.hero { overflow: hidden; padding: var(--space-32) var(--space-8); }
|
|
78
|
+
.hero__eyebrow { animation: rise var(--duration-slow) var(--ease-out-expo) both; animation-delay: 100ms; }
|
|
79
|
+
.hero__headline { animation: rise var(--duration-slow) var(--ease-out-expo) both; animation-delay: 250ms; }
|
|
80
|
+
.hero__body { animation: rise var(--duration-slow) var(--ease-out-expo) both; animation-delay: 400ms; }
|
|
81
|
+
.hero__cta { animation: rise var(--duration-slow) var(--ease-out-expo) both; animation-delay: 550ms; }
|
|
138
82
|
```
|
|
139
83
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
## Typography Pairing Examples
|
|
143
|
-
|
|
144
|
-
Never reach for the same font twice. Each project deserves a pairing chosen for its specific character. These are starting points — not a rotation list.
|
|
84
|
+
## Typography Pairings
|
|
145
85
|
|
|
146
86
|
| Aesthetic | Display | Body | Mood |
|
|
147
87
|
|-----------|---------|------|------|
|
|
148
|
-
| Editorial luxury | Playfair Display | Source Serif 4 | Authoritative, rich
|
|
149
|
-
| Swiss precision | Darker Grotesque | IBM Plex Sans | Sharp
|
|
150
|
-
| Warm humanist | Fraunces | Nunito Sans | Friendly
|
|
151
|
-
| Brutalist edge | Monument Extended | JetBrains Mono |
|
|
152
|
-
| Art nouveau organic | Cormorant Garamond | Lora | Flowing, calligraphic
|
|
153
|
-
| Retro-futuristic | Syne | Outfit | Geometric boldness
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
##
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
- [ ] Letter-spacing is adjusted for uppercase text and small sizes
|
|
171
|
-
|
|
172
|
-
### Color & Contrast
|
|
173
|
-
- [ ] Palette is defined as CSS custom properties — no raw hex in component styles
|
|
174
|
-
- [ ] There is a clear dominant/accent hierarchy — not five competing colors
|
|
175
|
-
- [ ] Text passes WCAG AA contrast minimums (4.5:1 body, 3:1 large text)
|
|
176
|
-
- [ ] Dark/light theme (if applicable) is not just color inversion — both feel intentional
|
|
177
|
-
|
|
178
|
-
### Layout & Spacing
|
|
179
|
-
- [ ] Spacing flows from a consistent scale — no random `margin: 37px`
|
|
180
|
-
- [ ] At least one layout choice breaks the expected grid — overlap, bleed, asymmetry
|
|
181
|
-
- [ ] Component padding and gaps use spacing tokens, not ad-hoc values
|
|
182
|
-
- [ ] The design holds at mobile, tablet, and desktop without layout collapse
|
|
183
|
-
|
|
184
|
-
### Motion & Interaction
|
|
185
|
-
- [ ] Page entrance has a coordinated animation sequence (staggered reveals)
|
|
186
|
-
- [ ] Hover/focus states exist for all interactive elements
|
|
187
|
-
- [ ] Animations use custom easing curves — never `linear` or bare `ease`
|
|
188
|
-
- [ ] Motion serves narrative purpose — no decoration-only animation
|
|
189
|
-
- [ ] `prefers-reduced-motion` is respected with a `@media` query fallback
|
|
190
|
-
|
|
191
|
-
### Production Readiness
|
|
192
|
-
- [ ] No hardcoded widths that break at unexpected viewports
|
|
193
|
-
- [ ] Images and decorative elements have proper `alt` text or `aria-hidden`
|
|
194
|
-
- [ ] Focus indicators are visible and styled to match the aesthetic
|
|
195
|
-
- [ ] Performance: no layout thrashing from scroll-triggered animations without `will-change`
|
|
196
|
-
## Convoy-Aware Design
|
|
197
|
-
|
|
198
|
-
When building as part of a multi-agent convoy (multiple pages or sections built in parallel), additional rules apply:
|
|
199
|
-
|
|
200
|
-
### If you ARE the foundation task agent
|
|
201
|
-
|
|
202
|
-
You are establishing the design system for the entire project. Your output is the source of truth that all other agents will consume. Focus on:
|
|
203
|
-
|
|
204
|
-
1. **Design tokens file** — comprehensive CSS custom properties covering all visual dimensions
|
|
205
|
-
2. **Layout component** — shared page container used by every page
|
|
206
|
-
3. **UI component library** — shared primitives (Button, Card, Heading, etc.)
|
|
207
|
-
4. **Style guide brief** — aesthetic direction, content tone, terminology, nav labels
|
|
208
|
-
|
|
209
|
-
Make explicit, decisive choices. Ambiguity in the foundation cascades into inconsistency across pages.
|
|
210
|
-
|
|
211
|
-
### If you are a page task agent (consuming the foundation)
|
|
212
|
-
|
|
213
|
-
You are NOT making design decisions — you are executing within an established system.
|
|
214
|
-
|
|
215
|
-
- **Import** design tokens. **Do not** create new color values, font sizes, or spacing units.
|
|
216
|
-
- **Import** the Layout component. **Do not** create a page-local layout wrapper.
|
|
217
|
-
- **Import** UI components (Button, Card, etc.). **Do not** recreate them.
|
|
218
|
-
- **Follow** the aesthetic direction and content tone from the foundation.
|
|
219
|
-
- If a token you need doesn't exist, flag it in your output — NEVER add an inline value as a workaround.
|
|
88
|
+
| Editorial luxury | Playfair Display | Source Serif 4 | Authoritative, rich |
|
|
89
|
+
| Swiss precision | Darker Grotesque | IBM Plex Sans | Sharp grotesque |
|
|
90
|
+
| Warm humanist | Fraunces | Nunito Sans | Friendly, approachable |
|
|
91
|
+
| Brutalist edge | Monument Extended | JetBrains Mono | Raw technical power |
|
|
92
|
+
| Art nouveau organic | Cormorant Garamond | Lora | Flowing, calligraphic |
|
|
93
|
+
| Retro-futuristic | Syne | Outfit | Geometric boldness |
|
|
94
|
+
|
|
95
|
+
Include a metric-preserving fallback chain (e.g., `'Fraunces', 'Georgia', serif`).
|
|
96
|
+
|
|
97
|
+
## Quality Checklist
|
|
98
|
+
|
|
99
|
+
**Identity:** aesthetic named in 2–3 words · color/type/space/motion tell one story · one memorable detail
|
|
100
|
+
|
|
101
|
+
**Typography:** display+body pair distinct · `clamp()` fluid scale · heading lh ~1.1–1.2 / body lh ~1.5–1.7 · letter-spacing on uppercase/small
|
|
102
|
+
|
|
103
|
+
**Color:** CSS vars only · dominant+accent hierarchy · WCAG AA (4.5:1 body, 3:1 large) · dark/light both intentional
|
|
104
|
+
|
|
105
|
+
**Layout:** spacing tokens throughout · one grid-breaking element · responsive at mobile/tablet/desktop
|
|
106
|
+
|
|
107
|
+
**Motion:** coordinated entrance sequence · hover/focus on all interactives · custom easing curves · `prefers-reduced-motion` fallback
|
|
108
|
+
|
|
109
|
+
**Production:** no hardcoded widths · `alt`/`aria-hidden` on images · visible focus indicators · no scroll-animation layout thrashing
|
|
220
110
|
|
|
221
111
|
> Load the **project-consistency** skill for the full Foundation Phase pattern and prompt templates.
|