opencastle 1.4.2 → 1.5.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 (128) hide show
  1. package/dist/cli/bootstrap-on-init.test.js +5 -5
  2. package/dist/cli/bootstrap-on-init.test.js.map +1 -1
  3. package/dist/cli/bootstrap.d.ts +17 -0
  4. package/dist/cli/bootstrap.d.ts.map +1 -1
  5. package/dist/cli/bootstrap.js +284 -312
  6. package/dist/cli/bootstrap.js.map +1 -1
  7. package/dist/cli/bootstrap.test.js +22 -16
  8. package/dist/cli/bootstrap.test.js.map +1 -1
  9. package/dist/cli/convoy/engine.d.ts.map +1 -1
  10. package/dist/cli/convoy/engine.js +8 -2
  11. package/dist/cli/convoy/engine.js.map +1 -1
  12. package/dist/cli/convoy/spec-types.d.ts +15 -0
  13. package/dist/cli/convoy/spec-types.d.ts.map +1 -1
  14. package/dist/cli/detect.d.ts +4 -0
  15. package/dist/cli/detect.d.ts.map +1 -1
  16. package/dist/cli/detect.js +1 -1
  17. package/dist/cli/detect.js.map +1 -1
  18. package/dist/cli/doctor.js +4 -4
  19. package/dist/cli/doctor.js.map +1 -1
  20. package/dist/cli/init.test.js +4 -5
  21. package/dist/cli/init.test.js.map +1 -1
  22. package/dist/cli/log.d.ts +2 -2
  23. package/dist/cli/log.d.ts.map +1 -1
  24. package/dist/cli/log.js +1 -1
  25. package/dist/cli/log.js.map +1 -1
  26. package/dist/cli/log.test.js +1 -1
  27. package/dist/cli/log.test.js.map +1 -1
  28. package/dist/cli/managed-paths.d.ts +1 -1
  29. package/dist/cli/managed-paths.d.ts.map +1 -1
  30. package/dist/cli/managed-paths.js +0 -1
  31. package/dist/cli/managed-paths.js.map +1 -1
  32. package/dist/cli/pipeline.d.ts.map +1 -1
  33. package/dist/cli/pipeline.flow.test.js +134 -27
  34. package/dist/cli/pipeline.flow.test.js.map +1 -1
  35. package/dist/cli/pipeline.js +113 -34
  36. package/dist/cli/pipeline.js.map +1 -1
  37. package/dist/cli/plan.d.ts +22 -0
  38. package/dist/cli/plan.d.ts.map +1 -1
  39. package/dist/cli/plan.js +43 -6
  40. package/dist/cli/plan.js.map +1 -1
  41. package/dist/cli/project-facts.d.ts +103 -0
  42. package/dist/cli/project-facts.d.ts.map +1 -0
  43. package/dist/cli/project-facts.js +577 -0
  44. package/dist/cli/project-facts.js.map +1 -0
  45. package/dist/cli/project-facts.test.d.ts +2 -0
  46. package/dist/cli/project-facts.test.d.ts.map +1 -0
  47. package/dist/cli/project-facts.test.js +209 -0
  48. package/dist/cli/project-facts.test.js.map +1 -0
  49. package/dist/cli/run/adapters/claude.d.ts +13 -0
  50. package/dist/cli/run/adapters/claude.d.ts.map +1 -1
  51. package/dist/cli/run/adapters/claude.js +30 -1
  52. package/dist/cli/run/adapters/claude.js.map +1 -1
  53. package/dist/cli/run/adapters/claude.test.js +34 -1
  54. package/dist/cli/run/adapters/claude.test.js.map +1 -1
  55. package/dist/cli/run/adapters/codex.d.ts.map +1 -1
  56. package/dist/cli/run/adapters/codex.js +4 -0
  57. package/dist/cli/run/adapters/codex.js.map +1 -1
  58. package/dist/cli/run/adapters/codex.test.js +8 -0
  59. package/dist/cli/run/adapters/codex.test.js.map +1 -1
  60. package/dist/cli/run/adapters/copilot.d.ts.map +1 -1
  61. package/dist/cli/run/adapters/copilot.js +4 -1
  62. package/dist/cli/run/adapters/copilot.js.map +1 -1
  63. package/dist/cli/run/adapters/copilot.test.js +9 -0
  64. package/dist/cli/run/adapters/copilot.test.js.map +1 -1
  65. package/dist/cli/run/adapters/stub-cli.test-helper.d.ts +2 -0
  66. package/dist/cli/run/adapters/stub-cli.test-helper.d.ts.map +1 -1
  67. package/dist/cli/run/adapters/stub-cli.test-helper.js +16 -1
  68. package/dist/cli/run/adapters/stub-cli.test-helper.js.map +1 -1
  69. package/dist/cli/run/platform.d.ts +12 -0
  70. package/dist/cli/run/platform.d.ts.map +1 -1
  71. package/dist/cli/run/platform.js +49 -0
  72. package/dist/cli/run/platform.js.map +1 -1
  73. package/dist/cli/run/platform.test.js +21 -1
  74. package/dist/cli/run/platform.test.js.map +1 -1
  75. package/dist/cli/stack-config.js +1 -1
  76. package/dist/cli/stack-config.js.map +1 -1
  77. package/package.json +1 -1
  78. package/src/cli/bootstrap-on-init.test.ts +5 -5
  79. package/src/cli/bootstrap.test.ts +22 -16
  80. package/src/cli/bootstrap.ts +361 -373
  81. package/src/cli/convoy/engine.ts +9 -2
  82. package/src/cli/convoy/spec-types.ts +15 -0
  83. package/src/cli/detect.ts +1 -1
  84. package/src/cli/doctor.ts +4 -4
  85. package/src/cli/init.test.ts +4 -5
  86. package/src/cli/log.test.ts +1 -1
  87. package/src/cli/log.ts +2 -2
  88. package/src/cli/managed-paths.ts +0 -1
  89. package/src/cli/pipeline.flow.test.ts +143 -28
  90. package/src/cli/pipeline.ts +141 -34
  91. package/src/cli/plan.ts +51 -6
  92. package/src/cli/project-facts.test.ts +228 -0
  93. package/src/cli/project-facts.ts +647 -0
  94. package/src/cli/run/adapters/claude.test.ts +39 -1
  95. package/src/cli/run/adapters/claude.ts +27 -1
  96. package/src/cli/run/adapters/codex.test.ts +9 -0
  97. package/src/cli/run/adapters/codex.ts +3 -0
  98. package/src/cli/run/adapters/copilot.test.ts +11 -0
  99. package/src/cli/run/adapters/copilot.ts +3 -1
  100. package/src/cli/run/adapters/stub-cli.test-helper.ts +16 -1
  101. package/src/cli/run/platform.test.ts +23 -1
  102. package/src/cli/run/platform.ts +50 -0
  103. package/src/cli/stack-config.ts +1 -1
  104. package/src/orchestrator/agent-workflows/data-pipeline.md +2 -2
  105. package/src/orchestrator/agent-workflows/feature-implementation.md +1 -1
  106. package/src/orchestrator/agent-workflows/schema-changes.md +1 -1
  107. package/src/orchestrator/agents/team-lead.agent.md +1 -1
  108. package/src/orchestrator/customizations/README.md +27 -84
  109. package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +38 -238
  110. package/src/orchestrator/prompts/brainstorm.prompt.md +1 -1
  111. package/src/orchestrator/prompts/implement-feature.prompt.md +6 -6
  112. package/src/orchestrator/skills/agent-memory/KNOWLEDGE-GRAPH.md +1 -1
  113. package/src/orchestrator/skills/agent-memory/SKILL.md +7 -16
  114. package/src/orchestrator/skills/documentation-standards/SKILL.md +1 -1
  115. package/src/orchestrator/skills/observability-logging/SKILL.md +1 -1
  116. package/src/orchestrator/skills/panel-majority-vote/REFERENCE.md +1 -1
  117. package/src/orchestrator/skills/team-lead-reference/SKILL.md +2 -2
  118. package/src/orchestrator/customizations/AGENT-EXPERTISE.md +0 -325
  119. package/src/orchestrator/customizations/AGENT-FAILURES.md +0 -69
  120. package/src/orchestrator/customizations/AGENT-PERFORMANCE.md +0 -55
  121. package/src/orchestrator/customizations/DISPUTES.md +0 -162
  122. package/src/orchestrator/customizations/KNOWLEDGE-GRAPH.md +0 -10
  123. package/src/orchestrator/customizations/agents/skill-matrix.md +0 -111
  124. package/src/orchestrator/customizations/logs/events.ndjson +0 -0
  125. package/src/orchestrator/customizations/project/decisions.md +0 -31
  126. package/src/orchestrator/customizations/project/docs-structure.md +0 -34
  127. package/src/orchestrator/customizations/project/roadmap.md +0 -24
  128. /package/src/orchestrator/{customizations/logs/README.md → skills/observability-logging/LOG-SCHEMA.md} +0 -0
@@ -1,111 +0,0 @@
1
- # Skill Matrix
2
-
3
- Maps abstract technology capabilities to concrete skill implementations. The matrix distinguishes two types of skills:
4
-
5
- - **Binding slots** — Plugin-driven, technology-specific skills resolved at runtime (e.g., `database` → `supabase-database`). These change when the tech stack changes.
6
- - **Core skills** — Hardcoded, stack-agnostic skills referenced directly in agent files (e.g., `validation-gates`, `security-hardening`, `performance-optimization`). These are always available regardless of plugins.
7
-
8
- ## Data File
9
-
10
- The machine-readable bindings are in [`skill-matrix.json`](skill-matrix.json). The CLI (`opencastle init` and `opencastle sync`) reads and writes this file directly. Agents should read the JSON to resolve capability slots.
11
-
12
- ## How It Works
13
-
14
- ```
15
- Agent file skill-matrix.json Skill file
16
- ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
17
- │ Developer │ │ "framework": │ │ nextjs- │
18
- │ needs: │──lookup──▶│ entries: [ │──load────▶│ framework │
19
- │ framework │ │ {name, │ │ │
20
- │ │ │ skill} │ │ │
21
- │ │ │ ] │ │ │
22
- └──────────────┘ └──────────────┘ └──────────────┘
23
- ```
24
-
25
- 1. **Agents** declare which capability slots they need (e.g., `framework`, `database`)
26
- 2. **`skill-matrix.json`** maps each slot to one or more technologies and their skill files
27
- 3. **When delegating**, resolve slots through the JSON to load the correct skill(s)
28
- 4. **To switch tech**, update only the binding entries — no agent files change
29
-
30
- ## Multiple Technologies Per Slot
31
-
32
- A slot can have multiple entries. For example, a project using both Supabase and Prisma:
33
-
34
- ```json
35
- "database": {
36
- "entries": [
37
- { "name": "Supabase", "skill": "supabase-database" },
38
- { "name": "Prisma", "skill": "prisma-database" }
39
- ],
40
- "description": "Schema, migrations, auth flow, roles"
41
- }
42
- ```
43
-
44
- When resolving, load **all** skills listed in the slot's entries.
45
-
46
- ## Switching Technologies
47
-
48
- ### Example: Migrate to a new plugin (Supabase → Azure)
49
-
50
- 1. Create (or install) the Azure plugin: `plugins/azure/SKILL.md` + `plugins/azure/config.ts`
51
- 2. Update `skill-matrix.json`: replace the database entries
52
- 3. Update `project.instructions.md` to reflect the new tech stack
53
- 4. **No agent files change** — Data Engineer, Security Expert still reference the `database` slot
54
-
55
- ### Example: Migrate to an existing plugin (Linear → Jira)
56
-
57
- 1. Plugin already exists: `plugins/jira/SKILL.md`
58
- 2. Update `skill-matrix.json`: replace the `task-management` entries
59
- 3. **No agent files change** — Team Lead still references the `task-management` slot
60
-
61
- ### Example: Switch knowledge-management tool (Notion → Confluence)
62
-
63
- 1. Create (or install) the Confluence plugin: `plugins/confluence/SKILL.md` + `plugins/confluence/config.ts`
64
- 2. Update `skill-matrix.json`: replace the `knowledge-management` entries
65
- 3. **No agent files change** — Team Lead, Researcher, Writer, and Architect still reference the `knowledge-management` slot
66
-
67
- ## Capability Slots Reference
68
-
69
- | Slot | Description | Agents That Use It |
70
- |------|-------------|-------------------|
71
- | `framework` | SSR/SSG, routing, layouts | Developer, Writer |
72
- | `database` | Schema, migrations, auth flow | Data Engineer, Security Expert |
73
- | `cms` | Document types, queries | Content Engineer, Writer |
74
- | `deployment` | Hosting, cron, env vars | DevOps & Release |
75
- | `codebase-tool` | Task running, linting, testing | Architect, DevOps & Release |
76
- | `testing` | Unit testing frameworks | Testing Expert |
77
- | `e2e-testing` | Browser automation | UI/UX Expert, Testing Expert |
78
- | `task-management` | Issue tracking, workflow states | Team Lead |
79
- | `knowledge-management` | Knowledge base, research, ADRs, specs | Team Lead, Researcher, Writer, Architect |
80
- | `design` | Design tokens, component inspection, asset export | UI/UX Expert |
81
- | `email` | Transactional email, templates, delivery | Developer |
82
- | `payments` | Payment processing, subscriptions, webhooks | Developer |
83
- | `observability` | Error tracking, performance monitoring, tracing | DevOps & Release, Performance Expert |
84
- | `notifications` | Team messaging, alerts, bot integrations | Developer |
85
-
86
- ### Example: Add a second plugin
87
-
88
- 1. Update `skill-matrix.json`: add another entry to the `framework` slot
89
- 2. Both framework skills will be loaded when agents resolve the `framework` slot
90
-
91
- ## Missing Plugin or Empty Slot
92
-
93
- When resolving a capability slot, two failure cases can occur:
94
-
95
- 1. **Empty slot** — The slot's `entries` array is empty (no plugin installed for that technology). Example: an agent needs `database` but no database plugin was selected during `opencastle init`.
96
- 2. **Missing plugin** — The slot references a skill name (e.g., `"skill": "convex-database"`) but no matching plugin `SKILL.md` file exists on disk.
97
-
98
- In both cases, **tell the user** that the capability is unavailable and why:
99
-
100
- - *"The `database` slot has no entries in `skill-matrix.json`. Install a database plugin (e.g., `supabase`, `prisma`) via `opencastle add <plugin>`, or add entries manually."*
101
- - *"The `database` slot references skill `convex-database`, but no matching plugin was found. Install the Convex plugin or run `opencastle sync` to fix the binding."*
102
-
103
- **Do NOT silently skip the slot or proceed without the skill.** The agent should surface the gap clearly so the user can resolve it.
104
-
105
- ## Design Principles
106
-
107
- 1. **Single source of truth** — All skill assignments (slots and direct) live in `skill-matrix.json`, not in agent files
108
- 2. **Agents are stack-agnostic** — They describe *what* they need, not *which* tool they use
109
- 3. **Swap without rewriting** — Changing entries updates every agent that uses that slot
110
- 4. **Process skills are stable** — Methodology doesn't change with technology; direct skill references in the matrix are fine
111
- 5. **Capability slots are composable** — Agents can combine slots and direct skills freely (e.g., Security Expert uses the `database` slot + `security-hardening` direct skill)
@@ -1,31 +0,0 @@
1
- <!-- Populated by agents. Add ADRs here when architectural decisions are made. -->
2
-
3
- # Architecture Decision Records
4
-
5
- Log of architectural decisions made during the project. Each ADR captures the context, decision, and consequences so future sessions understand why things are the way they are.
6
-
7
- ## How to Use
8
-
9
- - **Before making an architectural decision:** Check existing ADRs for prior decisions in the same area
10
- - **After making a decision:** Add a new ADR with the next available ID
11
- - **When revisiting a decision:** Update the status to `Superseded` and reference the new ADR
12
-
13
- ## Decisions
14
-
15
- ### ADR-001: _Template — Short Decision Title_
16
-
17
- | Field | Value |
18
- |-------|-------|
19
- | **ID** | ADR-001 |
20
- | **Date** | YYYY-MM-DD |
21
- | **Status** | Proposed / Accepted / Deprecated / Superseded |
22
-
23
- **Context:** _What is the issue that we're seeing that motivates this decision?_
24
-
25
- **Decision:** _What is the change that we're proposing and/or doing?_
26
-
27
- **Consequences:** _What becomes easier or more difficult to do because of this change?_
28
-
29
- ---
30
-
31
- _Add new ADRs above this line, incrementing the ID._
@@ -1,34 +0,0 @@
1
- # Documentation Structure
2
-
3
- <!-- Populated by `opencastle init` based on project structure. -->
4
-
5
- Project-specific documentation layout referenced by the `documentation-standards` skill.
6
-
7
- Documentation files live in the `.opencastle/` directory alongside other project-specific configuration. Key documentation files:
8
-
9
- - `.opencastle/KNOWN-ISSUES.md` — Tracked issues, limitations, and accepted risks
10
- - `.opencastle/project/roadmap.md` — Project roadmap and feature status
11
- - `.opencastle/project/decisions.md` — Architecture Decision Records
12
- - `.opencastle/LESSONS-LEARNED.md` — Agent knowledge base of retries and workarounds
13
-
14
- ## Directory Tree
15
-
16
- <!-- Map your project's documentation directory here if one exists -->
17
-
18
- ```
19
- .opencastle/
20
- ├── KNOWN-ISSUES.md — Tracked issues and limitations
21
- ├── LESSONS-LEARNED.md — Agent knowledge base
22
- └── project/
23
- ├── roadmap.md — Feature roadmap
24
- ├── decisions.md — Architecture Decision Records
25
- └── docs-structure.md — This file
26
- ```
27
-
28
- ## Practices
29
-
30
- - **Check Known Issues** before starting any task
31
- - **Review Architecture** decisions for context
32
- - **Update roadmap** after completing features
33
- - **Add new issues** with: Issue ID, Status, Severity, Evidence, Root Cause, Solution Options
34
- - **Archive** outdated docs rather than deleting
@@ -1,24 +0,0 @@
1
- <!-- Populated by `opencastle init` or manually. -->
2
-
3
- # Project Roadmap
4
-
5
- High-level roadmap of planned features and improvements. Updated by agents as tasks are completed.
6
-
7
- ## How to Use
8
-
9
- - **Before implementing a feature:** Check the roadmap for scope, status, and acceptance criteria
10
- - **After completing a feature:** Mark the item with ✅, add the completion date and tracker issue IDs
11
- - **When planning:** Add new items with priority and description
12
-
13
- ## Roadmap Items
14
-
15
- | Status | Priority | Description | Tracker Issues |
16
- |--------|----------|-------------|----------------|
17
- | Planned | High | _Example: Short description of the feature_ | — |
18
-
19
- ### Status Values
20
-
21
- - **Planned** — Scoped but not yet started
22
- - **In Progress** — Actively being worked on
23
- - **Done** — Completed and verified
24
- - **Cancelled** — Removed from scope with documented reason