feat: Orquestra - sequential orchestration runtime

- Context isolation: fresh Pi process per stage (run_stage.py)
- Gate enforcement: blocks close without approved gates
- Auto commit/push on feature close (close_feature.py)
- Write restrictions: only allowed directories (ALLOWED_WRITE_DIRS)
- Pi extension: orquestra-status with /orquestra-stage command
- Documentation: context-handoff.md, updated README
- Scripts: agent_status.py, verify.sh, install.sh updated
This commit is contained in:
rikrdo
2026-08-17 07:39:03 +02:00
parent 622e5df382
commit 634525fa21
28 changed files with 2296 additions and 284 deletions

View File

@@ -56,6 +56,14 @@ roles:
- regression_checks
- emit_qa_verdict
documenter:
can_edit: ["work/artifacts/", "docs/", "README.md", "HOWTO.md", "platforms/pi/README.md", "harness/contracts/"]
cannot_edit: ["src/", "tests/", "backlog/features.json:status"]
responsibilities:
- document_changes_when_needed
- update_docs_api_contracts_user_facing_notes
- produce_documenter_evidence
anti_cheat:
- "Implementer cannot promote feature to done"
- "Done requires reviewer/security/qa approved artifacts"

View File

@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://arnes.local/evidence.schema.json",
"$id": "https://orquestra.local/evidence.schema.json",
"title": "Gate Evidence",
"type": "object",
"required": ["feature_id", "agent", "verdict", "summary", "evidence", "timestamp"],

View File

@@ -5,11 +5,20 @@ Los agentes **no** devuelven código en chat. Deben escribir a disco y responder
- `done -> <ruta>`
- `blocked -> <ruta>`
## Contexto mínimo por stage
Cada stage recibe solo:
1. Los archivos listados en `harness/workflow.stages.yml` como `input`.
2. El artefacto del stage anterior cuando el workflow lo declare.
3. La memoria Engram que el leader seleccione explícitamente para ese stage.
No se considera válido pasar todo el chat anterior como contexto operativo. Si un stage necesita más información, debe pedir una ruta o artefacto concreto y bloquear hasta tenerlo.
## Rutas estándar por feature
- `work/artifacts/<feature_id>/implementer.md`
- `work/artifacts/<feature_id>/reviewer.json`
- `work/artifacts/<feature_id>/security.json`
- `work/artifacts/<feature_id>/qa.json`
- `work/artifacts/<feature_id>/documenter.md` (opcional; requerido solo si cambiaron docs/API/contratos/comportamiento user-facing)
- `work/artifacts/<feature_id>/leader-close.json`
## Campos mínimos de artefactos JSON de gate

23
harness/model-routing.yml Normal file
View File

@@ -0,0 +1,23 @@
version: 1
# Sequential role model hints for Pi. The parent session changes model before
# each stage when a different model is desired. No parallel agents/subagents.
roles:
leader:
model: default
reasoning: medium
architect:
model: strong
reasoning: medium
implementer:
model: default
reasoning: medium
reviewer:
model: strong
reasoning: low
security:
model: strong
reasoning: medium
qa:
model: default
reasoning: low

View File

@@ -15,38 +15,85 @@ stages:
- name: design
owner: architect
optional: true
input:
- work/current.md
- spec/product.md
- spec/tech.md
- spec/acceptance.md
output:
- work/artifacts/<feature_id>/architect.md
- name: build
owner: implementer
input:
- work/current.md
- spec/product.md
- spec/tech.md
- spec/acceptance.md
- work/artifacts/<feature_id>/architect.md
output:
- work/artifacts/<feature_id>/implementer.md
- name: review_gate
owner: reviewer
required: true
input:
- work/current.md
- spec/acceptance.md
- work/artifacts/<feature_id>/implementer.md
output:
- work/artifacts/<feature_id>/reviewer.json
- name: security_gate
owner: security
required: true
input:
- work/current.md
- work/artifacts/<feature_id>/implementer.md
- work/artifacts/<feature_id>/reviewer.json
output:
- work/artifacts/<feature_id>/security.json
- name: qa_gate
owner: qa
required: true
input:
- work/current.md
- spec/acceptance.md
- work/artifacts/<feature_id>/implementer.md
- work/artifacts/<feature_id>/reviewer.json
- work/artifacts/<feature_id>/security.json
output:
- work/artifacts/<feature_id>/qa.json
- name: document
owner: documenter
optional: true
when: docs/API/contracts/user-facing behavior changed
input:
- work/current.md
- work/artifacts/<feature_id>/implementer.md
- work/artifacts/<feature_id>/reviewer.json
- work/artifacts/<feature_id>/security.json
- work/artifacts/<feature_id>/qa.json
output:
- work/artifacts/<feature_id>/documenter.md
- name: close
owner: leader
required: true
input:
- work/current.md
- work/artifacts/<feature_id>/implementer.md
- work/artifacts/<feature_id>/reviewer.json
- work/artifacts/<feature_id>/security.json
- work/artifacts/<feature_id>/qa.json
- work/artifacts/<feature_id>/documenter.md
output:
- work/artifacts/<feature_id>/leader-close.json
- work/history.md
post_actions:
- scripts/close_feature.py <feature_id>
close_requirements:
- reviewer.json.verdict == "APPROVED"