agentic-orchestrator 0.1.4 → 0.1.6

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 (108) hide show
  1. package/.claude/settings.local.json +6 -1
  2. package/README.md +81 -54
  3. package/agentic/orchestrator/defaults/policy.defaults.yaml +212 -0
  4. package/agentic/orchestrator/schemas/adapters.schema.json +17 -4
  5. package/agentic/orchestrator/schemas/agents.schema.json +58 -13
  6. package/agentic/orchestrator/schemas/gates.schema.json +88 -17
  7. package/agentic/orchestrator/schemas/index.schema.json +172 -37
  8. package/agentic/orchestrator/schemas/multi-project.schema.json +85 -17
  9. package/agentic/orchestrator/schemas/plan.schema.json +135 -30
  10. package/agentic/orchestrator/schemas/policy.schema.json +198 -69
  11. package/agentic/orchestrator/schemas/policy.user.schema.json +165 -0
  12. package/agentic/orchestrator/schemas/qa_test_index.schema.json +71 -14
  13. package/agentic/orchestrator/schemas/state.schema.json +196 -39
  14. package/apps/control-plane/scripts/validate-architecture-rules.mjs +5 -3
  15. package/apps/control-plane/scripts/validate-docker-mcp-contract.mjs +0 -3
  16. package/apps/control-plane/scripts/validate-mcp-contracts.ts +2 -6
  17. package/apps/control-plane/src/application/services/policy-loader-service.ts +115 -0
  18. package/apps/control-plane/src/cli/aop.ts +35 -1
  19. package/apps/control-plane/src/cli/cli-argument-parser.ts +4 -0
  20. package/apps/control-plane/src/cli/help-command-handler.ts +2 -1
  21. package/apps/control-plane/src/cli/init-command-handler.ts +136 -27
  22. package/apps/control-plane/src/cli/retry-command-handler.ts +3 -6
  23. package/apps/control-plane/src/cli/types.ts +1 -0
  24. package/apps/control-plane/src/core/git.ts +1 -3
  25. package/apps/control-plane/src/core/kernel.ts +3 -6
  26. package/apps/control-plane/src/core/schemas.ts +36 -1
  27. package/apps/control-plane/src/interfaces/cli/bootstrap.ts +1 -1
  28. package/apps/control-plane/src/mcp/tool-registry-loader.ts +37 -1
  29. package/apps/control-plane/src/supervisor/qa-wave-executor.ts +1 -1
  30. package/apps/control-plane/test/aop.spec.ts +37 -0
  31. package/apps/control-plane/test/batch-operations.spec.ts +5 -3
  32. package/apps/control-plane/test/bootstrap-attach.spec.ts +28 -18
  33. package/apps/control-plane/test/bootstrap-edge-cases.spec.ts +25 -15
  34. package/apps/control-plane/test/bootstrap.spec.ts +30 -22
  35. package/apps/control-plane/test/cli.unit.spec.ts +55 -10
  36. package/apps/control-plane/test/core-utils.spec.ts +12 -3
  37. package/apps/control-plane/test/feature-deletion-service.spec.ts +2 -1
  38. package/apps/control-plane/test/feature-lifecycle.spec.ts +1 -1
  39. package/apps/control-plane/test/helpers.ts +22 -2
  40. package/apps/control-plane/test/init-wizard.spec.ts +160 -7
  41. package/apps/control-plane/test/issue-tracker.spec.ts +3 -3
  42. package/apps/control-plane/test/kernel.spec.ts +62 -0
  43. package/apps/control-plane/test/lock-service.spec.ts +4 -4
  44. package/apps/control-plane/test/policy-loader-service.spec.ts +346 -0
  45. package/apps/control-plane/test/reactions.spec.ts +8 -6
  46. package/apps/control-plane/test/resume-command.spec.ts +31 -15
  47. package/apps/control-plane/test/supervisor.unit.spec.ts +2 -2
  48. package/apps/control-plane/test/tool-registry-loader.spec.ts +12 -0
  49. package/apps/control-plane/vitest.config.ts +1 -1
  50. package/dist/apps/control-plane/application/services/policy-loader-service.d.ts +24 -0
  51. package/dist/apps/control-plane/application/services/policy-loader-service.js +90 -0
  52. package/dist/apps/control-plane/application/services/policy-loader-service.js.map +1 -0
  53. package/dist/apps/control-plane/application/tools/tool-metadata.js +1 -0
  54. package/dist/apps/control-plane/application/tools/tool-metadata.js.map +1 -1
  55. package/dist/apps/control-plane/cli/aop.js +33 -1
  56. package/dist/apps/control-plane/cli/aop.js.map +1 -1
  57. package/dist/apps/control-plane/cli/cli-argument-parser.js +4 -0
  58. package/dist/apps/control-plane/cli/cli-argument-parser.js.map +1 -1
  59. package/dist/apps/control-plane/cli/dashboard-command-handler.js +11 -5
  60. package/dist/apps/control-plane/cli/dashboard-command-handler.js.map +1 -1
  61. package/dist/apps/control-plane/cli/help-command-handler.js +5 -4
  62. package/dist/apps/control-plane/cli/help-command-handler.js.map +1 -1
  63. package/dist/apps/control-plane/cli/init-command-handler.d.ts +1 -0
  64. package/dist/apps/control-plane/cli/init-command-handler.js +110 -26
  65. package/dist/apps/control-plane/cli/init-command-handler.js.map +1 -1
  66. package/dist/apps/control-plane/cli/retry-command-handler.js +3 -6
  67. package/dist/apps/control-plane/cli/retry-command-handler.js.map +1 -1
  68. package/dist/apps/control-plane/cli/types.d.ts +1 -0
  69. package/dist/apps/control-plane/core/git.js +1 -3
  70. package/dist/apps/control-plane/core/git.js.map +1 -1
  71. package/dist/apps/control-plane/core/kernel.js +3 -5
  72. package/dist/apps/control-plane/core/kernel.js.map +1 -1
  73. package/dist/apps/control-plane/core/schemas.d.ts +2 -0
  74. package/dist/apps/control-plane/core/schemas.js +31 -1
  75. package/dist/apps/control-plane/core/schemas.js.map +1 -1
  76. package/dist/apps/control-plane/interfaces/cli/bootstrap.js +1 -1
  77. package/dist/apps/control-plane/interfaces/cli/bootstrap.js.map +1 -1
  78. package/dist/apps/control-plane/mcp/tool-registry-loader.d.ts +2 -0
  79. package/dist/apps/control-plane/mcp/tool-registry-loader.js +31 -1
  80. package/dist/apps/control-plane/mcp/tool-registry-loader.js.map +1 -1
  81. package/dist/apps/control-plane/supervisor/build-wave-executor.js +1 -1
  82. package/dist/apps/control-plane/supervisor/build-wave-executor.js.map +1 -1
  83. package/dist/apps/control-plane/supervisor/qa-wave-executor.js +1 -1
  84. package/dist/apps/control-plane/supervisor/qa-wave-executor.js.map +1 -1
  85. package/package.json +18 -17
  86. package/packages/web-dashboard/package.json +1 -1
  87. package/packages/web-dashboard/src/app/api/actions/route.ts +2 -2
  88. package/packages/web-dashboard/src/app/api/events/route.ts +1 -1
  89. package/packages/web-dashboard/src/app/api/features/[id]/checkout/route.ts +1 -1
  90. package/packages/web-dashboard/src/app/api/features/[id]/diff/route.ts +1 -1
  91. package/packages/web-dashboard/src/app/api/features/[id]/evidence/[artifact]/route.ts +1 -1
  92. package/packages/web-dashboard/src/app/api/features/[id]/review/route.ts +2 -2
  93. package/packages/web-dashboard/src/app/api/features/[id]/route.ts +1 -1
  94. package/packages/web-dashboard/src/app/api/projects/route.ts +2 -2
  95. package/packages/web-dashboard/src/app/api/status/route.ts +1 -1
  96. package/packages/web-dashboard/src/app/page.tsx +1 -1
  97. package/packages/web-dashboard/src/lib/aop-client.ts +1 -1
  98. package/packages/web-dashboard/src/lib/orchestrator-tools.ts +1 -1
  99. package/packages/web-dashboard/tsconfig.json +1 -0
  100. package/spec-files/completed/agentic_orchestrator_init_policy_ux_simplification_spec.md +481 -0
  101. package/spec-files/outstanding/agentic_orchestrator_artifact_database_publishing_spec.md +500 -0
  102. package/spec-files/outstanding/agentic_orchestrator_observability_integrity_diagnostics_spec.md +500 -195
  103. package/spec-files/outstanding/agentic_orchestrator_performance_improvements_spec.md +471 -162
  104. package/spec-files/outstanding/agentic_orchestrator_planning_review_quality_spec.md +532 -268
  105. package/spec-files/outstanding/agentic_orchestrator_productization_commercial_spec.md +645 -0
  106. package/spec-files/progress.md +99 -2
  107. package/tsconfig.base.json +4 -0
  108. /package/spec-files/{outstanding → completed}/agentic_orchestrator_validator_hardening_spec.md +0 -0
@@ -9,7 +9,12 @@
9
9
  "Bash(npx vitest:*)",
10
10
  "Bash(grep:*)",
11
11
  "Bash(ls:*)",
12
- "Bash(wc:*)"
12
+ "Bash(wc:*)",
13
+ "Bash(npm test:*)",
14
+ "Bash(npx eslint:*)",
15
+ "Bash(node:*)",
16
+ "Bash(tsc:*)",
17
+ "Bash(./node_modules/.bin/tsc:*)"
13
18
  ]
14
19
  }
15
20
  }
package/README.md CHANGED
@@ -95,39 +95,42 @@ Agentic-Orchestrator/
95
95
  ├── .aop/
96
96
  │ ├── features/ # runtime-generated feature artifacts
97
97
  │ │ └── index.json # global orchestration index
98
- │ ├── analytics/ # agent performance analytics
99
98
  │ └── runtime/
100
99
  │ └── operation-ledger/
101
100
  ├── agentic/
102
- ├── orchestrator/ # policy/gates/agents config + schemas + prompts
103
- ├── policy.yaml
104
- ├── gates.yaml
105
- ├── agents.yaml
106
- ├── multi-project.yaml # optional multi-project configuration
107
- ├── schemas/
108
- │ └── tools.md
101
+ └── orchestrator/ # policy/gates/agents config + schemas + prompts + tools
102
+ ├── policy.yaml
103
+ ├── gates.yaml
104
+ ├── agents.yaml
105
+ ├── adapters.yaml
106
+ ├── defaults/
107
+ │ └── policy.defaults.yaml # bundled canonical policy defaults (deep-merged at runtime)
108
+ │ ├── schemas/ # JSON schemas (policy, state, plan, gates, agents, etc.)
109
+ │ ├── prompts/ # role-specific system prompts
110
+ │ └── tools/ # MCP tool contracts: catalog.json, per-tool input/output schemas
109
111
  ├── apps/
110
112
  │ └── control-plane/
111
113
  │ ├── src/
112
114
  │ │ ├── cli/ # aop CLI commands and handlers
113
- │ │ ├── core/ # deterministic kernel
115
+ │ │ ├── core/ # deterministic kernel (kernel.ts, schemas.ts)
114
116
  │ │ ├── application/
115
- │ │ │ └── services/ # domain services (cost, reactions, pr-monitor, etc.)
117
+ │ │ │ └── services/ # 20+ domain services (plan, patch, gates, locks, policy-loader, etc.)
118
+ │ │ ├── interfaces/
119
+ │ │ │ └── cli/ # bootstrap.ts — CLI command dispatch
120
+ │ │ ├── mcp/ # MCP tool runtime and tool-registry-loader
116
121
  │ │ ├── providers/ # provider resolution + adapter
117
122
  │ │ └── supervisor/ # runtime orchestration loop
118
- │ ├── test/ # Vitest suites (68 files / 899 tests)
123
+ │ ├── test/ # Vitest suites (71 files / 1155 tests)
119
124
  │ ├── project.json # Nx targets
120
125
  │ └── vitest.config.ts
121
- ├── packages/
122
- │ └── web-dashboard/ # Next.js 14 web dashboard (aop dashboard)
123
126
  ├── docker/
124
127
  │ ├── mcp.Dockerfile
125
128
  │ ├── mcp.entrypoint.sh
126
129
  │ └── mcp.compose.yaml
127
130
  ├── spec-files/
128
- │ ├── agentic_orchestrator_spec.md
129
- │ ├── agentic_orchestrator_feature_gaps_closure_spec.md
130
- │ └── progress.md # implementation continuity log
131
+ │ ├── completed/ # completed spec files
132
+ │ ├── outstanding/ # pending / in-progress specs
133
+ │ └── progress.md # implementation continuity log
131
134
  └── README.md
132
135
  ```
133
136
 
@@ -373,19 +376,43 @@ When `cleanup.auto_after_merge` is enabled in `policy.yaml`, the runtime automat
373
376
 
374
377
  ### `init`
375
378
 
376
- Initialises agentic orchestrator configuration in the current directory. Generates `policy.yaml`, `gates.yaml`, `agents.yaml`, and system prompt templates.
379
+ Initialises agentic orchestrator configuration in the current directory. Generates `policy.yaml`, `gates.yaml`, `agents.yaml`, `adapters.yaml`, and system prompt templates. The wizard also captures default agent `provider`/`model` and `scm-provider`.
380
+
381
+ Schema files are bundled with AOP and validated from the installation path; `aop init` does not copy schemas into the target repository.
377
382
 
378
383
  ```bash
379
- # Interactive wizard
384
+ # Interactive wizard (generates lean policy.yaml with common controls only)
380
385
  aop init
381
386
 
382
- # Non-interactive (all defaults)
387
+ # Non-interactive (all defaults, lean policy)
383
388
  aop init --auto
384
389
 
390
+ # Generate full explicit policy.yaml with all advanced controls
391
+ aop init --advanced-policy
392
+
393
+ # Non-interactive with full policy
394
+ aop init --auto --advanced-policy
395
+
385
396
  # Overwrite existing configuration
386
397
  aop init --force
387
398
  ```
388
399
 
400
+ #### Policy Modes
401
+
402
+ **Lean policy (default):** `aop init` emits a minimal `policy.yaml` containing only the common controls users typically customise — `worktree.base_branch`, `supervisor.max_parallel_gate_runs`, `dashboard`, `merge_policy`, `notifications`, and `recovery`. All other fields (RBAC, locks, execution, implementation constraints, etc.) are provided by the bundled `policy.defaults.yaml` at runtime.
403
+
404
+ **Full policy (`--advanced-policy`):** Generates the complete `policy.yaml` with all controls expanded, useful for teams that need to audit or customise advanced settings.
405
+
406
+ #### Runtime Policy Composition
407
+
408
+ At runtime the kernel always composes a canonical full policy by:
409
+ 1. Loading bundled `agentic/orchestrator/defaults/policy.defaults.yaml`
410
+ 2. Loading `agentic/orchestrator/policy.yaml` from your repository
411
+ 3. Deep-merging user overrides over defaults (scalars replace, objects merge, arrays replace wholesale)
412
+ 4. Validating the merged result against the full `policy.schema.json`
413
+
414
+ Existing repositories with full `policy.yaml` files continue to work without changes — user values override defaults entirely.
415
+
389
416
  ### `dashboard`
390
417
 
391
418
  Starts the web dashboard server (`packages/web-dashboard/`). Provides a real-time Kanban view of all features, review approval/denial, checkout, and SSE-based live updates.
@@ -680,41 +707,41 @@ The MCP contracts validator checks: protocol pinning, `catalog.json`/`tools.md`/
680
707
 
681
708
  ### Tool definitions
682
709
 
683
- | Tool | Purpose | Mutates state/files | Typical caller role(s) |
684
- |--------------------------|------------------------------------------------------------------------|---------------------|----------------------------------------|
685
- | `feature.discover_specs` | Discover canonical `spec.md` files under `.aop/features/*` | No | orchestrator, system |
686
- | `feature.init` | Initialize feature folder/state and ensure branch/worktree | Yes | orchestrator, system |
687
- | `feature.get_context` | Return spec + state + plan + latest evidence + QA index bundle | No | orchestrator, planner, builder, qa |
688
- | `feature.state_get` | Read parsed state front matter/body | No | orchestrator/planner/builder/qa/system |
689
- | `feature.state_patch` | Patch canonical feature state with version guard | Yes | orchestrator, system |
690
- | `feature.log_append` | Append stamped note to feature decision log | Yes | orchestrator, system |
691
- | `plan.submit` | Validate and accept initial plan (schema/policy/lock/collision checks) | Yes | orchestrator, planner |
692
- | `plan.get` | Get accepted plan | No | orchestrator, planner, builder, qa |
693
- | `plan.update` | Submit versioned plan revision (`+1` version) with full revalidation | Yes | orchestrator, planner |
694
- | `repo.ensure_worktree` | Ensure feature branch + worktree exist | Yes | orchestrator, system |
695
- | `repo.apply_patch` | Apply unified diff with plan/policy/path/lock enforcement | Yes | builder, qa, orchestrator |
696
- | `repo.status` | Return porcelain status from feature worktree | No | builder, orchestrator |
697
- | `repo.diff` | Return git diff for feature worktree | No | builder, qa, orchestrator |
698
- | `repo.read_file` | Read file content from feature worktree path | No | planner, builder, qa, orchestrator |
699
- | `repo.search` | Repo-safe text search (`rg`) in feature worktree | No | planner, builder, qa, orchestrator |
700
- | `repo.diff_bundle` | Return review bundle (stat/full diff/files/latest gate summary) | No | orchestrator |
701
- | `feature.ready_to_merge` | Commit + merge promotion after required gates and approval checks | Yes | orchestrator, system |
702
- | `feature.delete` | Delete feature runtime artifacts and optional local git/worktree state | Yes | orchestrator, system |
703
- | `feature.send_message` | Send a message to the active agent session for a feature | Yes | orchestrator, system |
704
- | `gates.list` | List available gate profiles/modes | No | orchestrator, builder, qa |
705
- | `gates.run` | Execute gate profile/mode, capture logs/evidence, enforce thresholds | Yes | builder, qa, orchestrator |
706
- | `evidence.latest` | Return latest evidence summary for feature | No | qa, orchestrator |
707
- | `qa.test_index_get` | Return QA index + pending obligations summary | No | qa, orchestrator |
708
- | `qa.test_index_update` | Update QA hunk statuses with version guard and evidence refs | Yes | qa, orchestrator, system |
709
- | `locks.acquire` | Acquire/renew resource lease lock for feature | Yes | orchestrator, system |
710
- | `locks.release` | Release held resource lock | Yes | orchestrator, system |
711
- | `collisions.scan` | Compute collision matrix across accepted plans | No | planner, orchestrator |
712
- | `report.dashboard` | Return global orchestration summary (includes cost and PR metadata) | No | orchestrator |
713
- | `report.feature_summary` | Return per-feature state/diff/evidence summary | No | orchestrator |
714
- | `cost.record` | Record a cost entry for a feature (token usage, API cost) | Yes | orchestrator, system |
715
- | `cost.get` | Return accumulated cost for a feature | No | orchestrator, system |
716
- | `performance.record_outcome` | Record feature outcome (status, retries, duration, cost) for analytics | Yes | orchestrator, system |
717
- | `performance.get_analytics` | Return aggregated performance metrics by provider/model | No | orchestrator, system |
710
+ | Tool | Purpose | Mutates state/files | Typical caller role(s) |
711
+ |------------------------------|------------------------------------------------------------------------|---------------------|----------------------------------------|
712
+ | `feature.discover_specs` | Discover canonical `spec.md` files under `.aop/features/*` | No | orchestrator, system |
713
+ | `feature.init` | Initialize feature folder/state and ensure branch/worktree | Yes | orchestrator, system |
714
+ | `feature.get_context` | Return spec + state + plan + latest evidence + QA index bundle | No | orchestrator, planner, builder, qa |
715
+ | `feature.state_get` | Read parsed state front matter/body | No | orchestrator/planner/builder/qa/system |
716
+ | `feature.state_patch` | Patch canonical feature state with version guard | Yes | orchestrator, system |
717
+ | `feature.log_append` | Append stamped note to feature decision log | Yes | orchestrator, system |
718
+ | `plan.submit` | Validate and accept initial plan (schema/policy/lock/collision checks) | Yes | orchestrator, planner |
719
+ | `plan.get` | Get accepted plan | No | orchestrator, planner, builder, qa |
720
+ | `plan.update` | Submit versioned plan revision (`+1` version) with full revalidation | Yes | orchestrator, planner |
721
+ | `repo.ensure_worktree` | Ensure feature branch + worktree exist | Yes | orchestrator, system |
722
+ | `repo.apply_patch` | Apply unified diff with plan/policy/path/lock enforcement | Yes | builder, qa, orchestrator |
723
+ | `repo.status` | Return porcelain status from feature worktree | No | builder, orchestrator |
724
+ | `repo.diff` | Return git diff for feature worktree | No | builder, qa, orchestrator |
725
+ | `repo.read_file` | Read file content from feature worktree path | No | planner, builder, qa, orchestrator |
726
+ | `repo.search` | Repo-safe text search (`rg`) in feature worktree | No | planner, builder, qa, orchestrator |
727
+ | `repo.diff_bundle` | Return review bundle (stat/full diff/files/latest gate summary) | No | orchestrator |
728
+ | `feature.ready_to_merge` | Commit + merge promotion after required gates and approval checks | Yes | orchestrator, system |
729
+ | `feature.delete` | Delete feature runtime artifacts and optional local git/worktree state | Yes | orchestrator, system |
730
+ | `feature.send_message` | Send a message to the active agent session for a feature | Yes | orchestrator, system |
731
+ | `gates.list` | List available gate profiles/modes | No | orchestrator, builder, qa |
732
+ | `gates.run` | Execute gate profile/mode, capture logs/evidence, enforce thresholds | Yes | builder, qa, orchestrator |
733
+ | `evidence.latest` | Return latest evidence summary for feature | No | qa, orchestrator |
734
+ | `qa.test_index_get` | Return QA index + pending obligations summary | No | qa, orchestrator |
735
+ | `qa.test_index_update` | Update QA hunk statuses with version guard and evidence refs | Yes | qa, orchestrator, system |
736
+ | `locks.acquire` | Acquire/renew resource lease lock for feature | Yes | orchestrator, system |
737
+ | `locks.release` | Release held resource lock | Yes | orchestrator, system |
738
+ | `collisions.scan` | Compute collision matrix across accepted plans | No | planner, orchestrator |
739
+ | `report.dashboard` | Return global orchestration summary (includes cost and PR metadata) | No | orchestrator |
740
+ | `report.feature_summary` | Return per-feature state/diff/evidence summary | No | orchestrator |
741
+ | `cost.record` | Record a cost entry for a feature (token usage, API cost) | Yes | orchestrator, system |
742
+ | `cost.get` | Return accumulated cost for a feature | No | orchestrator, system |
743
+ | `performance.record_outcome` | Record feature outcome (status, retries, duration, cost) for analytics | Yes | orchestrator, system |
744
+ | `performance.get_analytics` | Return aggregated performance metrics by provider/model | No | orchestrator, system |
718
745
 
719
746
  ### Role expectations at a glance
720
747
 
@@ -0,0 +1,212 @@
1
+ # Canonical bundled policy defaults for AOP.
2
+ # These values are merged with the user's policy.yaml at runtime.
3
+ # User values override these defaults (scalars replace, objects merge recursively, arrays replace).
4
+ # Do not edit this file in user repos — it is a bundled AOP artifact.
5
+ version: 1
6
+ commit_policy:
7
+ allow_commit: false
8
+ allow_merge: false
9
+ patch_policy:
10
+ enforce_plan: true
11
+ enforce_allowed_areas: true
12
+ locks:
13
+ resources:
14
+ - openapi
15
+ - events
16
+ - db_migrations
17
+ contract_to_resource:
18
+ openapi: openapi
19
+ events: events
20
+ db: db_migrations
21
+ lease_ttl_seconds: 300
22
+ acquire_behavior: wait
23
+ default_wait_timeout_seconds: 300
24
+ acquire_backoff:
25
+ initial_ms: 200
26
+ max_ms: 5000
27
+ multiplier: 2
28
+ jitter_ms: 150
29
+ protected_areas:
30
+ - agentic/orchestrator/policy.yaml
31
+ required_modes:
32
+ - fast
33
+ - full
34
+ required_merge_mode: merge
35
+ collision_policy: reject
36
+ config_precedence:
37
+ policy_hard_constraints:
38
+ - execution.default_step_timeout_seconds
39
+ - testing.coverage.minimums
40
+ - testing.coverage.targets
41
+ gates_profile_defaults:
42
+ - profiles
43
+ plan_verification_overrides:
44
+ - verification_overrides
45
+ path_rules:
46
+ matching: repo_prefix
47
+ normalize_paths: true
48
+ allow_symlink_traversal: false
49
+ execution:
50
+ default_step_timeout_seconds: 600
51
+ retry_policy:
52
+ transient_max_retries: 1
53
+ transient_error_codes:
54
+ - 124
55
+ non_retryable_error_codes:
56
+ - 2
57
+ - 126
58
+ - 127
59
+ env_allowlist:
60
+ - PATH
61
+ - HOME
62
+ implementation:
63
+ workspace: nx
64
+ testing:
65
+ framework: vitest
66
+ coverage:
67
+ minimums:
68
+ line: 0.7
69
+ branch: 0.7
70
+ targets:
71
+ line: 1.0
72
+ branch: 1.0
73
+ merge_policy:
74
+ require_user_approval: true
75
+ allowed_strategies:
76
+ - merge_commit
77
+ - squash
78
+ - rebase
79
+ worktree:
80
+ base_branch: main
81
+ rbac:
82
+ orchestrator:
83
+ - feature.discover_specs
84
+ - feature.init
85
+ - feature.get_context
86
+ - feature.state_get
87
+ - feature.state_patch
88
+ - feature.log_append
89
+ - plan.submit
90
+ - plan.get
91
+ - plan.update
92
+ - repo.ensure_worktree
93
+ - repo.apply_patch
94
+ - repo.status
95
+ - repo.diff
96
+ - repo.read_file
97
+ - repo.search
98
+ - repo.diff_bundle
99
+ - gates.list
100
+ - gates.run
101
+ - evidence.latest
102
+ - qa.test_index_get
103
+ - qa.test_index_update
104
+ - locks.acquire
105
+ - locks.release
106
+ - collisions.scan
107
+ - report.dashboard
108
+ - report.feature_summary
109
+ - feature.ready_to_merge
110
+ - feature.delete
111
+ - feature.send_message
112
+ - cost.record
113
+ - cost.get
114
+ - performance.record_outcome
115
+ - performance.get_analytics
116
+ planner:
117
+ - feature.get_context
118
+ - feature.state_get
119
+ - plan.submit
120
+ - plan.update
121
+ - collisions.scan
122
+ - repo.read_file
123
+ - repo.search
124
+ - performance.get_analytics
125
+ builder:
126
+ - feature.get_context
127
+ - feature.state_get
128
+ - repo.apply_patch
129
+ - repo.status
130
+ - repo.diff
131
+ - repo.read_file
132
+ - repo.search
133
+ - gates.run
134
+ - performance.get_analytics
135
+ qa:
136
+ - feature.get_context
137
+ - feature.state_get
138
+ - repo.apply_patch
139
+ - repo.diff
140
+ - repo.read_file
141
+ - repo.search
142
+ - gates.run
143
+ - evidence.latest
144
+ - qa.test_index_get
145
+ - qa.test_index_update
146
+ - performance.get_analytics
147
+ system:
148
+ - "*"
149
+ recovery:
150
+ orchestrator_session_reattach_timeout_ms: 5000
151
+ orphan_session_cleanup_enabled: true
152
+ supervisor:
153
+ max_iterations_per_phase: 6
154
+ max_parallel_gate_runs: 2
155
+ agent_idle_threshold_ms: 300000
156
+ cleanup:
157
+ auto_after_merge: false
158
+ grace_period_seconds: 3600
159
+ dashboard:
160
+ enabled: true
161
+ port: 3000
162
+ notifications:
163
+ enabled: false
164
+ channels:
165
+ desktop:
166
+ enabled: false
167
+ slack:
168
+ enabled: false
169
+ webhook: ""
170
+ channel: "#aop-alerts"
171
+ webhook:
172
+ enabled: false
173
+ url: ""
174
+ routing:
175
+ critical:
176
+ - desktop
177
+ - slack
178
+ warning:
179
+ - slack
180
+ - desktop
181
+ info:
182
+ - slack
183
+ reactions:
184
+ gate_failed:
185
+ enabled: true
186
+ max_retries: 2
187
+ action: retry_with_agent_repair
188
+ escalate_after: 2
189
+ retry_delay_ms: 30000
190
+ agent_stuck:
191
+ enabled: true
192
+ action: notify_only
193
+ idle_threshold_ms: 300000
194
+ escalate_after: 2
195
+ collision_detected:
196
+ enabled: true
197
+ action: notify_only
198
+ ready_to_merge:
199
+ enabled: true
200
+ action: notify_only
201
+ changes_requested:
202
+ enabled: false
203
+ action: send_review_context_to_agent
204
+ escalate_after: 2
205
+ budget:
206
+ per_feature_limit_usd: 50.00
207
+ alert_threshold: 0.8
208
+ issue_tracker:
209
+ enabled: false
210
+ type: github
211
+ config:
212
+ repo: ""
@@ -1,12 +1,25 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://example.local/agentic/adapters.schema.json",
4
+ "description": "Adapter slot assignments for the orchestrator. Each field names a registered adapter implementation to use for that slot. Loaded from agentic/orchestrator/adapters.yaml.",
4
5
  "type": "object",
5
6
  "additionalProperties": false,
6
7
  "properties": {
7
- "notification-channel": { "type": "string" },
8
- "scm-provider": { "type": "string" },
9
- "issue-tracker": { "type": "string" },
10
- "activity-detector": { "type": "string" }
8
+ "notification-channel": {
9
+ "type": "string",
10
+ "description": "Name of the registered adapter used to deliver notifications (e.g. 'slack', 'desktop'). Resolved against the adapter registry at supervisor startup."
11
+ },
12
+ "scm-provider": {
13
+ "type": "string",
14
+ "description": "Name of the registered source control adapter (e.g. 'github'). Used by PrMonitorService for PR creation, status polling, and merge operations."
15
+ },
16
+ "issue-tracker": {
17
+ "type": "string",
18
+ "description": "Name of the registered issue tracker adapter (e.g. 'github', 'linear', 'jira'). Used when issue_tracker.enabled is true in policy."
19
+ },
20
+ "activity-detector": {
21
+ "type": "string",
22
+ "description": "Name of the adapter used to detect agent activity from session output logs (e.g. 'claude-jsonl'). Defaults to 'claude-jsonl' if not specified."
23
+ }
11
24
  }
12
25
  }
@@ -1,45 +1,88 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://example.local/agentic/agents.schema.json",
4
+ "description": "Agent role and runtime provider configuration for the Agentic Orchestrator.",
4
5
  "type": "object",
5
- "required": ["version", "roles"],
6
+ "required": [
7
+ "version",
8
+ "roles"
9
+ ],
6
10
  "additionalProperties": false,
7
11
  "properties": {
8
- "version": { "type": "number" },
12
+ "version": {
13
+ "type": "number",
14
+ "description": "Schema version number for this agents configuration file."
15
+ },
9
16
  "roles": {
10
17
  "type": "object",
11
- "required": ["planner", "builder", "qa"],
18
+ "description": "Per-role prompt configuration keyed by role name (planner, builder, qa).",
19
+ "required": [
20
+ "planner",
21
+ "builder",
22
+ "qa"
23
+ ],
12
24
  "properties": {
13
- "planner": { "$ref": "#/$defs/roleCfg" },
14
- "builder": { "$ref": "#/$defs/roleCfg" },
15
- "qa": { "$ref": "#/$defs/roleCfg" }
25
+ "planner": {
26
+ "$ref": "#/$defs/roleCfg",
27
+ "description": "Configuration for the planner agent role."
28
+ },
29
+ "builder": {
30
+ "$ref": "#/$defs/roleCfg",
31
+ "description": "Configuration for the builder agent role."
32
+ },
33
+ "qa": {
34
+ "$ref": "#/$defs/roleCfg",
35
+ "description": "Configuration for the QA agent role."
36
+ }
16
37
  }
17
38
  },
18
39
  "missing_prompt_behavior": {
19
40
  "type": "string",
20
- "enum": ["ignore", "error"],
41
+ "description": "What to do when a role's system_prompt_path file cannot be read. 'ignore' silently skips it (role gets no system prompt); 'error' throws MISSING_ROLE_PROMPT and aborts the run.",
42
+ "enum": [
43
+ "ignore",
44
+ "error"
45
+ ],
21
46
  "default": "ignore"
22
47
  },
23
48
  "runtime": {
24
49
  "type": "object",
50
+ "description": "Provider and model settings used to select the AI backend. CLI flags and environment variables (AOP_AGENT_PROVIDER, AOP_AGENT_MODEL) take precedence over these values.",
25
51
  "properties": {
26
52
  "default_provider": {
27
53
  "type": "string",
28
- "enum": ["codex", "claude", "gemini", "custom", "kiro-cli", "copilot"]
54
+ "description": "Default AI provider name (e.g. 'codex', 'claude', 'gemini'). Overridden by --agent-provider CLI flag or AOP_AGENT_PROVIDER env var.",
55
+ "enum": [
56
+ "codex",
57
+ "claude",
58
+ "gemini",
59
+ "custom",
60
+ "kiro-cli",
61
+ "copilot"
62
+ ]
63
+ },
64
+ "default_model": {
65
+ "type": "string",
66
+ "description": "Default model string passed to the provider SDK. Overridden by --agent-model CLI flag or AOP_AGENT_MODEL env var."
29
67
  },
30
- "default_model": { "type": "string" },
31
68
  "default_agent_config": {
32
- "type": "object"
69
+ "type": "object",
70
+ "description": "Default agent configuration object forwarded to the provider SDK when no provider-specific entry exists in provider_configs."
71
+ },
72
+ "provider_config_env": {
73
+ "type": "string",
74
+ "description": "Name of an environment variable whose value is a JSON provider-config blob. Takes lower priority than the CLI flag but higher than this file."
33
75
  },
34
- "provider_config_env": { "type": "string" },
35
76
  "provider_configs": {
36
77
  "type": "object",
78
+ "description": "Per-provider configuration objects keyed by provider name. When the active provider matches a key here its value is used instead of default_agent_config.",
37
79
  "additionalProperties": {
38
80
  "type": "object"
39
81
  }
40
82
  },
41
83
  "role_provider_overrides": {
42
- "type": "object"
84
+ "type": "object",
85
+ "description": "Reserved for future per-role provider overrides. Parsed but not yet consumed by the supervisor."
43
86
  }
44
87
  }
45
88
  }
@@ -47,10 +90,12 @@
47
90
  "$defs": {
48
91
  "roleCfg": {
49
92
  "type": "object",
93
+ "description": "Configuration block shared by all agent roles.",
50
94
  "additionalProperties": false,
51
95
  "properties": {
52
96
  "system_prompt_path": {
53
- "type": "string"
97
+ "type": "string",
98
+ "description": "Repo-relative path to the system prompt file loaded by the supervisor for this role. If missing, behaviour is controlled by missing_prompt_behavior."
54
99
  }
55
100
  }
56
101
  }