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.
- package/.claude/settings.local.json +6 -1
- package/README.md +81 -54
- package/agentic/orchestrator/defaults/policy.defaults.yaml +212 -0
- package/agentic/orchestrator/schemas/adapters.schema.json +17 -4
- package/agentic/orchestrator/schemas/agents.schema.json +58 -13
- package/agentic/orchestrator/schemas/gates.schema.json +88 -17
- package/agentic/orchestrator/schemas/index.schema.json +172 -37
- package/agentic/orchestrator/schemas/multi-project.schema.json +85 -17
- package/agentic/orchestrator/schemas/plan.schema.json +135 -30
- package/agentic/orchestrator/schemas/policy.schema.json +198 -69
- package/agentic/orchestrator/schemas/policy.user.schema.json +165 -0
- package/agentic/orchestrator/schemas/qa_test_index.schema.json +71 -14
- package/agentic/orchestrator/schemas/state.schema.json +196 -39
- package/apps/control-plane/scripts/validate-architecture-rules.mjs +5 -3
- package/apps/control-plane/scripts/validate-docker-mcp-contract.mjs +0 -3
- package/apps/control-plane/scripts/validate-mcp-contracts.ts +2 -6
- package/apps/control-plane/src/application/services/policy-loader-service.ts +115 -0
- package/apps/control-plane/src/cli/aop.ts +35 -1
- package/apps/control-plane/src/cli/cli-argument-parser.ts +4 -0
- package/apps/control-plane/src/cli/help-command-handler.ts +2 -1
- package/apps/control-plane/src/cli/init-command-handler.ts +136 -27
- package/apps/control-plane/src/cli/retry-command-handler.ts +3 -6
- package/apps/control-plane/src/cli/types.ts +1 -0
- package/apps/control-plane/src/core/git.ts +1 -3
- package/apps/control-plane/src/core/kernel.ts +3 -6
- package/apps/control-plane/src/core/schemas.ts +36 -1
- package/apps/control-plane/src/interfaces/cli/bootstrap.ts +1 -1
- package/apps/control-plane/src/mcp/tool-registry-loader.ts +37 -1
- package/apps/control-plane/src/supervisor/qa-wave-executor.ts +1 -1
- package/apps/control-plane/test/aop.spec.ts +37 -0
- package/apps/control-plane/test/batch-operations.spec.ts +5 -3
- package/apps/control-plane/test/bootstrap-attach.spec.ts +28 -18
- package/apps/control-plane/test/bootstrap-edge-cases.spec.ts +25 -15
- package/apps/control-plane/test/bootstrap.spec.ts +30 -22
- package/apps/control-plane/test/cli.unit.spec.ts +55 -10
- package/apps/control-plane/test/core-utils.spec.ts +12 -3
- package/apps/control-plane/test/feature-deletion-service.spec.ts +2 -1
- package/apps/control-plane/test/feature-lifecycle.spec.ts +1 -1
- package/apps/control-plane/test/helpers.ts +22 -2
- package/apps/control-plane/test/init-wizard.spec.ts +160 -7
- package/apps/control-plane/test/issue-tracker.spec.ts +3 -3
- package/apps/control-plane/test/kernel.spec.ts +62 -0
- package/apps/control-plane/test/lock-service.spec.ts +4 -4
- package/apps/control-plane/test/policy-loader-service.spec.ts +346 -0
- package/apps/control-plane/test/reactions.spec.ts +8 -6
- package/apps/control-plane/test/resume-command.spec.ts +31 -15
- package/apps/control-plane/test/supervisor.unit.spec.ts +2 -2
- package/apps/control-plane/test/tool-registry-loader.spec.ts +12 -0
- package/apps/control-plane/vitest.config.ts +1 -1
- package/dist/apps/control-plane/application/services/policy-loader-service.d.ts +24 -0
- package/dist/apps/control-plane/application/services/policy-loader-service.js +90 -0
- package/dist/apps/control-plane/application/services/policy-loader-service.js.map +1 -0
- package/dist/apps/control-plane/application/tools/tool-metadata.js +1 -0
- package/dist/apps/control-plane/application/tools/tool-metadata.js.map +1 -1
- package/dist/apps/control-plane/cli/aop.js +33 -1
- package/dist/apps/control-plane/cli/aop.js.map +1 -1
- package/dist/apps/control-plane/cli/cli-argument-parser.js +4 -0
- package/dist/apps/control-plane/cli/cli-argument-parser.js.map +1 -1
- package/dist/apps/control-plane/cli/dashboard-command-handler.js +11 -5
- package/dist/apps/control-plane/cli/dashboard-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/help-command-handler.js +5 -4
- package/dist/apps/control-plane/cli/help-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/init-command-handler.d.ts +1 -0
- package/dist/apps/control-plane/cli/init-command-handler.js +110 -26
- package/dist/apps/control-plane/cli/init-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/retry-command-handler.js +3 -6
- package/dist/apps/control-plane/cli/retry-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/types.d.ts +1 -0
- package/dist/apps/control-plane/core/git.js +1 -3
- package/dist/apps/control-plane/core/git.js.map +1 -1
- package/dist/apps/control-plane/core/kernel.js +3 -5
- package/dist/apps/control-plane/core/kernel.js.map +1 -1
- package/dist/apps/control-plane/core/schemas.d.ts +2 -0
- package/dist/apps/control-plane/core/schemas.js +31 -1
- package/dist/apps/control-plane/core/schemas.js.map +1 -1
- package/dist/apps/control-plane/interfaces/cli/bootstrap.js +1 -1
- package/dist/apps/control-plane/interfaces/cli/bootstrap.js.map +1 -1
- package/dist/apps/control-plane/mcp/tool-registry-loader.d.ts +2 -0
- package/dist/apps/control-plane/mcp/tool-registry-loader.js +31 -1
- package/dist/apps/control-plane/mcp/tool-registry-loader.js.map +1 -1
- package/dist/apps/control-plane/supervisor/build-wave-executor.js +1 -1
- package/dist/apps/control-plane/supervisor/build-wave-executor.js.map +1 -1
- package/dist/apps/control-plane/supervisor/qa-wave-executor.js +1 -1
- package/dist/apps/control-plane/supervisor/qa-wave-executor.js.map +1 -1
- package/package.json +18 -17
- package/packages/web-dashboard/package.json +1 -1
- package/packages/web-dashboard/src/app/api/actions/route.ts +2 -2
- package/packages/web-dashboard/src/app/api/events/route.ts +1 -1
- package/packages/web-dashboard/src/app/api/features/[id]/checkout/route.ts +1 -1
- package/packages/web-dashboard/src/app/api/features/[id]/diff/route.ts +1 -1
- package/packages/web-dashboard/src/app/api/features/[id]/evidence/[artifact]/route.ts +1 -1
- package/packages/web-dashboard/src/app/api/features/[id]/review/route.ts +2 -2
- package/packages/web-dashboard/src/app/api/features/[id]/route.ts +1 -1
- package/packages/web-dashboard/src/app/api/projects/route.ts +2 -2
- package/packages/web-dashboard/src/app/api/status/route.ts +1 -1
- package/packages/web-dashboard/src/app/page.tsx +1 -1
- package/packages/web-dashboard/src/lib/aop-client.ts +1 -1
- package/packages/web-dashboard/src/lib/orchestrator-tools.ts +1 -1
- package/packages/web-dashboard/tsconfig.json +1 -0
- package/spec-files/completed/agentic_orchestrator_init_policy_ux_simplification_spec.md +481 -0
- package/spec-files/outstanding/agentic_orchestrator_artifact_database_publishing_spec.md +500 -0
- package/spec-files/outstanding/agentic_orchestrator_observability_integrity_diagnostics_spec.md +500 -195
- package/spec-files/outstanding/agentic_orchestrator_performance_improvements_spec.md +471 -162
- package/spec-files/outstanding/agentic_orchestrator_planning_review_quality_spec.md +532 -268
- package/spec-files/outstanding/agentic_orchestrator_productization_commercial_spec.md +645 -0
- package/spec-files/progress.md +99 -2
- package/tsconfig.base.json +4 -0
- /package/spec-files/{outstanding → completed}/agentic_orchestrator_validator_hardening_spec.md +0 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://example.local/agentic/policy.user.schema.json",
|
|
4
|
+
"description": "User-editable policy overrides. These are deep-merged over the bundled defaults to produce the effective policy. Only the most commonly configured fields are exposed here.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"version": {
|
|
9
|
+
"type": "number",
|
|
10
|
+
"description": "Schema version number."
|
|
11
|
+
},
|
|
12
|
+
"worktree": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"description": "Git worktree settings. See policy.schema.json for full field descriptions.",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"properties": {
|
|
17
|
+
"base_branch": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"description": "Git branch that feature branches are created from and merged into (e.g. 'main')."
|
|
21
|
+
},
|
|
22
|
+
"post_create": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"description": "Shell commands run after a new feature worktree is created.",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"symlinks": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"description": "Repo-relative paths to symlink into every new feature worktree.",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"supervisor": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"description": "Supervisor loop tuning. See policy.schema.json for full field descriptions.",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"properties": {
|
|
43
|
+
"max_parallel_gate_runs": {
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"minimum": 1,
|
|
46
|
+
"description": "Maximum number of gate runs that may execute concurrently across features."
|
|
47
|
+
},
|
|
48
|
+
"max_iterations_per_phase": {
|
|
49
|
+
"type": "integer",
|
|
50
|
+
"minimum": 0,
|
|
51
|
+
"description": "Maximum agent iterations per phase before escalation."
|
|
52
|
+
},
|
|
53
|
+
"agent_idle_threshold_ms": {
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"minimum": 0,
|
|
56
|
+
"description": "Milliseconds of agent inactivity before triggering the agent_stuck reaction."
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"dashboard": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"description": "Dashboard HTTP server settings.",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"properties": {
|
|
65
|
+
"enabled": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "Whether the dashboard HTTP server is started."
|
|
68
|
+
},
|
|
69
|
+
"port": {
|
|
70
|
+
"type": "number",
|
|
71
|
+
"minimum": 1,
|
|
72
|
+
"maximum": 65535,
|
|
73
|
+
"description": "Port the dashboard HTTP server listens on."
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"merge_policy": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"description": "Merge controls.",
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"properties": {
|
|
82
|
+
"require_user_approval": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"description": "When true, a user approval token must be supplied before the orchestrator merges a feature."
|
|
85
|
+
},
|
|
86
|
+
"allowed_strategies": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"description": "Permitted merge strategies ('merge_commit', 'squash', 'rebase').",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": [
|
|
92
|
+
"merge_commit",
|
|
93
|
+
"squash",
|
|
94
|
+
"rebase"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"notifications": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"description": "Notification delivery settings. See policy.schema.json for full field descriptions.",
|
|
103
|
+
"properties": {
|
|
104
|
+
"enabled": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"description": "Master switch for all notification channels."
|
|
107
|
+
},
|
|
108
|
+
"channels": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {
|
|
111
|
+
"desktop": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"properties": {
|
|
114
|
+
"enabled": {
|
|
115
|
+
"type": "boolean"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"slack": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"properties": {
|
|
122
|
+
"enabled": {
|
|
123
|
+
"type": "boolean"
|
|
124
|
+
},
|
|
125
|
+
"webhook": {
|
|
126
|
+
"type": "string"
|
|
127
|
+
},
|
|
128
|
+
"channel": {
|
|
129
|
+
"type": "string"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"webhook": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"enabled": {
|
|
137
|
+
"type": "boolean"
|
|
138
|
+
},
|
|
139
|
+
"url": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"recovery": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"description": "Orphaned session recovery settings.",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"properties": {
|
|
153
|
+
"orchestrator_session_reattach_timeout_ms": {
|
|
154
|
+
"type": "number",
|
|
155
|
+
"minimum": 0,
|
|
156
|
+
"description": "Milliseconds to wait for an existing orchestrator session to reattach before treating it as orphaned."
|
|
157
|
+
},
|
|
158
|
+
"orphan_session_cleanup_enabled": {
|
|
159
|
+
"type": "boolean",
|
|
160
|
+
"description": "When true, orphaned agent sessions are automatically cleaned up at startup."
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -1,50 +1,107 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://example.local/agentic/qa_test_index.schema.json",
|
|
4
|
+
"description": "Per-feature test coverage index stored in .aop/features/<id>/qa_test_index.json. Built from git diffs when patches are applied; updated by the QA agent as tests are run.",
|
|
4
5
|
"type": "object",
|
|
5
6
|
"additionalProperties": false,
|
|
6
|
-
"required": [
|
|
7
|
+
"required": [
|
|
8
|
+
"feature_id",
|
|
9
|
+
"version",
|
|
10
|
+
"source_diff_ref",
|
|
11
|
+
"items"
|
|
12
|
+
],
|
|
7
13
|
"properties": {
|
|
8
|
-
"feature_id": {
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
"feature_id": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Feature this test index belongs to."
|
|
17
|
+
},
|
|
18
|
+
"version": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": 1,
|
|
21
|
+
"description": "Monotonically incrementing version, updated each time patches are applied or test statuses are updated."
|
|
22
|
+
},
|
|
23
|
+
"source_diff_ref": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Stable hash of the diff state used to generate this index. Used to detect whether the index is stale relative to the current worktree."
|
|
26
|
+
},
|
|
11
27
|
"items": {
|
|
12
28
|
"type": "array",
|
|
29
|
+
"description": "One entry per changed source file, listing the hunks modified and the tests required to cover those changes.",
|
|
13
30
|
"items": {
|
|
14
31
|
"type": "object",
|
|
15
|
-
"required": [
|
|
32
|
+
"required": [
|
|
33
|
+
"path",
|
|
34
|
+
"hunks",
|
|
35
|
+
"required_tests",
|
|
36
|
+
"status"
|
|
37
|
+
],
|
|
16
38
|
"properties": {
|
|
17
|
-
"path": {
|
|
39
|
+
"path": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Repo-relative path of the changed source file."
|
|
42
|
+
},
|
|
18
43
|
"hunks": {
|
|
19
44
|
"type": "array",
|
|
45
|
+
"description": "Changed line ranges within this file, derived from the unified diff.",
|
|
20
46
|
"items": {
|
|
21
47
|
"type": "object",
|
|
22
|
-
"required": [
|
|
48
|
+
"required": [
|
|
49
|
+
"start_line",
|
|
50
|
+
"end_line",
|
|
51
|
+
"change_type"
|
|
52
|
+
],
|
|
23
53
|
"properties": {
|
|
24
|
-
"start_line": {
|
|
25
|
-
|
|
54
|
+
"start_line": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 1,
|
|
57
|
+
"description": "First line of the changed hunk (1-indexed)."
|
|
58
|
+
},
|
|
59
|
+
"end_line": {
|
|
60
|
+
"type": "integer",
|
|
61
|
+
"minimum": 1,
|
|
62
|
+
"description": "Last line of the changed hunk (1-indexed)."
|
|
63
|
+
},
|
|
26
64
|
"change_type": {
|
|
27
65
|
"type": "string",
|
|
28
|
-
"enum": [
|
|
66
|
+
"enum": [
|
|
67
|
+
"add",
|
|
68
|
+
"modify",
|
|
69
|
+
"delete"
|
|
70
|
+
],
|
|
71
|
+
"description": "Type of change applied to this hunk: 'add', 'modify', or 'delete'."
|
|
29
72
|
}
|
|
30
73
|
}
|
|
31
74
|
}
|
|
32
75
|
},
|
|
33
76
|
"required_tests": {
|
|
34
77
|
"type": "array",
|
|
35
|
-
"items": {
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"description": "Test identifiers that must run to cover the changes in this file. Populated by the gate profile's test config."
|
|
36
82
|
},
|
|
37
83
|
"status": {
|
|
38
84
|
"type": "string",
|
|
39
|
-
"enum": [
|
|
85
|
+
"enum": [
|
|
86
|
+
"pending",
|
|
87
|
+
"running",
|
|
88
|
+
"passed",
|
|
89
|
+
"failed",
|
|
90
|
+
"waived"
|
|
91
|
+
],
|
|
92
|
+
"description": "Current test status for this file: 'pending' (not yet run), 'running', 'passed', 'failed', or 'waived'."
|
|
40
93
|
},
|
|
41
94
|
"last_run_at": {
|
|
42
95
|
"type": "string",
|
|
43
|
-
"format": "date-time"
|
|
96
|
+
"format": "date-time",
|
|
97
|
+
"description": "ISO 8601 timestamp of the last test run that produced results for this file."
|
|
44
98
|
},
|
|
45
99
|
"evidence_refs": {
|
|
46
100
|
"type": "array",
|
|
47
|
-
"items": {
|
|
101
|
+
"items": {
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
"description": "Paths to gate evidence artifacts produced by test runs covering this file."
|
|
48
105
|
}
|
|
49
106
|
}
|
|
50
107
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://example.local/agentic/state.schema.json",
|
|
4
|
+
"description": "Per-feature runtime state stored in .aop/features/<id>/state.md YAML frontmatter. Written on every state transition.",
|
|
4
5
|
"type": "object",
|
|
5
6
|
"additionalProperties": true,
|
|
6
7
|
"required": [
|
|
@@ -18,91 +19,247 @@
|
|
|
18
19
|
"last_updated"
|
|
19
20
|
],
|
|
20
21
|
"properties": {
|
|
21
|
-
"feature_id": {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
"feature_id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Unique identifier for this feature, matching the directory name under .aop/features/."
|
|
25
|
+
},
|
|
26
|
+
"version": {
|
|
27
|
+
"type": "integer",
|
|
28
|
+
"minimum": 1,
|
|
29
|
+
"description": "Monotonically incrementing integer used for optimistic concurrency. Incremented on every state write by FeatureStateService."
|
|
30
|
+
},
|
|
31
|
+
"branch": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "Git branch name for this feature's worktree."
|
|
34
|
+
},
|
|
35
|
+
"worktree_path": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Absolute filesystem path to this feature's git worktree."
|
|
38
|
+
},
|
|
25
39
|
"status": {
|
|
26
40
|
"type": "string",
|
|
27
|
-
"
|
|
41
|
+
"description": "Current lifecycle phase. planning \u2192 building \u2192 qa \u2192 ready_to_merge \u2192 merged. 'blocked' is a cross-cutting pause state; 'failed' is terminal.",
|
|
42
|
+
"enum": [
|
|
43
|
+
"planning",
|
|
44
|
+
"building",
|
|
45
|
+
"qa",
|
|
46
|
+
"blocked",
|
|
47
|
+
"ready_to_merge",
|
|
48
|
+
"merged",
|
|
49
|
+
"failed"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"gate_profile": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Name of the gates profile to use for this feature. Written from plan.gate_profile on plan submission."
|
|
28
55
|
},
|
|
29
|
-
"gate_profile": { "type": "string" },
|
|
30
56
|
"gates": {
|
|
31
57
|
"type": "object",
|
|
58
|
+
"description": "Map of gate mode names to their most recent result. Keys are mode names (e.g. 'fast', 'full', 'merge'); values are 'pass', 'fail', or 'na'.",
|
|
32
59
|
"additionalProperties": {
|
|
33
60
|
"type": "string",
|
|
34
|
-
"enum": [
|
|
61
|
+
"enum": [
|
|
62
|
+
"pass",
|
|
63
|
+
"fail",
|
|
64
|
+
"na"
|
|
65
|
+
]
|
|
35
66
|
}
|
|
36
67
|
},
|
|
37
68
|
"locks": {
|
|
38
69
|
"type": "object",
|
|
39
|
-
"
|
|
70
|
+
"description": "Lock resources currently held by this feature.",
|
|
71
|
+
"required": [
|
|
72
|
+
"held"
|
|
73
|
+
],
|
|
40
74
|
"properties": {
|
|
41
75
|
"held": {
|
|
42
76
|
"type": "array",
|
|
43
|
-
"
|
|
77
|
+
"description": "List of lock resource names this feature currently holds. Updated atomically alongside index.locks by the lock service.",
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
44
81
|
}
|
|
45
82
|
}
|
|
46
83
|
},
|
|
47
84
|
"collisions": {
|
|
48
85
|
"type": "object",
|
|
49
|
-
"
|
|
86
|
+
"description": "Collision details detected during the most recent plan submission. Cleared on successful plan resubmission.",
|
|
87
|
+
"required": [
|
|
88
|
+
"files",
|
|
89
|
+
"areas",
|
|
90
|
+
"contracts"
|
|
91
|
+
],
|
|
50
92
|
"properties": {
|
|
51
|
-
"files": {
|
|
52
|
-
|
|
53
|
-
|
|
93
|
+
"files": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "object"
|
|
97
|
+
},
|
|
98
|
+
"description": "File-level collisions: files that overlap with another active feature's plan."
|
|
99
|
+
},
|
|
100
|
+
"areas": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "object"
|
|
104
|
+
},
|
|
105
|
+
"description": "Area-level collisions: allowed_areas or exclusive_areas that overlap with another active feature's plan."
|
|
106
|
+
},
|
|
107
|
+
"contracts": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "object"
|
|
111
|
+
},
|
|
112
|
+
"description": "Contract-level collisions: two features both declaring changes to the same contract type (openapi, events, db)."
|
|
113
|
+
}
|
|
54
114
|
}
|
|
55
115
|
},
|
|
56
116
|
"cluster": {
|
|
57
117
|
"type": "object",
|
|
58
|
-
"description": "
|
|
59
|
-
"required": [
|
|
118
|
+
"description": "Agent session IDs allocated to this feature by the current orchestrator run. Used to detect and close stale sessions when a new run starts.",
|
|
119
|
+
"required": [
|
|
120
|
+
"orchestrator_session_id",
|
|
121
|
+
"planner_session_id",
|
|
122
|
+
"builder_session_id",
|
|
123
|
+
"qa_session_id"
|
|
124
|
+
],
|
|
60
125
|
"properties": {
|
|
61
|
-
"orchestrator_session_id": {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
126
|
+
"orchestrator_session_id": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "AI session ID of the orchestrator agent that manages this feature's lifecycle."
|
|
129
|
+
},
|
|
130
|
+
"planner_session_id": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "AI session ID of the planner agent for this feature."
|
|
133
|
+
},
|
|
134
|
+
"builder_session_id": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "AI session ID of the builder agent for this feature."
|
|
137
|
+
},
|
|
138
|
+
"qa_session_id": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"description": "AI session ID of the QA agent for this feature."
|
|
141
|
+
}
|
|
65
142
|
}
|
|
66
143
|
},
|
|
67
144
|
"role_status": {
|
|
68
145
|
"type": "object",
|
|
69
|
-
"
|
|
146
|
+
"description": "Execution status of each agent role within the current lifecycle phase.",
|
|
147
|
+
"required": [
|
|
148
|
+
"planner",
|
|
149
|
+
"builder",
|
|
150
|
+
"qa"
|
|
151
|
+
],
|
|
70
152
|
"properties": {
|
|
71
153
|
"planner": {
|
|
72
154
|
"type": "string",
|
|
73
|
-
"enum": [
|
|
155
|
+
"enum": [
|
|
156
|
+
"ready",
|
|
157
|
+
"running",
|
|
158
|
+
"blocked",
|
|
159
|
+
"done"
|
|
160
|
+
],
|
|
161
|
+
"description": "Planner agent status: 'ready' (not yet started), 'running', 'blocked', or 'done'."
|
|
74
162
|
},
|
|
75
163
|
"builder": {
|
|
76
164
|
"type": "string",
|
|
77
|
-
"enum": [
|
|
165
|
+
"enum": [
|
|
166
|
+
"ready",
|
|
167
|
+
"running",
|
|
168
|
+
"blocked",
|
|
169
|
+
"done"
|
|
170
|
+
],
|
|
171
|
+
"description": "Builder agent status: 'ready', 'running', 'blocked', or 'done'."
|
|
78
172
|
},
|
|
79
173
|
"qa": {
|
|
80
174
|
"type": "string",
|
|
81
|
-
"enum": [
|
|
175
|
+
"enum": [
|
|
176
|
+
"ready",
|
|
177
|
+
"running",
|
|
178
|
+
"blocked",
|
|
179
|
+
"done"
|
|
180
|
+
],
|
|
181
|
+
"description": "QA agent status: 'ready', 'running', 'blocked', or 'done'."
|
|
82
182
|
}
|
|
83
183
|
}
|
|
84
184
|
},
|
|
85
185
|
"pr": {
|
|
86
186
|
"type": "object",
|
|
187
|
+
"description": "Pull request metadata populated by the PR monitor service when a PR exists for this feature.",
|
|
188
|
+
"additionalProperties": false,
|
|
87
189
|
"properties": {
|
|
88
|
-
"number": {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
190
|
+
"number": {
|
|
191
|
+
"type": "integer",
|
|
192
|
+
"description": "GitHub PR number."
|
|
193
|
+
},
|
|
194
|
+
"url": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"description": "URL of the GitHub pull request."
|
|
197
|
+
},
|
|
198
|
+
"ci_status": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"enum": [
|
|
201
|
+
"passing",
|
|
202
|
+
"failing",
|
|
203
|
+
"pending",
|
|
204
|
+
"none"
|
|
205
|
+
],
|
|
206
|
+
"description": "Aggregated CI status for the PR's head commit: 'passing', 'failing', 'pending', or 'none'."
|
|
207
|
+
},
|
|
208
|
+
"review_decision": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"enum": [
|
|
211
|
+
"approved",
|
|
212
|
+
"changes_requested",
|
|
213
|
+
"pending",
|
|
214
|
+
"none"
|
|
215
|
+
],
|
|
216
|
+
"description": "Aggregated GitHub review decision: 'approved', 'changes_requested', 'pending', or 'none'."
|
|
217
|
+
},
|
|
218
|
+
"merge_ready": {
|
|
219
|
+
"type": "boolean",
|
|
220
|
+
"description": "Whether all merge prerequisites (CI passing, approved, no conflicts, no pending threads) are satisfied."
|
|
221
|
+
},
|
|
222
|
+
"pending_review_threads": {
|
|
223
|
+
"type": "integer",
|
|
224
|
+
"description": "Number of unresolved review comment threads on the PR."
|
|
225
|
+
},
|
|
226
|
+
"has_conflicts": {
|
|
227
|
+
"type": "boolean",
|
|
228
|
+
"description": "Whether the PR branch has merge conflicts with the base branch."
|
|
229
|
+
},
|
|
230
|
+
"merge_score": {
|
|
231
|
+
"type": "number",
|
|
232
|
+
"description": "Computed numeric merge readiness score (0\u2013100) used to prioritise which features to merge first."
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"gate_retry_count": {
|
|
237
|
+
"type": "integer",
|
|
238
|
+
"minimum": 0,
|
|
239
|
+
"default": 0,
|
|
240
|
+
"description": "Number of automatic gate-fail repair attempts made so far. Read by the QA wave executor to enforce reactions.gate_failed.max_retries."
|
|
241
|
+
},
|
|
242
|
+
"last_retry_at": {
|
|
243
|
+
"type": [
|
|
244
|
+
"string",
|
|
245
|
+
"null"
|
|
246
|
+
],
|
|
247
|
+
"format": "date-time",
|
|
248
|
+
"description": "ISO 8601 timestamp of the most recent gate repair attempt, or null if no retry has been made."
|
|
249
|
+
},
|
|
250
|
+
"last_updated": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"format": "date-time",
|
|
253
|
+
"description": "ISO 8601 timestamp of the most recent state write. Set automatically by FeatureStateService on every update."
|
|
254
|
+
},
|
|
255
|
+
"status_reason": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "Human-readable explanation of the current status. Set on error, blocked, and merge transitions (e.g. 'Gate mode full failed')."
|
|
258
|
+
},
|
|
103
259
|
"evidence": {
|
|
104
260
|
"type": "object",
|
|
105
|
-
"additionalProperties": true
|
|
261
|
+
"additionalProperties": true,
|
|
262
|
+
"description": "Freeform key-value evidence bag. Gate runs write last_gate_mode, last_gate_evidence_path, and coverage_status here; merge writes merge_sha, merge_strategy, and merge_at."
|
|
106
263
|
}
|
|
107
264
|
}
|
|
108
265
|
}
|
|
@@ -6,7 +6,7 @@ const ARCHITECTURE_RULES = {
|
|
|
6
6
|
'application-tools': ['cli', 'interfaces', 'mcp', 'providers', 'supervisor'],
|
|
7
7
|
application: ['cli', 'interfaces', 'supervisor'],
|
|
8
8
|
cli: [],
|
|
9
|
-
core: ['cli', 'interfaces', 'supervisor'],
|
|
9
|
+
core: ['cli', 'interfaces', 'supervisor', 'application-services', 'application-tools', 'application', 'mcp', 'providers'],
|
|
10
10
|
interfaces: [],
|
|
11
11
|
mcp: ['cli', 'interfaces', 'supervisor'],
|
|
12
12
|
providers: ['cli', 'interfaces', 'mcp', 'supervisor'],
|
|
@@ -36,6 +36,10 @@ async function collectFiles(root) {
|
|
|
36
36
|
|
|
37
37
|
function classifyLayer(filePath) {
|
|
38
38
|
const relativePath = path.relative(SRC_ROOT, filePath).replaceAll('\\', '/');
|
|
39
|
+
if (relativePath === 'core/kernel.ts') {
|
|
40
|
+
// Legacy placement: kernel composes application services and adapters, so enforce application-layer rules.
|
|
41
|
+
return 'application';
|
|
42
|
+
}
|
|
39
43
|
if (relativePath.startsWith('application/services/')) {
|
|
40
44
|
return 'application-services';
|
|
41
45
|
}
|
|
@@ -189,8 +193,6 @@ async function main() {
|
|
|
189
193
|
if (failed) {
|
|
190
194
|
process.exit(1);
|
|
191
195
|
}
|
|
192
|
-
|
|
193
|
-
process.stdout.write(`architecture_rules_ok files_checked=${filesChecked} violation_count=0\n`);
|
|
194
196
|
}
|
|
195
197
|
|
|
196
198
|
void main();
|
|
@@ -61,7 +61,6 @@ assertContains(entrypoint, /for tool in node npm npx git;/m, 'entrypoint must ve
|
|
|
61
61
|
assertContains(entrypoint, /\bexec\s+"\$@"/, 'entrypoint must contain exec "$@" passthrough');
|
|
62
62
|
|
|
63
63
|
if (!runSmoke) {
|
|
64
|
-
console.log('validate:docker-mcp: contract checks passed');
|
|
65
64
|
process.exit(0);
|
|
66
65
|
}
|
|
67
66
|
|
|
@@ -92,5 +91,3 @@ const smoke = spawnSync(
|
|
|
92
91
|
if (smoke.status !== 0) {
|
|
93
92
|
fail('docker compose run smoke check failed');
|
|
94
93
|
}
|
|
95
|
-
|
|
96
|
-
console.log('validate:docker-mcp: contract checks + smoke run passed');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import fsSync from 'node:fs';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import Ajv from 'ajv';
|
|
5
|
-
import Ajv2020 from 'ajv/dist/2020.js';
|
|
4
|
+
import { Ajv } from 'ajv';
|
|
5
|
+
import { Ajv2020 } from 'ajv/dist/2020.js';
|
|
6
6
|
import { MCP_PROTOCOL_PIN, REQUIRED_MCP_TRANSPORTS } from '../src/mcp/protocol-contract.js';
|
|
7
7
|
import { ToolsMarkdownGenerator } from '../src/mcp/tools-markdown-generator.js';
|
|
8
8
|
import { ToolRegistryLoader } from '../src/mcp/tool-registry-loader.js';
|
|
@@ -140,10 +140,6 @@ async function main(): Promise<void> {
|
|
|
140
140
|
for (const warning of warnings) {
|
|
141
141
|
process.stdout.write(`[validate:mcp-contracts] warning: ${warning}\n`);
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
process.stdout.write(
|
|
145
|
-
`[validate:mcp-contracts] ok: tools=${registry.catalog.tools.length} protocol=${protocol.mcp_protocol_version} sdk=${protocol.sdk.package}@${protocol.sdk.version}\n`
|
|
146
|
-
);
|
|
147
143
|
}
|
|
148
144
|
|
|
149
145
|
void main().catch((error: unknown) => {
|