trackops 1.1.0 → 2.0.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.
Files changed (55) hide show
  1. package/README.md +194 -230
  2. package/bin/trackops.js +54 -28
  3. package/lib/config.js +14 -10
  4. package/lib/control.js +44 -32
  5. package/lib/env.js +18 -1
  6. package/lib/init.js +40 -6
  7. package/lib/opera-bootstrap.js +825 -273
  8. package/lib/opera.js +360 -110
  9. package/lib/preferences.js +74 -0
  10. package/lib/runtime-state.js +144 -0
  11. package/lib/server.js +155 -25
  12. package/locales/en.json +136 -42
  13. package/locales/es.json +136 -42
  14. package/package.json +2 -1
  15. package/scripts/postinstall-locale.js +21 -0
  16. package/scripts/smoke-tests.js +130 -5
  17. package/scripts/validate-skill.js +2 -1
  18. package/skills/trackops/SKILL.md +67 -45
  19. package/skills/trackops/agents/openai.yaml +5 -1
  20. package/skills/trackops/locales/en/SKILL.md +86 -0
  21. package/skills/trackops/locales/en/references/activation.md +73 -0
  22. package/skills/trackops/locales/en/references/troubleshooting.md +49 -0
  23. package/skills/trackops/locales/en/references/workflow.md +26 -0
  24. package/skills/trackops/references/activation.md +53 -19
  25. package/skills/trackops/references/troubleshooting.md +36 -21
  26. package/skills/trackops/references/workflow.md +21 -15
  27. package/skills/trackops/scripts/bootstrap-trackops.js +9 -7
  28. package/skills/trackops/skill.json +4 -4
  29. package/templates/opera/agent.md +10 -9
  30. package/templates/opera/architecture/dependency-graph.md +24 -0
  31. package/templates/opera/architecture/runtime-automation.md +24 -0
  32. package/templates/opera/architecture/runtime-operations.md +34 -0
  33. package/templates/opera/en/agent.md +21 -20
  34. package/templates/opera/en/architecture/dependency-graph.md +24 -0
  35. package/templates/opera/en/architecture/runtime-automation.md +24 -0
  36. package/templates/opera/en/architecture/runtime-operations.md +34 -0
  37. package/templates/opera/en/reviews/delivery-audit.md +18 -0
  38. package/templates/opera/en/reviews/integration-audit.md +18 -0
  39. package/templates/opera/en/router.md +19 -9
  40. package/templates/opera/reviews/delivery-audit.md +18 -0
  41. package/templates/opera/reviews/integration-audit.md +18 -0
  42. package/templates/opera/router.md +15 -5
  43. package/templates/skills/opera-contract-auditor/SKILL.md +38 -0
  44. package/templates/skills/opera-contract-auditor/locales/en/SKILL.md +38 -0
  45. package/templates/skills/opera-policy-guard/SKILL.md +26 -0
  46. package/templates/skills/opera-policy-guard/locales/en/SKILL.md +26 -0
  47. package/templates/skills/project-starter-skill/SKILL.md +89 -164
  48. package/templates/skills/project-starter-skill/locales/en/SKILL.md +104 -24
  49. package/ui/js/views/overview.js +16 -12
  50. package/templates/etapa/agent.md +0 -26
  51. package/templates/etapa/genesis.md +0 -94
  52. package/templates/etapa/references/autonomy-and-recovery.md +0 -117
  53. package/templates/etapa/references/etapa-cycle.md +0 -193
  54. package/templates/etapa/registry.md +0 -28
  55. package/templates/etapa/router.md +0 -39
@@ -1,26 +1,27 @@
1
1
  # Project Agent: {{PROJECT_NAME}}
2
2
 
3
- ## Identity
4
- You are the primary agent for **{{PROJECT_NAME}}**. You operate under the O.P.E.R.A. v3.0 protocol.
5
-
6
- ## Source of Truth
7
- Your source of truth is `genesis.md`. Before making any architectural or implementation decision, read it first.
8
- For operational tracking and backlog state, use `project_control.json`.
9
-
10
- ## Behavior
11
- - Follow the behavior rules defined in `genesis.md`.
12
- - Respect the autonomy matrix to determine which actions are allowed.
13
- - Manage tasks and states from `project_control.json`.
14
- - Do not edit `task_plan.md`, `progress.md`, or `findings.md` manually; regenerate them with `trackops sync`.
3
+ ## Identity
4
+ You are the primary agent for **{{PROJECT_NAME}}**. You operate under the O.P.E.R.A. v3.0 protocol.
5
+
6
+ ## Source of Truth
7
+ Your machine source of truth is `ops/contract/operating-contract.json`.
8
+ Your compiled human view is `ops/genesis.md`.
9
+ For operational tracking and backlog state, use `ops/project_control.json`.
10
+
11
+ ## Behavior
12
+ - Follow the rules defined in `ops/contract/operating-contract.json` and reflected in `ops/genesis.md`.
13
+ - Respect `ops/policy/autonomy.json` to determine which actions are allowed without approval.
14
+ - Manage tasks and states from `ops/project_control.json`.
15
+ - Do not edit `ops/task_plan.md`, `ops/progress.md`, or `ops/findings.md` manually; regenerate them with `trackops sync`.
15
16
 
16
17
  ## Available Skills
17
- Check `.agents/skills/_registry.md` to see installed skills.
18
+ Check `ops/.agents/skills/_registry.md` to see installed skills.
18
19
  You can also discover new skills with `trackops skill catalog`.
19
20
 
20
- ## Work Cycle
21
- 1. Run `trackops status` at the beginning of each work block.
22
- 2. Read `genesis.md` to understand the data and rules.
23
- 3. Use `trackops next` to inspect the prioritized queue.
24
- 4. Before implementing, mark the task with `trackops task start <task-id>`.
25
- 5. Use the router in `.agent/hub/router.md` to choose the right skill.
26
- 6. When you finish, move the task to `review`, `complete`, or `block`, then run `trackops sync`.
21
+ ## Work Cycle
22
+ 1. Run `trackops status` at the beginning of each work block.
23
+ 2. Read `ops/contract/operating-contract.json` and `ops/genesis.md` to understand the contract and its human view.
24
+ 3. Use `trackops next` to inspect the prioritized queue.
25
+ 4. Before implementing, mark the task with `trackops task start <task-id>`.
26
+ 5. Use the router in `ops/.agent/hub/router.md` to choose the right skill.
27
+ 6. When you finish, move the task to `review`, `complete`, or `block`, then run `trackops sync`.
@@ -0,0 +1,24 @@
1
+ # Dependency Graph
2
+
3
+ ```mermaid
4
+ flowchart TD
5
+ A[Global runtime bootstrap] --> B[trackops init]
6
+ B --> C[trackops opera install]
7
+ C --> D{Routing}
8
+ D -->|direct_cli| E[Direct intake]
9
+ D -->|agent_handoff| F[agent-handoff.md/json]
10
+ F --> G[intake.json + spec-dossier.md]
11
+ E --> H[quality-report.json]
12
+ G --> H
13
+ H --> I[operating-contract.json]
14
+ I --> J[genesis.md]
15
+ I --> K[task_plan.md / progress.md / findings.md]
16
+ I --> L[dashboard + API state]
17
+ I --> M[env sync + policy enforcement]
18
+ ```
19
+
20
+ ## Notes
21
+
22
+ - `ops/project_control.json` is the operational source of truth for backlog and session state.
23
+ - `ops/contract/operating-contract.json` is the machine contract.
24
+ - `ops/genesis.md` is a compiled human view.
@@ -0,0 +1,24 @@
1
+ # SOP - Runtime Automation
2
+
3
+ ## Objective
4
+
5
+ Keep validation automatic on every relevant change.
6
+
7
+ ## Trigger policy
8
+
9
+ - Validate on push to `develop` and `master`.
10
+ - Validate on pull requests targeting `develop` or `master`.
11
+ - Allow manual execution with workflow dispatch.
12
+
13
+ ## Validation circuit
14
+
15
+ 1. Install Node 18 and 20.
16
+ 2. Install runtime dependencies.
17
+ 3. Run `npm run release:check`.
18
+ 4. Fail fast on any smoke, skill or packaging regression.
19
+
20
+ ## Release hygiene
21
+
22
+ - Do not publish if `release:check` fails.
23
+ - Do not treat local runtime state as deployable proof.
24
+ - Re-run smoke after structural or locale changes.
@@ -0,0 +1,34 @@
1
+ # SOP - Runtime Operations
2
+
3
+ ## Purpose
4
+
5
+ Define the minimum operating procedure required to keep a TrackOps + OPERA workspace healthy.
6
+
7
+ ## Inputs
8
+
9
+ - `ops/project_control.json`
10
+ - `ops/contract/operating-contract.json`
11
+ - `ops/policy/autonomy.json`
12
+ - `ops/bootstrap/quality-report.json`
13
+
14
+ ## Core checks
15
+
16
+ 1. Run `trackops status`.
17
+ 2. Run `trackops opera status`.
18
+ 3. Run `trackops env status`.
19
+ 4. Confirm `contract readiness` is not `hypothesis` for active delivery work.
20
+ 5. Confirm `legacyStatus` is `supported`.
21
+
22
+ ## Recovery path
23
+
24
+ 1. If bootstrap is incomplete, run `trackops opera handoff --print`.
25
+ 2. If discovery artifacts already exist, run `trackops opera bootstrap --resume`.
26
+ 3. If operational docs drift, run `trackops sync`.
27
+ 4. If managed artifacts drift, run `trackops opera upgrade --stable`.
28
+
29
+ ## Exit criteria
30
+
31
+ - Runtime status is readable.
32
+ - OPERA status is readable.
33
+ - Contract and policy files exist.
34
+ - No critical blocker remains undocumented.
@@ -0,0 +1,18 @@
1
+ # Delivery Audit
2
+
3
+ ## Scope
4
+
5
+ Review the final output shape against the active templates and compiled contract.
6
+
7
+ ## Checklist
8
+
9
+ - `ops/genesis.md` matches the current contract.
10
+ - `ops/task_plan.md`, `ops/progress.md` and `ops/findings.md` are synchronized.
11
+ - Public copy matches runtime behavior.
12
+ - API and dashboard reflect the same operational state.
13
+ - Visual review completed when a UI change exists.
14
+
15
+ ## Result
16
+
17
+ - Status: pending review
18
+ - Notes: replace this section with project-specific evidence.
@@ -0,0 +1,18 @@
1
+ # Integration Audit
2
+
3
+ ## Scope
4
+
5
+ Review credentials, connectivity assumptions and external response shapes before expanding delivery.
6
+
7
+ ## Checklist
8
+
9
+ - Required keys identified from the contract and environment contract.
10
+ - Missing keys documented without exposing secret values.
11
+ - External services listed in the contract.
12
+ - Response shapes aligned with `ops/contract/operating-contract.json`.
13
+ - Findings recorded in `ops/findings.md` when applicable.
14
+
15
+ ## Result
16
+
17
+ - Status: pending review
18
+ - Notes: replace this section with project-specific evidence.
@@ -15,15 +15,25 @@ This file defines the routing rules between the main agent and the available ski
15
15
  - **Skill**: `changelog-updater`
16
16
  - **Action**: Run the changelog update flow.
17
17
 
18
- ### Context: Project initialization
19
- - **Trigger**: The user wants to create a new project.
20
- - **Skill**: `project-starter-skill` (global)
21
- - **Action**: Run the full initialization protocol.
22
-
23
- ### Context: Operational tracking
24
- - **Trigger**: A work block is about to start, resume, or close.
25
- - **Skill**: No external skill.
26
- - **Action**: Run `trackops status`, take the next task with `trackops next`, and keep `project_control.json` as the operational source of truth.
18
+ ### Context: Agent-led project start
19
+ - **Trigger**: The user has an idea, partial specification, or TrackOps has generated `ops/bootstrap/agent-handoff.md`.
20
+ - **Skill**: `project-starter-skill`
21
+ - **Action**: Turn the user context into `ops/bootstrap/intake.json`, `ops/bootstrap/spec-dossier.md`, and `ops/bootstrap/open-questions.md` when needed.
22
+
23
+ ### Context: Contract audit
24
+ - **Trigger**: `ops/contract/operating-contract.json` or `ops/bootstrap/quality-report.json` exists and there are doubts about gaps or contradictions.
25
+ - **Skill**: `opera-contract-auditor`
26
+ - **Action**: Audit consistency, gaps, and false precision before execution continues.
27
+
28
+ ### Context: Operational risk
29
+ - **Trigger**: The action affects persistent data, deployments, external side effects, or sensitive permissions.
30
+ - **Skill**: `opera-policy-guard`
31
+ - **Action**: Read `ops/policy/autonomy.json` and decide whether explicit approval is required.
32
+
33
+ ### Context: Operational tracking
34
+ - **Trigger**: A work block is about to start, resume, or close.
35
+ - **Skill**: No external skill.
36
+ - **Action**: Run `trackops status`, take the next task with `trackops next`, use `ops/contract/operating-contract.json` as the machine contract, and keep `ops/project_control.json` as the backlog source of truth.
27
37
 
28
38
  ## Adding New Rules
29
39
 
@@ -0,0 +1,18 @@
1
+ # Delivery Audit
2
+
3
+ ## Scope
4
+
5
+ Review the final output shape against the active templates and compiled contract.
6
+
7
+ ## Checklist
8
+
9
+ - `ops/genesis.md` matches the current contract.
10
+ - `ops/task_plan.md`, `ops/progress.md` and `ops/findings.md` are synchronized.
11
+ - Public copy matches runtime behavior.
12
+ - API and dashboard reflect the same operational state.
13
+ - Visual review completed when a UI change exists.
14
+
15
+ ## Result
16
+
17
+ - Status: pending review
18
+ - Notes: replace this section with project-specific evidence.
@@ -0,0 +1,18 @@
1
+ # Integration Audit
2
+
3
+ ## Scope
4
+
5
+ Review credentials, connectivity assumptions and external response shapes before expanding delivery.
6
+
7
+ ## Checklist
8
+
9
+ - Required keys identified from the contract and environment contract.
10
+ - Missing keys documented without exposing secret values.
11
+ - External services listed in the contract.
12
+ - Response shapes aligned with `ops/contract/operating-contract.json`.
13
+ - Findings recorded in `ops/findings.md` when applicable.
14
+
15
+ ## Result
16
+
17
+ - Status: pending review
18
+ - Notes: replace this section with project-specific evidence.
@@ -15,15 +15,25 @@ Este archivo define las reglas de enrutamiento entre el agente principal y las s
15
15
  - **Skill**: `changelog-updater`
16
16
  - **Acción**: Ejecuta el script de actualización del changelog.
17
17
 
18
- ### Contexto: Inicialización de proyecto
19
- - **Trigger**: El usuario quiere crear un nuevo proyecto.
20
- - **Skill**: `project-starter-skill` (global)
21
- - **Acción**: Ejecutar el protocolo de inicialización completo.
18
+ ### Contexto: Arranque asistido del proyecto
19
+ - **Trigger**: El usuario tiene una idea, una especificación parcial o TrackOps ha generado `ops/bootstrap/agent-handoff.md`.
20
+ - **Skill**: `project-starter-skill`
21
+ - **Acción**: Convertir el contexto del usuario en `ops/bootstrap/intake.json`, `ops/bootstrap/spec-dossier.md` y `ops/bootstrap/open-questions.md` cuando haga falta.
22
+
23
+ ### Contexto: Auditoria del contrato
24
+ - **Trigger**: Existe `ops/contract/operating-contract.json` o `ops/bootstrap/quality-report.json` y hay dudas sobre huecos o contradicciones.
25
+ - **Skill**: `opera-contract-auditor`
26
+ - **Acción**: Auditar consistencia, huecos y pseudoprecision antes de seguir ejecutando.
27
+
28
+ ### Contexto: Riesgo operativo
29
+ - **Trigger**: La accion afecta datos persistentes, despliegues, efectos externos o permisos sensibles.
30
+ - **Skill**: `opera-policy-guard`
31
+ - **Acción**: Consultar `ops/policy/autonomy.json` y decidir si hace falta aprobacion explicita.
22
32
 
23
33
  ### Contexto: Seguimiento operativo
24
34
  - **Trigger**: Se va a empezar, retomar o cerrar un bloque de trabajo.
25
35
  - **Skill**: No aplica skill externa.
26
- - **Acción**: Ejecutar `trackops status`, tomar la siguiente tarea con `trackops next` y mantener `project_control.json` como fuente de verdad operativa.
36
+ - **Acción**: Ejecutar `trackops status`, tomar la siguiente tarea con `trackops next`, usar `ops/contract/operating-contract.json` como contrato de maquina y mantener `ops/project_control.json` como fuente de verdad operativa del backlog.
27
37
 
28
38
  ## Cómo Añadir Nuevas Reglas
29
39
 
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: "opera-contract-auditor"
3
+ description: "Skill para auditar el contrato operativo de OPERA, detectar huecos, contradicciones y pseudoprecision antes de seguir ejecutando."
4
+ metadata:
5
+ version: "1.0"
6
+ type: "project"
7
+ ---
8
+
9
+ # OPERA Contract Auditor
10
+
11
+ Usa esta skill cuando exista `ops/contract/operating-contract.json` o cuando OPERA haya dejado `ops/bootstrap/quality-report.json`.
12
+
13
+ ## Objetivo
14
+
15
+ Validar si el contrato operativo ya es suficientemente coherente para pasar de discovery a ejecucion.
16
+
17
+ ## Debes revisar
18
+
19
+ - `ops/contract/operating-contract.json`
20
+ - `ops/bootstrap/quality-report.json`
21
+ - `ops/bootstrap/open-questions.md`
22
+ - `ops/genesis.md`
23
+
24
+ ## Checklist minimo
25
+
26
+ - el problema y el usuario objetivo estan definidos
27
+ - el resultado singular deseado es verificable
28
+ - la fuente de verdad esta clara
29
+ - input y output schema no se contradicen
30
+ - no hay reglas de comportamiento ambiguas
31
+ - las integraciones externas son coherentes con el contrato
32
+ - las preguntas abiertas siguen abiertas de forma explicita o estan resueltas
33
+
34
+ ## Salida esperada
35
+
36
+ - identificar contradicciones o lagunas concretas
37
+ - proponer solo las correcciones necesarias
38
+ - no inventar decisiones de negocio no confirmadas
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: "opera-contract-auditor"
3
+ description: "Skill for auditing the OPERA operating contract, spotting gaps, contradictions, and false precision before execution continues."
4
+ metadata:
5
+ version: "1.0"
6
+ type: "project"
7
+ ---
8
+
9
+ # OPERA Contract Auditor
10
+
11
+ Use this skill when `ops/contract/operating-contract.json` already exists or when OPERA has produced `ops/bootstrap/quality-report.json`.
12
+
13
+ ## Goal
14
+
15
+ Validate whether the operating contract is coherent enough to move from discovery into execution.
16
+
17
+ ## Review these files
18
+
19
+ - `ops/contract/operating-contract.json`
20
+ - `ops/bootstrap/quality-report.json`
21
+ - `ops/bootstrap/open-questions.md`
22
+ - `ops/genesis.md`
23
+
24
+ ## Minimum checklist
25
+
26
+ - the problem and target user are defined
27
+ - the singular desired outcome is verifiable
28
+ - the source of truth is clear
29
+ - input and output schema do not contradict each other
30
+ - behavior rules are not ambiguous
31
+ - external integrations match the contract
32
+ - open questions are either explicitly open or clearly resolved
33
+
34
+ ## Expected output
35
+
36
+ - identify concrete contradictions or gaps
37
+ - propose only the corrections that are actually needed
38
+ - do not invent unconfirmed business decisions
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: "opera-policy-guard"
3
+ description: "Skill para interpretar la politica ejecutable de OPERA y decidir que acciones requieren aprobacion explicita."
4
+ metadata:
5
+ version: "1.0"
6
+ type: "project"
7
+ ---
8
+
9
+ # OPERA Policy Guard
10
+
11
+ Usa esta skill cuando vayas a ejecutar acciones con riesgo operativo, efectos externos o cambios destructivos.
12
+
13
+ ## Fuente principal
14
+
15
+ - `ops/policy/autonomy.json`
16
+
17
+ ## Debes responder
18
+
19
+ - si la accion es verde, amarilla o roja
20
+ - si requiere aprobacion explicita
21
+ - que efecto externo produce
22
+ - que alternativa segura existe si no hay permiso
23
+
24
+ ## Regla
25
+
26
+ Si la politica deja dudas, no asumas permiso. Marca la accion como bloqueada hasta aclararlo.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: "opera-policy-guard"
3
+ description: "Skill for interpreting the OPERA executable policy and deciding which actions require explicit approval."
4
+ metadata:
5
+ version: "1.0"
6
+ type: "project"
7
+ ---
8
+
9
+ # OPERA Policy Guard
10
+
11
+ Use this skill before actions with operational risk, external side effects, or destructive changes.
12
+
13
+ ## Primary source
14
+
15
+ - `ops/policy/autonomy.json`
16
+
17
+ ## You must answer
18
+
19
+ - whether the action is green, yellow, or red
20
+ - whether it requires explicit approval
21
+ - what external side effect it causes
22
+ - what safe alternative exists if approval is missing
23
+
24
+ ## Rule
25
+
26
+ If the policy is ambiguous, do not assume permission. Mark the action as blocked until it is clarified.