opencastle 0.32.10 → 0.32.12
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 +4 -4
- package/dist/cli/convoy/engine.d.ts.map +1 -1
- package/dist/cli/convoy/engine.js +1 -0
- package/dist/cli/convoy/engine.js.map +1 -1
- package/dist/cli/convoy/pipeline.d.ts.map +1 -1
- package/dist/cli/convoy/pipeline.js +5 -2
- package/dist/cli/convoy/pipeline.js.map +1 -1
- package/dist/cli/convoy/pipeline.test.js +44 -0
- package/dist/cli/convoy/pipeline.test.js.map +1 -1
- package/dist/cli/run.js +4 -4
- package/dist/cli/run.js.map +1 -1
- package/dist/dashboard/scripts/etl.d.ts +1 -0
- package/dist/dashboard/scripts/etl.d.ts.map +1 -1
- package/dist/dashboard/scripts/etl.js +7 -2
- package/dist/dashboard/scripts/etl.js.map +1 -1
- package/package.json +3 -3
- package/src/cli/convoy/engine.ts +1 -0
- package/src/cli/convoy/pipeline.test.ts +49 -0
- package/src/cli/convoy/pipeline.ts +7 -2
- package/src/cli/run.ts +4 -4
- package/src/dashboard/dist/_astro/{index.6xXNs4L2.css → index.CADNhRPS.css} +1 -1
- package/src/dashboard/dist/data/convoys/demo-api-v2.json +3 -3
- package/src/dashboard/dist/data/convoys/demo-auth-revamp.json +4 -4
- package/src/dashboard/dist/data/convoys/demo-dashboard-ui.json +6 -6
- package/src/dashboard/dist/data/convoys/demo-data-pipeline.json +3 -3
- package/src/dashboard/dist/data/convoys/demo-deploy-ci.json +1 -1
- package/src/dashboard/dist/data/convoys/demo-docs-update.json +7 -7
- package/src/dashboard/dist/data/convoys/demo-perf-opt.json +4 -4
- package/src/dashboard/dist/index.html +29 -6
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/dashboard/public/data/convoys/demo-api-v2.json +3 -3
- package/src/dashboard/public/data/convoys/demo-auth-revamp.json +4 -4
- package/src/dashboard/public/data/convoys/demo-dashboard-ui.json +6 -6
- package/src/dashboard/public/data/convoys/demo-data-pipeline.json +3 -3
- package/src/dashboard/public/data/convoys/demo-deploy-ci.json +1 -1
- package/src/dashboard/public/data/convoys/demo-docs-update.json +7 -7
- package/src/dashboard/public/data/convoys/demo-perf-opt.json +4 -4
- package/src/dashboard/scripts/etl.ts +9 -5
- package/src/dashboard/src/pages/index.astro +36 -4
- package/src/dashboard/src/styles/dashboard.css +4 -0
- package/src/orchestrator/prompts/generate-convoy.prompt.md +33 -19
- package/src/orchestrator/prompts/validate-convoy.prompt.md +13 -30
|
@@ -339,6 +339,15 @@ try {
|
|
|
339
339
|
<div class="chart-card__body" id="panel-chart"></div>
|
|
340
340
|
</section>
|
|
341
341
|
|
|
342
|
+
<!-- Recent Sessions (live during active convoy) -->
|
|
343
|
+
<section class="chart-card" id="detail-sessions-section" data-nav-section>
|
|
344
|
+
<div class="chart-card__header">
|
|
345
|
+
<h2 class="chart-card__title">Recent Sessions</h2>
|
|
346
|
+
<p class="chart-card__desc">Latest agent sessions from observability log</p>
|
|
347
|
+
</div>
|
|
348
|
+
<div class="chart-card__body chart-card__body--table" id="detail-sessions-table"></div>
|
|
349
|
+
</section>
|
|
350
|
+
|
|
342
351
|
</div><!-- .view-convoy-detail -->
|
|
343
352
|
|
|
344
353
|
|
|
@@ -693,6 +702,8 @@ try {
|
|
|
693
702
|
const url = new URL(window.location);
|
|
694
703
|
url.searchParams.delete('convoy');
|
|
695
704
|
history.pushState({}, '', url);
|
|
705
|
+
const chainNav = document.getElementById('pipeline-chain-nav');
|
|
706
|
+
if (chainNav) chainNav.remove();
|
|
696
707
|
}
|
|
697
708
|
|
|
698
709
|
function showConvoyDetailView(convoyId, convoyName) {
|
|
@@ -977,7 +988,8 @@ try {
|
|
|
977
988
|
|
|
978
989
|
async function renderRecentSessions() {
|
|
979
990
|
var el = document.getElementById('sessions-table');
|
|
980
|
-
|
|
991
|
+
var detailEl = document.getElementById('detail-sessions-table');
|
|
992
|
+
if (!el && !detailEl) return;
|
|
981
993
|
try {
|
|
982
994
|
var allEvents = await loadNdjson(base + 'data/events.ndjson');
|
|
983
995
|
var sessions = allEvents.filter(function(e) { return e.type === 'session'; });
|
|
@@ -986,7 +998,9 @@ try {
|
|
|
986
998
|
});
|
|
987
999
|
sessions = sessions.slice(0, 15);
|
|
988
1000
|
if (sessions.length === 0) {
|
|
989
|
-
|
|
1001
|
+
var emptyHtml = emptyStateHtml('sessions', 'No sessions recorded yet', 'Agent session data will appear here when sessions are logged via opencastle log.');
|
|
1002
|
+
if (el) el.innerHTML = emptyHtml;
|
|
1003
|
+
if (detailEl) detailEl.innerHTML = emptyHtml;
|
|
990
1004
|
return;
|
|
991
1005
|
}
|
|
992
1006
|
var thead = '<thead><tr>' +
|
|
@@ -1016,9 +1030,13 @@ try {
|
|
|
1016
1030
|
'</tr>';
|
|
1017
1031
|
}
|
|
1018
1032
|
tbody += '</tbody>';
|
|
1019
|
-
|
|
1033
|
+
var tableHtml = '<table class="sessions-table">' + thead + tbody + '</table>';
|
|
1034
|
+
if (el) el.innerHTML = tableHtml;
|
|
1035
|
+
if (detailEl) detailEl.innerHTML = tableHtml;
|
|
1020
1036
|
} catch (e) {
|
|
1021
|
-
|
|
1037
|
+
var errHtml = emptyStateHtml('sessions', 'No sessions recorded yet', 'Agent session data will appear here when sessions are logged.');
|
|
1038
|
+
if (el) el.innerHTML = errHtml;
|
|
1039
|
+
if (detailEl) detailEl.innerHTML = errHtml;
|
|
1022
1040
|
}
|
|
1023
1041
|
}
|
|
1024
1042
|
|
|
@@ -1056,6 +1074,18 @@ try {
|
|
|
1056
1074
|
renderEventTimeline(detail);
|
|
1057
1075
|
renderDetailPanelChart(detail.tasks || []);
|
|
1058
1076
|
renderDetailReviewsTable(detail.tasks || []);
|
|
1077
|
+
// Show pipeline chain if this convoy is part of a pipeline
|
|
1078
|
+
const convoyListForChain = window.__DASHBOARD_DATA__?.convoyList ?? [];
|
|
1079
|
+
const currentConvoyEntry = convoyListForChain.find(c => c.id === convoyId);
|
|
1080
|
+
if (currentConvoyEntry && currentConvoyEntry.pipeline_id) {
|
|
1081
|
+
const chainConvoys = convoyListForChain
|
|
1082
|
+
.filter(c => c.pipeline_id === currentConvoyEntry.pipeline_id)
|
|
1083
|
+
.sort((a, b) => (a.created_at || '').localeCompare(b.created_at || ''));
|
|
1084
|
+
if (chainConvoys.length > 1) {
|
|
1085
|
+
renderPipelineChain(chainConvoys, convoyId);
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
await renderRecentSessions();
|
|
1059
1089
|
} catch (e) {
|
|
1060
1090
|
console.error('Failed to load convoy detail:', e);
|
|
1061
1091
|
renderConvoyDetailHeader(null);
|
|
@@ -1165,6 +1195,7 @@ try {
|
|
|
1165
1195
|
return;
|
|
1166
1196
|
}
|
|
1167
1197
|
const cols = [
|
|
1198
|
+
{ key: 'id', label: 'Task ID' },
|
|
1168
1199
|
{ key: 'phase', label: 'Phase' },
|
|
1169
1200
|
{ key: 'agent', label: 'Agent' },
|
|
1170
1201
|
{ key: 'status', label: 'Status' },
|
|
@@ -1209,6 +1240,7 @@ try {
|
|
|
1209
1240
|
: '<span style="opacity:0.4">\u2014</span>';
|
|
1210
1241
|
const tokens = t.total_tokens != null ? formatTokens(t.total_tokens) : '\u2014';
|
|
1211
1242
|
return '<tr>' +
|
|
1243
|
+
'<td class="td-task">' + escapeHtml(t.id || '\u2014') + '</td>' +
|
|
1212
1244
|
'<td>' + (t.phase != null ? t.phase : '\u2014') + '</td>' +
|
|
1213
1245
|
'<td class="td-agent">' + escapeHtml(t.agent || '\u2014') + '</td>' +
|
|
1214
1246
|
'<td>' + statusBadge + '</td>' +
|
|
@@ -1961,6 +1961,8 @@ body {
|
|
|
1961
1961
|
pointer-events: none;
|
|
1962
1962
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
|
1963
1963
|
text-transform: none;
|
|
1964
|
+
font-family: inherit;
|
|
1965
|
+
font-weight: 400;
|
|
1964
1966
|
}
|
|
1965
1967
|
.tooltip-trigger:focus {
|
|
1966
1968
|
opacity: 1;
|
|
@@ -1991,6 +1993,8 @@ body {
|
|
|
1991
1993
|
pointer-events: none;
|
|
1992
1994
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
|
1993
1995
|
text-transform: none;
|
|
1996
|
+
font-family: inherit;
|
|
1997
|
+
font-weight: 400;
|
|
1994
1998
|
}
|
|
1995
1999
|
|
|
1996
2000
|
/* ── Additional Status Badges ── */
|
|
@@ -173,25 +173,7 @@ Each task `prompt` must be a **complete, standalone instruction**. Include:
|
|
|
173
173
|
>
|
|
174
174
|
> **Weak page prompt:** "Build the About page with a bio and skills section." — No foundation references, agent will create its own styles.
|
|
175
175
|
|
|
176
|
-
### 6.
|
|
177
|
-
|
|
178
|
-
- [ ] Every task has a unique `id`
|
|
179
|
-
- [ ] Every `depends_on` reference points to a valid `id` defined earlier in the list
|
|
180
|
-
- [ ] No dependency cycles exist
|
|
181
|
-
- [ ] No two parallel tasks share the same `files` entries — group tasks by phase and check each phase for overlaps; resolve with specific file paths or `depends_on` (see Step 2, rule 4)
|
|
182
|
-
- [ ] No `files` entry contains `*`, `?`, or `**` — use plain file paths or directory paths only
|
|
183
|
-
- [ ] Prompts are self-contained — an agent with zero context can execute them
|
|
184
|
-
- [ ] Timeouts are reasonable for the scope of each task
|
|
185
|
-
- [ ] **Dependency completeness**: For every task prompt, scan for imports, references, or usage of files/types/components produced by other tasks. Each such cross-reference MUST have a `depends_on` edge to the producing task.
|
|
186
|
-
- [ ] **Agent domain matching**: Verify each task's `agent` matches the domain — `developer` for code, `testing-expert` for tests, `documentation-writer` for docs, `copywriter` for marketing copy, `ui-ux-expert` for UI components, `database-engineer` for migrations, `security-expert` for auth/security, `data-expert` for ETL/scraping. A `content-engineer` should NOT be assigned to pure TypeScript code tasks.
|
|
187
|
-
- [ ] **File list completeness**: Every file mentioned in a task's prompt that the agent will create or modify MUST appear in that task's `files` list. Don't omit utility files, sub-components, or config files if the prompt instructs the agent to create them.
|
|
188
|
-
- [ ] **Prompt instruction accuracy**: Don't include instructions that contradict the dependency graph. If a task depends on another task (via `depends_on`), the depended task's outputs will exist when this task runs — don't add `@ts-expect-error` comments, stub files, or "if not found" fallbacks for files produced by dependencies.
|
|
189
|
-
- [ ] **Content research rule compliance**: If a prompt concerns real people, places, or organisations, it includes a research instruction telling the agent to search the internet first.
|
|
190
|
-
- [ ] **Foundation phase present**: If the plan involves 2+ pages or UI sections, a `foundation-setup` task exists with no dependencies, and all page tasks depend on it
|
|
191
|
-
- [ ] **Foundation references in page prompts**: Every page-building task prompt includes the 5 mandatory Foundation References (design tokens path, layout path, UI component path, aesthetic direction, content tone)
|
|
192
|
-
- [ ] **No token duplication**: Page task prompts do NOT instruct agents to create new design tokens, layout components, or shared UI primitives — only to import and use existing ones from the foundation
|
|
193
|
-
|
|
194
|
-
### 7. Output
|
|
176
|
+
### 6. Output
|
|
195
177
|
|
|
196
178
|
Your response must contain **ONLY** a single ` ```json ` fenced code block — no text before it, no text after it, no explanations, no summaries, no DAG diagrams.
|
|
197
179
|
|
|
@@ -234,6 +216,38 @@ When chain mode is detected:
|
|
|
234
216
|
}
|
|
235
217
|
````
|
|
236
218
|
|
|
219
|
+
## Self-Validation Checklist (MANDATORY)
|
|
220
|
+
|
|
221
|
+
Before outputting the JSON, verify **every item** below. The downstream validator will reject your plan if any blocking checks fail — fix them now to avoid expensive retry cycles.
|
|
222
|
+
|
|
223
|
+
### Structural Integrity
|
|
224
|
+
|
|
225
|
+
- [ ] Every task has a unique `id` (lowercase, kebab-case)
|
|
226
|
+
- [ ] Every `depends_on` reference points to a valid `id` defined in the task list
|
|
227
|
+
- [ ] No dependency cycles exist (DAG is acyclic)
|
|
228
|
+
- [ ] No `files` entry contains `*`, `?`, or `**` — plain paths only
|
|
229
|
+
- [ ] Top-level `name` and `tasks` fields are present; `tasks` is non-empty
|
|
230
|
+
- [ ] Every task has both `id` and `prompt` fields (both non-empty strings)
|
|
231
|
+
|
|
232
|
+
### Partition & Dependency Coherence
|
|
233
|
+
|
|
234
|
+
- [ ] No two parallel tasks (same phase / no `depends_on` edge) share any `files` entry — resolve with specific file paths or sequencing
|
|
235
|
+
- [ ] **Dependency completeness**: For every task prompt, scan for imports or references to files/types/components produced by other tasks. Each cross-reference MUST have a `depends_on` edge to the producing task.
|
|
236
|
+
- [ ] **File list completeness**: Every file mentioned in a task's prompt that the agent will create or modify appears in that task's `files` list. Don't omit utility files, sub-components, or config files.
|
|
237
|
+
- [ ] **Prompt-dependency coherence**: Prompts do not include workarounds (stub files, `@ts-expect-error`, conditional imports) for outputs of tasks listed in `depends_on`, since those outputs are guaranteed to exist.
|
|
238
|
+
|
|
239
|
+
### Prompt Quality
|
|
240
|
+
|
|
241
|
+
- [ ] **Self-contained**: An agent with zero context can execute the prompt without external clarification.
|
|
242
|
+
- [ ] **File-specific**: Names the exact files to create or modify — no vague references ("the frontend", "the codebase").
|
|
243
|
+
- [ ] **Substantive**: At least 2 meaningful sentences; no stubs (`...`), no placeholders.
|
|
244
|
+
- [ ] **Verifiable**: Contains acceptance criteria or explicit verification steps.
|
|
245
|
+
- [ ] **Agent domain matching**: Each task's `agent` matches the domain — `developer` for code, `testing-expert` for tests, `documentation-writer` for docs, `copywriter` for marketing copy, `ui-ux-expert` for UI, `database-engineer` for migrations, `security-expert` for auth/security, `data-expert` for ETL/scraping.
|
|
246
|
+
- [ ] **Content research compliance**: If a prompt concerns real people, places, or organisations, it includes a research instruction.
|
|
247
|
+
- [ ] **Foundation phase present** (multi-page only): If 2+ pages/UI sections, a `foundation-setup` task exists and all page tasks depend on it with the 5 mandatory Foundation References.
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
237
251
|
## Historical Performance Context
|
|
238
252
|
|
|
239
253
|
When historical execution data is available (via `opencastle insights --json`), the Team Lead should include a compact summary in the context. Example:
|
|
@@ -8,11 +8,9 @@ output: validation
|
|
|
8
8
|
|
|
9
9
|
# Validate Task Plan
|
|
10
10
|
|
|
11
|
-
> **Note:** Schema validation (field types, YAML syntax, dependency cycles, glob patterns) has already passed. Focus ONLY on the
|
|
11
|
+
> **Note:** Schema validation (field types, YAML syntax, dependency cycles, glob patterns) has already passed. The generator already enforces prompt quality, agent matching, and file list completeness. Focus ONLY on the structural and logical checks below.
|
|
12
12
|
|
|
13
|
-
You are a senior technical reviewer. Validate the task plan below for
|
|
14
|
-
|
|
15
|
-
> **⚠ EXHAUSTIVENESS MANDATE**: You MUST report ALL errors in a single pass. Do NOT stop at the first few issues. Systematically evaluate every task against every check below. A second validation pass should find zero new issues — if it would, your first pass was incomplete. Cross-reference every task's prompt against every other task's files list and dependency edges before concluding.
|
|
13
|
+
You are a senior technical reviewer. Validate the task plan below for **structural correctness**. Pass the plan if the structure is sound — do not fail for prompt wording, style, or verbosity.
|
|
16
14
|
|
|
17
15
|
## Task Plan to Validate
|
|
18
16
|
|
|
@@ -20,46 +18,31 @@ You are a senior technical reviewer. Validate the task plan below for semantic c
|
|
|
20
18
|
|
|
21
19
|
---
|
|
22
20
|
|
|
23
|
-
##
|
|
21
|
+
## Validation Checks
|
|
24
22
|
|
|
25
|
-
> If the spec
|
|
23
|
+
> If the spec contains `<!-- validation-pass: N -->`, this is pass N. On pass 2+, verify previous fixes were applied — do NOT invent new issues.
|
|
26
24
|
|
|
27
|
-
Evaluate
|
|
25
|
+
Evaluate the checks below. If ALL pass, respond `VALID`. Only fail for checks marked BLOCKING.
|
|
28
26
|
|
|
29
|
-
###
|
|
27
|
+
### Partition Conflicts (BLOCKING)
|
|
30
28
|
|
|
31
29
|
Two tasks that can run in parallel (no direct or transitive `depends_on` edge between them) must not share any `files` entry.
|
|
32
30
|
|
|
33
31
|
- [ ] For every pair of potentially-parallel tasks, confirm they share no file or directory path in their `files` lists
|
|
34
32
|
- [ ] Transitive dependencies count: if A → B → C, then A and C are NOT parallel
|
|
35
33
|
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
Each task `prompt` must be:
|
|
39
|
-
|
|
40
|
-
- [ ] **Self-contained** — an agent with zero context can execute it without external clarification
|
|
41
|
-
- [ ] **File-specific** — names the exact files to create or modify (not vague references like "the frontend" or "the codebase")
|
|
42
|
-
- [ ] **Substantive** — at least 2 meaningful sentences; no stubs (`...`), no placeholders
|
|
43
|
-
- [ ] **Verifiable** — contains acceptance criteria or explicit verification steps
|
|
44
|
-
- [ ] **Research-instructed** — if the prompt concerns real people, places, or organisations, it includes a research instruction
|
|
45
|
-
|
|
46
|
-
### 3. Dependency Completeness
|
|
47
|
-
|
|
48
|
-
If a task's prompt imports, references, or builds on files, types, components, or packages produced by another task, a `depends_on` edge to that producing task must exist.
|
|
34
|
+
### Dependency Completeness (BLOCKING)
|
|
49
35
|
|
|
50
|
-
|
|
51
|
-
- [ ] Each such reference must be covered by a `depends_on` edge to the task that creates it
|
|
36
|
+
If a task's prompt imports, references, or builds on files produced by another task, a `depends_on` edge to that producing task must exist.
|
|
52
37
|
|
|
53
|
-
|
|
38
|
+
- [ ] Scan every prompt for cross-task file references
|
|
39
|
+
- [ ] Each such reference must be covered by a `depends_on` edge
|
|
54
40
|
|
|
55
|
-
|
|
41
|
+
### Logical Soundness (BLOCKING)
|
|
56
42
|
|
|
57
43
|
- [ ] No redundant tasks doing the same work
|
|
58
|
-
- [ ] No obvious missing tasks
|
|
59
|
-
- [ ]
|
|
60
|
-
- [ ] Agent assignment matches domain — `developer` for code, `documentation-writer` for docs, `copywriter` for marketing copy, etc.
|
|
61
|
-
- [ ] File list completeness — every file the prompt instructs the agent to create/modify appears in the task's `files` list
|
|
62
|
-
- [ ] Prompt-dependency coherence — prompts do not include workarounds (stub files, `@ts-expect-error`, conditional imports) for outputs of tasks listed in `depends_on`, since those outputs are guaranteed to exist
|
|
44
|
+
- [ ] No obvious missing tasks that would leave the goal unachievable
|
|
45
|
+
- [ ] No tasks with empty or stub prompts (`...`, placeholder text)
|
|
63
46
|
|
|
64
47
|
---
|
|
65
48
|
|