@geraldmaron/construct 1.4.0 → 1.4.2
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/bin/construct +2 -1
- package/bin/construct-postinstall.mjs +27 -2
- package/config/tag-vocabulary.json +264 -0
- package/lib/config/schema.mjs +1 -1
- package/lib/doctor/diagnosis.mjs +20 -0
- package/lib/doctor/index.mjs +5 -0
- package/lib/embed/worker.mjs +5 -0
- package/lib/env-config.mjs +10 -2
- package/lib/export-validate.mjs +34 -2
- package/lib/hooks/guard-bash.mjs +3 -1
- package/lib/host/readiness.mjs +109 -0
- package/lib/host-disposition.mjs +10 -1
- package/lib/install/stage-project.mjs +41 -4
- package/lib/intake/prepare.mjs +2 -0
- package/lib/mcp/destructive-approval.mjs +57 -0
- package/lib/mcp/server.mjs +209 -35
- package/lib/mcp/tool-rate-limit.mjs +47 -0
- package/lib/mcp/tool-safety.mjs +94 -0
- package/lib/mcp/tool-surface-parity.mjs +60 -0
- package/lib/mcp/tools/orchestration-run.mjs +45 -7
- package/lib/mcp/tools/project.mjs +25 -8
- package/lib/mcp/tools/storage.mjs +9 -1
- package/lib/mcp/tools/web-search-governance.mjs +96 -0
- package/lib/mcp/tools/web-search.mjs +6 -44
- package/lib/mcp-platform-config.mjs +27 -18
- package/lib/oracle/daemon-entry.mjs +6 -0
- package/lib/orchestration/runtime.mjs +81 -42
- package/lib/orchestration/web-capability.mjs +59 -0
- package/lib/orchestration/worker.mjs +263 -19
- package/lib/orchestration-policy.mjs +36 -0
- package/lib/output-quality.mjs +61 -2
- package/lib/path-policy.mjs +56 -0
- package/lib/providers/secret-audit-wiring.mjs +35 -18
- package/lib/providers/secret-resolver.mjs +28 -13
- package/lib/registry/catalog.mjs +6 -0
- package/lib/registry/loader.mjs +7 -1
- package/lib/registry/validate.mjs +3 -3
- package/lib/sandbox.mjs +1 -1
- package/lib/service-manager.mjs +59 -9
- package/lib/storage/admin.mjs +7 -2
- package/package.json +6 -1
- package/registry/agent-manifest.json +117 -0
- package/registry/capabilities.json +1880 -0
- package/schemas/brand-voice.schema.json +24 -0
- package/schemas/capability-registry.schema.json +72 -0
- package/schemas/certification-run.schema.json +130 -0
- package/schemas/demo-recording.schema.json +46 -0
- package/schemas/eval-dataset.schema.json +79 -0
- package/schemas/execution-capability-profile.schema.json +46 -0
- package/schemas/execution-policy.schema.json +114 -0
- package/schemas/improvement-proposal.schema.json +65 -0
- package/schemas/mcp-tool-output.schema.json +61 -0
- package/schemas/platform-capabilities.schema.json +83 -0
- package/schemas/project-config.schema.json +227 -0
- package/schemas/project-demo.schema.json +60 -0
- package/schemas/provider-behavior-matrix.schema.json +91 -0
- package/schemas/scope.schema.json +197 -0
- package/schemas/specialist-trace.schema.json +107 -0
- package/schemas/team.schema.json +99 -0
- package/schemas/unified-registry.schema.json +548 -0
- package/scripts/sync-specialists.mjs +135 -12
- package/specialists/org/specialists/cx-researcher.json +1 -0
- package/specialists/prompts/cx-researcher.md +9 -8
- package/vendor/pandoc-ext/README.md +3 -0
- package/vendor/pandoc-ext/diagram.lua +687 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://construct.dev/schemas/platform-capabilities.schema.json",
|
|
4
|
+
"title": "Platform Capability Registry",
|
|
5
|
+
"description": "Declarative source of truth for what each host platform (Claude Code, Codex, OpenCode, Cursor, VS Code, Copilot) can do. Consumed by the sync and init code so per-host behavior is declared data, not inline branches. See docs/decisions/adr/0033-platform-capability-registry.md.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "hosts"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "type": "string" },
|
|
11
|
+
"version": { "type": "integer", "const": 1 },
|
|
12
|
+
"hosts": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"minProperties": 1,
|
|
15
|
+
"additionalProperties": { "$ref": "#/definitions/host" }
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"definitions": {
|
|
19
|
+
"host": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"required": [
|
|
22
|
+
"displayName",
|
|
23
|
+
"hasNativeSubagents",
|
|
24
|
+
"instructionsOnly",
|
|
25
|
+
"supportsMcp",
|
|
26
|
+
"configFormat",
|
|
27
|
+
"localModelProvisioning",
|
|
28
|
+
"hooks",
|
|
29
|
+
"globalMcpAllowlist"
|
|
30
|
+
],
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"displayName": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Human-facing host name as reported by host-capabilities detection; also the key in the displayName-to-id lookup."
|
|
36
|
+
},
|
|
37
|
+
"hasNativeSubagents": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"description": "True when the host routes subagents itself (OpenCode, Cursor, VS Code). When true, the static specialist roster is NOT injected into the system prompt; the host resolves the chain at runtime via orchestration_policy."
|
|
40
|
+
},
|
|
41
|
+
"instructionsOnly": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "True when the host accepts only instruction text (no agents, no MCP) — Copilot."
|
|
44
|
+
},
|
|
45
|
+
"supportsMcp": {
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"description": "True when the host can register MCP servers."
|
|
48
|
+
},
|
|
49
|
+
"configFormat": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": ["json", "toml", "markdown"],
|
|
52
|
+
"description": "Native config serialization for the host."
|
|
53
|
+
},
|
|
54
|
+
"localModelProvisioning": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": ["modelfile", "none"],
|
|
57
|
+
"description": "How the host provisions local-model context windows. 'modelfile' = Ollama Modelfile variants (OpenCode). 'none' = not applicable."
|
|
58
|
+
},
|
|
59
|
+
"hooks": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": ["supported", "globalAllowlist"],
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"properties": {
|
|
64
|
+
"supported": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"description": "True when the host runs lifecycle hooks (Claude Code only today)."
|
|
67
|
+
},
|
|
68
|
+
"globalAllowlist": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": { "type": "string" },
|
|
71
|
+
"description": "Hook group ids permitted at user/global scope (safety-only subset). Empty unless hooks.supported is true."
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"globalMcpAllowlist": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": { "type": "string" },
|
|
78
|
+
"description": "MCP server ids permitted at user/global scope. Empty unless the host supports MCP at global scope."
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://geraldmaron.github.io/construct/schemas/project-config.schema.json",
|
|
4
|
+
"title": "Construct Project Configuration",
|
|
5
|
+
"description": "Schema for construct.config.json, the source of truth for project-level Construct settings. Shared and committed to the repo.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version"],
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Reference to the JSON Schema for this file."
|
|
13
|
+
},
|
|
14
|
+
"version": {
|
|
15
|
+
"type": "number",
|
|
16
|
+
"description": "The configuration schema version.",
|
|
17
|
+
"default": 1
|
|
18
|
+
},
|
|
19
|
+
"alias": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "The display name for this Construct project instance.",
|
|
22
|
+
"maxLength": 120,
|
|
23
|
+
"default": "Construct"
|
|
24
|
+
},
|
|
25
|
+
"scope": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "The active organizational scope ID. Determines which specialists and capabilities are available.",
|
|
28
|
+
"enum": ["rnd", "operations", "creative", "research"],
|
|
29
|
+
"default": "rnd"
|
|
30
|
+
},
|
|
31
|
+
"deployment": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"description": "Deployment and infrastructure settings.",
|
|
34
|
+
"properties": {
|
|
35
|
+
"mode": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "The operational mode of the Construct instance.",
|
|
38
|
+
"enum": ["solo", "team", "enterprise"],
|
|
39
|
+
"default": "solo"
|
|
40
|
+
},
|
|
41
|
+
"mcpBroker": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Controls the engagement of the MCP (Model Context Protocol) broker.",
|
|
44
|
+
"enum": ["auto", "on", "off"],
|
|
45
|
+
"default": "auto"
|
|
46
|
+
},
|
|
47
|
+
"projectName": {
|
|
48
|
+
"type": ["string", "null"],
|
|
49
|
+
"description": "The unique name of the project. Used for multi-project telemetry and storage."
|
|
50
|
+
},
|
|
51
|
+
"tenantId": {
|
|
52
|
+
"type": ["string", "null"],
|
|
53
|
+
"description": "The tenant ID for enterprise deployments."
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"orchestration": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"description": "Agent orchestration and workflow strategy.",
|
|
60
|
+
"properties": {
|
|
61
|
+
"workerBackend": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "The execution environment for orchestrated workers.",
|
|
64
|
+
"enum": ["inline", "provider"],
|
|
65
|
+
"default": "inline"
|
|
66
|
+
},
|
|
67
|
+
"store": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "The storage engine for orchestration state and task graphs.",
|
|
70
|
+
"enum": ["filesystem", "sqlite", "postgres"],
|
|
71
|
+
"default": "filesystem"
|
|
72
|
+
},
|
|
73
|
+
"chainOfThought": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "Disclosure of a provider-executed specialist's reasoning during orchestration. 'hidden': reasoning is not requested or shown. 'surface': reasoning is requested and attached to each task so the CLI, MCP, and dashboard display it. 'telemetry_only': reasoning is requested and written to the run trace but never displayed.",
|
|
76
|
+
"enum": ["hidden", "surface", "telemetry_only"],
|
|
77
|
+
"default": "hidden",
|
|
78
|
+
"examples": ["hidden", "surface", "telemetry_only"]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"telemetry": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"description": "Observability and usage tracking settings.",
|
|
85
|
+
"properties": {
|
|
86
|
+
"enabled": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"description": "Whether to record session traces and token usage.",
|
|
89
|
+
"default": true
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"ingest": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"description": "Strategy for ingesting and indexing project documents.",
|
|
96
|
+
"properties": {
|
|
97
|
+
"strategy": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "The primary mechanism for extracting text from files.",
|
|
100
|
+
"enum": ["adapter", "provider"],
|
|
101
|
+
"default": "adapter"
|
|
102
|
+
},
|
|
103
|
+
"fallback": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"description": "The secondary mechanism if the primary strategy fails.",
|
|
106
|
+
"enum": ["none", "provider", "adapter"],
|
|
107
|
+
"default": "none"
|
|
108
|
+
},
|
|
109
|
+
"orchestration": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "Determines if intake processing is a simple prompt or an orchestrated workflow.",
|
|
112
|
+
"enum": ["prompt-only", "orchestrated"],
|
|
113
|
+
"default": "prompt-only"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"hosts": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"description": "Granular control over editor and platform adapter sets.",
|
|
120
|
+
"properties": {
|
|
121
|
+
"claude": { "type": "object", "properties": { "enabled": { "type": "boolean" } } },
|
|
122
|
+
"opencode": { "type": "object", "properties": { "enabled": { "type": "boolean" } } },
|
|
123
|
+
"codex": { "type": "object", "properties": { "enabled": { "type": "boolean" } } },
|
|
124
|
+
"copilot": { "type": "object", "properties": { "enabled": { "type": "boolean" } } },
|
|
125
|
+
"vscode": { "type": "object", "properties": { "enabled": { "type": "boolean" } } },
|
|
126
|
+
"cursor": { "type": "object", "properties": { "enabled": { "type": "boolean" } } }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"providers": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"description": "Provider-specific settings (e.g., Anthropic, OpenAI, GitHub). Values starting with '$' are interpolated from environment variables.",
|
|
132
|
+
"additionalProperties": true
|
|
133
|
+
},
|
|
134
|
+
"sources": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"description": "Typed integration source targets for embed auto-discovery and provider_fetch.",
|
|
137
|
+
"properties": {
|
|
138
|
+
"targets": {
|
|
139
|
+
"type": "array",
|
|
140
|
+
"items": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"required": ["id", "provider", "selector"],
|
|
143
|
+
"properties": {
|
|
144
|
+
"id": { "type": "string" },
|
|
145
|
+
"provider": { "type": "string", "enum": ["github", "jira", "linear", "slack"] },
|
|
146
|
+
"selector": { "type": "object" }
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"intakePolicy": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"description": "Filesystem inbox watcher policy. The canonical drop zone is inbox/ at the project root (always watched, ADR-0045 §C); maxDepth and additionalDirs tune the scan.",
|
|
155
|
+
"properties": {
|
|
156
|
+
"maxDepth": { "type": "number", "default": 4, "description": "Subdirectory scan depth per watched directory" },
|
|
157
|
+
"additionalDirs": { "type": "array", "items": { "type": "string" }, "description": "Extra directories to watch beyond inbox/ (opt-in)" }
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"artifactWorkflow": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"description": "Project overrides for manifest-backed artifact workflows. Per-invocation overrides take precedence over these values, which take precedence over Construct defaults.",
|
|
163
|
+
"properties": {
|
|
164
|
+
"defaults": { "type": "object" },
|
|
165
|
+
"types": { "type": "object", "additionalProperties": { "type": "object" } }
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"models": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"description": "Model catalog visibility and live polling preferences.",
|
|
171
|
+
"properties": {
|
|
172
|
+
"visibility": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"properties": {
|
|
175
|
+
"mode": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"enum": ["all_configured", "tier_defaults", "explicit"],
|
|
178
|
+
"default": "all_configured"
|
|
179
|
+
},
|
|
180
|
+
"include": {
|
|
181
|
+
"type": "array",
|
|
182
|
+
"items": { "type": "string" },
|
|
183
|
+
"description": "Allowlist used when mode is explicit."
|
|
184
|
+
},
|
|
185
|
+
"exclude": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": { "type": "string" },
|
|
188
|
+
"description": "Model ids hidden from pickers (active pin still shown with warning)."
|
|
189
|
+
},
|
|
190
|
+
"providers": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"description": "Per provider-family toggles; false hides the family from pickers.",
|
|
193
|
+
"additionalProperties": { "type": "boolean" }
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"catalog": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"properties": {
|
|
200
|
+
"liveOpenRouter": {
|
|
201
|
+
"type": "boolean",
|
|
202
|
+
"default": true,
|
|
203
|
+
"description": "Merge cached live OpenRouter free models into the catalog."
|
|
204
|
+
},
|
|
205
|
+
"maxLiveFree": {
|
|
206
|
+
"type": "number",
|
|
207
|
+
"default": 24,
|
|
208
|
+
"description": "Maximum live free models merged from cache."
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"resources": {
|
|
215
|
+
"type": "object",
|
|
216
|
+
"description": "Storage and runtime resource limits.",
|
|
217
|
+
"properties": {
|
|
218
|
+
"disk": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"properties": {
|
|
221
|
+
"totalCxMaxMb": { "type": "number", "description": "Maximum disk usage for the .cx/ directory (MB).", "default": 2000 }
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://construct.dev/schemas/project-demo.schema.json",
|
|
4
|
+
"title": "Construct project demo plug-in manifest",
|
|
5
|
+
"description": "Schema for .cx/demos/<name>.project.json — a project-defined demo plug-in scaffolded by `construct demo init --from-project`. Declares a project-local demo and the script plus terminal tape it ships with. Project runtime state; gitignored in consuming projects.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema", "name", "title", "project", "script"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Reference to the JSON Schema for this file."
|
|
13
|
+
},
|
|
14
|
+
"schema": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Schema identifier and version for this manifest.",
|
|
17
|
+
"const": "construct/project-demo/1"
|
|
18
|
+
},
|
|
19
|
+
"name": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Demo id (matches the scaffolded file basename).",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
24
|
+
},
|
|
25
|
+
"title": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Human-readable demo title.",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"summary": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "One-line description of what the demo walks through."
|
|
33
|
+
},
|
|
34
|
+
"project": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "The host project name this demo belongs to, seeded from real project signals (.cx/context.json, package.json, or directory name).",
|
|
37
|
+
"minLength": 1
|
|
38
|
+
},
|
|
39
|
+
"script": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Repo-relative path to the demo script under .cx/demos/scripts/.",
|
|
42
|
+
"pattern": "^\\.cx/demos/scripts/.+\\.json$"
|
|
43
|
+
},
|
|
44
|
+
"tape": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Repo-relative path to the terminal VHS tape stub under .cx/demos/tapes/."
|
|
47
|
+
},
|
|
48
|
+
"fallbackSurface": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Surface to fall back to when the requested demo runner is unavailable.",
|
|
51
|
+
"enum": ["tape", "playwright"],
|
|
52
|
+
"default": "tape"
|
|
53
|
+
},
|
|
54
|
+
"createdAt": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "ISO-8601 timestamp the scaffold was written.",
|
|
57
|
+
"format": "date-time"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://construct.dev/schemas/provider-behavior-matrix.schema.json",
|
|
4
|
+
"title": "Construct Provider/Model Behavior Matrix",
|
|
5
|
+
"description": "Baseline evidence producer for the ExecutionCapabilityProfile (construct-6zga.1.8). Records measured execution behavior keyed by structural capability class — never by vendor name. Each observation carries an evidence provenance so the profile can declare where every field came from.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "observations"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"version": { "type": "integer", "minimum": 1 },
|
|
11
|
+
"description": { "type": "string" },
|
|
12
|
+
"observations": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "$ref": "#/$defs/observation" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"$defs": {
|
|
18
|
+
"capabilityClass": {
|
|
19
|
+
"enum": ["hosted-direct", "hosted-routed", "local-constrained", "local-capable", "unknown"]
|
|
20
|
+
},
|
|
21
|
+
"transport": {
|
|
22
|
+
"enum": ["direct", "routed", "local", "unknown"]
|
|
23
|
+
},
|
|
24
|
+
"evidenceSource": {
|
|
25
|
+
"enum": ["hermetic_fixture", "live_probe", "provider_metadata", "operator_override"]
|
|
26
|
+
},
|
|
27
|
+
"observation": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["capabilityClass", "transport", "adapterProtocol", "requestShape", "toolCall", "cancellation", "usage", "contextFailureBehavior", "fallbackClassification", "evidence"],
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"properties": {
|
|
32
|
+
"capabilityClass": { "$ref": "#/$defs/capabilityClass" },
|
|
33
|
+
"transport": { "$ref": "#/$defs/transport" },
|
|
34
|
+
"adapterProtocol": { "type": "string", "minLength": 1 },
|
|
35
|
+
"responseModelId": { "type": ["string", "null"] },
|
|
36
|
+
"requestShape": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["system", "toolSchemaCount", "toolSchemaTokenEstimate"],
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"system": { "enum": ["accepted", "rejected", "ignored", "unknown"] },
|
|
42
|
+
"toolSchemaCount": { "type": "integer", "minimum": 0 },
|
|
43
|
+
"toolSchemaTokenEstimate": { "type": "integer", "minimum": 0 }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"toolCall": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": ["supported", "parseShape", "resultShape"],
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"properties": {
|
|
51
|
+
"supported": { "type": "boolean" },
|
|
52
|
+
"parseShape": { "enum": ["native_tool_use", "openai_function", "none", "unknown"] },
|
|
53
|
+
"resultShape": { "enum": ["tool_result_block", "message_role_tool", "none", "unknown"] }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"cancellation": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"required": ["supported", "mechanism"],
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"properties": {
|
|
61
|
+
"supported": { "type": "boolean" },
|
|
62
|
+
"mechanism": { "enum": ["abort_signal", "none", "unknown"] }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"usage": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": ["fields", "cost"],
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"properties": {
|
|
70
|
+
"fields": { "type": "array", "items": { "type": "string" } },
|
|
71
|
+
"cost": { "type": "boolean" }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"contextFailureBehavior": { "enum": ["error", "truncate", "silent_drop", "unknown"] },
|
|
75
|
+
"fallbackClassification": { "enum": ["retryable", "fatal", "rate_limited", "model_unavailable", "unknown"] },
|
|
76
|
+
"evidence": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": ["source", "redacted", "runs"],
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"properties": {
|
|
81
|
+
"source": { "$ref": "#/$defs/evidenceSource" },
|
|
82
|
+
"capturedAt": { "type": ["string", "null"] },
|
|
83
|
+
"redacted": { "type": "boolean" },
|
|
84
|
+
"runs": { "type": "integer", "minimum": 1 },
|
|
85
|
+
"distribution": { "type": ["object", "null"] }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://geraldmaron.github.io/construct/schemas/scope.schema.json",
|
|
4
|
+
"title": "Construct work scope",
|
|
5
|
+
"description": "A curated or user-defined work scope. Drives intake taxonomy, doc templates, hooks, and default skills. Teams and roles load from specialists/org at runtime — do not author them here.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["id", "displayName", "intake"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"id": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-z][a-z0-9-]{1,30}$",
|
|
13
|
+
"description": "Lowercase id used in config and CLI flags."
|
|
14
|
+
},
|
|
15
|
+
"displayName": { "type": "string", "minLength": 1, "maxLength": 60 },
|
|
16
|
+
"tagline": { "type": "string", "maxLength": 120 },
|
|
17
|
+
"extends": { "type": ["string", "null"] },
|
|
18
|
+
"custom": { "type": "boolean", "default": false },
|
|
19
|
+
"experimental": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Scope borrows the shared org; excluded from certification until dedicated workflow agents exist."
|
|
22
|
+
},
|
|
23
|
+
"roles": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"maxItems": 80,
|
|
26
|
+
"description": "Custom profiles only. Curated scopes derive roles from specialists/org.",
|
|
27
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" }
|
|
28
|
+
},
|
|
29
|
+
"teams": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"maxItems": 12,
|
|
32
|
+
"description": "Custom profiles only. Curated scopes derive teams from specialists/org.",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": ["id", "name", "owner", "roles", "charter"],
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" },
|
|
39
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
40
|
+
"owner": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$", "description": "Primary owner/lead role for this team." },
|
|
41
|
+
"roles": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"minItems": 1,
|
|
44
|
+
"maxItems": 20,
|
|
45
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" }
|
|
46
|
+
},
|
|
47
|
+
"decisionRights": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"description": "Decisions this team is authorized to make.",
|
|
50
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" }
|
|
51
|
+
},
|
|
52
|
+
"forbiddenDecisions": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"description": "Decisions this team explicitly cannot make.",
|
|
55
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" }
|
|
56
|
+
},
|
|
57
|
+
"escalationPath": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"description": "Escalation chain for unresolved decisions.",
|
|
60
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" }
|
|
61
|
+
},
|
|
62
|
+
"charter": { "type": "string", "minLength": 20, "maxLength": 800, "description": "Mission statement: what this team owns, what it doesn't, and key constraints." },
|
|
63
|
+
"contact": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"properties": {
|
|
67
|
+
"slack": { "type": "string" },
|
|
68
|
+
"email": { "type": "string", "format": "email" },
|
|
69
|
+
"owner": { "type": "string" }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"evidence": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"description": "Primary sources justifying this team's structure.",
|
|
75
|
+
"items": { "type": "string" }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"departments": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"maxItems": 12,
|
|
83
|
+
"description": "Deprecated. Synthesized at runtime from teams when absent. Do not author in curated profiles.",
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"required": ["id", "displayName", "charter", "roles"],
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"properties": {
|
|
89
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" },
|
|
90
|
+
"displayName": { "type": "string", "minLength": 1, "maxLength": 60 },
|
|
91
|
+
"charter": { "type": "string", "minLength": 20, "maxLength": 600, "description": "One-paragraph mission statement: what this department owns, what it does not own, who it hands off to." },
|
|
92
|
+
"roles": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"minItems": 1,
|
|
95
|
+
"maxItems": 20,
|
|
96
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" }
|
|
97
|
+
},
|
|
98
|
+
"evidence": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"description": "Primary sources used to justify this department exists (interview transcripts, public job specs, ADRs). Required when promoting from draft.",
|
|
101
|
+
"items": { "type": "string" }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"intake": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"required": ["types", "stages"],
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"properties": {
|
|
111
|
+
"types": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"minItems": 1,
|
|
114
|
+
"maxItems": 24,
|
|
115
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,30}$" }
|
|
116
|
+
},
|
|
117
|
+
"stages": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"minItems": 1,
|
|
120
|
+
"maxItems": 12,
|
|
121
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,30}$" }
|
|
122
|
+
},
|
|
123
|
+
"classificationTable": {
|
|
124
|
+
"type": ["string", "null"],
|
|
125
|
+
"description": "Module path resolved relative to repo root. Optional. B2 ships per-profile tables for the curated set."
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"docTemplates": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"maxItems": 30,
|
|
132
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" }
|
|
133
|
+
},
|
|
134
|
+
"hooks": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"properties": {
|
|
138
|
+
"sessionReflect": { "type": "string", "enum": ["on", "off"] },
|
|
139
|
+
"sessionOptimize": { "type": "string", "enum": ["on", "off"] }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"defaultSkills": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"maxItems": 30,
|
|
145
|
+
"items": { "type": "string" }
|
|
146
|
+
},
|
|
147
|
+
"toneDefaults": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"description": "Maps doc type id to tone profile id from specialists/tone-profiles.json",
|
|
150
|
+
"additionalProperties": { "type": "string" }
|
|
151
|
+
},
|
|
152
|
+
"researchProfiles": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"description": "Maps intake type id to research profile: external, user, codebase, market, compliance",
|
|
155
|
+
"additionalProperties": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"enum": ["external", "user", "codebase", "market", "compliance"]
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"rebrand": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"additionalProperties": true,
|
|
163
|
+
"properties": {
|
|
164
|
+
"intakeQueueLabel": { "type": "string", "maxLength": 60 },
|
|
165
|
+
"signalNoun": { "type": "string", "maxLength": 30 }
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"capabilities": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"description": "Optional capability flags. Each one toggles a generic Construct subsystem on for the profile. Adding a capability never changes the role set; it changes which scaffolding init applies and which runtime helpers are exposed.",
|
|
172
|
+
"properties": {
|
|
173
|
+
"intake": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"additionalProperties": false,
|
|
176
|
+
"description": "The project ingests raw files into structured artifacts. Init scaffolds inbox/, the dedup manifest, and stamps attribution metadata when this is on.",
|
|
177
|
+
"properties": {
|
|
178
|
+
"inbox": {
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"description": "Scaffold inbox/ at the project root with a permissive .gitignore (everything except the .gitignore itself) so raw drops never end up in source."
|
|
181
|
+
},
|
|
182
|
+
"dedup": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"enum": ["sha256", "none"],
|
|
185
|
+
"default": "sha256",
|
|
186
|
+
"description": "Content-hash dedup for processed files. sha256 is the default; none disables the manifest."
|
|
187
|
+
},
|
|
188
|
+
"attribution": {
|
|
189
|
+
"type": "boolean",
|
|
190
|
+
"description": "Stamp createdBy / createdByAgent / createdAt on every intake-produced artifact."
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|