@jterrats/open-orchestra 0.1.0 → 0.2.1
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/CHANGELOG.md +53 -0
- package/README.md +17 -2
- package/dist/assets/web-console.js +743 -0
- package/dist/cli.js +157 -4
- package/dist/cli.js.map +1 -1
- package/dist/collaboration-flows.d.ts +5 -0
- package/dist/collaboration-flows.js +256 -0
- package/dist/collaboration-flows.js.map +1 -0
- package/dist/command-manifest.d.ts +11 -0
- package/dist/command-manifest.js +52 -0
- package/dist/command-manifest.js.map +1 -0
- package/dist/commands.d.ts +31 -0
- package/dist/commands.js +644 -2
- package/dist/commands.js.map +1 -1
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +22 -0
- package/dist/constants.js.map +1 -1
- package/dist/defaults.d.ts +7 -11
- package/dist/defaults.js +7 -625
- package/dist/defaults.js.map +1 -1
- package/dist/delegation-decision.d.ts +14 -0
- package/dist/delegation-decision.js +391 -0
- package/dist/delegation-decision.js.map +1 -0
- package/dist/detect-commands.d.ts +3 -0
- package/dist/detect-commands.js +28 -0
- package/dist/detect-commands.js.map +1 -0
- package/dist/diagram-validation.d.ts +36 -0
- package/dist/diagram-validation.js +118 -0
- package/dist/diagram-validation.js.map +1 -0
- package/dist/fs-utils.d.ts +2 -0
- package/dist/fs-utils.js +75 -6
- package/dist/fs-utils.js.map +1 -1
- package/dist/health-checks.d.ts +28 -0
- package/dist/health-checks.js +219 -0
- package/dist/health-checks.js.map +1 -0
- package/dist/health-commands.d.ts +2 -0
- package/dist/health-commands.js +18 -0
- package/dist/health-commands.js.map +1 -0
- package/dist/instruction-apply.d.ts +34 -0
- package/dist/instruction-apply.js +150 -0
- package/dist/instruction-apply.js.map +1 -0
- package/dist/instruction-blocks.d.ts +22 -0
- package/dist/instruction-blocks.js +120 -0
- package/dist/instruction-blocks.js.map +1 -0
- package/dist/instruction-imports.d.ts +12 -0
- package/dist/instruction-imports.js +45 -0
- package/dist/instruction-imports.js.map +1 -0
- package/dist/instruction-stale.d.ts +9 -0
- package/dist/instruction-stale.js +106 -0
- package/dist/instruction-stale.js.map +1 -0
- package/dist/instruction-types.d.ts +66 -0
- package/dist/instruction-types.js +2 -0
- package/dist/instruction-types.js.map +1 -0
- package/dist/instruction-updates.d.ts +4 -0
- package/dist/instruction-updates.js +5 -0
- package/dist/instruction-updates.js.map +1 -0
- package/dist/knowledge-base.d.ts +10 -0
- package/dist/knowledge-base.js +117 -0
- package/dist/knowledge-base.js.map +1 -0
- package/dist/mcp-oauth-proxy.d.ts +39 -0
- package/dist/mcp-oauth-proxy.js +80 -0
- package/dist/mcp-oauth-proxy.js.map +1 -0
- package/dist/pr-review.d.ts +20 -0
- package/dist/pr-review.js +142 -0
- package/dist/pr-review.js.map +1 -0
- package/dist/project-detection.d.ts +22 -0
- package/dist/project-detection.js +174 -0
- package/dist/project-detection.js.map +1 -0
- package/dist/prompt-registry.d.ts +56 -0
- package/dist/prompt-registry.js +163 -0
- package/dist/prompt-registry.js.map +1 -0
- package/dist/release-candidate.d.ts +41 -0
- package/dist/release-candidate.js +196 -0
- package/dist/release-candidate.js.map +1 -0
- package/dist/release-commands.d.ts +4 -0
- package/dist/release-commands.js +50 -0
- package/dist/release-commands.js.map +1 -0
- package/dist/roles/ai-support-roles.d.ts +11 -0
- package/dist/roles/ai-support-roles.js +67 -0
- package/dist/roles/ai-support-roles.js.map +1 -0
- package/dist/roles/core-roles.d.ts +11 -0
- package/dist/roles/core-roles.js +144 -0
- package/dist/roles/core-roles.js.map +1 -0
- package/dist/roles/engineering-roles.d.ts +11 -0
- package/dist/roles/engineering-roles.js +176 -0
- package/dist/roles/engineering-roles.js.map +1 -0
- package/dist/roles/governance-roles.d.ts +11 -0
- package/dist/roles/governance-roles.js +117 -0
- package/dist/roles/governance-roles.js.map +1 -0
- package/dist/roles/index.d.ts +11 -0
- package/dist/roles/index.js +17 -0
- package/dist/roles/index.js.map +1 -0
- package/dist/roles/platform-ops-roles.d.ts +11 -0
- package/dist/roles/platform-ops-roles.js +158 -0
- package/dist/roles/platform-ops-roles.js.map +1 -0
- package/dist/roles/qa-ux-roles.d.ts +11 -0
- package/dist/roles/qa-ux-roles.js +193 -0
- package/dist/roles/qa-ux-roles.js.map +1 -0
- package/dist/roles/release-ops-roles.d.ts +11 -0
- package/dist/roles/release-ops-roles.js +109 -0
- package/dist/roles/release-ops-roles.js.map +1 -0
- package/dist/runtime-adapters.d.ts +6 -0
- package/dist/runtime-adapters.js +88 -0
- package/dist/runtime-adapters.js.map +1 -0
- package/dist/runtime-bootstrap.d.ts +12 -0
- package/dist/runtime-bootstrap.js +85 -0
- package/dist/runtime-bootstrap.js.map +1 -0
- package/dist/skills.d.ts +36 -0
- package/dist/skills.js +665 -0
- package/dist/skills.js.map +1 -0
- package/dist/subagent-protocol.d.ts +41 -0
- package/dist/subagent-protocol.js +179 -0
- package/dist/subagent-protocol.js.map +1 -0
- package/dist/telemetry-consent.d.ts +24 -0
- package/dist/telemetry-consent.js +95 -0
- package/dist/telemetry-consent.js.map +1 -0
- package/dist/telemetry-export.d.ts +14 -0
- package/dist/telemetry-export.js +126 -0
- package/dist/telemetry-export.js.map +1 -0
- package/dist/telemetry-records.d.ts +3 -0
- package/dist/telemetry-records.js +96 -0
- package/dist/telemetry-records.js.map +1 -0
- package/dist/telemetry-redaction.d.ts +9 -0
- package/dist/telemetry-redaction.js +55 -0
- package/dist/telemetry-redaction.js.map +1 -0
- package/dist/telemetry-types.d.ts +52 -0
- package/dist/telemetry-types.js +2 -0
- package/dist/telemetry-types.js.map +1 -0
- package/dist/telemetry.d.ts +4 -0
- package/dist/telemetry.js +4 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/types.d.ts +176 -1
- package/dist/validation.d.ts +3 -1
- package/dist/validation.js +28 -5
- package/dist/validation.js.map +1 -1
- package/dist/web-api.js +167 -3
- package/dist/web-api.js.map +1 -1
- package/dist/web-console.js +6 -160
- package/dist/web-console.js.map +1 -1
- package/dist/workflow-gates.js +4 -2
- package/dist/workflow-gates.js.map +1 -1
- package/dist/workflow-services.js +125 -67
- package/dist/workflow-services.js.map +1 -1
- package/dist/workflow-templates.d.ts +10 -0
- package/dist/workflow-templates.js +141 -0
- package/dist/workflow-templates.js.map +1 -0
- package/dist/workspace-classification.d.ts +5 -0
- package/dist/workspace-classification.js +127 -0
- package/dist/workspace-classification.js.map +1 -0
- package/dist/workspace-validator.js +11 -1
- package/dist/workspace-validator.js.map +1 -1
- package/dist/workspace.d.ts +8 -4
- package/dist/workspace.js +111 -4
- package/dist/workspace.js.map +1 -1
- package/docs/dev-team-specialist-role-profiles.md +171 -0
- package/docs/mcp-oauth-proxy-evaluation.md +44 -0
- package/docs/multi-agent-orchestrator-backlog.md +413 -1
- package/docs/open-orchestra-dogfooding-findings.md +66 -0
- package/docs/orchestra-mvp.md +46 -1
- package/docs/runtime-adapters.md +86 -0
- package/docs/runtime-llm-flow.md +124 -0
- package/docs/setup-agents-dogfooding-findings.md +101 -0
- package/docs/skill-loading-strategy.md +114 -0
- package/docs/source-of-truth-and-agent-learning.md +83 -0
- package/package.json +9 -5
- package/rules/agent-roles.mdc +30 -0
- package/rules/ai-assisted-development.mdc +22 -0
- package/skills/agent-learning/SKILL.md +24 -0
- package/skills/agent-learning/manifest.json +40 -0
- package/skills/backlog-sync/SKILL.md +24 -0
- package/skills/backlog-sync/manifest.json +41 -0
- package/skills/diagram-export/SKILL.md +35 -0
- package/skills/diagram-export/manifest.json +40 -0
- package/skills/model-evaluation/SKILL.md +25 -0
- package/skills/model-evaluation/manifest.json +41 -0
- package/skills/playwright-evidence/SKILL.md +28 -0
- package/skills/playwright-evidence/manifest.json +46 -0
- package/skills/pr-review/SKILL.md +23 -0
- package/skills/pr-review/manifest.json +43 -0
- package/skills/prompt-registry/SKILL.md +24 -0
- package/skills/prompt-registry/manifest.json +45 -0
- package/skills/release-readiness/SKILL.md +25 -0
- package/skills/release-readiness/manifest.json +45 -0
- package/skills/source-of-truth/SKILL.md +24 -0
- package/skills/source-of-truth/manifest.json +47 -0
- package/skills/static-analysis/SKILL.md +26 -0
- package/skills/static-analysis/manifest.json +46 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Open Orchestra Dogfooding Findings
|
|
2
|
+
|
|
3
|
+
This file records what Open Orchestra contributed while building Open Orchestra
|
|
4
|
+
itself, plus issues found by using the CLI as the local control plane.
|
|
5
|
+
|
|
6
|
+
## What Helped
|
|
7
|
+
|
|
8
|
+
- **Backlog alignment:** GitHub issues, local `.agent-workflow/tasks.json`, and
|
|
9
|
+
semantic commits stayed tied to backlog IDs such as `ROLE-003`, `WFLOW-001`,
|
|
10
|
+
and `BUG-087`.
|
|
11
|
+
- **Explicit delegation:** `orchestra delegation decide` made role selection
|
|
12
|
+
visible before implementation, including write scopes and expected outputs.
|
|
13
|
+
- **Evidence discipline:** fixes were closed with command evidence,
|
|
14
|
+
reviewer records, and `npm run precommit` results instead of relying on a
|
|
15
|
+
prose claim.
|
|
16
|
+
- **Bug discovery:** concurrent state writes exposed real bugs in task and lock
|
|
17
|
+
mutation safety. Those became tracked fixes instead of one-off manual repairs.
|
|
18
|
+
- **Context control:** skills, source-of-truth, lessons, protocols, and workflow
|
|
19
|
+
templates kept primary instruction files smaller while preserving task-specific
|
|
20
|
+
context.
|
|
21
|
+
- **Runtime portability:** the same workflow state supported Codex, CLI, web/API,
|
|
22
|
+
VS Code extension scaffolding, and future Claude/Cursor instruction renders.
|
|
23
|
+
|
|
24
|
+
## Finding: Parallel Independent Commands Are Safe So Far
|
|
25
|
+
|
|
26
|
+
- **Date checked:** 2026-05-06
|
|
27
|
+
- **Workspace:** `/tmp/oo-parallel-dogfood`
|
|
28
|
+
- **Commands tested in parallel:** `task add`, `delegation decide`,
|
|
29
|
+
duplicate `task add`, same-path `lock claim`, `validate`, `task list`, and
|
|
30
|
+
concurrent `evidence add`.
|
|
31
|
+
- **Observed behavior:** independent writes serialized correctly. Duplicate
|
|
32
|
+
tasks failed with `task already exists`. Same-path locks allowed one winner
|
|
33
|
+
and blocked the second. Concurrent evidence writes produced distinct artifacts
|
|
34
|
+
and a valid event log.
|
|
35
|
+
- **Validation:** `orchestra validate --json` returned valid after the stress
|
|
36
|
+
run.
|
|
37
|
+
|
|
38
|
+
## Finding: Parallel Dependent Commands Need DAG Semantics
|
|
39
|
+
|
|
40
|
+
- **Date found:** 2026-05-06
|
|
41
|
+
- **Observed behavior:** when a parent agent schedules `task add` and an
|
|
42
|
+
immediate dependent command such as `delegation decide --task <id>` in the
|
|
43
|
+
same parallel batch, the dependent command can run before the task exists and
|
|
44
|
+
fail with `unknown task`.
|
|
45
|
+
- **Impact:** this is not state corruption, but it creates noisy false failures
|
|
46
|
+
when the parent agent treats dependent steps as independent parallel work.
|
|
47
|
+
- **Recommended product fix:** add a future batch runner with explicit
|
|
48
|
+
`dependsOn` ordering, or make dependent command failures retryable when the
|
|
49
|
+
missing task is being created in the same batch.
|
|
50
|
+
- **Current workaround:** only run independent Open Orchestra commands in
|
|
51
|
+
parallel. Run `task add` before `context`, `delegation`, `plan`, `review`, or
|
|
52
|
+
`evidence` for that task.
|
|
53
|
+
|
|
54
|
+
## Finding: Renamed Project Paths Must Be Revalidated Before Generation
|
|
55
|
+
|
|
56
|
+
- **Date found:** 2026-05-06
|
|
57
|
+
- **Observed behavior:** after the project directory moved from `cursor-rules`
|
|
58
|
+
to `open-orchestra`, a file-generation tool attempted to write new files
|
|
59
|
+
through stale path context.
|
|
60
|
+
- **Impact:** generated files can be created outside the intended repo, leaving
|
|
61
|
+
imports in the current repo pointing at missing files.
|
|
62
|
+
- **Recommended product fix:** add a workspace guard that verifies `cwd`,
|
|
63
|
+
`package.json`, and `.git` root before generated file writes.
|
|
64
|
+
- **Current workaround:** after a rename or context transition, run
|
|
65
|
+
`pwd`, `git status --short`, and `ls` for every newly generated file before
|
|
66
|
+
continuing.
|
package/docs/orchestra-mvp.md
CHANGED
|
@@ -11,6 +11,31 @@ It stores workflow state in `.agent-workflow/` and coordinates agents through fi
|
|
|
11
11
|
- Existing `AGENTS.md`, `CLAUDE.md`, Cursor rules, and generated instruction files remain supported entry points.
|
|
12
12
|
- `ORCHESTRA.md` is the intended future primary guide name; it is not required for existing projects.
|
|
13
13
|
|
|
14
|
+
## Prompt Registry
|
|
15
|
+
|
|
16
|
+
Open Orchestra initializes `.generated-prompts/` beside `.agent-workflow/`. The prompt registry stores the latest prompt intent and generation context by artifact type so future agents can preserve conventions without loading all history into the main instruction files.
|
|
17
|
+
|
|
18
|
+
Generated register files:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
.generated-prompts/
|
|
22
|
+
cicd.md
|
|
23
|
+
code.md
|
|
24
|
+
diagrams.md
|
|
25
|
+
docs.md
|
|
26
|
+
evals.md
|
|
27
|
+
services.md
|
|
28
|
+
tests.md
|
|
29
|
+
ui.md
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Existing register files are preserved unless `orchestra init --force` is used.
|
|
33
|
+
|
|
34
|
+
## Skills and Context Loading
|
|
35
|
+
|
|
36
|
+
Open Orchestra should treat skills as demand-loaded capabilities. Main files such as `AGENTS.md`, `CLAUDE.md`, Cursor rules, and `ORCHESTRA.md` should contain a compact index and activation rules, while detailed procedures live in skill files. See [skill-loading-strategy.md](skill-loading-strategy.md).
|
|
37
|
+
|
|
38
|
+
|
|
14
39
|
## Commands
|
|
15
40
|
|
|
16
41
|
```bash
|
|
@@ -41,6 +66,22 @@ node bin/orchestra.js lock list
|
|
|
41
66
|
node bin/orchestra.js lock release --id lock-123
|
|
42
67
|
node bin/orchestra.js roles list
|
|
43
68
|
node bin/orchestra.js roles list --json
|
|
69
|
+
node bin/orchestra.js skills list
|
|
70
|
+
node bin/orchestra.js skills list --json
|
|
71
|
+
node bin/orchestra.js skills plan --task TASK-1
|
|
72
|
+
node bin/orchestra.js skills plan --task TASK-1 --json
|
|
73
|
+
node bin/orchestra.js skills render --target generic --task TASK-1
|
|
74
|
+
node bin/orchestra.js skills render --target claude --task TASK-1
|
|
75
|
+
node bin/orchestra.js skills render --target cursor --skills static-analysis,playwright-evidence
|
|
76
|
+
node bin/orchestra.js skills render --target codex --task TASK-1
|
|
77
|
+
node bin/orchestra.js skills render --target vscode --task TASK-1 --json
|
|
78
|
+
node bin/orchestra.js skills validate
|
|
79
|
+
node bin/orchestra.js skills validate --json
|
|
80
|
+
node bin/orchestra.js sources list
|
|
81
|
+
node bin/orchestra.js sources list --json
|
|
82
|
+
node bin/orchestra.js lessons list
|
|
83
|
+
node bin/orchestra.js lessons add --operation "shell edit" --failed-action "bad escaping" --error-signature "syntax error" --root-cause "unescaped token" --fix "escape token" --prevention "dry run first" --applies-to node,markdown --verified-by precommit
|
|
84
|
+
node bin/orchestra.js lessons promote --to doc --filter escaping
|
|
44
85
|
node bin/orchestra.js readiness --task TASK-1
|
|
45
86
|
node bin/orchestra.js gate --gate architecture --task TASK-1
|
|
46
87
|
node bin/orchestra.js gate --gate qa-release --task TASK-1
|
|
@@ -92,6 +133,8 @@ node bin/orchestra.js model provenance list --task TASK-1 --json
|
|
|
92
133
|
tasks.json
|
|
93
134
|
locks.json
|
|
94
135
|
events.jsonl
|
|
136
|
+
source-of-truth.json
|
|
137
|
+
agent-lessons.jsonl
|
|
95
138
|
approvals/
|
|
96
139
|
decisions/
|
|
97
140
|
handoffs/
|
|
@@ -121,7 +164,9 @@ The role catalog JSON includes capabilities, required handoff fields, blocking a
|
|
|
121
164
|
|
|
122
165
|
Open Orchestra initializes a broad role catalog but does not require every role to participate in every task. The parent/orchestrator should activate roles based on task type, risk, touched paths, impact areas, and gate requirements.
|
|
123
166
|
|
|
124
|
-
Default roles include delivery roles such as Product Manager, Product Owner, Business Analyst, Architect, Developer, QA, Security, DevOps, SRE, DBA, UX/UI Designer, Release Manager, Compliance/Privacy, and
|
|
167
|
+
Default roles include delivery and specialist roles such as Product Manager, Product Owner, Business Analyst, Architect, Developer, Tech Lead, Frontend Specialist, Backend Specialist, Mobile Specialist, QA, SDET, Security, DevOps, Platform Engineer, SRE, DBA, UX/UI Designer, Release Manager, Compliance/Privacy, Technical Writer, AI Evaluation Engineer, and Support/Customer Operations. They also include orchestration roles for modern multi-agent systems: Planner, Reviewer/Critic, Toolsmith, Context Curator, Policy/Governance, Observability/Incident Response, Data/Privacy Officer, Domain Expert, UX Researcher/Accessibility Reviewer, Performance Engineer, and Game Designer.
|
|
168
|
+
|
|
169
|
+
Specialist profiles and their source rationale are documented in [dev-team-specialist-role-profiles.md](dev-team-specialist-role-profiles.md).
|
|
125
170
|
|
|
126
171
|
Each default role declares:
|
|
127
172
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Runtime Adapters
|
|
2
|
+
|
|
3
|
+
Open Orchestra uses one adapter catalog for LLM runtimes, IDEs, and CLI agents.
|
|
4
|
+
The catalog keeps target names, default files, managed-block support, structured
|
|
5
|
+
payload support, and usage guidance in one place.
|
|
6
|
+
|
|
7
|
+
## Adapter Catalog
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
node bin/orchestra.js runtime adapters --json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Current targets:
|
|
14
|
+
|
|
15
|
+
- `generic`: provider-agnostic Markdown in `ORCHESTRA.md`.
|
|
16
|
+
- `claude`: Claude project memory in `CLAUDE.md`.
|
|
17
|
+
- `cursor`: Cursor MDC rules in `.cursor/rules/open-orchestra.mdc`.
|
|
18
|
+
- `codex`: Codex instructions in `AGENTS.md`.
|
|
19
|
+
- `vscode`: extension/chat payloads in `.vscode/open-orchestra.runtime.json`
|
|
20
|
+
and `.vscode/open-orchestra.md`.
|
|
21
|
+
- `windsurf`: Windsurf rules in `.windsurf/rules/open-orchestra.md`.
|
|
22
|
+
|
|
23
|
+
## Init Modes
|
|
24
|
+
|
|
25
|
+
Default project init keeps the current compact bootstrap behavior:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node bin/orchestra.js init
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Generate only selected runtime files:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
node bin/orchestra.js init --target claude,cursor,windsurf
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Advisory mode creates workflow state without root instruction files unless a
|
|
38
|
+
target is explicit:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
node bin/orchestra.js init --advisory
|
|
42
|
+
node bin/orchestra.js init --advisory --target claude
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Unsafe roots are blocked before writes. Unknown non-temp directories require an
|
|
46
|
+
explicit confirmation:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
node bin/orchestra.js init --confirm-unknown
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Runtime Loop
|
|
53
|
+
|
|
54
|
+
After init, any runtime should use the same local control-plane loop:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
node bin/orchestra.js health --json
|
|
58
|
+
node bin/orchestra.js task list --json
|
|
59
|
+
node bin/orchestra.js context --task STORY-001 --json
|
|
60
|
+
node bin/orchestra.js delegation decide --task STORY-001 --json
|
|
61
|
+
node bin/orchestra.js skills render --target codex --task STORY-001
|
|
62
|
+
node bin/orchestra.js protocol render --target codex --task STORY-001
|
|
63
|
+
node bin/orchestra.js workflow render --target codex --task STORY-001
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Change `--target` to the runtime that is executing the work. The workflow state,
|
|
67
|
+
roles, evidence, reviews, and gates remain runtime-agnostic.
|
|
68
|
+
|
|
69
|
+
## Web And VS Code
|
|
70
|
+
|
|
71
|
+
The local web console exposes workspace classification and supported runtime
|
|
72
|
+
targets through:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
node bin/orchestra.js web
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The API contracts are:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
curl -s http://127.0.0.1:3717/api/workspace/classification
|
|
82
|
+
curl -s http://127.0.0.1:3717/api/runtime/adapters
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
These endpoints are intended for VS Code, Cursor-like extensions, and other
|
|
86
|
+
clients that need to show safe next actions without parsing human CLI output.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Runtime LLM Flow
|
|
2
|
+
|
|
3
|
+
Open Orchestra is the local control plane. The active LLM runtime is the parent
|
|
4
|
+
agent today.
|
|
5
|
+
|
|
6
|
+
That means Claude, Codex, Cursor, VS Code, Windsurf, or another LLM starts the
|
|
7
|
+
work, reads the relevant project instructions, and calls `orchestra` commands to
|
|
8
|
+
coordinate tasks, roles, skills, handoffs, reviews, evidence, gates, and model
|
|
9
|
+
routing metadata. Open Orchestra does not yet spawn real provider-backed
|
|
10
|
+
subagents by itself.
|
|
11
|
+
|
|
12
|
+
## Startup Flow
|
|
13
|
+
|
|
14
|
+
Use this sequence for a new project or a new task:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
node bin/orchestra.js init
|
|
18
|
+
node bin/orchestra.js health --json
|
|
19
|
+
node bin/orchestra.js task add --id STORY-001 --title "Short title" --owner developer --goal "Outcome"
|
|
20
|
+
node bin/orchestra.js context --task STORY-001 --json
|
|
21
|
+
node bin/orchestra.js delegation decide --task STORY-001 --json
|
|
22
|
+
node bin/orchestra.js plan --task STORY-001 --json
|
|
23
|
+
node bin/orchestra.js skills plan --task STORY-001 --json
|
|
24
|
+
node bin/orchestra.js skills render --target codex --task STORY-001
|
|
25
|
+
node bin/orchestra.js protocol render --target codex --task STORY-001
|
|
26
|
+
node bin/orchestra.js workflow render --target codex --task STORY-001
|
|
27
|
+
node bin/orchestra.js commands manifest --json
|
|
28
|
+
node bin/orchestra.js runtime bootstrap --target codex
|
|
29
|
+
node bin/orchestra.js evidence add --task STORY-001 --role developer --type command --summary "npm run precommit passed" --command "npm run precommit" --exit-code 0
|
|
30
|
+
node bin/orchestra.js gate --gate architecture --task STORY-001
|
|
31
|
+
node bin/orchestra.js summary --json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use `--target claude`, `--target cursor`, `--target codex`, `--target vscode`,
|
|
35
|
+
`--target windsurf`, or `--target generic` when rendering skills, protocol, or
|
|
36
|
+
workflow instructions for a specific runtime.
|
|
37
|
+
|
|
38
|
+
`orchestra init` also refreshes compact managed bootstrap blocks in
|
|
39
|
+
`ORCHESTRA.md` and `AGENTS.md`. These blocks tell the active LLM how to discover
|
|
40
|
+
commands and which task loop to run without copying the full manual into the
|
|
41
|
+
always-loaded context.
|
|
42
|
+
|
|
43
|
+
Use explicit init targets when a project should generate runtime-specific files:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
node bin/orchestra.js runtime adapters --json
|
|
47
|
+
node bin/orchestra.js init --target claude,cursor,windsurf
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Parent Agent Prompts
|
|
51
|
+
|
|
52
|
+
Claude:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
Use Open Orchestra as the local control plane for this repo. Treat yourself as
|
|
56
|
+
the parent agent. Start by running health, context, delegation, plan, skills
|
|
57
|
+
plan, and target-specific skill/protocol render commands. Do not spawn or claim
|
|
58
|
+
subagents unless the local workflow state and user approval make that explicit.
|
|
59
|
+
Record evidence and reviews before saying work is complete.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Codex:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
Use the local orchestra CLI before implementation. Confirm the task exists,
|
|
66
|
+
inspect context and delegation, render Codex skills/protocol/workflow context,
|
|
67
|
+
implement with focused tests, run precommit, then record evidence and review
|
|
68
|
+
artifacts in Open Orchestra.
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Cursor:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
Use Open Orchestra for task state and context. Render Cursor-targeted skills and
|
|
75
|
+
protocol instead of copying large rule files. Keep generated MDC/MD blocks
|
|
76
|
+
managed, record test evidence, and do not overwrite user-authored content.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Generic LLM runtime:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
Act as the parent agent. Use Open Orchestra commands as the source of truth for
|
|
83
|
+
tasks, roles, skills, workflow templates, evidence, reviews, and gates. Ask the
|
|
84
|
+
user before changing architecture or spending budget. Treat provider execution
|
|
85
|
+
as future capability unless the project exposes an approved adapter.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Model Routing
|
|
89
|
+
|
|
90
|
+
Current model routing is metadata and policy plumbing. These commands inspect
|
|
91
|
+
or update routing state, but they do not yet execute real provider-backed
|
|
92
|
+
subagents:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
node bin/orchestra.js model providers --json
|
|
96
|
+
node bin/orchestra.js model set-role --role qa --provider fake --model fake-model
|
|
97
|
+
node bin/orchestra.js model provenance list --json
|
|
98
|
+
node bin/orchestra.js budget check --json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Future multi-model delegation should route by role capability, risk, budget,
|
|
102
|
+
latency, and required evidence. For example, a parent agent could keep planning
|
|
103
|
+
local, route security review to a stronger security model, route Playwright
|
|
104
|
+
analysis to a browser-capable runtime, and request user approval before any
|
|
105
|
+
budget fallback.
|
|
106
|
+
|
|
107
|
+
## Current Limits
|
|
108
|
+
|
|
109
|
+
- Open Orchestra has fake/provider-routing primitives, not real autonomous
|
|
110
|
+
provider execution.
|
|
111
|
+
- It records delegation decisions, but it does not automatically spawn
|
|
112
|
+
subagents yet.
|
|
113
|
+
- Parallel independent CLI commands are expected to work, but dependent commands
|
|
114
|
+
still need parent-agent ordering or future DAG semantics.
|
|
115
|
+
- Workflow files are local state. Promote durable lessons into docs, skills, or
|
|
116
|
+
managed instruction blocks only after review.
|
|
117
|
+
|
|
118
|
+
## Related Docs
|
|
119
|
+
|
|
120
|
+
- [Skill Loading Strategy](skill-loading-strategy.md)
|
|
121
|
+
- [Runtime Adapters](runtime-adapters.md)
|
|
122
|
+
- [Open Orchestra MVP](orchestra-mvp.md)
|
|
123
|
+
- [Source of Truth and Agent Learning](source-of-truth-and-agent-learning.md)
|
|
124
|
+
- [Dogfooding Findings](open-orchestra-dogfooding-findings.md)
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Setup Agents Dogfooding Findings
|
|
2
|
+
|
|
3
|
+
This file tracks issues found while using Open Orchestra to coordinate the
|
|
4
|
+
`setup-agents` improvement backlog.
|
|
5
|
+
|
|
6
|
+
## Finding 1: Concurrent `task add` commands can corrupt `tasks.json`
|
|
7
|
+
|
|
8
|
+
- **Open Orchestra issue:** https://github.com/jterrats/open-orchestra/issues/85
|
|
9
|
+
- **Status:** fixed in Open Orchestra
|
|
10
|
+
|
|
11
|
+
- **Date found:** 2026-05-06
|
|
12
|
+
- **Source repo:** `/Users/polux/dev/setup-agents`
|
|
13
|
+
- **Command pattern:** multiple `node_modules/.bin/orchestra task add ...` commands executed concurrently
|
|
14
|
+
- **Observed behavior:** `.agent-workflow/tasks.json` ended up with trailing partial JSON and subsequent Orchestra commands failed with `Unexpected non-whitespace character after JSON`.
|
|
15
|
+
- **Impact:** users or automation that parallelize CLI calls can corrupt workflow state.
|
|
16
|
+
- **Expected behavior:** state writes should be serialized, locked, or written atomically so concurrent commands either succeed safely or fail without corrupting existing state.
|
|
17
|
+
- **Workaround used:** manually rewrote `.agent-workflow/tasks.json` as valid JSON and continued with sequential state-changing commands.
|
|
18
|
+
- **Suggested fix:** introduce file-level locking plus atomic write through a temp file and rename for all workflow state mutations.
|
|
19
|
+
- **Resolution:** workflow state writes are serialized with per-file lock directories and JSON state files are written through temporary files followed by atomic rename.
|
|
20
|
+
|
|
21
|
+
## Finding 2: Evidence type validation is stricter than the CLI help implies
|
|
22
|
+
|
|
23
|
+
- **Open Orchestra issue:** https://github.com/jterrats/open-orchestra/issues/84
|
|
24
|
+
- **Status:** fixed in Open Orchestra
|
|
25
|
+
|
|
26
|
+
- **Date found:** 2026-05-06
|
|
27
|
+
- **Source repo:** `/Users/polux/dev/setup-agents`
|
|
28
|
+
- **Command pattern:** `orchestra evidence add --type validation ...`
|
|
29
|
+
- **Observed behavior:** the command failed with `type must be one of: command, file, screenshot, trace, video, log, report`.
|
|
30
|
+
- **Impact:** users must know the closed evidence type list before calling the command.
|
|
31
|
+
- **Expected behavior:** CLI help should show the allowed values, and validation failures should suggest the nearest valid type when possible.
|
|
32
|
+
- **Workaround used:** recorded validation evidence as `--type command`.
|
|
33
|
+
- **Suggested fix:** update command help to include the enum and consider aliases such as `validation -> command`.
|
|
34
|
+
- **Resolution:** `validation` is accepted as an alias for `command`; CLI help lists canonical types and the alias; invalid type errors include valid types and aliases.
|
|
35
|
+
|
|
36
|
+
## Finding 3: `reviewer` is not accepted as a review role
|
|
37
|
+
|
|
38
|
+
- **Open Orchestra issue:** https://github.com/jterrats/open-orchestra/issues/86
|
|
39
|
+
- **Status:** fixed in Open Orchestra
|
|
40
|
+
|
|
41
|
+
- **Date found:** 2026-05-06
|
|
42
|
+
- **Source repo:** `/Users/polux/dev/setup-agents`
|
|
43
|
+
- **Command pattern:** `orchestra review --task SA-90 --role reviewer --result approve ...`
|
|
44
|
+
- **Observed behavior:** the command failed with `unknown reviewer role: reviewer`.
|
|
45
|
+
- **Impact:** the role catalog and README describe a Reviewer / Critic capability, but the review command does not accept the intuitive `reviewer` role id.
|
|
46
|
+
- **Expected behavior:** `reviewer` should either be a valid role alias or the error should list accepted role ids.
|
|
47
|
+
- **Workaround used:** record the approval with an existing valid role.
|
|
48
|
+
- **Suggested fix:** add `reviewer` as a role alias or expose accepted roles in validation errors and CLI help.
|
|
49
|
+
- **Resolution:** `reviewer` is accepted as an alias for `reviewer_critic`; CLI help lists the alias; unknown reviewer role errors include accepted role ids and aliases.
|
|
50
|
+
|
|
51
|
+
## Finding 4: Concurrent `lock claim` commands can create duplicate lock ids
|
|
52
|
+
|
|
53
|
+
- **Open Orchestra issue:** https://github.com/jterrats/open-orchestra/issues/87
|
|
54
|
+
- **Status:** fixed in Open Orchestra
|
|
55
|
+
|
|
56
|
+
- **Date found:** 2026-05-06
|
|
57
|
+
- **Source repo:** `/Users/polux/dev/setup-agents`
|
|
58
|
+
- **Command pattern:** multiple `node_modules/.bin/orchestra lock claim ...` commands executed concurrently
|
|
59
|
+
- **Observed behavior:** two distinct locks were created with the same id, `lock-1778052846730`, for different paths.
|
|
60
|
+
- **Impact:** `lock release --id <id>` becomes ambiguous and can release the wrong lock or require manual state repair.
|
|
61
|
+
- **Expected behavior:** lock ids should be collision-resistant even when lock claims happen in the same millisecond.
|
|
62
|
+
- **Workaround used:** avoid concurrent state-mutating Orchestra commands and continue sequentially.
|
|
63
|
+
- **Suggested fix:** generate lock ids with a random suffix or monotonic per-process sequence in addition to the timestamp.
|
|
64
|
+
- **Resolution:** lock ids now include a timestamp plus `crypto.randomUUID()`, and concurrent lock claim regression coverage verifies uniqueness.
|
|
65
|
+
|
|
66
|
+
## Finding 5: Runtime bootstrap examples are not portable after package install
|
|
67
|
+
|
|
68
|
+
- **Open Orchestra issue:** https://github.com/jterrats/open-orchestra/issues/96
|
|
69
|
+
- **Status:** fixed in Open Orchestra
|
|
70
|
+
|
|
71
|
+
- **Date found:** 2026-05-06
|
|
72
|
+
- **Source repo:** `/Users/polux/dev/setup-agents`
|
|
73
|
+
- **Command pattern:** `node_modules/.bin/orchestra init --force`
|
|
74
|
+
- **Observed behavior:** generated `AGENTS.md` and `ORCHESTRA.md` bootstrap blocks recommend commands such as `node bin/orchestra.js health --json` and `node bin/orchestra.js task list --json`.
|
|
75
|
+
- **Impact:** those examples only work inside the Open Orchestra repository layout. When Open Orchestra is installed into another repository as a package or local file install, the consumer repo does not have `bin/orchestra.js`, so agents following the generated bootstrap will run the wrong command.
|
|
76
|
+
- **Expected behavior:** generated runtime bootstrap guidance should use the installed executable form, such as `orchestra health --json`, or derive a target-appropriate command prefix from the runtime/install context.
|
|
77
|
+
- **Workaround used:** run `node_modules/.bin/orchestra ...` directly from the consuming repo.
|
|
78
|
+
- **Suggested fix:** update command manifest examples and runtime bootstrap rendering to prefer `orchestra` for installed usage, with repo-local `node bin/orchestra.js` reserved for Open Orchestra development docs.
|
|
79
|
+
- **Resolution:** command manifest examples and generated runtime bootstrap blocks now use the portable installed executable form, `orchestra ...`; regression coverage verifies generated bootstrap content does not include `node bin/orchestra.js`.
|
|
80
|
+
|
|
81
|
+
## Finding 6: Concurrent `evidence add` commands can overwrite artifact files
|
|
82
|
+
|
|
83
|
+
- **Open Orchestra issue:** https://github.com/jterrats/open-orchestra/issues/98
|
|
84
|
+
- **Status:** fixed in Open Orchestra
|
|
85
|
+
|
|
86
|
+
- **Date found:** 2026-05-06
|
|
87
|
+
- **Source repo:** `/Users/polux/dev/open-orchestra`
|
|
88
|
+
- **Command pattern:** multiple `orchestra evidence add ...` commands executed concurrently
|
|
89
|
+
- **Observed behavior:** two distinct `EVIDENCE_ADDED` events pointed to the same artifact file when they were created in the same millisecond.
|
|
90
|
+
- **Impact:** the later evidence write overwrote the earlier evidence content, leaving one event pointing to mismatched artifact content.
|
|
91
|
+
- **Expected behavior:** every evidence event should keep a unique artifact path even under concurrent CLI usage.
|
|
92
|
+
- **Workaround used:** rerun evidence recording sequentially.
|
|
93
|
+
- **Suggested fix:** include a collision-resistant suffix in generated evidence artifact filenames.
|
|
94
|
+
- **Resolution:** evidence artifact filenames now include a UUID in addition to task, timestamp, and type; concurrent CLI regression coverage verifies unique artifact paths.
|
|
95
|
+
|
|
96
|
+
## Workspace State Safety Notes
|
|
97
|
+
|
|
98
|
+
- Open Orchestra serializes local workflow state writes with per-file lock directories next to the target file.
|
|
99
|
+
- JSON state files are written through temporary files and atomic rename to avoid partial JSON on interruption.
|
|
100
|
+
- The lock mechanism is intended for local filesystems. Network filesystems or stale lock directories after a killed process may require manual cleanup if a command times out waiting for a lock.
|
|
101
|
+
- State-mutating Orchestra commands should still prefer explicit task/path locks when multiple agents edit code, because file serialization protects workflow metadata, not source-code merge conflicts.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Skill Loading Strategy
|
|
2
|
+
|
|
3
|
+
Open Orchestra should keep primary agent instruction files small. AGENTS.md, CLAUDE.md, Cursor rules, and ORCHESTRA.md should act as an entry point, not as the full operating manual for every capability.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Load detailed capability instructions only when the current task needs them, while keeping core governance rules always available.
|
|
8
|
+
|
|
9
|
+
## Core Pattern
|
|
10
|
+
|
|
11
|
+
Use a two-layer model:
|
|
12
|
+
|
|
13
|
+
- **Core instructions:** short, always-loaded rules for safety, user alignment, engineering standards, gates, and how to select skills.
|
|
14
|
+
- **Skills:** focused sub-files with task-specific procedures, examples, scripts, templates, and evidence rules.
|
|
15
|
+
|
|
16
|
+
The main files should include a compact Skill Index instead of embedding every procedure inline.
|
|
17
|
+
|
|
18
|
+
## Skill Manifest
|
|
19
|
+
|
|
20
|
+
Each skill should expose metadata that allows a parent agent or middleware to decide whether to load it.
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"id": "static-analysis",
|
|
25
|
+
"name": "Static Analysis",
|
|
26
|
+
"summary": "Run and interpret local quality, type, dependency, secret, and security checks.",
|
|
27
|
+
"triggers": ["lint", "typecheck", "secret", "sast", "precommit", "dependency"],
|
|
28
|
+
"roles": ["developer", "tech_lead", "qa", "sdet", "security", "devops"],
|
|
29
|
+
"capabilities": ["quality-gate", "security-review", "commit-readiness"],
|
|
30
|
+
"riskAreas": ["security", "release", "maintainability"],
|
|
31
|
+
"entry": "skills/static-analysis/SKILL.md",
|
|
32
|
+
"assets": ["skills/static-analysis/checklist.md"],
|
|
33
|
+
"evidence": ["command", "report"],
|
|
34
|
+
"sourceGroups": ["codebase", "quality-security", "agent-memory"],
|
|
35
|
+
"loadBudget": "normal"
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Source Selection
|
|
40
|
+
|
|
41
|
+
Before loading full skill instructions, the parent agent should select authoritative source groups for the task. The source catalog lives in `.agent-workflow/source-of-truth.json` and is documented in [source-of-truth-and-agent-learning.md](source-of-truth-and-agent-learning.md).
|
|
42
|
+
|
|
43
|
+
Skill manifests should be able to declare `sourceGroups` so the orchestrator can load the right local files, docs, official vendor references, and prior lessons without pulling unrelated context.
|
|
44
|
+
|
|
45
|
+
## Loading Flow
|
|
46
|
+
|
|
47
|
+
1. Parse the task brief into goal, touched paths, impacted systems, requested outputs, risk areas, and likely roles.
|
|
48
|
+
2. Activate roles from the role catalog.
|
|
49
|
+
3. Match task signals against skill manifests by triggers, paths, roles, capabilities, and risk areas.
|
|
50
|
+
4. Load only the selected skill summaries first.
|
|
51
|
+
5. Load the full `SKILL.md` only when the skill is needed for execution or review.
|
|
52
|
+
6. Load matching source-of-truth entries and recent relevant lessons for the selected skills.
|
|
53
|
+
7. Load skill assets, templates, scripts, or examples only at the point of use.
|
|
54
|
+
8. Record selected skills and source groups in task context, handoffs, evidence, and final summary.
|
|
55
|
+
|
|
56
|
+
## Built-in Skill Candidates
|
|
57
|
+
|
|
58
|
+
- `prompt-registry`: read and update `.generated-prompts/` registers for substantial AI-generated artifacts.
|
|
59
|
+
- `diagram-export`: generate, validate, and export architecture or workflow diagrams.
|
|
60
|
+
- `static-analysis`: run local quality, typing, SAST, dependency, and secret checks.
|
|
61
|
+
- `pr-review`: produce review findings, PR summary, risks, rollout notes, and missing-test gaps.
|
|
62
|
+
- `playwright-evidence`: plan browser automation and attach screenshots, traces, videos, and reports.
|
|
63
|
+
- `backlog-sync`: keep GitHub issues, local stories, and workflow tasks aligned.
|
|
64
|
+
- `release-readiness`: validate gates, rollback, observability, support, and customer-impact evidence.
|
|
65
|
+
- `model-evaluation`: run prompt/model/provider-routing evaluations and compare outputs.
|
|
66
|
+
- `source-of-truth`: select authoritative project, vendor, and workflow sources before acting.
|
|
67
|
+
- `agent-learning`: record reusable failure lessons and promote repeated lessons into skills or rules.
|
|
68
|
+
|
|
69
|
+
## Fallback for LLMs Without Native Skills
|
|
70
|
+
|
|
71
|
+
If an LLM platform cannot load skills dynamically, Open Orchestra should provide middleware behavior:
|
|
72
|
+
|
|
73
|
+
- A parent orchestrator reads the manifest and selects skills.
|
|
74
|
+
- The orchestrator injects only the selected skill text into the child agent prompt.
|
|
75
|
+
- The orchestrator keeps full skill content out of the base system prompt.
|
|
76
|
+
- The loaded skill IDs are written to `.agent-workflow/` events and handoff artifacts.
|
|
77
|
+
|
|
78
|
+
This keeps the project portable across Cursor, Claude, Codex, VS Code, GitHub Actions, and future web clients.
|
|
79
|
+
|
|
80
|
+
## Main File Budget
|
|
81
|
+
|
|
82
|
+
Primary MD files should stay bounded:
|
|
83
|
+
|
|
84
|
+
- Keep role and skill catalogs as indexes with links.
|
|
85
|
+
- Move long procedures into skills or docs.
|
|
86
|
+
- Prefer activation criteria over exhaustive instructions.
|
|
87
|
+
- Keep examples inside the skill that owns them.
|
|
88
|
+
- Review file size when a main MD crosses a practical context threshold.
|
|
89
|
+
|
|
90
|
+
## Implemented CLI Surface
|
|
91
|
+
|
|
92
|
+
- `orchestra skills list` lists the canonical built-in skill catalog.
|
|
93
|
+
- `orchestra skills plan --task <id>` selects skills from task text, owner role, paths, risks, and source groups.
|
|
94
|
+
- `orchestra skills render --target generic|claude|cursor|codex|vscode --task <id>` renders selected skills for a runtime or IDE.
|
|
95
|
+
- `orchestra skills render --target <target> --skills <csv>` renders explicit skills when no task exists.
|
|
96
|
+
- `orchestra skills validate` validates canonical skills against portable `manifest.json` and `SKILL.md` files.
|
|
97
|
+
- `orchestra sources list` exposes the source-of-truth catalog.
|
|
98
|
+
- `orchestra lessons list/add/promote` manages local agent learning and promotes repeated lessons into reviewable artifacts.
|
|
99
|
+
|
|
100
|
+
The CLI render path is the universal fallback for environments without native skill support.
|
|
101
|
+
|
|
102
|
+
## Generated Markdown Update Policy
|
|
103
|
+
|
|
104
|
+
Generated `.md`, `.mdc`, and agent instruction files should be managed through explicit ownership rules instead of blind rewrites.
|
|
105
|
+
|
|
106
|
+
- Use generated block markers such as `<!-- open-orchestra:start skill-index -->` and `<!-- open-orchestra:end skill-index -->` for sections the CLI owns.
|
|
107
|
+
- Keep user-authored sections outside managed blocks and never overwrite them during generation.
|
|
108
|
+
- Store generator metadata: generator name, version, source manifest, target file, managed block id, and last rendered hash.
|
|
109
|
+
- Default to idempotent updates: rerunning the generator without source changes should produce no diff.
|
|
110
|
+
- Provide `--dry-run` and `--check` modes before writing generated docs.
|
|
111
|
+
- If a generated section was manually edited, detect drift and require explicit `--force` or emit a conflict.
|
|
112
|
+
- Promote stable runtime lessons or prompts into versioned docs/rules/skills only through reviewed generated blocks.
|
|
113
|
+
|
|
114
|
+
This keeps Claude, Cursor, Codex, VS Code, and generic CLI outputs synchronized without turning primary instruction files into unbounded generated blobs.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Source of Truth and Agent Learning
|
|
2
|
+
|
|
3
|
+
Open Orchestra should make context provenance explicit. Agents and subagents should know where to look before acting, and they should record repeatable failure lessons after an action fails.
|
|
4
|
+
|
|
5
|
+
## Source of Truth Catalog
|
|
6
|
+
|
|
7
|
+
The source catalog answers: which document, file, or external reference is authoritative for a decision?
|
|
8
|
+
|
|
9
|
+
Default source groups:
|
|
10
|
+
|
|
11
|
+
- `project-instructions`: `AGENTS.md`, `ORCHESTRA.md`, `CLAUDE.md`, Cursor rules, and local agent rules.
|
|
12
|
+
- `product-backlog`: GitHub issues, local backlog docs, acceptance criteria, user stories, and task graph state.
|
|
13
|
+
- `architecture`: ADRs, architecture docs, service boundaries, diagrams, domain models, and integration contracts.
|
|
14
|
+
- `codebase`: source files, tests, package manifests, config, generated types, and local command contracts.
|
|
15
|
+
- `quality-security`: static analysis config, pre-commit hooks, SAST reports, dependency scans, secret scans, QA plans, and Playwright evidence.
|
|
16
|
+
- `devops-runtime`: CI/CD workflows, deployment docs, IaC, observability, rollback, incident, and release artifacts.
|
|
17
|
+
- `vendor-docs`: official provider, framework, package, cloud, and browser documentation.
|
|
18
|
+
- `agent-memory`: decisions, handoffs, evidence, prompt registry entries, and lessons learned.
|
|
19
|
+
|
|
20
|
+
Rules:
|
|
21
|
+
|
|
22
|
+
- Prefer local project sources before generic external guidance.
|
|
23
|
+
- Prefer primary vendor documentation over blogs, examples, or generated answers.
|
|
24
|
+
- For current or fast-changing APIs, verify against official docs before implementation.
|
|
25
|
+
- Record which source group justified a material decision in decisions, handoffs, evidence, or final summaries.
|
|
26
|
+
- If sources conflict, stop and record the conflict instead of silently choosing one.
|
|
27
|
+
|
|
28
|
+
## Versioning Policy
|
|
29
|
+
|
|
30
|
+
- Track the schema, documentation, examples, and promoted rules or skills.
|
|
31
|
+
- Do not track the live `.agent-workflow/agent-lessons.jsonl` file by default; it is local runtime state and can contain machine-specific commands, timestamps, paths, or sensitive context.
|
|
32
|
+
- Do not track the live `.generated-prompts/` directory by default; prompt registers are generated local runtime memory unless a project explicitly promotes selected entries into versioned docs, rules, or skills.
|
|
33
|
+
- Track `source-of-truth.json` only when a project intentionally wants shared authoritative sources. Otherwise regenerate it through `orchestra init` and project config.
|
|
34
|
+
- Promote repeated lessons into versioned skills or rules after review.
|
|
35
|
+
|
|
36
|
+
## Agent Lessons Log
|
|
37
|
+
|
|
38
|
+
The lessons log captures operational mistakes that an agent can avoid next time. It is not a blame log; it is a repeat-prevention mechanism.
|
|
39
|
+
|
|
40
|
+
Store lessons as JSONL in `.agent-workflow/agent-lessons.jsonl`.
|
|
41
|
+
|
|
42
|
+
Example entry:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"timestamp": "2026-05-03T00:00:00.000Z",
|
|
47
|
+
"taskId": "SKILL-001",
|
|
48
|
+
"actor": "parent",
|
|
49
|
+
"operation": "edit-doc-with-node-script",
|
|
50
|
+
"failedAction": "embedded Markdown fences inside a JavaScript template literal",
|
|
51
|
+
"errorSignature": "SyntaxError: Unexpected identifier",
|
|
52
|
+
"rootCause": "unescaped backticks in generated script content",
|
|
53
|
+
"fix": "build long Markdown content as an array of lines or escape fences explicitly",
|
|
54
|
+
"prevention": "before running generated edit scripts, scan for nested template literals and Markdown fences",
|
|
55
|
+
"appliesTo": ["node", "markdown", "code-generation"],
|
|
56
|
+
"verifiedBy": ["reran edit script successfully"]
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Record a lesson when:
|
|
61
|
+
|
|
62
|
+
- The same class of failure is likely to happen again.
|
|
63
|
+
- A command failed because of quoting, escaping, shell behavior, permissions, cwd, missing dependency, or stale assumption.
|
|
64
|
+
- A test failure revealed a reusable project convention.
|
|
65
|
+
- A provider, tool, or runtime behaved differently than expected.
|
|
66
|
+
|
|
67
|
+
Do not record a lesson for:
|
|
68
|
+
|
|
69
|
+
- One-off typos with no reusable prevention value.
|
|
70
|
+
- Secrets, raw credentials, private customer data, or sensitive prompt/response content.
|
|
71
|
+
- Failures already covered by a current lesson unless the prevention changed.
|
|
72
|
+
|
|
73
|
+
## Learning Flow
|
|
74
|
+
|
|
75
|
+
1. Before acting, select relevant source groups and load only the necessary files or docs.
|
|
76
|
+
2. Before repeating a risky operation, search `.agent-workflow/agent-lessons.jsonl` for matching operation, error signature, or tool.
|
|
77
|
+
3. After a failure, classify whether it is reusable knowledge.
|
|
78
|
+
4. If reusable, append one JSONL entry with root cause, fix, prevention, and verification.
|
|
79
|
+
5. If the same lesson appears repeatedly, promote it into the relevant skill or project rule.
|
|
80
|
+
|
|
81
|
+
## Relationship to Skills
|
|
82
|
+
|
|
83
|
+
Skills should declare which source groups they use and which lessons are relevant. The orchestrator should load lessons only for the selected skills and current operation, not the full historical log.
|