@smartmemory/compose 0.1.1-beta → 0.1.2-beta
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/skills/bug-fix/SKILL.md +143 -0
- package/.claude/skills/compose/SKILL.md +604 -0
- package/.compose-deps.json +89 -0
- package/README.md +14 -3
- package/bin/compose.js +473 -0
- package/contracts/comp-obs-contract.schema.json +362 -0
- package/contracts/cross-model-review-result.json +78 -0
- package/contracts/review-result.json +126 -0
- package/dist/assets/{_baseUniq-CQwX6VLz.js → _baseUniq-D-avYfn5.js} +1 -1
- package/dist/assets/{arc-SxJ2J1sh.js → arc-BC4dfQ-X.js} +1 -1
- package/dist/assets/{architectureDiagram-Q4EWVU46-BykunY1F.js → architectureDiagram-Q4EWVU46-BZmFXnGI.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-ohAKBOUw.js → blockDiagram-DXYQGD6D-DlfWSuux.js} +1 -1
- package/dist/assets/{c4Diagram-AHTNJAMY-DBDC3ENB.js → c4Diagram-AHTNJAMY-Y__uJrRx.js} +1 -1
- package/dist/assets/channel-LRG9kHqJ.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-Cv93Z7uM.js → chunk-4BX2VUAB-BfMePfTp.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-DE0WBDkj.js → chunk-4TB4RGXK-BdlMSdEA.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-CE1EXenG.js → chunk-55IACEB6-vrQHZTdv.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-DA7Ana6H.js → chunk-EDXVE4YY-B8wioVlW.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-CTDIPA3p.js → chunk-FMBD7UC4-Cd6Hrux2.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-uGBaPaTX.js → chunk-OYMX7WX6-CfrhdQXY.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CYlnXuUO.js → chunk-QZHKN3VN-B9JQerOU.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-ojGkzcZK.js → chunk-YZCP3GAM-DFN9X99H.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-BC9a6pDE.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-BC9a6pDE.js +1 -0
- package/dist/assets/clone-dRxgFrBv.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-Bktn9hL-.js → cose-bilkent-S5V4N54A-BAn0ap_E.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-DFaSzuRF.js → dagre-KV5264BT-DyxnVq1g.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-DnfmDzEm.js → diagram-5BDNPKRD-XCrzqski.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-Bm8W9YnG.js → diagram-G4DWMVQ6-MBCAXft_.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-B5-TSKvp.js → diagram-MMDJMWI5-DbtB2yS6.js} +1 -1
- package/dist/assets/{diagram-TYMM5635-ls4rqlky.js → diagram-TYMM5635-Bb5NzX61.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-giG6WO-r.js → erDiagram-SMLLAGMA-CpIeCOh2.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-XvlUuz-7.js → flowDiagram-DWJPFMVM-CHyoKnhW.js} +1 -1
- package/dist/assets/{ganttDiagram-T4ZO3ILL-hLBV57oV.js → ganttDiagram-T4ZO3ILL-DErKteO_.js} +1 -1
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-BHu3s_Gn.js → gitGraphDiagram-UUTBAWPF-KFVAtj2F.js} +1 -1
- package/dist/assets/{graph-D0Cfv00Y.js → graph-CRnO_ifT.js} +1 -1
- package/dist/assets/index-DKBsEUJ-.css +1 -0
- package/dist/assets/index-DkRKLuNr.js +1144 -0
- package/dist/assets/{infoDiagram-42DDH7IO-DbqRsOo3.js → infoDiagram-42DDH7IO-BZFnuSp5.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-DnCdx7zb.js → ishikawaDiagram-UXIWVN3A-4Xe2Szde.js} +1 -1
- package/dist/assets/{journeyDiagram-VCZTEJTY-CfD7eNcP.js → journeyDiagram-VCZTEJTY-CZRByfS-.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-BYaO9-mK.js → kanban-definition-6JOO6SKY-B95sk6Fk.js} +1 -1
- package/dist/assets/{layout-Bj72wOEB.js → layout-BqNQzxWT.js} +1 -1
- package/dist/assets/{linear-BRFo114D.js → linear-CUh7qb64.js} +1 -1
- package/dist/assets/{min-GCHnKlJS.js → min-wXgOS3ig.js} +1 -1
- package/dist/assets/{mindmap-definition-QFDTVHPH-n0PMebY4.js → mindmap-definition-QFDTVHPH-DB6iaAbO.js} +1 -1
- package/dist/assets/{pieDiagram-DEJITSTG-pN4CljHF.js → pieDiagram-DEJITSTG-CHkZHrTW.js} +1 -1
- package/dist/assets/{quadrantDiagram-34T5L4WZ-DNoAy8-D.js → quadrantDiagram-34T5L4WZ-DoTEO8e3.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-BhtY05PT.js → requirementDiagram-MS252O5E-Dn8peXYp.js} +1 -1
- package/dist/assets/{sankeyDiagram-XADWPNL6-B6AD-16A.js → sankeyDiagram-XADWPNL6-DRXs6Ipb.js} +1 -1
- package/dist/assets/{sequenceDiagram-FGHM5R23-DShHM-uk.js → sequenceDiagram-FGHM5R23-wBBYZ0aq.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-DMxn7HTo.js → stateDiagram-FHFEXIEX-DPlBNGmf.js} +1 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-BW0ezXb4.js +1 -0
- package/dist/assets/{timeline-definition-GMOUNBTQ-Cdu6uq52.js → timeline-definition-GMOUNBTQ-CbbyTlHk.js} +1 -1
- package/dist/assets/{vennDiagram-DHZGUBPP-CpK29iRe.js → vennDiagram-DHZGUBPP-Bj4GaFfj.js} +1 -1
- package/dist/assets/{wardley-RL74JXVD-BQgSkdcO.js → wardley-RL74JXVD-RtNzq8KU.js} +55 -55
- package/dist/assets/{wardleyDiagram-NUSXRM2D-DJHYev6O.js → wardleyDiagram-NUSXRM2D-CDfE3zSj.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-1d75pbaO.js → xychartDiagram-5P7HB3ND-CZXHHYD5.js} +1 -1
- package/dist/index.html +2 -2
- package/lib/budget-ledger.js +45 -0
- package/lib/bug-bisect.js +292 -0
- package/lib/bug-checkpoint.js +191 -0
- package/lib/bug-escalation.js +306 -0
- package/lib/bug-index-gen.js +136 -0
- package/lib/bug-ledger.js +126 -0
- package/lib/build-stream-schema.js +176 -0
- package/lib/build-stream-writer.js +3 -1
- package/lib/build.js +854 -284
- package/lib/connector-factory-shim.js +167 -0
- package/lib/constants.js +18 -0
- package/lib/debug-discipline.js +176 -27
- package/lib/deps.js +205 -0
- package/lib/health-score.js +4 -4
- package/lib/import.js +26 -13
- package/lib/inject-schema.js +21 -0
- package/lib/new.js +27 -53
- package/lib/result-normalizer.js +160 -144
- package/lib/review-lenses.js +5 -5
- package/lib/review-normalize.js +413 -0
- package/lib/review-prompt.js +163 -0
- package/lib/sections.js +325 -0
- package/lib/step-prompt.js +21 -1
- package/lib/step-validator.js +5 -3
- package/lib/stratum-mcp-client.js +172 -7
- package/package.json +14 -3
- package/pipelines/bug-fix.stratum.yaml +39 -1
- package/pipelines/build.stratum.yaml +28 -45
- package/pipelines/review-fix.stratum.yaml +1 -1
- package/presets/team-review.stratum.yaml +21 -14
- package/server/build-stream-bridge.js +28 -0
- package/server/cc-session-feature-resolver.js +111 -0
- package/server/cc-session-reader.js +327 -0
- package/server/cc-session-watcher.js +318 -0
- package/server/compose-mcp-tools.js +0 -125
- package/server/compose-mcp.js +2 -4
- package/server/contract-diff.js +192 -0
- package/server/decision-event-emit.js +175 -0
- package/server/decision-event-id.js +64 -0
- package/server/decision-events-snapshot.js +166 -0
- package/server/design-routes.js +92 -49
- package/server/drift-axes.js +365 -0
- package/server/drift-emit.js +121 -0
- package/server/gate-log-store.js +102 -0
- package/server/lifecycle-phase-history.js +44 -0
- package/server/open-loops-store.js +102 -0
- package/server/schema-validator.js +49 -0
- package/server/status-emit.js +27 -0
- package/server/status-snapshot.js +218 -0
- package/server/vision-routes.js +332 -4
- package/server/vision-server.js +104 -12
- package/server/vision-store.js +21 -0
- package/dist/assets/channel-DGElom1e.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-KqWP9wWZ.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-KqWP9wWZ.js +0 -1
- package/dist/assets/clone-DUJKJXd7.js +0 -1
- package/dist/assets/index-CUd6pFGF.css +0 -1
- package/dist/assets/index-DReRlzZI.js +0 -1144
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-o6PnCs4e.js +0 -1
- package/server/connectors/agent-connector.js +0 -78
- package/server/connectors/claude-sdk-connector.js +0 -198
- package/server/connectors/codex-connector.js +0 -240
- package/server/connectors/connector-discovery.js +0 -18
- package/server/connectors/connector-runtime.js +0 -13
- package/server/connectors/opencode-connector.js +0 -200
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://forge.local/contracts/comp-obs-contract.schema.json",
|
|
4
|
+
"title": "COMP-OBS-CONTRACT — Wave 6 shared data model",
|
|
5
|
+
"version": "0.2.5",
|
|
6
|
+
"_source": "docs/features/COMP-OBS-CONTRACT/schema.json",
|
|
7
|
+
"_roadmap": "Wave 6 — Situational Awareness",
|
|
8
|
+
"_changelog": {
|
|
9
|
+
"0.2.5": "STRAT-PAR-STREAM — added BuildStreamEvent typed discriminated union (12 kinds): 6 new agent-narration kinds (agent_started, tool_use_summary, agent_relay closed + live; iteration_update, tier_result, health_event closed + reserved) and 6 legacy build-level kinds imported from compose/lib/build-stream-writer.js (capability_profile, capability_violation, step_usage, gate_tier_result, health_score, build_end — open metadata, catalog only; STRAT-PAR-STREAM-LEGACY-CLOSE will tighten). Additive — v0.2.4 specs continue to validate.",
|
|
10
|
+
"0.2.4": "COMP-OBS-DRIFT — added optional breach_started_at + breach_event_id to DriftAxis for stable threshold-event identity across WS reconnect; live emit and snapshot rehydration both compose the event id from these persisted fields.",
|
|
11
|
+
"0.2.3": "Codex review (2026-04-24) — two joinable-data fixes + SURFACE-split propagation. (a) `StatusSnapshot.drift_alerts[]` now a locally-defined subschema that mandates `breached: true`, so STATUS cannot emit non-alert axes through the alerts field. (b) gate `DecisionEvent.metadata.gate_log_entry_id` promoted to required — every gate DecisionEvent MUST carry its GateLogEntry id. `GateLogEntry.decision_event_id` remains nullable (explicit emission-failure escape hatch, reader reconciliation documented in prose). (c) Propagate 2026-04-23 SURFACE split (ROADMAP): `COMP-OBS-SURFACE` → `COMP-OBS-TIMELINE` (region ②, DecisionEvent producer+reader) + `COMP-OBS-STEPDETAIL` (step-level surface, no direct contract consumption in v1). `_consumers` updated; no field-shape changes beyond (a)+(b). DecisionEvent emitter ownership restated: BRANCH emits kind=branch, GATELOG emits kind=gate, TIMELINE adds kind=phase_transition (on lifecycle.advance) + kind=iteration (wrapping existing iteration-loop events), DRIFT emits kind=drift_threshold on breach.",
|
|
12
|
+
"0.2.2": "COMP-OBS-BRANCH blueprint Codex review (2026-04-19): added `BranchLineage.emitted_event_ids[]` to persist DecisionEvent ids across restarts — solves the full-rescan replay hazard identified during blueprint review. Made `feature_code` a required field on BranchLineage so schema enforces the 'never emit unbound branches' rule (see BRANCH resolver in feature.json).",
|
|
13
|
+
"0.2.1": "Codex review pass 2 (2026-04-19): dropped `format: uuid` from `in_progress_siblings` items (branch_id is sha1 hex, not uuid — the constraint conflicted with BranchOutcome.branch_id definition). Added `additionalProperties: false` to every per-kind DecisionEvent.metadata subschema so new kind-specific keys can't slip through silently.",
|
|
14
|
+
"0.2.0": "Codex review pass 1 (2026-04-19): closed nested objects against drift (additionalProperties:false everywhere); LifecycleExt no longer accepts unknown keys; BranchOutcome gained `state` enum so mid-progress siblings are representable; BranchLineage grew `in_progress_siblings` pointer list; OpenLoop pinned to UUID ids + append-only semantics; DecisionEvent.metadata constrained per `kind` via allOf/if-then; final_artifact.snapshot type matches its prose (nullable); layout.md Open Loops collapse key namespaced per feature.",
|
|
15
|
+
"0.1.0": "Initial draft."
|
|
16
|
+
},
|
|
17
|
+
"_consumers": {
|
|
18
|
+
"branch_outcome": ["COMP-OBS-BRANCH (producer)", "COMP-OBS-DRIFT (reader)", "COMP-OBS-LOOPS (reader)", "COMP-OBS-TIMELINE (timeline event via BRANCH emitter)", "COMP-OBS-STATUS (rollup)"],
|
|
19
|
+
"lifecycle_ext.open_loops": ["COMP-OBS-LOOPS (producer+reader)", "COMP-OBS-STATUS (rollup count)"],
|
|
20
|
+
"lifecycle_ext.drift_axes": ["COMP-OBS-DRIFT (producer)", "COMP-OBS-STATUS (threshold crossings)", "COMP-OBS-BRANCH (per-branch panel)"],
|
|
21
|
+
"lifecycle_ext.branch_lineage": ["COMP-OBS-BRANCH (producer+reader)"],
|
|
22
|
+
"decision_event": ["COMP-OBS-TIMELINE (renderer + phase_transition/iteration emitter)", "COMP-OBS-BRANCH (branch emitter)", "COMP-OBS-GATELOG (gate emitter)", "COMP-OBS-DRIFT (drift_threshold emitter)"],
|
|
23
|
+
"status_snapshot": ["COMP-OBS-STATUS (producer)"],
|
|
24
|
+
"gate_log_entry": ["COMP-OBS-GATELOG (producer)", "COMP-OBS-TIMELINE (gate-event reader — primary join is `DecisionEvent[kind=gate].metadata.gate_log_entry_id` → `GateLogEntry.id`; `GateLogEntry.decision_event_id` is a nullable back-pointer, used only for reconciliation when emission transiently failed)"]
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
"definitions": {
|
|
28
|
+
|
|
29
|
+
"LifecycleExt": {
|
|
30
|
+
"description": "Additive extensions to the existing vision-item lifecycle object. Closed: adding a new `lifecycle_ext.<key>` requires a schema version bump and batch-wide re-approval. All fields optional (absence = that feature hasn't landed yet).",
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"open_loops": { "type": "array", "items": { "$ref": "#/definitions/OpenLoop" }, "default": [] },
|
|
34
|
+
"drift_axes": { "type": "array", "items": { "$ref": "#/definitions/DriftAxis" }, "default": [] },
|
|
35
|
+
"branch_lineage": { "$ref": "#/definitions/BranchLineage" },
|
|
36
|
+
"status_snapshot":{ "$ref": "#/definitions/StatusSnapshot" }
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
"BranchOutcome": {
|
|
42
|
+
"description": "One session branch (may be running, complete, or failed). The unit compared in COMP-OBS-BRANCH. Derived from CC's JSONL; no new storage. Completion-only fields (ended_at, tests, cost, final_artifact, etc.) are absent or null while state != 'complete'.",
|
|
43
|
+
"type": "object",
|
|
44
|
+
"required": ["branch_id", "cc_session_id", "fork_uuid", "leaf_uuid", "feature_code", "state", "started_at"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"branch_id": { "type": "string", "description": "Stable Forge-assigned id: sha1(cc_session_id + ':' + leaf_uuid). Stable across reads; one branch = one id." },
|
|
47
|
+
"cc_session_id": { "type": "string", "description": "Claude Code session uuid (`~/.claude/projects/.../<id>.jsonl` basename)." },
|
|
48
|
+
"fork_uuid": { "type": ["string", "null"], "description": "parentUuid shared with sibling branch(es); null when branch has no siblings in the tree." },
|
|
49
|
+
"leaf_uuid": { "type": "string", "description": "uuid of the current terminal record on this branch (the tip)." },
|
|
50
|
+
"parent_branch_id": { "type": ["string", "null"], "description": "Sibling-relative pointer; null for root branches or when sibling wasn't recorded." },
|
|
51
|
+
"feature_code": { "type": "string" },
|
|
52
|
+
"state": { "type": "string", "enum": ["running", "complete", "failed", "unknown"], "description": "'running' = sibling branch detected but tip has no `result` record yet. 'complete' = branch reached `result`. 'failed' = terminal error record. 'unknown' = reader can't classify (e.g. truncated JSONL). Only 'complete' branches are eligible for compare view metrics." },
|
|
53
|
+
"started_at": { "type": "string", "format": "date-time" },
|
|
54
|
+
"ended_at": { "type": ["string", "null"], "format": "date-time", "description": "Populated when state is terminal (complete / failed). Null while running." },
|
|
55
|
+
"turn_count": { "type": ["integer", "null"], "minimum": 0, "description": "Populated when state=complete. Null while running." },
|
|
56
|
+
"files_touched": {
|
|
57
|
+
"type": ["array", "null"],
|
|
58
|
+
"description": "Populated when state=complete. Null while running.",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": ["path", "turns_modified"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"path": { "type": "string" },
|
|
64
|
+
"turns_modified": { "type": "integer", "minimum": 1 }
|
|
65
|
+
},
|
|
66
|
+
"additionalProperties": false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"tests": {
|
|
70
|
+
"type": ["object", "null"],
|
|
71
|
+
"description": "Populated when state=complete. Null while running.",
|
|
72
|
+
"properties": {
|
|
73
|
+
"passed": { "type": "integer", "minimum": 0, "default": 0 },
|
|
74
|
+
"failed": { "type": "integer", "minimum": 0, "default": 0 },
|
|
75
|
+
"skipped": { "type": "integer", "minimum": 0, "default": 0 },
|
|
76
|
+
"run_ids": { "type": "array", "items": { "type": "string" } }
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
},
|
|
80
|
+
"cost": {
|
|
81
|
+
"type": ["object", "null"],
|
|
82
|
+
"description": "Populated when state=complete. Null while running.",
|
|
83
|
+
"properties": {
|
|
84
|
+
"tokens_in": { "type": "integer", "minimum": 0 },
|
|
85
|
+
"tokens_out": { "type": "integer", "minimum": 0 },
|
|
86
|
+
"usd": { "type": "number", "minimum": 0 },
|
|
87
|
+
"wall_clock_ms": { "type": "integer", "minimum": 0 }
|
|
88
|
+
},
|
|
89
|
+
"additionalProperties": false
|
|
90
|
+
},
|
|
91
|
+
"final_artifact": {
|
|
92
|
+
"description": "Pointer to the artifact the branch produced (design.md, plan.md, diff bundle, etc). Used for side-by-side diff via existing ArtifactDiff. Null while running; may remain null on complete when no artifact was produced.",
|
|
93
|
+
"type": ["object", "null"],
|
|
94
|
+
"properties": {
|
|
95
|
+
"path": { "type": "string" },
|
|
96
|
+
"kind": { "type": "string", "enum": ["design", "plan", "prd", "blueprint", "report", "diff", "other"] },
|
|
97
|
+
"snapshot": { "type": ["string", "null"], "description": "Inline content snapshot; null means lazy-load via `path`." }
|
|
98
|
+
},
|
|
99
|
+
"additionalProperties": false
|
|
100
|
+
},
|
|
101
|
+
"drift_axes_snapshot": {
|
|
102
|
+
"description": "Populated by COMP-OBS-DRIFT once it lands. Null until then — readers MUST tolerate absence.",
|
|
103
|
+
"type": ["array", "null"],
|
|
104
|
+
"items": { "$ref": "#/definitions/DriftAxis" }
|
|
105
|
+
},
|
|
106
|
+
"open_loops_produced": {
|
|
107
|
+
"description": "Ids of OpenLoop entries this branch created. Join key into lifecycle_ext.open_loops.",
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": { "type": "string", "format": "uuid" }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"additionalProperties": false
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
"BranchLineage": {
|
|
116
|
+
"description": "Per-feature index of known branches — populated incrementally by the COMP-OBS-BRANCH reader.",
|
|
117
|
+
"type": "object",
|
|
118
|
+
"required": ["feature_code"],
|
|
119
|
+
"properties": {
|
|
120
|
+
"feature_code": { "type": "string" },
|
|
121
|
+
"branches": { "type": "array", "items": { "$ref": "#/definitions/BranchOutcome" }, "description": "All detected branches, running + complete + failed. Compare view filters by state." },
|
|
122
|
+
"in_progress_siblings": { "type": "array", "items": { "type": "string" }, "description": "branch_ids (sha1 hex, NOT uuid — see BranchOutcome.branch_id) of currently-running siblings. Compare view uses this to render 'X of N branches ready' and disable compare button until at least two are complete." },
|
|
123
|
+
"emitted_event_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "description": "Ids of DecisionEvents already broadcast for this feature's forks. Persisted to survive restarts; consulted before each broadcast so full rescans don't replay history." },
|
|
124
|
+
"last_scan_at": { "type": "string", "format": "date-time" }
|
|
125
|
+
},
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
"OpenLoop": {
|
|
130
|
+
"description": "Structured deferred/blocked/open-question item with mechanical TTL. `open_loops[]` is append-only: a loop is closed by setting `resolution` in-place, never by deletion. Ids are UUID v4 so concurrent writers (BRANCH reader + manual CLI + future automation) cannot collide.",
|
|
131
|
+
"type": "object",
|
|
132
|
+
"required": ["id", "kind", "summary", "created_at", "parent_feature"],
|
|
133
|
+
"properties": {
|
|
134
|
+
"id": { "type": "string", "format": "uuid", "description": "UUID v4 generated at creation time. Collision-free across concurrent writers." },
|
|
135
|
+
"kind": { "type": "string", "enum": ["deferred", "blocked", "open_question"] },
|
|
136
|
+
"summary": { "type": "string", "maxLength": 280 },
|
|
137
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
138
|
+
"parent_feature": { "type": "string", "description": "feature code that owns this loop" },
|
|
139
|
+
"parent_branch": { "type": ["string", "null"], "description": "branch_id if produced by a specific branch" },
|
|
140
|
+
"resolution": {
|
|
141
|
+
"description": "Null while open. Set (never replaced with null) when loop closes.",
|
|
142
|
+
"type": ["object", "null"],
|
|
143
|
+
"properties": {
|
|
144
|
+
"resolved_at": { "type": "string", "format": "date-time" },
|
|
145
|
+
"resolved_by": { "type": "string" },
|
|
146
|
+
"note": { "type": "string" }
|
|
147
|
+
},
|
|
148
|
+
"required": ["resolved_at", "resolved_by"],
|
|
149
|
+
"additionalProperties": false
|
|
150
|
+
},
|
|
151
|
+
"ttl_days": { "type": "integer", "default": 90, "description": "Flag for review/archive when (now - created_at) > ttl_days and resolution is null" }
|
|
152
|
+
},
|
|
153
|
+
"additionalProperties": false
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
"DriftAxis": {
|
|
157
|
+
"description": "One mechanical drift ratio. Server-computed, no LLM in v1.",
|
|
158
|
+
"type": "object",
|
|
159
|
+
"required": ["axis_id", "numerator", "denominator", "ratio", "computed_at"],
|
|
160
|
+
"properties": {
|
|
161
|
+
"axis_id": { "type": "string", "enum": ["path_drift", "contract_drift", "review_debt_drift"] },
|
|
162
|
+
"name": { "type": "string", "description": "Human-readable label" },
|
|
163
|
+
"numerator": { "type": "number", "minimum": 0 },
|
|
164
|
+
"denominator": { "type": "number", "minimum": 0 },
|
|
165
|
+
"ratio": { "type": "number", "minimum": 0, "description": "numerator / max(denominator, 1)" },
|
|
166
|
+
"threshold": { "type": ["number", "null"], "description": "Warning threshold; null = no alert configured" },
|
|
167
|
+
"breached": { "type": "boolean", "default": false },
|
|
168
|
+
"computed_at": { "type": "string", "format": "date-time" },
|
|
169
|
+
"explanation": { "type": "string", "description": "One sentence describing what numerator and denominator mean, surfaced on hover in status expansion" },
|
|
170
|
+
"breach_started_at": { "type": ["string", "null"], "format": "date-time", "description": "ISO timestamp of the rising-edge breach. Set when breached flips false→true; preserved while breached; cleared when breached flips true→false. Used to compose stable DecisionEvent ids on rehydrate." },
|
|
171
|
+
"breach_event_id": { "type": ["string", "null"], "format": "uuid", "description": "Persisted DecisionEvent id for the rising-edge breach. Equals driftThresholdDecisionEventId(featureCode, axis_id, breach_started_at). Reset to null when breached flips back to false." }
|
|
172
|
+
},
|
|
173
|
+
"additionalProperties": false
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
"StatusSnapshot": {
|
|
177
|
+
"description": "Input to the one-sentence status line. Server rolls this into prose at /lifecycle/status.",
|
|
178
|
+
"type": "object",
|
|
179
|
+
"required": ["sentence", "computed_at"],
|
|
180
|
+
"properties": {
|
|
181
|
+
"sentence": { "type": "string", "maxLength": 280, "description": "The single rendered sentence" },
|
|
182
|
+
"active_goal": { "type": ["string", "null"] },
|
|
183
|
+
"active_phase": { "type": ["string", "null"] },
|
|
184
|
+
"pending_gates": { "type": "array", "items": { "type": "string" } },
|
|
185
|
+
"drift_alerts": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"description": "Breached axes only — schema enforces `breached: true` so STATUS cannot emit non-alert axes through this field.",
|
|
188
|
+
"items": {
|
|
189
|
+
"allOf": [
|
|
190
|
+
{ "$ref": "#/definitions/DriftAxis" },
|
|
191
|
+
{ "type": "object", "properties": { "breached": { "const": true } }, "required": ["breached"] }
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"open_loops_count": { "type": "integer", "minimum": 0 },
|
|
196
|
+
"gate_load_24h": { "type": "integer", "minimum": 0 },
|
|
197
|
+
"cta": {
|
|
198
|
+
"type": ["object", "null"],
|
|
199
|
+
"properties": {
|
|
200
|
+
"label": { "type": "string" },
|
|
201
|
+
"action": { "type": "string", "description": "URL or command string" }
|
|
202
|
+
},
|
|
203
|
+
"required": ["label", "action"],
|
|
204
|
+
"additionalProperties": false
|
|
205
|
+
},
|
|
206
|
+
"computed_at": { "type": "string", "format": "date-time" }
|
|
207
|
+
},
|
|
208
|
+
"additionalProperties": false
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
"DecisionEvent": {
|
|
212
|
+
"description": "One entry on the feature-level decision timeline strip. Coarser than step events. `metadata` shape is constrained per `kind` — emitters must supply the minimum required payload below, consumers may rely on it.",
|
|
213
|
+
"type": "object",
|
|
214
|
+
"required": ["id", "feature_code", "timestamp", "kind", "title", "metadata"],
|
|
215
|
+
"properties": {
|
|
216
|
+
"id": { "type": "string", "format": "uuid" },
|
|
217
|
+
"feature_code": { "type": "string" },
|
|
218
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
219
|
+
"kind": { "type": "string", "enum": ["gate", "branch", "iteration", "phase_transition", "drift_threshold"] },
|
|
220
|
+
"title": { "type": "string", "maxLength": 140 },
|
|
221
|
+
"roles": {
|
|
222
|
+
"type": "array",
|
|
223
|
+
"items": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"required": ["name"],
|
|
226
|
+
"properties": {
|
|
227
|
+
"name": { "type": "string", "enum": ["IMPLEMENTER", "REVIEWER", "PRODUCER"] },
|
|
228
|
+
"agent_id": { "type": ["string", "null"] }
|
|
229
|
+
},
|
|
230
|
+
"additionalProperties": false
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"linked_runs": {
|
|
234
|
+
"type": "array",
|
|
235
|
+
"items": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"required": ["run_id", "status"],
|
|
238
|
+
"properties": {
|
|
239
|
+
"run_id": { "type": "string" },
|
|
240
|
+
"status": { "type": "string", "enum": ["running", "complete", "failed", "skipped"] },
|
|
241
|
+
"duration_ms": { "type": ["integer", "null"] }
|
|
242
|
+
},
|
|
243
|
+
"additionalProperties": false
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"metadata": {
|
|
247
|
+
"type": "object",
|
|
248
|
+
"description": "Per-kind shape enforced via allOf below. Each kind's subschema is closed (`additionalProperties: false`); extending a kind requires adding the field to the subschema in a schema version bump, not emitting it ad-hoc."
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"additionalProperties": false,
|
|
252
|
+
"allOf": [
|
|
253
|
+
{
|
|
254
|
+
"if": { "properties": { "kind": { "const": "branch" } } },
|
|
255
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["branch_id"], "properties": { "branch_id": { "type": "string" }, "fork_uuid": { "type": ["string", "null"] }, "sibling_branch_ids": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } } }
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"if": { "properties": { "kind": { "const": "gate" } } },
|
|
259
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["gate_id", "decision", "gate_log_entry_id"], "properties": { "gate_id": { "type": "string" }, "decision": { "type": "string", "enum": ["approve", "deny", "interrupt"] }, "gate_log_entry_id": { "type": "string", "format": "uuid", "description": "MUST match a GateLogEntry.id. The join is mandatory on the DecisionEvent side; GateLogEntry.decision_event_id stays nullable only to cover transient emission-failure (reader reconciles via gate_id + timestamp ±5s)." } }, "additionalProperties": false } } }
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"if": { "properties": { "kind": { "const": "iteration" } } },
|
|
263
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["iteration_id"], "properties": { "iteration_id": { "type": "string" }, "attempt": { "type": "integer", "minimum": 1 }, "outcome": { "type": "string", "enum": ["pass", "fail", "retry"] } }, "additionalProperties": false } } }
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"if": { "properties": { "kind": { "const": "phase_transition" } } },
|
|
267
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["from_phase", "to_phase"], "properties": { "from_phase": { "type": "string" }, "to_phase": { "type": "string" } }, "additionalProperties": false } } }
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"if": { "properties": { "kind": { "const": "drift_threshold" } } },
|
|
271
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["axis_id", "ratio", "threshold"], "properties": { "axis_id": { "type": "string", "enum": ["path_drift", "contract_drift", "review_debt_drift"] }, "ratio": { "type": "number" }, "threshold": { "type": "number" } }, "additionalProperties": false } } }
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
|
|
276
|
+
"BuildStreamEvent": {
|
|
277
|
+
"description": "Typed event streamed from stratum-mcp producers (parallel_dispatch tasks, build orchestration) to consumers (compose cockpit). Discriminated by `kind` with per-kind metadata subschema. STRAT-PAR-STREAM v1 emits the first 3 kinds (agent_started, tool_use_summary, agent_relay) live from Python connectors; the next 3 (iteration_update, tier_result, health_event) are reserved schema-only; the last 6 (capability_*, step_usage, gate_tier_result, health_score, build_end) are imported from compose/lib/build-stream-writer.js with open metadata for catalog completeness — STRAT-PAR-STREAM-LEGACY-CLOSE will trace emit sites and tighten.",
|
|
278
|
+
"type": "object",
|
|
279
|
+
"required": ["schema_version", "flow_id", "step_id", "seq", "ts", "kind", "metadata"],
|
|
280
|
+
"properties": {
|
|
281
|
+
"schema_version": { "type": "string", "const": "0.2.5" },
|
|
282
|
+
"flow_id": { "type": "string" },
|
|
283
|
+
"step_id": { "type": "string" },
|
|
284
|
+
"task_id": { "type": ["string", "null"], "description": "Present iff event originated inside a parallel_dispatch scope. seq is per-(flow_id, step_id, task_id) when set; per-(flow_id, step_id) when null." },
|
|
285
|
+
"seq": { "type": "integer", "minimum": 0, "description": "Monotonic per scope (see task_id)." },
|
|
286
|
+
"ts": { "type": "string", "format": "date-time" },
|
|
287
|
+
"kind": { "type": "string", "enum": ["agent_started", "tool_use_summary", "agent_relay", "iteration_update", "tier_result", "health_event", "capability_profile", "capability_violation", "step_usage", "gate_tier_result", "health_score", "build_end"] },
|
|
288
|
+
"metadata": { "type": "object" },
|
|
289
|
+
"_status": { "type": "string", "enum": ["live", "reserved", "legacy_open"], "description": "Documentation tag — not enforced. live: v1 emitter exists. reserved: schema-only, no v1 emitter. legacy_open: imported from BuildStreamWriter, metadata not yet closed." }
|
|
290
|
+
},
|
|
291
|
+
"additionalProperties": false,
|
|
292
|
+
"allOf": [
|
|
293
|
+
{
|
|
294
|
+
"if": { "properties": { "kind": { "const": "agent_started" } } },
|
|
295
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["agent", "model"], "properties": { "agent": { "type": "string", "enum": ["claude", "codex"] }, "model": { "type": "string" }, "prompt_chars": { "type": "integer", "minimum": 0 } }, "additionalProperties": false } } }
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"if": { "properties": { "kind": { "const": "tool_use_summary" } } },
|
|
299
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["tool", "summary"], "properties": { "tool": { "type": "string" }, "summary": { "type": "string" }, "ok": { "type": "boolean" }, "duration_ms": { "type": "integer", "minimum": 0 } }, "additionalProperties": false } } }
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"if": { "properties": { "kind": { "const": "agent_relay" } } },
|
|
303
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string" }, "role": { "type": "string", "enum": ["assistant", "system"] } }, "additionalProperties": false } } }
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"if": { "properties": { "kind": { "const": "iteration_update" } } },
|
|
307
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["iteration_id", "attempt"], "properties": { "iteration_id": { "type": "string" }, "attempt": { "type": "integer", "minimum": 1 }, "outcome": { "type": "string", "enum": ["pass", "fail", "retry"] } }, "additionalProperties": false } } }
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"if": { "properties": { "kind": { "const": "tier_result" } } },
|
|
311
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["gate_id", "tier", "decision"], "properties": { "gate_id": { "type": "string" }, "tier": { "type": "string" }, "score": { "type": "number" }, "decision": { "type": "string", "enum": ["approve", "deny", "interrupt"] } }, "additionalProperties": false } } }
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"if": { "properties": { "kind": { "const": "health_event" } } },
|
|
315
|
+
"then": { "properties": { "metadata": { "type": "object", "required": ["axis", "kind"], "properties": { "axis": { "type": "string" }, "score": { "type": "number" }, "kind": { "type": "string", "enum": ["score", "breach", "recovery"] } }, "additionalProperties": false } } }
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"if": { "properties": { "kind": { "const": "capability_profile" } } },
|
|
319
|
+
"then": { "properties": { "metadata": { "type": "object", "additionalProperties": true } } }
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"if": { "properties": { "kind": { "const": "capability_violation" } } },
|
|
323
|
+
"then": { "properties": { "metadata": { "type": "object", "additionalProperties": true } } }
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"if": { "properties": { "kind": { "const": "step_usage" } } },
|
|
327
|
+
"then": { "properties": { "metadata": { "type": "object", "additionalProperties": true } } }
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"if": { "properties": { "kind": { "const": "gate_tier_result" } } },
|
|
331
|
+
"then": { "properties": { "metadata": { "type": "object", "additionalProperties": true } } }
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"if": { "properties": { "kind": { "const": "health_score" } } },
|
|
335
|
+
"then": { "properties": { "metadata": { "type": "object", "additionalProperties": true } } }
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"if": { "properties": { "kind": { "const": "build_end" } } },
|
|
339
|
+
"then": { "properties": { "metadata": { "type": "object", "additionalProperties": true } } }
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
|
|
344
|
+
"GateLogEntry": {
|
|
345
|
+
"description": "One gate invocation record. v1 exposed only via `compose gates report` CLI. Every entry SHOULD emit a matching DecisionEvent (kind='gate') whose metadata.gate_log_entry_id equals this entry's id.",
|
|
346
|
+
"type": "object",
|
|
347
|
+
"required": ["id", "gate_id", "decision", "timestamp"],
|
|
348
|
+
"properties": {
|
|
349
|
+
"id": { "type": "string", "format": "uuid" },
|
|
350
|
+
"gate_id": { "type": "string" },
|
|
351
|
+
"decision": { "type": "string", "enum": ["approve", "deny", "interrupt"] },
|
|
352
|
+
"operator": { "type": ["string", "null"] },
|
|
353
|
+
"duration_to_decide_ms": { "type": ["integer", "null"], "minimum": 0 },
|
|
354
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
355
|
+
"feature_code": { "type": ["string", "null"] },
|
|
356
|
+
"decision_event_id": { "type": ["string", "null"], "format": "uuid", "description": "Join key — id of the emitted DecisionEvent. Null ONLY if emission transiently failed; readers MUST reconcile via gate_id + timestamp (±5s window). The reverse edge (`DecisionEvent[kind=gate].metadata.gate_log_entry_id`) is schema-required, so every emitted gate event is trivially re-joinable." }
|
|
357
|
+
},
|
|
358
|
+
"additionalProperties": false
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
}
|
|
362
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "cross-model-review-result.json",
|
|
4
|
+
"_source": "docs/features/STRAT-XMODEL-PARITY/design.md",
|
|
5
|
+
"_roadmap": "STRAT-XMODEL-PARITY",
|
|
6
|
+
"title": "CrossModelReviewResult",
|
|
7
|
+
"description": "Extended canonical review output schema for cross-model synthesis. Extends ReviewResult with three arrays of canonical finding items partitioned by model agreement. Produced by normalizeCrossModelResult in review-normalize.js. Convention: _source = design doc origin, _roadmap = feature code.",
|
|
8
|
+
"allOf": [
|
|
9
|
+
{ "$ref": "review-result.json" },
|
|
10
|
+
{
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["consensus", "claude_only", "codex_only"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"consensus": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"description": "Findings flagged by both Claude and Codex for the same issue. Each item is a canonical finding shape from ReviewResult.",
|
|
17
|
+
"items": { "$ref": "#/definitions/findingItem" }
|
|
18
|
+
},
|
|
19
|
+
"claude_only": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"description": "Findings flagged only by Claude (not corroborated by Codex).",
|
|
22
|
+
"items": { "$ref": "#/definitions/findingItem" }
|
|
23
|
+
},
|
|
24
|
+
"codex_only": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"description": "Findings flagged only by Codex. Normalized to canonical finding shape by normalizeCrossModelResult.",
|
|
27
|
+
"items": { "$ref": "#/definitions/findingItem" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"definitions": {
|
|
33
|
+
"findingItem": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": ["lens", "severity", "finding", "confidence", "applied_gate"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"lens": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Lens name (e.g. 'diff-quality', 'security') or 'general' for Codex single-pass."
|
|
40
|
+
},
|
|
41
|
+
"file": {
|
|
42
|
+
"type": ["string", "null"],
|
|
43
|
+
"description": "File path relative to working directory, or null if not file-specific."
|
|
44
|
+
},
|
|
45
|
+
"line": {
|
|
46
|
+
"type": ["integer", "null"],
|
|
47
|
+
"description": "Line number within file, or null."
|
|
48
|
+
},
|
|
49
|
+
"severity": {
|
|
50
|
+
"enum": ["must-fix", "should-fix", "nit"],
|
|
51
|
+
"description": "must-fix: blocks ship. should-fix: next iteration. nit: logged only."
|
|
52
|
+
},
|
|
53
|
+
"finding": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Human-readable description of the finding."
|
|
56
|
+
},
|
|
57
|
+
"confidence": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 1,
|
|
60
|
+
"maximum": 10,
|
|
61
|
+
"description": "Model's self-assessed confidence 1-10."
|
|
62
|
+
},
|
|
63
|
+
"applied_gate": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 1,
|
|
66
|
+
"maximum": 10,
|
|
67
|
+
"description": "The confidence gate that was applied when this finding was emitted. Stamped by normalizer if missing."
|
|
68
|
+
},
|
|
69
|
+
"rationale": {
|
|
70
|
+
"type": ["string", "null"],
|
|
71
|
+
"description": "Optional STRAT-CERT structured reasoning trace."
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"additionalProperties": true
|
|
78
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "review-result.json",
|
|
4
|
+
"_source": "docs/features/STRAT-CLAUDE-EFFORT-PARITY/design.md",
|
|
5
|
+
"_roadmap": "STRAT-CLAUDE-EFFORT-PARITY",
|
|
6
|
+
"title": "ReviewResult",
|
|
7
|
+
"description": "Canonical review output schema produced by both Claude (parallel_review) and Codex (review_check) paths. Convention: _source = design doc origin, _roadmap = feature code.",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"required": ["clean", "summary", "findings", "meta"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"clean": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"description": "Derived by normalizer — true iff zero must-fix and zero should-fix findings remain after confidence gate filtering. NOT model-reported."
|
|
14
|
+
},
|
|
15
|
+
"summary": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "1-3 sentence narrative summary of findings."
|
|
18
|
+
},
|
|
19
|
+
"findings": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"description": "All findings from this review pass.",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": ["lens", "severity", "finding", "confidence", "applied_gate"],
|
|
25
|
+
"properties": {
|
|
26
|
+
"lens": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Lens name (e.g. 'diff-quality', 'security') or 'general' for Codex single-pass."
|
|
29
|
+
},
|
|
30
|
+
"file": {
|
|
31
|
+
"type": ["string", "null"],
|
|
32
|
+
"description": "File path relative to working directory, or null if not file-specific."
|
|
33
|
+
},
|
|
34
|
+
"line": {
|
|
35
|
+
"type": ["integer", "null"],
|
|
36
|
+
"description": "Line number within file, or null."
|
|
37
|
+
},
|
|
38
|
+
"severity": {
|
|
39
|
+
"enum": ["must-fix", "should-fix", "nit"],
|
|
40
|
+
"description": "must-fix: blocks ship. should-fix: next iteration. nit: logged only."
|
|
41
|
+
},
|
|
42
|
+
"finding": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Human-readable description of the finding."
|
|
45
|
+
},
|
|
46
|
+
"confidence": {
|
|
47
|
+
"type": "integer",
|
|
48
|
+
"minimum": 1,
|
|
49
|
+
"maximum": 10,
|
|
50
|
+
"description": "Model's self-assessed confidence 1-10."
|
|
51
|
+
},
|
|
52
|
+
"applied_gate": {
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"minimum": 1,
|
|
55
|
+
"maximum": 10,
|
|
56
|
+
"description": "The confidence gate that was applied when this finding was emitted. Stamped by normalizer if missing."
|
|
57
|
+
},
|
|
58
|
+
"rationale": {
|
|
59
|
+
"type": ["string", "null"],
|
|
60
|
+
"description": "Optional STRAT-CERT structured reasoning trace."
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"meta": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["agent_type", "model_id"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"agent_type": {
|
|
71
|
+
"enum": ["claude", "codex"],
|
|
72
|
+
"description": "Which model type produced this result."
|
|
73
|
+
},
|
|
74
|
+
"model_id": {
|
|
75
|
+
"type": ["string", "null"],
|
|
76
|
+
"description": "Model identifier (e.g. 'claude-sonnet-4-5'). Null if not available."
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"additionalProperties": true
|
|
80
|
+
},
|
|
81
|
+
"lenses_run": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"description": "IDs of lenses that produced any must-fix or should-fix finding. Populated by merge step in parallel_review; empty array for single-pass Codex review.",
|
|
84
|
+
"items": { "type": "string" }
|
|
85
|
+
},
|
|
86
|
+
"auto_fixes": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"description": "Mechanical findings (formatting, typos, simple tests) that can be auto-applied. Populated by merge step.",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"required": ["lens", "severity", "finding", "confidence", "applied_gate"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"lens": { "type": "string" },
|
|
94
|
+
"file": { "type": ["string", "null"] },
|
|
95
|
+
"line": { "type": ["integer", "null"] },
|
|
96
|
+
"severity": { "enum": ["must-fix", "should-fix", "nit"] },
|
|
97
|
+
"finding": { "type": "string" },
|
|
98
|
+
"confidence": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
99
|
+
"applied_gate": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
100
|
+
"rationale": { "type": ["string", "null"] }
|
|
101
|
+
},
|
|
102
|
+
"additionalProperties": true
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"asks": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"description": "Findings requiring human judgment. Populated by merge step.",
|
|
108
|
+
"items": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"required": ["lens", "severity", "finding", "confidence", "applied_gate"],
|
|
111
|
+
"properties": {
|
|
112
|
+
"lens": { "type": "string" },
|
|
113
|
+
"file": { "type": ["string", "null"] },
|
|
114
|
+
"line": { "type": ["integer", "null"] },
|
|
115
|
+
"severity": { "enum": ["must-fix", "should-fix", "nit"] },
|
|
116
|
+
"finding": { "type": "string" },
|
|
117
|
+
"confidence": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
118
|
+
"applied_gate": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
119
|
+
"rationale": { "type": ["string", "null"] }
|
|
120
|
+
},
|
|
121
|
+
"additionalProperties": true
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"additionalProperties": true
|
|
126
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a_ as S,bw as ln,aM as A,aY as b,aL as z,bx as gn,by as dn,bz as hn,bA as W,bB as pn,br as An,bC as N,a$ as m,b4 as B,b7 as T,bD as _n,b2 as on,bE as wn,bu as On,aN as V,bs as Pn,bF as I}from"./index-
|
|
1
|
+
import{a_ as S,bw as ln,aM as A,aY as b,aL as z,bx as gn,by as dn,bz as hn,bA as W,bB as pn,br as An,bC as N,a$ as m,b4 as B,b7 as T,bD as _n,b2 as on,bE as wn,bu as On,aN as V,bs as Pn,bF as I}from"./index-DkRKLuNr.js";var bn="[object Symbol]";function x(n){return typeof n=="symbol"||S(n)&&ln(n)==bn}function vn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var U=b?b.prototype:void 0,K=U?U.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return vn(n,k)+"";if(x(n))return K?K.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(){}function En(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function cn(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function Tn(n){return n!==n}function Rn(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function In(n,r,e){return r===r?Rn(n,r,e):cn(n,Tn,e)}function Ln(n,r){var e=n==null?0:n.length;return!!e&&In(n,r,0)>-1}function M(n){return z(n)?gn(n):dn(n)}var Sn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function $(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Sn.test(n)||r!=null&&n in Object(r)}var Mn=500;function $n(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dn=/\\(\\)?/g,Fn=$n(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Cn,function(e,i,f,t){r.push(f?t.replace(Dn,"$1"):i||e)}),r});function Gn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:$(n,r)?[n]:Fn(Gn(n))}function R(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[R(r[e++])];return e&&e==i?n:void 0}function Nn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var H=b?b.isConcatSpreadable:void 0;function mn(n){return A(n)||W(n)||!!(H&&n&&n[H])}function Hr(n,r,e,i,f){var t=-1,s=n.length;for(e||(e=mn),f||(f=[]);++t<s;){var u=n[t];e(u)?rn(f,u):i||(f[f.length]=u)}return f}function Bn(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var s=n[e];r(s,e,n)&&(t[f++]=s)}return t}function Un(){return[]}var Kn=Object.prototype,Hn=Kn.propertyIsEnumerable,q=Object.getOwnPropertySymbols,qn=q?function(n){return n==null?[]:(n=Object(n),en(q(n),function(r){return Hn.call(n,r)}))}:Un;function Yn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function Y(n){return Yn(n,M,qn)}var Zn="__lodash_hash_undefined__";function Xn(n){return this.__data__.set(n,Zn),this}function Jn(n){return this.__data__.has(n)}function v(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new pn;++r<e;)this.add(n[r])}v.prototype.add=v.prototype.push=Xn;v.prototype.has=Jn;function Qn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var zn=1,Wn=2;function fn(n,r,e,i,f,t){var s=e&zn,u=n.length,a=r.length;if(u!=a&&!(s&&a>u))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&Wn?new v:void 0;for(t.set(n,r),t.set(r,n);++l<u;){var p=n[l],_=r[l];if(i)var w=s?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(w!==void 0){if(w)continue;d=!1;break}if(o){if(!Qn(r,function(O,P){if(!tn(o,P)&&(p===O||f(p,O,e,i,t)))return o.push(P)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Vn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function C(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var kn=1,jn=2,nr="[object Boolean]",rr="[object Date]",er="[object Error]",ir="[object Map]",tr="[object Number]",fr="[object RegExp]",sr="[object Set]",ur="[object String]",ar="[object Symbol]",lr="[object ArrayBuffer]",gr="[object DataView]",Z=b?b.prototype:void 0,L=Z?Z.valueOf:void 0;function dr(n,r,e,i,f,t,s){switch(e){case gr:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case lr:return!(n.byteLength!=r.byteLength||!t(new N(n),new N(r)));case nr:case rr:case tr:return An(+n,+r);case er:return n.name==r.name&&n.message==r.message;case fr:case ur:return n==r+"";case ir:var u=Vn;case sr:var a=i&kn;if(u||(u=C),n.size!=r.size&&!a)return!1;var h=s.get(n);if(h)return h==r;i|=jn,s.set(n,r);var g=fn(u(n),u(r),i,f,t,s);return s.delete(n),g;case ar:if(L)return L.call(n)==L.call(r)}return!1}var hr=1,pr=Object.prototype,Ar=pr.hasOwnProperty;function _r(n,r,e,i,f,t){var s=e&hr,u=Y(n),a=u.length,h=Y(r),g=h.length;if(a!=g&&!s)return!1;for(var l=a;l--;){var d=u[l];if(!(s?d in r:Ar.call(r,d)))return!1}var o=t.get(n),p=t.get(r);if(o&&p)return o==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var w=s;++l<a;){d=u[l];var O=n[d],P=r[d];if(i)var G=s?i(P,O,d,r,n,t):i(O,P,d,n,r,t);if(!(G===void 0?O===P||f(O,P,e,i,t):G)){_=!1;break}w||(w=d=="constructor")}if(_&&!w){var y=n.constructor,E=r.constructor;y!=E&&"constructor"in n&&"constructor"in r&&!(typeof y=="function"&&y instanceof y&&typeof E=="function"&&E instanceof E)&&(_=!1)}return t.delete(n),t.delete(r),_}var or=1,X="[object Arguments]",J="[object Array]",c="[object Object]",wr=Object.prototype,Q=wr.hasOwnProperty;function Or(n,r,e,i,f,t){var s=A(n),u=A(r),a=s?J:m(n),h=u?J:m(r);a=a==X?c:a,h=h==X?c:h;var g=a==c,l=h==c,d=a==h;if(d&&B(n)){if(!B(r))return!1;s=!0,g=!1}if(d&&!g)return t||(t=new T),s||_n(n)?fn(n,r,e,i,f,t):dr(n,r,a,e,i,f,t);if(!(e&or)){var o=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(o||p){var _=o?n.value():n,w=p?r.value():r;return t||(t=new T),f(_,w,e,i,t)}}return d?(t||(t=new T),_r(n,r,e,i,f,t)):!1}function D(n,r,e,i,f){return n===r?!0:n==null||r==null||!S(n)&&!S(r)?n!==n&&r!==r:Or(n,r,e,i,D,f)}var Pr=1,br=2;function vr(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var s=e[f];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<t;){s=e[f];var u=s[0],a=n[u],h=s[1];if(s[2]){if(a===void 0&&!(u in n))return!1}else{var g=new T,l;if(!(l===void 0?D(h,a,Pr|br,i,g):l))return!1}}return!0}function sn(n){return n===n&&!on(n)}function yr(n){for(var r=M(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,sn(f)]}return r}function un(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function Er(n){var r=yr(n);return r.length==1&&r[0][2]?un(r[0][0],r[0][1]):function(e){return e===n||vr(e,n,r)}}function cr(n,r){return n!=null&&r in Object(n)}function Tr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var s=R(r[i]);if(!(t=n!=null&&e(n,s)))break;n=n[s]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&On(s,f)&&(A(n)||W(n)))}function Rr(n,r){return n!=null&&Tr(n,r,cr)}var Ir=1,Lr=2;function Sr(n,r){return $(n)&&sn(r)?un(R(n),r):function(e){var i=Nn(e,n);return i===void 0&&i===r?Rr(e,n):D(r,i,Ir|Lr)}}function xr(n){return function(r){return r==null?void 0:r[n]}}function Mr(n){return function(r){return nn(r,n)}}function $r(n){return $(n)?xr(R(n)):Mr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Sr(n[0],n[1]):Er(n):$r(n)}function Cr(n,r){return n&&Pn(n,r,M)}function Dr(n,r){return function(e,i){if(e==null)return e;if(!z(e))return n(e,i);for(var f=e.length,t=-1,s=Object(e);++t<f&&i(s[t],t,s)!==!1;);return e}}var F=Dr(Cr);function Fr(n){return typeof n=="function"?n:V}function qr(n,r){var e=A(n)?En:F;return e(n,Fr(r))}function Gr(n,r){var e=[];return F(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Yr(n,r){var e=A(n)?en:Gr;return e(n,an(r))}function Nr(n,r,e,i,f){return f(n,function(t,s,u){e=i?(i=!1,t):r(e,t,s,u)}),e}function Zr(n,r,e){var i=A(n)?Bn:Nr,f=arguments.length<3;return i(n,an(r),e,f,F)}var mr=1/0,Br=I&&1/C(new I([,-0]))[1]==mr?function(n){return new I(n)}:yn,Ur=200;function Xr(n,r,e){var i=-1,f=Ln,t=n.length,s=!0,u=[],a=u;if(t>=Ur){var h=r?null:Br(n);if(h)return C(h);s=!1,f=tn,a=new v}else a=r?[]:u;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,s&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),u.push(g)}else f(a,l,e)||(a!==u&&a.push(l),u.push(g))}return u}export{F as a,Hr as b,an as c,vn as d,rn as e,Yn as f,qn as g,En as h,x as i,Y as j,M as k,Xr as l,Yr as m,qr as n,cn as o,Fr as p,Cr as q,Zr as r,Un as s,Tr as t,j as u,R as v,nn as w,Rr as x,Gn as y};
|