opencastle 0.27.2 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/bin/cli.mjs +13 -5
  2. package/dist/cli/convoy/engine.js +2 -2
  3. package/dist/cli/convoy/engine.js.map +1 -1
  4. package/dist/cli/convoy/engine.test.js +1 -1
  5. package/dist/cli/convoy/engine.test.js.map +1 -1
  6. package/dist/cli/convoy/issues.js +3 -3
  7. package/dist/cli/convoy/issues.js.map +1 -1
  8. package/dist/cli/convoy/issues.test.js +4 -3
  9. package/dist/cli/convoy/issues.test.js.map +1 -1
  10. package/dist/cli/pipeline.d.ts +3 -0
  11. package/dist/cli/pipeline.d.ts.map +1 -0
  12. package/dist/cli/pipeline.js +305 -0
  13. package/dist/cli/pipeline.js.map +1 -0
  14. package/dist/cli/plan.d.ts +37 -0
  15. package/dist/cli/plan.d.ts.map +1 -1
  16. package/dist/cli/plan.js +321 -161
  17. package/dist/cli/plan.js.map +1 -1
  18. package/dist/cli/run.d.ts.map +1 -1
  19. package/dist/cli/run.js +37 -1
  20. package/dist/cli/run.js.map +1 -1
  21. package/dist/cli/validate.d.ts +3 -0
  22. package/dist/cli/validate.d.ts.map +1 -0
  23. package/dist/cli/validate.js +60 -0
  24. package/dist/cli/validate.js.map +1 -0
  25. package/package.json +5 -3
  26. package/src/cli/convoy/engine.test.ts +1 -1
  27. package/src/cli/convoy/engine.ts +2 -2
  28. package/src/cli/convoy/issues.test.ts +3 -2
  29. package/src/cli/convoy/issues.ts +3 -3
  30. package/src/cli/pipeline.ts +343 -0
  31. package/src/cli/plan.ts +357 -153
  32. package/src/cli/run.ts +37 -1
  33. package/src/cli/validate.ts +65 -0
  34. package/src/dashboard/dist/data/convoy-list.json +65 -1
  35. package/src/dashboard/dist/data/convoys/demo-api-v2.json +177 -0
  36. package/src/dashboard/dist/data/convoys/demo-auth-revamp.json +239 -0
  37. package/src/dashboard/dist/data/convoys/demo-convoy-1.json +111 -0
  38. package/src/dashboard/dist/data/convoys/demo-convoy-2.json +72 -0
  39. package/src/dashboard/dist/data/convoys/demo-dashboard-ui.json +328 -0
  40. package/src/dashboard/dist/data/convoys/demo-data-pipeline.json +187 -0
  41. package/src/dashboard/dist/data/convoys/demo-deploy-ci.json +153 -0
  42. package/src/dashboard/dist/data/convoys/demo-docs-update.json +154 -0
  43. package/src/dashboard/dist/data/convoys/demo-perf-opt.json +227 -0
  44. package/src/dashboard/dist/data/events.ndjson +115 -0
  45. package/src/dashboard/dist/data/overall-stats.json +67 -12
  46. package/src/dashboard/dist/data/pipelines.ndjson +5285 -0
  47. package/src/dashboard/dist/index.html +39 -16
  48. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  49. package/src/dashboard/public/data/convoy-list.json +65 -1
  50. package/src/dashboard/public/data/convoys/demo-api-v2.json +177 -0
  51. package/src/dashboard/public/data/convoys/demo-auth-revamp.json +239 -0
  52. package/src/dashboard/public/data/convoys/demo-convoy-1.json +111 -0
  53. package/src/dashboard/public/data/convoys/demo-convoy-2.json +72 -0
  54. package/src/dashboard/public/data/convoys/demo-dashboard-ui.json +328 -0
  55. package/src/dashboard/public/data/convoys/demo-data-pipeline.json +187 -0
  56. package/src/dashboard/public/data/convoys/demo-deploy-ci.json +153 -0
  57. package/src/dashboard/public/data/convoys/demo-docs-update.json +154 -0
  58. package/src/dashboard/public/data/convoys/demo-perf-opt.json +227 -0
  59. package/src/dashboard/public/data/events.ndjson +115 -0
  60. package/src/dashboard/public/data/overall-stats.json +67 -12
  61. package/src/dashboard/public/data/pipelines.ndjson +5285 -0
  62. package/src/dashboard/scripts/etl.ts +38 -4
  63. package/src/dashboard/scripts/generate-demo-db.test.ts +30 -0
  64. package/src/dashboard/scripts/generate-demo-db.ts +507 -0
  65. package/src/dashboard/scripts/verify-demo-data.sh +51 -0
  66. package/src/dashboard/src/pages/index.astro +46 -23
  67. package/src/orchestrator/prompts/fix-convoy.prompt.md +79 -0
  68. package/src/orchestrator/prompts/generate-convoy.prompt.md +53 -58
  69. package/src/orchestrator/prompts/generate-prd.prompt.md +120 -0
  70. package/src/orchestrator/prompts/validate-convoy.prompt.md +89 -0
  71. package/src/orchestrator/prompts/validate-prd.prompt.md +83 -0
@@ -0,0 +1,89 @@
1
+ ---
2
+ description: 'Validate a convoy YAML spec for schema correctness and logical soundness. Outputs VALID or INVALID with specific errors.'
3
+ agent: 'Reviewer'
4
+ output: validation
5
+ ---
6
+
7
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
8
+
9
+ # Validate Convoy Spec
10
+
11
+ You are a senior technical reviewer. Validate the convoy spec below against the schema rules and logical constraints. Be strict — a spec that passes this gate will be executed autonomously by AI agents.
12
+
13
+ ## Convoy Spec to Validate
14
+
15
+ {{goal}}
16
+
17
+ ---
18
+
19
+ ## Validation Rules
20
+
21
+ Evaluate **every rule** below. If ALL pass, respond `VALID`. If ANY fail, respond `INVALID` with specific, actionable errors.
22
+
23
+ ### Schema Requirements
24
+
25
+ - [ ] `name` field is present (non-empty string)
26
+ - [ ] `version` field is present (integer: `1` or `2`)
27
+ - [ ] `tasks` list is present and contains at least one task
28
+ - [ ] Every task has a unique `id` (lowercase, kebab-case, no spaces or special chars)
29
+ - [ ] Every task has a non-empty `prompt` field
30
+ - [ ] `on_failure` is `continue` or `stop` (if present; default `stop` is fine if absent)
31
+ - [ ] `concurrency` is a positive integer or the string `"auto"` (if present)
32
+ - [ ] `review` values are one of: `auto`, `fast`, `panel`, `none` (if present on task)
33
+ - [ ] `agent` values are from the approved roster (if present on task):
34
+ `api-designer`, `architect`, `content-engineer`, `copywriter`, `data-expert`,
35
+ `database-engineer`, `developer`, `devops-expert`, `documentation-writer`,
36
+ `performance-expert`, `release-manager`, `researcher`, `security-expert`,
37
+ `seo-specialist`, `team-lead`, `testing-expert`, `ui-ux-expert`
38
+ - [ ] `timeout` values match `<integer><s|m|h>` format (e.g., `30m`, `1h`, `90s`) (if present)
39
+
40
+ ### Files Constraint
41
+
42
+ - [ ] No `files` entry contains glob patterns (`*`, `?`, `**`)
43
+ - [ ] All `files` entries are plain file paths or directory paths (trailing `/` is allowed for directories)
44
+ - [ ] No `files` entry is an absolute path (all paths must be relative to the repo root)
45
+
46
+ ### Dependency Graph
47
+
48
+ - [ ] Every `depends_on` id references a real task `id` in the spec
49
+ - [ ] No dependency cycles exist (A → B → A is a cycle; A → B → C → A is also a cycle)
50
+
51
+ ### Partition Conflicts
52
+
53
+ Two tasks that can run in parallel (no `depends_on` edge between them) must not share any `files` entry.
54
+
55
+ - [ ] Check every pair of tasks that lack a `depends_on` relationship — they must not share any file or directory path in their `files` lists
56
+
57
+ ### Prompt Quality
58
+
59
+ - [ ] Each task `prompt` is self-contained: an agent with no surrounding context must be able to execute it
60
+ - [ ] Each task `prompt` names the specific files to act on (not vague phrases like "the frontend" or "the codebase")
61
+ - [ ] No task `prompt` is shorter than 2 sentences (one-liners are usually too vague)
62
+
63
+ ### Inputs / Outputs Consistency (if used)
64
+
65
+ - [ ] Every `inputs[].from` references an existing task `id`
66
+ - [ ] Every task referenced in an `inputs[].from` declares a matching `outputs[].name`
67
+ - [ ] No consuming task runs before its producing task (must have `depends_on` edge or be in a later phase)
68
+
69
+ ---
70
+
71
+ ## Output Format
72
+
73
+ If all checks pass:
74
+
75
+ ```
76
+ VALID
77
+ ```
78
+
79
+ If any check fails:
80
+
81
+ ```
82
+ INVALID
83
+
84
+ Errors:
85
+ - [Rule category] / [task id if applicable]: [Specific problem] — Fix: [How to correct it]
86
+ - [Rule category] / [task id if applicable]: [Another problem] — Fix: [How to correct it]
87
+ ```
88
+
89
+ List only real failures. Do not list passing checks. Be specific — name the task id, the field, and the exact value that violates the rule.
@@ -0,0 +1,83 @@
1
+ ---
2
+ description: 'Validate a PRD for completeness, clarity, and implementability before generating a convoy spec. Outputs VALID or INVALID with specific issues.'
3
+ agent: 'Reviewer'
4
+ output: validation
5
+ ---
6
+
7
+ <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
8
+
9
+ # Validate PRD
10
+
11
+ You are a senior technical reviewer. Your job is to validate the PRD below against strict quality criteria before it is used to generate an automated convoy spec. A PRD that passes this gate will produce a clean, executable convoy spec. A PRD that fails will produce bad tasks.
12
+
13
+ Be strict. Do not pass a PRD with vague language or missing sections just because it "looks mostly right."
14
+
15
+ ## PRD to Validate
16
+
17
+ {{goal}}
18
+
19
+ ---
20
+
21
+ ## Validation Checklist
22
+
23
+ Evaluate **every item** below. If ALL items pass, respond `VALID`. If ANY item fails, respond `INVALID` with a specific, actionable issue list.
24
+
25
+ ### Required Sections
26
+
27
+ - [ ] `Overview` section is present and non-empty (at least 2 sentences)
28
+ - [ ] `Goals` section is present with at least one numbered, specific goal
29
+ - [ ] `Non-Goals` section is present (may say "None" but must not be missing)
30
+ - [ ] `User Stories & Acceptance Criteria` section is present with at least one user story
31
+ - [ ] Each user story has associated acceptance criteria (not just the story itself)
32
+ - [ ] `Technical Requirements` section is present and non-empty
33
+ - [ ] `Implementation Scope` section is present with a table or list of specific files/directories
34
+ - [ ] `Task Breakdown` section is present with at least one phase and workstream
35
+ - [ ] `Success Criteria` section is present with at least 3 measurable checks
36
+ - [ ] `Risks & Open Questions` section is present (may say "None identified")
37
+
38
+ ### Acceptance Criteria Quality
39
+
40
+ - [ ] All acceptance criteria can be evaluated as pass/fail (no subjective language like "looks good", "feels responsive", "is clean")
41
+ - [ ] No criterion uses modal verbs that imply optionality ("should", "might", "could", "may")
42
+ - [ ] No criterion references undefined external systems without explaining what they are
43
+
44
+ ### Implementation Scope Quality
45
+
46
+ - [ ] Scope lists **specific** file names or subdirectory names — not broad paths like `src/` or `the frontend`
47
+ - [ ] Scope table does not use glob patterns (`*`, `**`)
48
+ - [ ] Every concern area has at least one specific file or directory
49
+
50
+ ### Task Breakdown Quality
51
+
52
+ - [ ] Each workstream lists the exact files it will modify
53
+ - [ ] No two parallel workstreams (same phase) claim the same file
54
+ - [ ] Phases have explicit dependency declarations (`depends on: Phase N`)
55
+ - [ ] No circular dependencies
56
+
57
+ ### Language Quality
58
+
59
+ - [ ] No undefined acronyms or jargon used without explanation
60
+ - [ ] No conflicting requirements (e.g., "must be fast AND run full suite on every change")
61
+ - [ ] Section content is not placeholder/template text (e.g., "2–3 sentences about…", "Description here")
62
+
63
+ ---
64
+
65
+ ## Output Format
66
+
67
+ If the PRD passes every check above, respond with **exactly**:
68
+
69
+ ```
70
+ VALID
71
+ ```
72
+
73
+ If the PRD fails one or more checks, respond with:
74
+
75
+ ```
76
+ INVALID
77
+
78
+ Issues:
79
+ - [Section name]: [Specific problem] — Fix: [What the author must change]
80
+ - [Section name]: [Another problem] — Fix: [What the author must change]
81
+ ```
82
+
83
+ List only real failures. Do not list items that passed.