opencastle 0.38.0 → 0.38.2
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/cli/adapters/rules-dir-base.d.ts.map +1 -1
- package/dist/cli/adapters/rules-dir-base.js +28 -4
- package/dist/cli/adapters/rules-dir-base.js.map +1 -1
- package/dist/cli/adapters/rules-dir-base.test.js +17 -1
- package/dist/cli/adapters/rules-dir-base.test.js.map +1 -1
- package/dist/cli/bootstrap-on-init.test.d.ts +2 -0
- package/dist/cli/bootstrap-on-init.test.d.ts.map +1 -0
- package/dist/cli/bootstrap-on-init.test.js +90 -0
- package/dist/cli/bootstrap-on-init.test.js.map +1 -0
- package/dist/cli/bootstrap.d.ts +1 -0
- package/dist/cli/bootstrap.d.ts.map +1 -1
- package/dist/cli/bootstrap.js +1 -1
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +9 -2
- package/dist/cli/init.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/adapters/rules-dir-base.test.ts +21 -1
- package/src/cli/adapters/rules-dir-base.ts +42 -6
- package/src/cli/bootstrap-on-init.test.ts +106 -0
- package/src/cli/bootstrap.ts +1 -1
- package/src/cli/init.ts +10 -2
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/orchestrator/agents/team-lead.agent.md +1 -1
- package/src/orchestrator/customizations/README.md +1 -1
- package/src/orchestrator/plugins/astro/SKILL.md +1 -1
- package/src/orchestrator/plugins/chrome-devtools/SKILL.md +1 -1
- package/src/orchestrator/plugins/contentful/SKILL.md +1 -1
- package/src/orchestrator/plugins/convex/SKILL.md +1 -1
- package/src/orchestrator/plugins/cypress/SKILL.md +1 -1
- package/src/orchestrator/plugins/jira/SKILL.md +2 -2
- package/src/orchestrator/plugins/linear/SKILL.md +3 -3
- package/src/orchestrator/plugins/netlify/SKILL.md +1 -1
- package/src/orchestrator/plugins/nx/SKILL.md +7 -7
- package/src/orchestrator/plugins/playwright/SKILL.md +1 -1
- package/src/orchestrator/plugins/prisma/SKILL.md +1 -1
- package/src/orchestrator/plugins/sanity/SKILL.md +1 -1
- package/src/orchestrator/plugins/strapi/SKILL.md +2 -2
- package/src/orchestrator/plugins/supabase/SKILL.md +1 -1
- package/src/orchestrator/plugins/trello/SKILL.md +1 -1
- package/src/orchestrator/plugins/vercel/SKILL.md +1 -1
- package/src/orchestrator/plugins/vitest/SKILL.md +1 -1
- package/src/orchestrator/skill-config-links.test.ts +30 -0
- package/src/orchestrator/skills/agent-hooks/HOOKS-REFERENCE.md +1 -1
- package/src/orchestrator/skills/agent-hooks/SKILL.md +2 -2
- package/src/orchestrator/skills/api-patterns/SKILL.md +1 -1
- package/src/orchestrator/skills/context-map/SKILL.md +11 -9
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +1 -1
- package/src/orchestrator/skills/documentation-standards/SKILL.md +5 -2
- package/src/orchestrator/skills/fast-review/SKILL.md +8 -3
- package/src/orchestrator/skills/frontend-design/SKILL.md +0 -1
- package/src/orchestrator/skills/git-workflow/SKILL.md +1 -1
- package/src/orchestrator/skills/orchestration-protocols/SKILL.md +9 -11
- package/src/orchestrator/skills/panel-majority-vote/SKILL.md +1 -1
- package/src/orchestrator/skills/performance-optimization/SKILL.md +2 -1
- package/src/orchestrator/skills/project-consistency/SKILL.md +2 -2
- package/src/orchestrator/skills/react-development/SKILL.md +4 -7
- package/src/orchestrator/skills/security-hardening/SKILL.md +1 -1
- package/src/orchestrator/skills/session-checkpoints/CHECKPOINT-TEMPLATE.md +1 -1
- package/src/orchestrator/skills/session-checkpoints/SKILL.md +2 -2
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +2 -2
- package/src/orchestrator/skills/validation-gates/REFERENCE.md +1 -1
- package/src/orchestrator/skills/validation-gates/SKILL.md +3 -3
|
@@ -23,17 +23,19 @@ Identify files that MUST change from task description.
|
|
|
23
23
|
|
|
24
24
|
### 2 — Trace Outward (dependents)
|
|
25
25
|
Find consumers of entry-point exports:
|
|
26
|
+
```bash
|
|
27
|
+
rg -n "import .*from .*libs/auth" # find importers
|
|
28
|
+
rg -n "\bAuthCard\b" --type ts --type tsx # find component consumers
|
|
29
|
+
rg -n "auth.*route|/auth" # find route references
|
|
26
30
|
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
grep_search("places.*route|/places", isRegexp=true) # find route references
|
|
30
|
-
```
|
|
31
|
+
If the assistant exposes a code-usage lookup (find-references), prefer it for
|
|
32
|
+
symbols: it resolves re-exports and aliases that a text search misses.
|
|
31
33
|
|
|
32
34
|
### 3 — Trace Inward (sources)
|
|
33
35
|
Find what entry points depend on:
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
```bash
|
|
37
|
+
rg -n "from .*libs/" src/auth/ # shared lib deps
|
|
38
|
+
rg -n "from .*config" src/auth/ # config deps
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
### 4 — Build the Map
|
|
@@ -59,11 +61,11 @@ Context Map — Feature: Add priceRange
|
|
|
59
61
|
- src/components/Account/**
|
|
60
62
|
```
|
|
61
63
|
|
|
62
|
-
Validation checkpoint: every
|
|
64
|
+
Validation checkpoint: every search hit lands in the map; all listed files open without errors (typecheck via the **codebase-tool** slot). Full template, depth levels, partition derivation, Team Lead integration: see [REFERENCE.md](./REFERENCE.md).
|
|
63
65
|
|
|
64
66
|
## Anti-Patterns
|
|
65
67
|
|
|
66
68
|
- Skipping for "obvious" tasks — shared libs cascade unexpectedly
|
|
67
|
-
- Guessing dependencies instead of
|
|
69
|
+
- Guessing dependencies instead of searching for them
|
|
68
70
|
- Over-mapping a 2-file fix
|
|
69
71
|
- Using a stale map after plan changes
|
|
@@ -5,7 +5,7 @@ description: "Configures deployment pipelines, manages environment variables, sc
|
|
|
5
5
|
|
|
6
6
|
# Deployment Infrastructure
|
|
7
7
|
|
|
8
|
-
See
|
|
8
|
+
See `.opencastle/stack/deployment-config.md` for full architecture, env vars, cron jobs, caching headers.
|
|
9
9
|
|
|
10
10
|
## Environment Variables
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ description: "Scaffolds issue docs, ADRs, README outlines, changelog entries, ro
|
|
|
5
5
|
|
|
6
6
|
# Documentation Standards
|
|
7
7
|
|
|
8
|
-
Project directory structure and practices:
|
|
8
|
+
Project directory structure and practices: `.opencastle/project/docs-structure.md`. Writing guidelines, formatting rules, anti-patterns: `WRITING-GUIDE.md`, beside this file.
|
|
9
9
|
|
|
10
10
|
## Templates
|
|
11
11
|
|
|
@@ -23,6 +23,9 @@ One concern per diagram, max 10–12 nodes. `flowchart TD` for pipelines, `LR` f
|
|
|
23
23
|
|
|
24
24
|
## Validate
|
|
25
25
|
|
|
26
|
+
Check links and formatting before committing docs. Resolve the formatter
|
|
27
|
+
command via the **codebase-tool** slot; the link checker is standalone:
|
|
28
|
+
|
|
26
29
|
```bash
|
|
27
|
-
npx markdown-link-check docs/**/*.md
|
|
30
|
+
npx markdown-link-check docs/**/*.md
|
|
28
31
|
```
|
|
@@ -23,10 +23,15 @@ Issue + acceptance criteria, file diff, file partition, deterministic results (l
|
|
|
23
23
|
|
|
24
24
|
### 2 — Spawn Reviewer
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
One sub-agent, dispatched as the Reviewer. Context = acceptance criteria, diff, partition, deterministic results **only** — no session history, no delegation prompt.
|
|
27
27
|
|
|
28
|
-
```
|
|
29
|
-
|
|
28
|
+
```
|
|
29
|
+
Agent: Reviewer
|
|
30
|
+
Review against these acceptance criteria:
|
|
31
|
+
[criteria]
|
|
32
|
+
Diff:
|
|
33
|
+
[diff]
|
|
34
|
+
Deterministic gates: lint ✅ test ✅ build ✅
|
|
30
35
|
```
|
|
31
36
|
|
|
32
37
|
Full reviewer prompt template: [REFERENCE.md](REFERENCE.md).
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontend-design
|
|
3
3
|
description: "Defines named visual aesthetic, selects typography pairings, builds CSS token systems, adds entrance animations for high-design-quality pages. Use when user asks to design landing page, style marketing site, create distinctive UI theme, pick fonts, or add CSS animations — specifically when visual polish, brand identity matter rather than generic component scaffolding."
|
|
4
|
-
license: Complete terms in LICENSE.txt
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
@@ -47,6 +47,6 @@ when it is fixable.
|
|
|
47
47
|
|
|
48
48
|
## Task Tracking
|
|
49
49
|
|
|
50
|
-
Tracked in the **task tracker
|
|
50
|
+
Tracked in the **task tracker**, configured in `.opencastle/project/<tracker>-config.md` (for example `linear-config.md`). Team Lead creates/updates issues via MCP. Load **task-management** skill for conventions.
|
|
51
51
|
|
|
52
52
|
**If MCP tools unavailable:** Document planned issues (title + AC) in output; use `"N/A"` (no tracker) or `"TAS-PENDING"` (tracker configured); proceed with work; update IDs when available.
|
|
@@ -99,15 +99,13 @@ opencastle convoy retry
|
|
|
99
99
|
|
|
100
100
|
**Post-run verification (copy-paste checks):**
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
echo "convoy failed — inspect .opencastle/convoy.log" \
|
|
105
|
-
&& tail -n 200 .opencastle/convoy.log && exit 1
|
|
106
|
-
fi
|
|
107
|
-
|
|
108
|
-
npx opencastle convoy
|
|
102
|
+
Convoy records to `.opencastle/convoy.db` and `.opencastle/logs/`; there is no
|
|
103
|
+
plain-text run log to tail.
|
|
109
104
|
|
|
110
|
-
|
|
105
|
+
```bash
|
|
106
|
+
opencastle convoy --json # last run's status, machine-readable
|
|
107
|
+
opencastle convoy run --status # current convoy state from convoy.db
|
|
108
|
+
tail -n 50 .opencastle/logs/events.ndjson | jq -c 'select(.outcome != "success")'
|
|
111
109
|
```
|
|
112
110
|
|
|
113
111
|
## Validation & Verification Checkpoints
|
|
@@ -115,9 +113,9 @@ grep -i "error\|failed" .opencastle/convoy.log || echo "no obvious errors in log
|
|
|
115
113
|
| Phase | Check | Command / Action |
|
|
116
114
|
|-------|-------|-----------------|
|
|
117
115
|
| Pre-spawn | Inputs present (task, scope, ACs) | `test -s convoy.yml \|\| exit 1` |
|
|
118
|
-
| During-run |
|
|
119
|
-
| Pre-merge |
|
|
120
|
-
|
|
|
116
|
+
| During-run | Watch for failures | `opencastle convoy run --status` |
|
|
117
|
+
| Pre-merge | No task left failed or gate-failed | `opencastle convoy --json \| jq -e '.failed == 0'` |
|
|
118
|
+
| Dead letters | Queue is empty | `opencastle convoy run --dlq-list` |
|
|
121
119
|
| Post-merge | Lint + smoke tests pass | `npm run lint && npm test -- -t "smoke"` |
|
|
122
120
|
| Blocker | Any failure | Block merge; reopen to original researcher(s) |
|
|
123
121
|
|
|
@@ -20,7 +20,7 @@ description: "Runs 3 isolated reviewer sub-agents; consolidates PASS/BLOCK verdi
|
|
|
20
20
|
|
|
21
21
|
1. **Validate scope** — every artifact path under `<runRoot>`; list sufficient to answer question.
|
|
22
22
|
|
|
23
|
-
2. **Spawn 3 reviewers in parallel** — three
|
|
23
|
+
2. **Spawn 3 reviewers in parallel** — three sub-agent dispatches with identical prompts (same question, artifact list, constraints), each isolated. Required reviewer output sections (no others): `VERDICT: PASS | BLOCK`, `MUST-FIX:`, `SHOULD-FIX:`, `QUESTIONS:`, `TEST IDEAS:`, `CONFIDENCE: low | med | high`.
|
|
24
24
|
|
|
25
25
|
3. **Persist outputs** — write `<panelDir>/<panelKey>-reviewer-outputs.md` with a header (run root, panel key, question, artifacts) and each reviewer output verbatim, separated.
|
|
26
26
|
|
|
@@ -11,11 +11,12 @@ Measure before changing anything. Add `React.memo`/`useMemo`/`useCallback` only
|
|
|
11
11
|
|
|
12
12
|
- Node: async APIs only — never `readFileSync` or other sync I/O on a request path.
|
|
13
13
|
- Debounce input-driven fetches at 300 ms.
|
|
14
|
+
- INP replaced FID as a Core Web Vital in March 2024: budget it at ≤200 ms, and measure every interaction, not just the first.
|
|
14
15
|
- Profile Node with `clinic.js` or `node --inspect`; profile React with `<Profiler onRender>` or the DevTools Profiler.
|
|
15
16
|
|
|
16
17
|
## Profiling Workflow
|
|
17
18
|
|
|
18
|
-
1. Lighthouse (or the CI perf job) for a baseline; name the failing metric (LCP/CLS/
|
|
19
|
+
1. Lighthouse (or the CI perf job) for a baseline; name the failing metric (LCP/CLS/INP/TTI). Lighthouse emulates mobile by default; pass `--preset=desktop` when the regression is desktop-only.
|
|
19
20
|
2. Profile to locate the hotspot call stacks / long tasks.
|
|
20
21
|
3. Apply the minimal fix (code-split, memoize, shrink payloads, defer non-critical work); confirm in the profiler that the measured hotspot actually shrank.
|
|
21
22
|
4. Re-run Lighthouse / the CI perf job. Ship only at ≥10% improvement or once inside budget.
|
|
@@ -22,7 +22,7 @@ Phase 1 (sequential): `foundation-setup` creates tokens, Layout, UI library, sty
|
|
|
22
22
|
|
|
23
23
|
**Validation checkpoints:**
|
|
24
24
|
1. Foundation complete: `tokens.css` has all palette/type/spacing vars, Layout renders, UI components compile.
|
|
25
|
-
2. Per-page: `grep -
|
|
25
|
+
2. Per-page: `grep -rF 'style={{' src/pages/` returns 0 hits (no inline styles). All imports resolve.
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
@@ -50,7 +50,7 @@ Prompt templates: see [TEMPLATES.md](./TEMPLATES.md).
|
|
|
50
50
|
--color-primary-600: #0284c7;
|
|
51
51
|
|
|
52
52
|
/* Typography */
|
|
53
|
-
--font-base:
|
|
53
|
+
--font-base: Inter, system-ui, -apple-system, sans-serif;
|
|
54
54
|
--text-sm: 0.875rem;
|
|
55
55
|
--text-base: 1rem;
|
|
56
56
|
|
|
@@ -11,16 +11,13 @@ description: "Enforces React-specific patterns: functional components with hooks
|
|
|
11
11
|
- Export the props type as `ComponentNameProps`; PascalCase component names.
|
|
12
12
|
- Styling: CSS Modules (`.module.scss`), Sass variables/mixins pulled from the shared libraries, CSS custom properties for theming.
|
|
13
13
|
- `strict` stays enabled in `tsconfig.json`; no `as` casts.
|
|
14
|
-
- Tests: React Testing Library on
|
|
14
|
+
- Tests: React Testing Library on the runner bound to the **testing** capability slot, mocking external deps and API calls.
|
|
15
15
|
|
|
16
16
|
## Verification
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
pnpm test # single test: pnpm test -- -t <name>
|
|
22
|
-
pnpm build
|
|
23
|
-
```
|
|
18
|
+
Lint, typecheck, test, and build must all exit zero. Resolve the exact commands
|
|
19
|
+
via the **codebase-tool** slot; `.opencastle/project.instructions.md` records the
|
|
20
|
+
project's package manager and script names.
|
|
24
21
|
|
|
25
22
|
## Security
|
|
26
23
|
|
|
@@ -32,4 +32,4 @@ Cron routes: require `authorization: Bearer ${process.env.CRON_SECRET}`, else re
|
|
|
32
32
|
|
|
33
33
|
Zod schema validation on every Server Action and route handler before any DB operation; React Hook Form client-side.
|
|
34
34
|
|
|
35
|
-
Cross-reference:
|
|
35
|
+
Cross-reference: the **api-patterns** skill for Server Action patterns; the **session-checkpoints** skill for checkpointing security-sensitive work.
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|----------|---------|-----------|----------|-----------|
|
|
34
34
|
| slack | C0AHAQFJ7C1 | 1772393542.345149 | Run migration on production? | 2026-03-01 14:30 |
|
|
35
35
|
|
|
36
|
-
Remove row once answered (
|
|
36
|
+
Remove row once answered (a reply in chat counts as resolved).
|
|
37
37
|
|
|
38
38
|
## Decisions & Blockers
|
|
39
39
|
|
|
@@ -15,7 +15,7 @@ description: "Saves, restores session state including task progress, file change
|
|
|
15
15
|
| Session end | Any session with incomplete work |
|
|
16
16
|
| Context running low | Checkpoint immediately |
|
|
17
17
|
|
|
18
|
-
Phase boundaries that warrant a checkpoint:
|
|
18
|
+
Phase boundaries that warrant a checkpoint: load the **decomposition** skill.
|
|
19
19
|
|
|
20
20
|
## Creating a Checkpoint
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@ Phase boundaries that warrant a checkpoint: see [decomposition](../../skills/dec
|
|
|
28
28
|
1. Read `.opencastle/SESSION-CHECKPOINT.md`
|
|
29
29
|
2. Run `git status`, `git branch` — confirm you are on correct branch
|
|
30
30
|
3. Check In Progress tasks — if stale (>1 session old), verify files match expected state
|
|
31
|
-
4. Check Pending Approvals — remove rows for questions
|
|
31
|
+
4. Check Pending Approvals — remove rows for questions the user has since answered in chat
|
|
32
32
|
5. Read tracker issues for tasks marked In Progress or Todo
|
|
33
33
|
6. Follow Resume Instructions section in checkpoint
|
|
34
34
|
7. Update checkpoint progress after each completed task
|
|
@@ -15,7 +15,7 @@ description: "Provides model routing rules, validates delegation prerequisites,
|
|
|
15
15
|
6. **Handle** output per Status Handling table
|
|
16
16
|
7. **Log** via **observability-logging** skill
|
|
17
17
|
|
|
18
|
-
For specialist agent registry, model assignments, see
|
|
18
|
+
For specialist agent registry, model assignments, see `.opencastle/agents/agent-registry.md`.
|
|
19
19
|
|
|
20
20
|
## Cost-Aware Model Routing
|
|
21
21
|
|
|
@@ -57,7 +57,7 @@ For specialist agent registry, model assignments, see [agent-registry.md](../../
|
|
|
57
57
|
| 6+ subtasks, unfamiliar | Full deepen — parallel Researcher sub-agents |
|
|
58
58
|
|
|
59
59
|
**Quick deepen:** Fire one Researcher for exact file paths + line ranges, patterns to follow (file:line examples), relevant lessons from `LESSONS-LEARNED.md`, risks/blockers per subtask, dependencies verified against exact imports.
|
|
60
|
-
**Full deepen:** Split by domain into parallel Researchers. See
|
|
60
|
+
**Full deepen:** Split by domain into parallel Researchers. See `.opencastle/agents/agent-registry.md` for scope examples.
|
|
61
61
|
|
|
62
62
|
Deepen is done when no field is still a guess — "some component" → exact path + line range, "follow existing style" → specific file:line.
|
|
63
63
|
|
|
@@ -30,7 +30,7 @@ Extended checklists and options for validation gates.
|
|
|
30
30
|
|
|
31
31
|
```json
|
|
32
32
|
{
|
|
33
|
-
"tool": "browser-testing/
|
|
33
|
+
"tool": "browser-testing/take_screenshot",
|
|
34
34
|
"url": "http://localhost:3000/page",
|
|
35
35
|
"viewports": ["mobile", "tablet", "desktop"],
|
|
36
36
|
"wait_selector": ".content-loaded",
|
|
@@ -63,7 +63,7 @@ npm run lint && npm test --silent && npm run build
|
|
|
63
63
|
|
|
64
64
|
> Runs only when `package.json`, `yarn.lock`, `package-lock.json`, `pnpm-lock.yaml`, or similar lockfiles are modified.
|
|
65
65
|
|
|
66
|
-
- **Vulnerability:** `npm audit --audit-level=
|
|
66
|
+
- **Vulnerability:** `npm audit --audit-level=high` — no new high/critical, else BLOCK (patched version or alternative).
|
|
67
67
|
- **Bundle size:** frontend pkgs ≤50KB gzipped (project policy) — SHOULD-FIX; blocking if >200KB.
|
|
68
68
|
|
|
69
69
|
Full checklist (license, duplicates, maintenance, peer deps, type coverage) with commands: [REFERENCE.md](REFERENCE.md).
|
|
@@ -83,14 +83,14 @@ rm -rf node_modules/.cache .next/cache .astro/ dist/
|
|
|
83
83
|
UI changes require Chrome screenshots. Start dev server → verify ACs → responsive breakpoints → capture screenshots. Load **browser-testing** skill.
|
|
84
84
|
|
|
85
85
|
```json
|
|
86
|
-
{ "tool": "browser-testing/
|
|
86
|
+
{ "tool": "browser-testing/take_screenshot", "url": "http://localhost:3000", "viewports": ["mobile", "desktop"] }
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
Additional options: see [REFERENCE.md](REFERENCE.md).
|
|
90
90
|
|
|
91
91
|
## Gate 8: Regression Testing
|
|
92
92
|
|
|
93
|
-
1.
|
|
93
|
+
1. Full test suite for all affected projects (resolve the command via the **codebase-tool** slot)
|
|
94
94
|
2. Browser-test adjacent pages (navigation, routing, back-button) — find them via `rg "href=\"/changed-path|import .*from '@/components/changed'"`.
|
|
95
95
|
3. Find consuming apps/packages via `rg "from '@/components/PriceRange'|@my-org/ui-package"`; run their tests or smoke builds.
|
|
96
96
|
|