opencastle 1.4.1 → 1.4.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/adapter-contract.test.js +85 -2
- package/dist/cli/adapters/adapter-contract.test.js.map +1 -1
- package/dist/cli/adapters/antigravity.d.ts +5 -4
- package/dist/cli/adapters/antigravity.d.ts.map +1 -1
- package/dist/cli/adapters/antigravity.js +5 -4
- package/dist/cli/adapters/antigravity.js.map +1 -1
- package/dist/cli/adapters/rules-dir-base.d.ts.map +1 -1
- package/dist/cli/adapters/rules-dir-base.js +25 -19
- package/dist/cli/adapters/rules-dir-base.js.map +1 -1
- package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
- package/dist/cli/adapters/single-file-base.js +10 -7
- package/dist/cli/adapters/single-file-base.js.map +1 -1
- package/dist/cli/adapters/vscode.d.ts.map +1 -1
- package/dist/cli/adapters/vscode.js +11 -5
- package/dist/cli/adapters/vscode.js.map +1 -1
- package/dist/cli/adapters/workflows.d.ts +33 -0
- package/dist/cli/adapters/workflows.d.ts.map +1 -0
- package/dist/cli/adapters/workflows.js +58 -0
- package/dist/cli/adapters/workflows.js.map +1 -0
- package/dist/cli/adapters/workflows.test.d.ts +2 -0
- package/dist/cli/adapters/workflows.test.d.ts.map +1 -0
- package/dist/cli/adapters/workflows.test.js +62 -0
- package/dist/cli/adapters/workflows.test.js.map +1 -0
- package/dist/cli/docs-accuracy.test.js +3 -3
- package/dist/cli/docs-accuracy.test.js.map +1 -1
- package/dist/cli/explain.d.ts.map +1 -1
- package/dist/cli/explain.js +3 -1
- package/dist/cli/explain.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/adapters/adapter-contract.test.ts +89 -2
- package/src/cli/adapters/antigravity.ts +5 -4
- package/src/cli/adapters/rules-dir-base.ts +30 -19
- package/src/cli/adapters/single-file-base.ts +10 -6
- package/src/cli/adapters/vscode.ts +11 -4
- package/src/cli/adapters/workflows.test.ts +70 -0
- package/src/cli/adapters/workflows.ts +62 -0
- package/src/cli/docs-accuracy.test.ts +3 -3
- package/src/cli/explain.ts +3 -1
- package/src/orchestrator/agent-workflows/README.md +2 -0
- package/src/orchestrator/agent-workflows/bug-fix.md +3 -3
- package/src/orchestrator/agent-workflows/data-pipeline.md +2 -2
- package/src/orchestrator/agent-workflows/database-migration.md +2 -2
- package/src/orchestrator/agent-workflows/feature-implementation.md +2 -2
- package/src/orchestrator/agent-workflows/performance-optimization.md +3 -3
- package/src/orchestrator/agent-workflows/refactoring.md +2 -2
- package/src/orchestrator/agent-workflows/schema-changes.md +2 -2
- package/src/orchestrator/agent-workflows/security-audit.md +2 -2
- package/src/orchestrator/agents/architect.agent.md +1 -1
- package/src/orchestrator/agents/content-engineer.agent.md +1 -1
- package/src/orchestrator/agents/data-engineer.agent.md +1 -1
- package/src/orchestrator/agents/developer.agent.md +1 -1
- package/src/orchestrator/agents/devops-expert.agent.md +1 -1
- package/src/orchestrator/agents/performance-expert.agent.md +1 -1
- package/src/orchestrator/agents/researcher.agent.md +1 -1
- package/src/orchestrator/agents/security-expert.agent.md +1 -1
- package/src/orchestrator/agents/team-lead.agent.md +3 -4
- package/src/orchestrator/agents/testing-expert.agent.md +1 -1
- package/src/orchestrator/agents/ui-ux-expert.agent.md +1 -1
- package/src/orchestrator/agents/writer.agent.md +1 -1
- package/src/orchestrator/instructions/general.instructions.md +2 -2
- package/src/orchestrator/plugins/chrome-devtools/skills/browser-testing/SKILL.md +1 -1
- package/src/orchestrator/plugins/nx/skills/nx-workspace/SKILL.md +1 -1
- package/src/orchestrator/prompts/brainstorm.prompt.md +1 -1
- package/src/orchestrator/prompts/bug-fix.prompt.md +3 -3
- package/src/orchestrator/prompts/implement-feature.prompt.md +2 -2
- package/src/orchestrator/prompts/quick-refinement.prompt.md +2 -2
- package/src/orchestrator/skills/api-patterns/SKILL.md +1 -1
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +1 -1
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +11 -11
- package/src/orchestrator/skills/validation-gates/SKILL.md +1 -1
|
@@ -43,7 +43,6 @@ Load on-demand **only when the phase is reached**.
|
|
|
43
43
|
| **agent-hooks** | Step 3 — delegation prompt templates |
|
|
44
44
|
| **task-management** | Step 2 — tracker conventions |
|
|
45
45
|
| **decomposition** | Step 2–3 — dependency resolution, delegation specs |
|
|
46
|
-
| **agent-routing** | Step 2 — task-to-agent routing, anti-patterns |
|
|
47
46
|
| **orchestration-protocols** | Step 4+ — steering, background agents, health-checks, escalation |
|
|
48
47
|
| **context-map** | Step 2, 5+ files affected |
|
|
49
48
|
| **validation-gates** | Step 4 — deterministic checks, browser testing, regression |
|
|
@@ -55,7 +54,7 @@ Load on-demand **only when the phase is reached**.
|
|
|
55
54
|
|
|
56
55
|
Developer | UI/UX Expert | Content Engineer | Data Engineer | Testing Expert | Security Expert | Performance Expert | DevOps & Release | Architect | Writer | Researcher | Reviewer.
|
|
57
56
|
|
|
58
|
-
> **⛔ Developer is LAST resort.**
|
|
57
|
+
> **⛔ Developer is LAST resort.** Route each task by the **Best For** column of `.opencastle/agents/agent-registry.md` before assigning. Decompose multi-domain tasks across agent boundaries.
|
|
59
58
|
|
|
60
59
|
## Delegation
|
|
61
60
|
|
|
@@ -63,7 +62,7 @@ Developer | UI/UX Expert | Content Engineer | Data Engineer | Testing Expert | S
|
|
|
63
62
|
|
|
64
63
|
**⛔ Hard gates:**
|
|
65
64
|
- Log delegation record immediately after each return/spawn — **observability-logging** (`--mechanism sub-agent` or `--mechanism background`).
|
|
66
|
-
- `
|
|
65
|
+
- `tier` from the agent registry only; `model` is the one the assistant actually ran, when it says.
|
|
67
66
|
- Empty/off-topic: retry max 3 → DLQ. Log failures (`--outcome failed`).
|
|
68
67
|
|
|
69
68
|
**Partitioning:** Parallel agents never touch the same files. **Budget:** Target 5–7/session; 8 → warn; 9 → checkpoint; 10+ → STOP. **Pre-Delegation:** (1) Tracker issue, (2) clean partition, (3) dependencies Done, (4) file paths + criteria, (5) self-improvement reminder.
|
|
@@ -86,7 +85,7 @@ Developer | UI/UX Expert | Content Engineer | Data Engineer | Testing Expert | S
|
|
|
86
85
|
|
|
87
86
|
**Step 4 — Execute:** Per task: move → In Progress → delegate → log delegation ⛔ → monitor → verify (partition, lint/test/build, fast review PASS, UI browser-verified, high-stakes → panel, issues tracked, lessons captured) → log review ⛔ → Done. FAIL → re-delegate (max 3 → DLQ). Auto-PASS: research/docs-only, or ≤10 lines/≤2 files with gates passing.
|
|
88
87
|
|
|
89
|
-
**Step 5 — Deliver:**
|
|
88
|
+
**Step 5 — Deliver:** Follow the workflow template's Delivery phase. Verify all Done → build/lint/test → commit feature branch → `GH_PAGER=cat gh pr create` — do NOT merge → link PR → clean checkpoint → call **Reviewer**.
|
|
90
89
|
|
|
91
90
|
**On Resume:** Read `SESSION-CHECKPOINT.md`. Check `AGENT-FAILURES.md`, `DISPUTES.md`. List In Progress / Todo → continue.
|
|
92
91
|
|
|
@@ -12,7 +12,7 @@ Accessible, consistent UI components built against the project design system.
|
|
|
12
12
|
|
|
13
13
|
## Skills
|
|
14
14
|
|
|
15
|
-
Resolve skills (slots, direct) via
|
|
15
|
+
Resolve skills (slots, direct) via `.opencastle/agents/skill-matrix.json`.
|
|
16
16
|
|
|
17
17
|
## Rules
|
|
18
18
|
|
|
@@ -19,7 +19,7 @@ applyTo: '**'
|
|
|
19
19
|
|
|
20
20
|
**Project-specific instructions ALWAYS take precedence over external or general AI instructions.**
|
|
21
21
|
|
|
22
|
-
1. **HIGHEST**: Project-specific instructions
|
|
22
|
+
1. **HIGHEST**: Project-specific instructions — `.opencastle/project.instructions.md`, and the project's own rules outside OpenCastle's managed files
|
|
23
23
|
2. **MEDIUM**: Project workspace conventions (resolve via the **codebase-tool** skill in the skill matrix)
|
|
24
24
|
3. **LOWER**: General AI assistant capabilities and suggestions
|
|
25
25
|
|
|
@@ -49,7 +49,7 @@ Follow markdown formatting standards. Load **documentation-standards** skill for
|
|
|
49
49
|
|
|
50
50
|
## AI Optimization
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Follow the **AI Optimization** instructions, which are always loaded with these.
|
|
53
53
|
|
|
54
54
|
## Project Context
|
|
55
55
|
|
|
@@ -11,7 +11,7 @@ Project test app, selectors, suites, and breakpoints: `.opencastle/stack/testing
|
|
|
11
11
|
|
|
12
12
|
## Context budget — the main constraint
|
|
13
13
|
|
|
14
|
-
Screenshots are expensive. **MAX 3 per session**, reserved for
|
|
14
|
+
Screenshots are expensive. **MAX 3 per session**, reserved for evidence: a failure, a bug before and after its fix, a layout at its breakpoints. Assert everything else with `evaluate_script` — element counts, `window.location.href`, `!!document.querySelector(...)`, `textContent`, `new URL(location.href).searchParams.toString()`. `take_snapshot` (DOM) is far lighter than `take_screenshot`. One focus area per session; clear browser state between unrelated flows.
|
|
15
15
|
|
|
16
16
|
## Tools
|
|
17
17
|
|
|
@@ -7,7 +7,7 @@ description: "Run and generate NX targets, configure project.json, and visualize
|
|
|
7
7
|
|
|
8
8
|
# NX Workspace
|
|
9
9
|
|
|
10
|
-
Docs: https://nx.dev/getting-started/intro. Project name → location mapping:
|
|
10
|
+
Docs: https://nx.dev/getting-started/intro. Project name → location mapping: `.opencastle/project.instructions.md`.
|
|
11
11
|
|
|
12
12
|
## Never bypass NX
|
|
13
13
|
|
|
@@ -105,7 +105,7 @@ Summarize the brainstorm as **Brainstorm Report** — becomes input for planning
|
|
|
105
105
|
### Affected Areas
|
|
106
106
|
- Apps: [list]
|
|
107
107
|
- Libs: [list]
|
|
108
|
-
- Data: [which data layers are affected — see
|
|
108
|
+
- Data: [which data layers are affected — see `.opencastle/project.instructions.md` for tech stack]
|
|
109
109
|
- Routes: [list]
|
|
110
110
|
|
|
111
111
|
### Open Questions
|
|
@@ -35,7 +35,7 @@ You are the Team Lead. Investigate and fix the bug described below. Bugs are rea
|
|
|
35
35
|
2. **Check tracker** — Search for existing bug tickets. If one exists, take it over instead of creating duplicate
|
|
36
36
|
3. **Read lessons learned** — Check `.opencastle/LESSONS-LEARNED.md` for related pitfalls
|
|
37
37
|
4. **Reproduce the bug** — Start the dev server (see **codebase-tool** skill), navigate to the affected page in Chrome, follow the repro steps, and screenshot the broken state
|
|
38
|
-
5. **Determine scope** — Which apps are affected? (see
|
|
38
|
+
5. **Determine scope** — Which apps are affected? (see `.opencastle/project.instructions.md` for the app inventory)
|
|
39
39
|
6. **Assess severity**: Critical (crash/data loss/auth bypass) | High (broken + workaround) | Medium (minor functional) | Low (edge case/cosmetic)
|
|
40
40
|
|
|
41
41
|
### 2. Create Tracker Issue
|
|
@@ -91,7 +91,7 @@ All bug fixes execute via OpenCastle's convoy engine — even single-task fixes
|
|
|
91
91
|
|
|
92
92
|
### 6. Delivery
|
|
93
93
|
|
|
94
|
-
Follow **Delivery
|
|
94
|
+
Follow the **Delivery Checklist** in the **git-workflow** skill — commit, push, open PR (not merged), link to tracker.
|
|
95
95
|
|
|
96
96
|
### 7. Wrap Up
|
|
97
97
|
|
|
@@ -109,7 +109,7 @@ Bug fix is complete when:
|
|
|
109
109
|
- [ ] Test added covering the bug scenario
|
|
110
110
|
- [ ] Bug verified fixed in the browser
|
|
111
111
|
- [ ] Both apps checked if shared code was modified
|
|
112
|
-
- [ ] Delivery
|
|
112
|
+
- [ ] Delivery Checklist completed (see the **git-workflow** skill) — branch pushed, PR opened (not merged), tracker linked
|
|
113
113
|
- [ ] Tracker issue moved to Done
|
|
114
114
|
- [ ] Known issues updated if applicable
|
|
115
115
|
- [ ] Lessons learned captured if any retries occurred
|
|
@@ -84,7 +84,7 @@ Every subtask must pass ALL gates before being marked Done:
|
|
|
84
84
|
|
|
85
85
|
### 5. Delivery
|
|
86
86
|
|
|
87
|
-
Follow **Delivery
|
|
87
|
+
Follow the **Delivery Checklist** in the **git-workflow** skill — commit, push, open PR (not merged), link to tracker. Convoy engine creates commits on configured `branch` directly; open PR from that branch after validation passes.
|
|
88
88
|
|
|
89
89
|
### 6. Documentation & Traceability
|
|
90
90
|
|
|
@@ -106,5 +106,5 @@ Roadmap task is complete when:
|
|
|
106
106
|
- [ ] Documentation updated (roadmap, known issues, decisions)
|
|
107
107
|
- [ ] Panel review passed for any high-stakes changes
|
|
108
108
|
- [ ] Roadmap item marked complete in `.opencastle/project/roadmap.md`
|
|
109
|
-
- [ ] Delivery
|
|
109
|
+
- [ ] Delivery Checklist completed (see the **git-workflow** skill) — branch pushed, PR opened (not merged), tracker linked
|
|
110
110
|
- [ ] Lessons learned captured if any retries occurred
|
|
@@ -87,7 +87,7 @@ Every follow-up, no matter how small, must pass these gates:
|
|
|
87
87
|
|
|
88
88
|
### 6. Delivery
|
|
89
89
|
|
|
90
|
-
If tracked: follow **Delivery
|
|
90
|
+
If tracked: follow the **Delivery Checklist** in the **git-workflow** skill — commit, push, open PR (not merged), tracker linked.
|
|
91
91
|
|
|
92
92
|
If untracked: commit to current branch; Team Lead includes in parent task's existing PR.
|
|
93
93
|
|
|
@@ -106,5 +106,5 @@ If untracked: commit to current branch; Team Lead includes in parent task's exis
|
|
|
106
106
|
- [ ] Tracker issue created, moved to Done (if triage determined tracking was needed)
|
|
107
107
|
- [ ] **Visual changes verified in Chrome with screenshot as proof**
|
|
108
108
|
- [ ] Shared component changes tested across all consuming apps
|
|
109
|
-
- [ ] Delivery
|
|
109
|
+
- [ ] Delivery Checklist completed if tracked (see the **git-workflow** skill) — branch pushed, PR opened (not merged), tracker linked
|
|
110
110
|
- [ ] Lessons learned captured, known issues updated if applicable
|
|
@@ -5,7 +5,7 @@ description: "Creates API route handlers, implements Server Actions with Zod sch
|
|
|
5
5
|
|
|
6
6
|
# API Patterns
|
|
7
7
|
|
|
8
|
-
Project-specific config: `.opencastle/stack/api-config.md
|
|
8
|
+
Project-specific config: `.opencastle/stack/api-config.md`, when the project has one.
|
|
9
9
|
|
|
10
10
|
## Architecture
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ description: "Configures deployment pipelines, manages environment variables, sc
|
|
|
5
5
|
|
|
6
6
|
# Deployment Infrastructure
|
|
7
7
|
|
|
8
|
-
See `.opencastle/stack/deployment-config.md
|
|
8
|
+
See `.opencastle/stack/deployment-config.md`, when the project has one, for full architecture, env vars, cron jobs, caching headers.
|
|
9
9
|
|
|
10
10
|
## Environment Variables
|
|
11
11
|
|
|
@@ -21,13 +21,13 @@ For specialist agent registry, model assignments, see `.opencastle/agents/agent-
|
|
|
21
21
|
|
|
22
22
|
| Tier | Use For |
|
|
23
23
|
|------|---------|
|
|
24
|
-
| **Premium** |
|
|
25
|
-
| **
|
|
26
|
-
| **
|
|
27
|
-
| **Fast** | Terminal-heavy tasks, E2E tests, data pipelines, agentic workflows |
|
|
28
|
-
| **Economy** | Docs, simple config, formatting, boilerplate |
|
|
24
|
+
| **Premium** | Orchestration, architecture, security review — the hardest reasoning |
|
|
25
|
+
| **Standard** | Feature work, schemas, UI, tests — the bulk of the work |
|
|
26
|
+
| **Economy** | Review passes, docs, copy — high volume, low ambiguity |
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
A tier names the kind of model, not a model: the assistant picks one it can reach.
|
|
29
|
+
|
|
30
|
+
**Selection:** Default to the agent's registry tier. Never Premium for boilerplate. 3+ parallel agents → prefer Standard/Economy. Per-task overrides below.
|
|
31
31
|
|
|
32
32
|
## Complexity-Based Task Scoring
|
|
33
33
|
|
|
@@ -41,12 +41,12 @@ For specialist agent registry, model assignments, see `.opencastle/agents/agent-
|
|
|
41
41
|
|
|
42
42
|
| Score | Tier | Examples |
|
|
43
43
|
|-------|------|----------|
|
|
44
|
-
| 1–2 | Economy
|
|
45
|
-
| 3–5 | Standard
|
|
46
|
-
| 8 |
|
|
47
|
-
| 13 |
|
|
44
|
+
| 1–2 | Economy | Docs update, config tweak, rename, simple test |
|
|
45
|
+
| 3–5 | Standard | Component, CMS query, API route, migration |
|
|
46
|
+
| 8 | Premium | Architecture decision, security audit, complex refactor |
|
|
47
|
+
| 13 | Premium + Panel | DB migration with data transform, auth flow redesign |
|
|
48
48
|
|
|
49
|
-
**Overrides:** Blocker (blocking 2+ downstream) → upgrade one tier. Security-touching or architecture ambiguity →
|
|
49
|
+
**Overrides:** Blocker (blocking 2+ downstream) → upgrade one tier. Security-touching or architecture ambiguity → Premium. Pure docs/config → Economy. Registry default takes precedence unless complexity clearly warrants change.
|
|
50
50
|
|
|
51
51
|
## Deepen-Plan Protocol
|
|
52
52
|
|
|
@@ -80,7 +80,7 @@ rm -rf node_modules/.cache .next/cache .astro/ dist/
|
|
|
80
80
|
|
|
81
81
|
## Gate 7: Browser Testing
|
|
82
82
|
|
|
83
|
-
UI changes
|
|
83
|
+
UI changes are verified in Chrome. Start dev server → verify ACs → responsive breakpoints → screenshots as evidence, at most 3 per session. Load **browser-testing** skill.
|
|
84
84
|
|
|
85
85
|
```json
|
|
86
86
|
{ "tool": "browser-testing/take_screenshot", "url": "http://localhost:3000", "viewports": ["mobile", "desktop"] }
|