@nebulacomponents/citable 1.3.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +49 -9
  3. package/dist/universal/.agents/skills/citable/SKILL.md +14 -3
  4. package/dist/universal/.agents/skills/citable/VERSION +1 -1
  5. package/dist/universal/.agents/skills/citable/commands/README.md +8 -2
  6. package/dist/universal/.agents/skills/citable/commands/measurement.md +22 -5
  7. package/dist/universal/.agents/skills/citable/commands/observe-and-act.md +40 -0
  8. package/dist/universal/.agents/skills/citable/manifest.json +15 -8
  9. package/dist/universal/.agents/skills/citable/references/capability-boundaries.md +8 -8
  10. package/dist/universal/.agents/skills/citable/schemas/connection.schema.json +32 -0
  11. package/dist/universal/.agents/skills/citable/schemas/intervention.schema.json +33 -0
  12. package/dist/universal/.agents/skills/citable/schemas/metric.schema.json +42 -0
  13. package/dist/universal/.agents/skills/citable/schemas/objective.schema.json +65 -0
  14. package/dist/universal/.agents/skills/citable/schemas/observation.schema.json +20 -0
  15. package/dist/universal/.agents/skills/citable/schemas/remediation-spec.schema.json +28 -0
  16. package/dist/universal/.claude/skills/citable/SKILL.md +14 -3
  17. package/dist/universal/.claude/skills/citable/VERSION +1 -1
  18. package/dist/universal/.claude/skills/citable/commands/README.md +8 -2
  19. package/dist/universal/.claude/skills/citable/commands/measurement.md +22 -5
  20. package/dist/universal/.claude/skills/citable/commands/observe-and-act.md +40 -0
  21. package/dist/universal/.claude/skills/citable/manifest.json +15 -8
  22. package/dist/universal/.claude/skills/citable/references/capability-boundaries.md +8 -8
  23. package/dist/universal/.claude/skills/citable/schemas/connection.schema.json +32 -0
  24. package/dist/universal/.claude/skills/citable/schemas/intervention.schema.json +33 -0
  25. package/dist/universal/.claude/skills/citable/schemas/metric.schema.json +42 -0
  26. package/dist/universal/.claude/skills/citable/schemas/objective.schema.json +65 -0
  27. package/dist/universal/.claude/skills/citable/schemas/observation.schema.json +20 -0
  28. package/dist/universal/.claude/skills/citable/schemas/remediation-spec.schema.json +28 -0
  29. package/dist/universal/.cursor/skills/citable/SKILL.md +14 -3
  30. package/dist/universal/.cursor/skills/citable/VERSION +1 -1
  31. package/dist/universal/.cursor/skills/citable/commands/README.md +8 -2
  32. package/dist/universal/.cursor/skills/citable/commands/measurement.md +22 -5
  33. package/dist/universal/.cursor/skills/citable/commands/observe-and-act.md +40 -0
  34. package/dist/universal/.cursor/skills/citable/manifest.json +15 -8
  35. package/dist/universal/.cursor/skills/citable/references/capability-boundaries.md +8 -8
  36. package/dist/universal/.cursor/skills/citable/schemas/connection.schema.json +32 -0
  37. package/dist/universal/.cursor/skills/citable/schemas/intervention.schema.json +33 -0
  38. package/dist/universal/.cursor/skills/citable/schemas/metric.schema.json +42 -0
  39. package/dist/universal/.cursor/skills/citable/schemas/objective.schema.json +65 -0
  40. package/dist/universal/.cursor/skills/citable/schemas/observation.schema.json +20 -0
  41. package/dist/universal/.cursor/skills/citable/schemas/remediation-spec.schema.json +28 -0
  42. package/dist/universal/.gemini/skills/citable/SKILL.md +14 -3
  43. package/dist/universal/.gemini/skills/citable/VERSION +1 -1
  44. package/dist/universal/.gemini/skills/citable/commands/README.md +8 -2
  45. package/dist/universal/.gemini/skills/citable/commands/measurement.md +22 -5
  46. package/dist/universal/.gemini/skills/citable/commands/observe-and-act.md +40 -0
  47. package/dist/universal/.gemini/skills/citable/manifest.json +15 -8
  48. package/dist/universal/.gemini/skills/citable/references/capability-boundaries.md +8 -8
  49. package/dist/universal/.gemini/skills/citable/schemas/connection.schema.json +32 -0
  50. package/dist/universal/.gemini/skills/citable/schemas/intervention.schema.json +33 -0
  51. package/dist/universal/.gemini/skills/citable/schemas/metric.schema.json +42 -0
  52. package/dist/universal/.gemini/skills/citable/schemas/objective.schema.json +65 -0
  53. package/dist/universal/.gemini/skills/citable/schemas/observation.schema.json +20 -0
  54. package/dist/universal/.gemini/skills/citable/schemas/remediation-spec.schema.json +28 -0
  55. package/dist/universal/.github/skills/citable/SKILL.md +14 -3
  56. package/dist/universal/.github/skills/citable/VERSION +1 -1
  57. package/dist/universal/.github/skills/citable/commands/README.md +8 -2
  58. package/dist/universal/.github/skills/citable/commands/measurement.md +22 -5
  59. package/dist/universal/.github/skills/citable/commands/observe-and-act.md +40 -0
  60. package/dist/universal/.github/skills/citable/manifest.json +15 -8
  61. package/dist/universal/.github/skills/citable/references/capability-boundaries.md +8 -8
  62. package/dist/universal/.github/skills/citable/schemas/connection.schema.json +32 -0
  63. package/dist/universal/.github/skills/citable/schemas/intervention.schema.json +33 -0
  64. package/dist/universal/.github/skills/citable/schemas/metric.schema.json +42 -0
  65. package/dist/universal/.github/skills/citable/schemas/objective.schema.json +65 -0
  66. package/dist/universal/.github/skills/citable/schemas/observation.schema.json +20 -0
  67. package/dist/universal/.github/skills/citable/schemas/remediation-spec.schema.json +28 -0
  68. package/dist/universal/.kiro/skills/citable/SKILL.md +14 -3
  69. package/dist/universal/.kiro/skills/citable/VERSION +1 -1
  70. package/dist/universal/.kiro/skills/citable/commands/README.md +8 -2
  71. package/dist/universal/.kiro/skills/citable/commands/measurement.md +22 -5
  72. package/dist/universal/.kiro/skills/citable/commands/observe-and-act.md +40 -0
  73. package/dist/universal/.kiro/skills/citable/manifest.json +15 -8
  74. package/dist/universal/.kiro/skills/citable/references/capability-boundaries.md +8 -8
  75. package/dist/universal/.kiro/skills/citable/schemas/connection.schema.json +32 -0
  76. package/dist/universal/.kiro/skills/citable/schemas/intervention.schema.json +33 -0
  77. package/dist/universal/.kiro/skills/citable/schemas/metric.schema.json +42 -0
  78. package/dist/universal/.kiro/skills/citable/schemas/objective.schema.json +65 -0
  79. package/dist/universal/.kiro/skills/citable/schemas/observation.schema.json +20 -0
  80. package/dist/universal/.kiro/skills/citable/schemas/remediation-spec.schema.json +28 -0
  81. package/dist/universal/.opencode/skills/citable/SKILL.md +14 -3
  82. package/dist/universal/.opencode/skills/citable/VERSION +1 -1
  83. package/dist/universal/.opencode/skills/citable/commands/README.md +8 -2
  84. package/dist/universal/.opencode/skills/citable/commands/measurement.md +22 -5
  85. package/dist/universal/.opencode/skills/citable/commands/observe-and-act.md +40 -0
  86. package/dist/universal/.opencode/skills/citable/manifest.json +15 -8
  87. package/dist/universal/.opencode/skills/citable/references/capability-boundaries.md +8 -8
  88. package/dist/universal/.opencode/skills/citable/schemas/connection.schema.json +32 -0
  89. package/dist/universal/.opencode/skills/citable/schemas/intervention.schema.json +33 -0
  90. package/dist/universal/.opencode/skills/citable/schemas/metric.schema.json +42 -0
  91. package/dist/universal/.opencode/skills/citable/schemas/objective.schema.json +65 -0
  92. package/dist/universal/.opencode/skills/citable/schemas/observation.schema.json +20 -0
  93. package/dist/universal/.opencode/skills/citable/schemas/remediation-spec.schema.json +28 -0
  94. package/dist/universal/.pi/agent/skills/citable/SKILL.md +14 -3
  95. package/dist/universal/.pi/agent/skills/citable/VERSION +1 -1
  96. package/dist/universal/.pi/agent/skills/citable/commands/README.md +8 -2
  97. package/dist/universal/.pi/agent/skills/citable/commands/measurement.md +22 -5
  98. package/dist/universal/.pi/agent/skills/citable/commands/observe-and-act.md +40 -0
  99. package/dist/universal/.pi/agent/skills/citable/manifest.json +15 -8
  100. package/dist/universal/.pi/agent/skills/citable/references/capability-boundaries.md +8 -8
  101. package/dist/universal/.pi/agent/skills/citable/schemas/connection.schema.json +32 -0
  102. package/dist/universal/.pi/agent/skills/citable/schemas/intervention.schema.json +33 -0
  103. package/dist/universal/.pi/agent/skills/citable/schemas/metric.schema.json +42 -0
  104. package/dist/universal/.pi/agent/skills/citable/schemas/objective.schema.json +65 -0
  105. package/dist/universal/.pi/agent/skills/citable/schemas/observation.schema.json +20 -0
  106. package/dist/universal/.pi/agent/skills/citable/schemas/remediation-spec.schema.json +28 -0
  107. package/dist/universal/.qoder/skills/citable/SKILL.md +14 -3
  108. package/dist/universal/.qoder/skills/citable/VERSION +1 -1
  109. package/dist/universal/.qoder/skills/citable/commands/README.md +8 -2
  110. package/dist/universal/.qoder/skills/citable/commands/measurement.md +22 -5
  111. package/dist/universal/.qoder/skills/citable/commands/observe-and-act.md +40 -0
  112. package/dist/universal/.qoder/skills/citable/manifest.json +15 -8
  113. package/dist/universal/.qoder/skills/citable/references/capability-boundaries.md +8 -8
  114. package/dist/universal/.qoder/skills/citable/schemas/connection.schema.json +32 -0
  115. package/dist/universal/.qoder/skills/citable/schemas/intervention.schema.json +33 -0
  116. package/dist/universal/.qoder/skills/citable/schemas/metric.schema.json +42 -0
  117. package/dist/universal/.qoder/skills/citable/schemas/objective.schema.json +65 -0
  118. package/dist/universal/.qoder/skills/citable/schemas/observation.schema.json +20 -0
  119. package/dist/universal/.qoder/skills/citable/schemas/remediation-spec.schema.json +28 -0
  120. package/dist/universal/.rovodev/skills/citable/SKILL.md +14 -3
  121. package/dist/universal/.rovodev/skills/citable/VERSION +1 -1
  122. package/dist/universal/.rovodev/skills/citable/commands/README.md +8 -2
  123. package/dist/universal/.rovodev/skills/citable/commands/measurement.md +22 -5
  124. package/dist/universal/.rovodev/skills/citable/commands/observe-and-act.md +40 -0
  125. package/dist/universal/.rovodev/skills/citable/manifest.json +15 -8
  126. package/dist/universal/.rovodev/skills/citable/references/capability-boundaries.md +8 -8
  127. package/dist/universal/.rovodev/skills/citable/schemas/connection.schema.json +32 -0
  128. package/dist/universal/.rovodev/skills/citable/schemas/intervention.schema.json +33 -0
  129. package/dist/universal/.rovodev/skills/citable/schemas/metric.schema.json +42 -0
  130. package/dist/universal/.rovodev/skills/citable/schemas/objective.schema.json +65 -0
  131. package/dist/universal/.rovodev/skills/citable/schemas/observation.schema.json +20 -0
  132. package/dist/universal/.rovodev/skills/citable/schemas/remediation-spec.schema.json +28 -0
  133. package/dist/universal/.trae/skills/citable/SKILL.md +14 -3
  134. package/dist/universal/.trae/skills/citable/VERSION +1 -1
  135. package/dist/universal/.trae/skills/citable/commands/README.md +8 -2
  136. package/dist/universal/.trae/skills/citable/commands/measurement.md +22 -5
  137. package/dist/universal/.trae/skills/citable/commands/observe-and-act.md +40 -0
  138. package/dist/universal/.trae/skills/citable/manifest.json +15 -8
  139. package/dist/universal/.trae/skills/citable/references/capability-boundaries.md +8 -8
  140. package/dist/universal/.trae/skills/citable/schemas/connection.schema.json +32 -0
  141. package/dist/universal/.trae/skills/citable/schemas/intervention.schema.json +33 -0
  142. package/dist/universal/.trae/skills/citable/schemas/metric.schema.json +42 -0
  143. package/dist/universal/.trae/skills/citable/schemas/objective.schema.json +65 -0
  144. package/dist/universal/.trae/skills/citable/schemas/observation.schema.json +20 -0
  145. package/dist/universal/.trae/skills/citable/schemas/remediation-spec.schema.json +28 -0
  146. package/dist/universal/.trae-cn/skills/citable/SKILL.md +14 -3
  147. package/dist/universal/.trae-cn/skills/citable/VERSION +1 -1
  148. package/dist/universal/.trae-cn/skills/citable/commands/README.md +8 -2
  149. package/dist/universal/.trae-cn/skills/citable/commands/measurement.md +22 -5
  150. package/dist/universal/.trae-cn/skills/citable/commands/observe-and-act.md +40 -0
  151. package/dist/universal/.trae-cn/skills/citable/manifest.json +15 -8
  152. package/dist/universal/.trae-cn/skills/citable/references/capability-boundaries.md +8 -8
  153. package/dist/universal/.trae-cn/skills/citable/schemas/connection.schema.json +32 -0
  154. package/dist/universal/.trae-cn/skills/citable/schemas/intervention.schema.json +33 -0
  155. package/dist/universal/.trae-cn/skills/citable/schemas/metric.schema.json +42 -0
  156. package/dist/universal/.trae-cn/skills/citable/schemas/objective.schema.json +65 -0
  157. package/dist/universal/.trae-cn/skills/citable/schemas/observation.schema.json +20 -0
  158. package/dist/universal/.trae-cn/skills/citable/schemas/remediation-spec.schema.json +28 -0
  159. package/dist/universal/manifest.json +183 -99
  160. package/package.json +12 -1
  161. package/schemas/connection.schema.json +32 -0
  162. package/schemas/intervention.schema.json +33 -0
  163. package/schemas/metric.schema.json +42 -0
  164. package/schemas/objective.schema.json +65 -0
  165. package/schemas/observation.schema.json +20 -0
  166. package/schemas/remediation-spec.schema.json +28 -0
  167. package/skill/SKILL.md +14 -3
  168. package/skill/commands/README.md +8 -2
  169. package/skill/commands/measurement.md +22 -5
  170. package/skill/commands/observe-and-act.md +40 -0
  171. package/skill/references/capability-boundaries.md +8 -8
  172. package/src/cli/index.js +67 -0
  173. package/src/commands/applyRemediation.js +57 -0
  174. package/src/commands/measurement.js +205 -0
  175. package/src/commands/monitor.js +40 -0
  176. package/src/commands/observe.js +235 -0
  177. package/src/evidence/run.js +1 -1
  178. package/src/installer/index.js +35 -7
  179. package/src/installer/providers.js +1 -1
  180. package/src/observations/common.js +61 -0
  181. package/src/registries/index.js +13 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 1.5.0 — 2026-07-18
6
+
7
+ ### Added
8
+
9
+ - Installer aliases compatible with the common `skills` CLI interface:
10
+ repeatable `--agent`/`-a`, `--skill`/`-s`, `--copy`, `-p`, `-g`, and `*`
11
+ provider selection.
12
+ - Explicit copy-only integrity policy and actionable rejection of unsupported
13
+ symlink installs.
14
+ - Structured pull request controls with code ownership, a required PR contract,
15
+ Conventional Commits title validation, and release-note enforcement.
16
+ - Review-gated release preparation and shipping workflows with semantic-version
17
+ consistency checks, changelog-derived GitHub releases, protected tagging, and
18
+ npm trusted publishing handoff.
19
+ - Optional provider-neutral metric, objective, intervention, and connection-state
20
+ contracts with strict schema and referential validation.
21
+ - CSV/JSON metric imports, user-owned objective creation and validation, and
22
+ evidence-deduplicated baseline/evaluation reporting with explicit guardrails
23
+ and inconclusive outcomes.
24
+
25
+ ### Fixed
26
+
27
+ - `citable install --all` now selects every supported provider in addition to
28
+ confirming non-interactively.
29
+ - Release preparation now updates and validates the canonical skill version in
30
+ addition to package, lockfile, changelog, and roadmap versions.
31
+
32
+ ## 1.4.0 — 2026-07-18
33
+
34
+ ### Added
35
+
36
+ - Governed observation envelopes and evidence collectors for rendered DOM,
37
+ search-index exports/live Google inspection, controlled citation experiments,
38
+ citation support review, production crawler logs, answer passages,
39
+ canonical/freshness consensus, CrUX or imported performance data, and external
40
+ corroboration.
41
+ - `citable apply` for reviewed, source-run-bound, hash-locked source changes;
42
+ dry-run is the default and stale or ambiguous operations fail closed.
43
+ - `citable monitor` for observation-state, index, canonical, and citation
44
+ regressions across immutable runs.
45
+ - Optional Playwright peer integration and a disclosed HTTP adapter protocol
46
+ for repeatable provider/prompt experiments.
47
+
3
48
  ## 1.3.1 — 2026-07-18
4
49
 
5
50
  ### Fixed
package/README.md CHANGED
@@ -52,6 +52,20 @@ Install into specific agents:
52
52
  npx @nebulacomponents/citable install --providers=claude,codex,cursor
53
53
  ```
54
54
 
55
+ The installer also accepts the common `skills` CLI conventions. `--agent` is
56
+ repeatable, `--skill` accepts `citable` or `*`, and `--copy` explicitly selects
57
+ Citable's default managed-copy mode:
58
+
59
+ ```bash
60
+ npx @nebulacomponents/citable install --agent claude-code --agent codex --skill citable --copy -p -y
61
+ ```
62
+
63
+ Install into every supported provider layout without prompting:
64
+
65
+ ```bash
66
+ npx @nebulacomponents/citable install --all --project
67
+ ```
68
+
55
69
  Install globally:
56
70
 
57
71
  ```bash
@@ -91,10 +105,13 @@ provider-specific home paths, including `~/.claude/skills/citable/`,
91
105
  Target resolution is deterministic: explicit `--providers` wins, then project
92
106
  harness directories, then user-home harness hints. `--providers=detected`
93
107
  selects every detected supported provider; `--providers=all` selects every
94
- supported provider layout for the requested scope. Unknown provider names fail
95
- non-zero. In non-interactive mode, use `--yes`; project scope is the default
96
- unless `--global`/`--user`/`--scope=global` is supplied. The installer never
97
- reports success when no install target was selected.
108
+ supported provider layout for the requested scope. `--providers=*` and `--all`
109
+ are equivalent provider selections; `--all` also confirms non-interactively.
110
+ Repeatable `--agent`/`-a`, `--skill`/`-s`, `--copy`, `-p`, and `-g` follow the
111
+ familiar `skills` CLI interface. Unknown provider or skill names fail non-zero.
112
+ Project scope is the default unless `--global`/`--user`/`--scope=global` is
113
+ supplied. The installer never reports success when no install target was
114
+ selected.
98
115
 
99
116
  Managed installs carry `manifest.json` with `managedBy: "citable-cli"` and
100
117
  SHA-256 hashes for the installed payload. Repeated installs validate the tree
@@ -102,7 +119,9 @@ and report `already current`. `update` compares the complete managed tree, not
102
119
  only `SKILL.md` or the version string. `uninstall` removes managed files only
103
120
  and preserves unrelated files in the skill directory. Locally modified managed
104
121
  installs and unmanaged `citable/` collisions are refused unless `--force` is
105
- used.
122
+ used. Symlink mode is intentionally unsupported: provider-specific payloads and
123
+ their manifests must remain an atomic managed unit so validation and uninstall
124
+ do not cross ownership boundaries.
106
125
 
107
126
  The initial installer installs the skill payload only. It does not install
108
127
  provider hooks, sidecar configuration, telemetry, or unrelated agent settings.
@@ -124,6 +143,19 @@ cd your-site/
124
143
  citable init # creates .citable/ (non-destructive)
125
144
  citable audit --target ./dist --base-url https://example.com
126
145
  citable action-plan <run-id> # ordered actions, blockers, review gates, verification
146
+ citable observe passages --target ./dist --base-url https://example.com
147
+ citable observe index --input search-console-export.json
148
+ citable observe citations --input prompt-results.json --target https://example.com
149
+ citable observe logs --input edge-logs.json
150
+ citable observe consensus --target ./dist --base-url https://example.com
151
+ citable observe performance --target https://example.com # CRUX_API_KEY
152
+ citable apply --input remediation-spec.json # dry run
153
+ citable apply --input remediation-spec.json --write # reviewed + hash-locked
154
+ citable monitor [runA runB]
155
+ citable metrics import --provider gsc --input metrics.csv
156
+ citable objectives init --input objective.json --write
157
+ citable objectives validate
158
+ citable evaluate OBJECTIVE-PRODUCT_DISCOVERY --ref-date 2026-07-18
127
159
  citable substantiate # claim/evidence assessment (dry run)
128
160
  citable validate # registry schema + referential integrity
129
161
  ```
@@ -134,7 +166,7 @@ citable validate # registry schema + referential integrity
134
166
  | --- | --- |
135
167
  | `skill/` | Canonical agent skill: SKILL.md, command contracts, rubrics, anti-patterns, policies, templates |
136
168
  | `src/` | CLI, commands, registries, detectors, crawler/extractor, evidence, reporting |
137
- | `schemas/` | JSON Schemas: 9 registries + finding + run + config + prompt-result |
169
+ | `schemas/` | JSON Schemas: 13 registries plus findings, runs, observations, remediation, config, and prompt results |
138
170
  | `tests/` | Unit + integration suites; positive/negative fixtures |
139
171
  | `docs/` | ADR, traceability matrix, known limitations |
140
172
  | `dist/` | Generated distribution packages (run `npm run build:dist`) |
@@ -150,12 +182,20 @@ citable validate # registry schema + referential integrity
150
182
  any coverage claim
151
183
  - [Capability gap analysis](docs/capability-gap-analysis.md) — implemented,
152
184
  partial, operator-supplied, and missing evidence boundaries
185
+ - [Measurement objectives](docs/measurement-objectives.md) — optional metric
186
+ imports, user-owned objectives, comparison windows, and guardrails
153
187
 
154
188
  ## Requirements
155
189
 
156
- Node >= 22.22.2. Network access only for URL-mode audits. Supported frameworks for
157
- auto-detection: Next.js, Astro, Nuxt, SvelteKit, Gatsby (other stacks: audit
158
- their built HTML output).
190
+ Node >= 22.22.2. Network access is used for URL audits and explicitly selected
191
+ live collectors. Render collection requires the optional `playwright` peer and
192
+ an installed Chromium browser. Google index inspection uses `GSC_ACCESS_TOKEN`
193
+ and `--site-url`; CrUX uses `CRUX_API_KEY`. Missing dependencies or credentials
194
+ produce incomplete evidence. Supported frameworks for auto-detection: Next.js,
195
+ Astro, Nuxt, SvelteKit, Gatsby (other stacks: audit their built HTML output).
196
+ Metrics and objectives are optional. No analytics or webmaster connection is
197
+ required for core Citable workflows; owner CSV/JSON imports work without live
198
+ provider authorization.
159
199
 
160
200
  ## License
161
201
 
@@ -7,7 +7,7 @@ description: >
7
7
  generative engine optimization, structured data governance, claim substantiation,
8
8
  crawler policy, entity consistency, content discoverability, or wants a site audited
9
9
  for how search and AI systems will retrieve, understand, cite, or recommend it.
10
- version: 1.3.1
10
+ version: 1.5.0
11
11
  ---
12
12
 
13
13
  # Citable — search & generative discoverability governance
@@ -85,6 +85,13 @@ citable schema --target <dir|url>
85
85
  citable validate [registries|claims|evidence|schema|links]
86
86
  citable compare-snapshots [runA runB]
87
87
  citable action-plan [run-id] # ordered actions, blockers, semantic gates, verification
88
+ citable observe <mode> [options] # render/index/citation/log/passage/consensus/performance evidence
89
+ citable apply --input <spec> [--write] # reviewed, hash-locked remediation; dry run by default
90
+ citable monitor [runA runB] # observation regression alerts
91
+ citable metrics import --provider <name> --input <csv|json>
92
+ citable objectives init --input <json|yaml> [--write]
93
+ citable objectives validate
94
+ citable evaluate [objective-id] [--ref-date YYYY-MM-DD]
88
95
  ```
89
96
 
90
97
  Audit scopes: `technical seo aeo geo architecture entity claims evidence schema
@@ -126,6 +133,9 @@ mandatory semantic reviews make the relevant posture `not_established`.
126
133
  Consult `references/capability-boundaries.md` before claiming any observation;
127
134
  it identifies which states the current CLI can collect and which require
128
135
  operator data or future adapters.
136
+ Use `commands/observe-and-act.md` for collector prerequisites, evidence labels,
137
+ the controlled citation adapter protocol, remediation refusal conditions, and
138
+ monitoring interpretation.
129
139
 
130
140
  ## Command workflows
131
141
 
@@ -138,8 +148,9 @@ mandatory.
138
148
 
139
149
  ## Registries are the source of truth
140
150
 
141
- `.citable/` holds nine YAML registries (queries, prompts, entities, claims,
142
- evidence, pages, crawlers, competitors, experiments), all schema-validated
151
+ `.citable/` holds YAML registries for queries, prompts, entities, claims,
152
+ evidence, pages, crawlers, competitors, experiments, metrics, objectives,
153
+ interventions, and optional connection state, all schema-validated
143
154
  (`schemas/*.schema.json`) with referential integrity checks. Rules:
144
155
 
145
156
  - Never overwrite registry content without history — use the loader/saver in
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.5.0
@@ -21,11 +21,17 @@ intent, not executability, so statuses are strict:
21
21
  | /citable validate, validate-claims, validate-evidence, validate-schema, validate-links | implemented |
22
22
  | /citable compare-snapshots / validate-regression | implemented |
23
23
  | /citable action-plan | implemented — writes ordered, source-run-bound action artifacts outside immutable evidence packages |
24
+ | /citable observe | implemented — render, index, citation, crawler-log, passage, consensus, performance, and corroboration evidence |
25
+ | /citable apply | implemented — reviewed, hash-locked source replacements; dry run by default |
26
+ | /citable monitor | implemented — compares immutable observation runs and emits evidence-linked alerts |
27
+ | /citable metrics import | implemented — validates declared CSV/JSON metrics and writes immutable observations |
28
+ | /citable objectives init / validate | implemented — user-owned metric selection, cohorts, windows, and guardrails |
29
+ | /citable evaluate | implemented — independent baseline/evaluation comparisons with inconclusive handling |
24
30
  | /citable ingest, map-site, map-queries, map-prompts, map-entities, map-evidence | specified (ingest.md) |
25
31
  | /citable optimize-page | specified (optimize-page.md) — requires source-to-render mapping, claim-preserving rewrites, build execution, rollback; none of that is proven yet |
26
32
  | /citable create-page, answer-block, architect, interlink, consolidate, metadata | specified (page-work.md) |
27
- | /citable validate-render | specified (validate-render.md) blocked on the rendered-truth phase (docs/detectors/render-phase-plan.md) |
28
- | /citable measure seo/aeo/geo, test-prompts, monitor-crawlers, monitor-contradictions | specified (measurement.md) no external engine adapters exist or are claimed |
33
+ | /citable validate-render | partially implemented by `observe render`; mobile/cross-browser and interaction exploration remain |
34
+ | /citable measure seo/aeo/geo, test-prompts, monitor-crawlers, monitor-contradictions | partially implemented by metric/observation imports, objective evaluation, Google/CrUX live APIs, custom citation adapters, and monitor comparisons |
29
35
 
30
36
  Shared refusal conditions (all commands): any action that would fabricate
31
37
  facts, citations, evidence, authorship, reviews, corroboration, or hidden
@@ -1,14 +1,31 @@
1
1
  ---
2
2
  command: /citable measure seo|aeo|geo, test-prompts, monitor-crawlers, monitor-contradictions
3
- purpose: Observation and measurement workflows. Citable records and validates observations; it does not claim live engine adapters it does not have.
3
+ purpose: Observation and measurement workflows with exact collector and product-mode boundaries.
4
4
  ---
5
5
 
6
6
  # Honest capability statement
7
7
 
8
- This MVP ships **no external engine adapters** (no Search Console API client,
9
- no ChatGPT/Perplexity automation). Measurement commands therefore operate on
10
- *operator-supplied observations*, validated against the data contracts, plus
11
- registry-side integrity checks (MEAS-001/002/003). Do not imply otherwise.
8
+ Citable ships Google URL Inspection, CrUX field collection, normalized owner
9
+ imports, and a disclosed custom citation-adapter protocol. It does not claim
10
+ Bing AI Performance automation or equivalence between an API adapter and a
11
+ consumer answer product. Preserve collector and product mode on every result.
12
+
13
+ # implemented metric and objective workflow
14
+
15
+ `citable metrics import --provider <name> --input <csv|json>` validates every
16
+ row against a declared entry in `metrics.yaml` and writes immutable metric
17
+ observations. `citable objectives init --input <json|yaml>` is dry-run by
18
+ default; `--write` adds the validated objective with registry history.
19
+ `citable objectives validate` checks contracts and metric references.
20
+ `citable evaluate [objective-id]` compares independent baseline and evaluation
21
+ windows, deduplicates repeated evidence, and reports each metric and guardrail
22
+ separately. Insufficient data is `inconclusive`, never zero. Results describe
23
+ temporal association and do not establish causation.
24
+
25
+ Metrics, objectives, interventions, and connection state are optional. The
26
+ absence of provider credentials is `not_configured`, not a finding and not
27
+ evidence of zero activity. Credentials must never enter registries or evidence
28
+ packages.
12
29
 
13
30
  # measure seo
14
31
  Inputs the operator exports (Search Console/Bing/analytics CSV or JSON).
@@ -0,0 +1,40 @@
1
+ ---
2
+ command: /citable observe|apply|monitor
3
+ purpose: Collect external and rendered evidence, apply reviewed source changes, and detect regressions without collapsing unlike evidence states.
4
+ failure_behaviour: unavailable dependency, credential, source run, reviewer, exact hash, or unique replacement -> incomplete or fail; never infer success
5
+ ---
6
+
7
+ # Observe, apply, and monitor
8
+
9
+ ## Collection modes
10
+
11
+ - `observe render --target <URL>` uses optional Playwright. Browser evidence is
12
+ not search-index evidence.
13
+ - `observe index --input <JSON>` imports owner exports. With `--target`,
14
+ `--site-url`, and `GSC_ACCESS_TOKEN`, it calls Google URL Inspection, which
15
+ reports the indexed version rather than performing a live indexability test.
16
+ - `observe citations --input <JSON>` imports complete controlled observations.
17
+ With `--endpoint`, the input is a versioned prompt corpus and each prompt runs
18
+ 1-20 times (default 3) through the disclosed adapter protocol. An API is not
19
+ presumed equivalent to a provider's consumer search experience.
20
+ - `observe logs --input <JSON>` imports server/CDN records. User-agent matches
21
+ without IP verification remain low confidence.
22
+ - `observe passages|consensus --target <dir|URL>` performs static extraction.
23
+ - `observe performance` imports evidence or calls CrUX with `CRUX_API_KEY`.
24
+ - `observe corroboration --input <JSON>` records observable external mentions;
25
+ controlled or unverified sources do not become authority claims.
26
+
27
+ ## Guarded remediation
28
+
29
+ `apply --input remediation-spec.json` is a dry run. Every operation binds to an
30
+ existing audit run and finding IDs, stays inside repository source, names a
31
+ reviewer, matches the exact file hash, and identifies exactly one source string.
32
+ `--write` applies only after all operations validate. Build, tests, semantic
33
+ review, re-audit, and snapshot comparison remain mandatory afterward.
34
+
35
+ ## Monitoring
36
+
37
+ `monitor [runA runB]` reports state changes, missing observations, index loss,
38
+ canonical disagreement, and citation-presence changes. Alerts are evidence
39
+ changes, not causal explanations or ranking conclusions. Schedule it in CI at
40
+ the cadence defined by lifecycle and experiment records.
@@ -1,24 +1,25 @@
1
1
  {
2
2
  "name": "citable",
3
- "version": "1.3.1",
3
+ "version": "1.5.0",
4
4
  "managedBy": "citable-cli",
5
5
  "provider": "codex",
6
6
  "providerName": "OpenAI Codex",
7
7
  "scope": "bundle",
8
- "sourcePackage": "@nebulacomponents/citable@1.3.1",
8
+ "sourcePackage": "@nebulacomponents/citable@1.5.0",
9
9
  "variantPath": ".agents/skills/citable",
10
10
  "files": {
11
11
  "commands/action-findings.md": "sha256:510361461f24fcd4a550e0a8d960c383aefe23f9a65a54a3ffc44abd4c1293e7",
12
12
  "commands/ingest.md": "sha256:cf35659aecd9d0e160909003efdbe056864fc5d824c71b4ef0ee801ce07ff598",
13
- "commands/measurement.md": "sha256:3550b1e747c5a38cdb712016b9bc773d93596bc4d1b49a309f9cddd816c1b662",
13
+ "commands/measurement.md": "sha256:5d7d94b496d2772ad433cf9fafa85af5c9638c8f326ec2017d2c8d6ef4dd1650",
14
+ "commands/observe-and-act.md": "sha256:02a93bbbfddc3d8e11cb921ddccd19b0666133c4bdb4f4a280bcb131bed37e8c",
14
15
  "commands/optimize-page.md": "sha256:35866f3d7cdeef0376ea7a7d7036085a9b9cf95bbb300ecf4bd77610ebd74d85",
15
16
  "commands/page-work.md": "sha256:965a66e59bdf7b0da482d26fade53b3d265885ece5d463fe83b0789ebefaef3e",
16
- "commands/README.md": "sha256:186ca808e0f303938ef9f8f98c8273c4b7cb76cc791e7d751c3639bf201e3bb1",
17
+ "commands/README.md": "sha256:be1f55b439af94670d0711dcd7476eab09a2d7c86c4bcbf85b2ee0b454fb8684",
17
18
  "commands/validate-render.md": "sha256:a8e1d04d40b84d57c35039250d98c6a7302cd44a148a8c3b9d9cfb92678c4347",
18
19
  "policies/crawler-policy-template.md": "sha256:15c88a4eeb21f53f71e5250dd3eb2d2791a814b304eaefce8bb30e2bdf2e2e59",
19
20
  "references/aeo-geo-validation.md": "sha256:e45828d3ccca54a08513cb4235578c8a8ecf1dc47d1cb98e4a497838103bef70",
20
21
  "references/anti-patterns.md": "sha256:de63f8e646af0fbf479b45eb1d050ae62a8637acc320d21b87e4a083fd4c47e7",
21
- "references/capability-boundaries.md": "sha256:901840fe87080071d0b11aa329d6a7954ffa6c601c58fadc275b55a7a988376a",
22
+ "references/capability-boundaries.md": "sha256:0d66909025541c1b4b7f5532750fdbfaed9116fb7fc156a67f290024342e30e4",
22
23
  "rubrics/answer-extractability.md": "sha256:c8e741143c34e53afdb3dc7b6976ce7b4485dce13b12d14c193fccb17bacf1da",
23
24
  "rubrics/claim-boundedness.md": "sha256:0bab1b85248c252b966175912ebfae13bf18aa7e41573f7466831ac78b5d3e27",
24
25
  "rubrics/comparison-fairness.md": "sha256:7afc86903aa4a695060be7b6bca42ba505c106ea7cfa153344189afc5b78a5ba",
@@ -37,22 +38,28 @@
37
38
  "schemas/common.defs.json": "sha256:effdd812910d1c275c50520bb70d8aec085e53fa8cb68054dc58c04a5d4a66b3",
38
39
  "schemas/competitor.schema.json": "sha256:2f6fd7e4543846bde56ff4dc62bb41fa366889787b794a7cdb0bff1a3392e591",
39
40
  "schemas/config.schema.json": "sha256:a87f3bb0087de09035b9f2dafea66e32e4fcc2e3e329abcd0fd8a5ec33318f2a",
41
+ "schemas/connection.schema.json": "sha256:cf0e9698dee697fb2c124989c3f478187297594c6ae76ecd04a43470e0a73616",
40
42
  "schemas/crawler.schema.json": "sha256:1a113dfb80bc6cde904c3ea648c82ea1d88fe50f2c1a0e7175d44abba28ac64e",
41
43
  "schemas/detector-quality.schema.json": "sha256:5e9e1ac80b1198a0ff8fa17b9f7a543d3ccf3ed3d60196152f6ff095cfdebccd",
42
44
  "schemas/entity.schema.json": "sha256:78a08c35c8f4eb7a804ab46b61a238502f59621ac5218991e783251fbde61c4f",
43
45
  "schemas/evidence.schema.json": "sha256:76baec7ad7e89c6952473c01dacb9e3b26953c088331e6314d531ce620df9ec1",
44
46
  "schemas/experiment.schema.json": "sha256:3cebebc5745a9eb359261408b0a0421b8370d2c94f8244ce939827cd9da41cb6",
45
47
  "schemas/finding.schema.json": "sha256:85907cd04cd8d2fe24a1e618e0df7160f6d56aa1818db501f345aebce5eb5edb",
48
+ "schemas/intervention.schema.json": "sha256:fcf28e117b207e64ffc96088aa70a95370841a2a9fa43ecb1c82b34c2058a818",
49
+ "schemas/metric.schema.json": "sha256:2ada648e7274a8d78cc9d6e7ed616f91faa79cf9ed07613e2c1fc53b247aac8d",
50
+ "schemas/objective.schema.json": "sha256:94404dc95d04a6641ea7b9654317d0222793251ad44d3dfd2875738622a36025",
51
+ "schemas/observation.schema.json": "sha256:240ab0030e900dd8d779b63ef0558b1cca3b59a6de1a10cf9b2418b73ad92f02",
46
52
  "schemas/page.schema.json": "sha256:627613c35f461177fa946df08edf66fbf6f6bbdfc57eef812572b3af796d5e07",
47
53
  "schemas/project.schema.json": "sha256:ea48fdb6480f7047ba4594bd5908bc1f79c1ad6b9a2c204df900959b5f203dc6",
48
54
  "schemas/prompt-result.schema.json": "sha256:b55be47d7d58d7b1dd8c3b1e849e24e55216212c592cde7eb836953379b85737",
49
55
  "schemas/prompt.schema.json": "sha256:7f0f50c83a86ac91faa7b79895dbc1fed371e8c0342e18d8c2877cc81f4f0f4c",
50
56
  "schemas/query.schema.json": "sha256:3c0793a8c0c48ab39320416790840b345ea987696f35b1cc364f23245a62aacb",
57
+ "schemas/remediation-spec.schema.json": "sha256:6fe8cb773702862ba6d261198bb5cc2dca3eca0a2310a60ebddd04377654df8d",
51
58
  "schemas/run.schema.json": "sha256:46c3178620f3a358d936d535aeadb83454b9b35b551e53e6615cc9862063dacb",
52
59
  "scripts/README.md": "sha256:1c3e952950ef353849621b07c5f615bf7cd20cc5654da4635492a7bd6384e747",
53
- "SKILL.md": "sha256:571cbb467f40ac55778fdbbcd1d36a9234adde87cdfe80c7ed7d0bd0a799895d",
60
+ "SKILL.md": "sha256:108e48a53c8bd39c312e48d8b62e274c1c7da02cf2da3bc818e078524175558f",
54
61
  "templates/finding-review.md": "sha256:b270a83d3f015150aac80249ae9314979c0befea39ff92ec455f9a5aaa73404c",
55
- "VERSION": "sha256:10e2e117b01523891ca271a615ae36e9d5e52348fd7d642f66727602c1b8dcbe"
62
+ "VERSION": "sha256:acb57a7135b2d7d6e665f67f056e21353023b93835f54def1ae523bf76f1bfb3"
56
63
  },
57
- "treeHash": "sha256:f4be2ccf3c0ceb34df2554f6dad5d25eab4c11f8ccc98002a0abce2cb0667d30"
64
+ "treeHash": "sha256:887e87c19988b711b5e466cdb31b2a2dc9d212cb10f198b82001641aa4a45498"
58
65
  }
@@ -6,18 +6,18 @@ Use the narrowest supported state. Never promote evidence across rows.
6
6
  | --- | --- | --- |
7
7
  | Allowed by policy | Implemented | Effective robots rule plus crawler-purpose registry decision |
8
8
  | Synthetic fetch succeeded | Partial | Captured status, redirects, headers, body from the declared user agent; label identity simulated |
9
- | Verified crawler reached edge | Operator supplied | Request log plus provider-published IP verification where supported |
10
- | Observed in production logs | Operator supplied | Timestamped server/CDN log with URL, status, bytes, latency, cache result, UA, and verification result |
11
- | Indexed | Operator supplied | Search Console/Bing Webmaster/API or timestamped engine observation |
9
+ | Verified crawler reached edge | Imported evidence | `observe logs` record plus provider-published IP verification where supported |
10
+ | Observed in production logs | Imported evidence | Timestamped `observe logs` artifact with URL, status, bytes, latency, cache result, UA, and verification result |
11
+ | Indexed | Google API or imported evidence | `observe index`; Google inspection covers the indexed version, other engines require owner exports |
12
12
  | Returned by retrieval | Operator supplied | Provider observation containing retrieved source URL |
13
- | Cited | Operator supplied | Complete answer observation with citation URL |
14
- | Materially supports answer | Human review required | Answer claim mapped to a passage that entails it |
13
+ | Cited | Import or disclosed adapter | Complete `observe citations` answer with citation URL and product/adapter mode |
14
+ | Materially supports answer | Human review required | `citation_review` maps answer claim to source passage and names the reviewer |
15
15
  | Recommended | Operator supplied + review | Explicit recommendation, constraints, provider/mode/locale/time |
16
16
 
17
- Current CLI URL mode does not prove crawler identity, WAF allowlisting,
17
+ URL audit mode alone does not prove crawler identity, WAF allowlisting,
18
18
  production-log access, index presence, selected canonical, rendered DOM parity,
19
- or provider citation behavior. Record those states as `not_evidenced` unless the
20
- specified evidence is supplied.
19
+ or provider citation behavior. Observation collectors can supply narrower
20
+ evidence for these states; unavailable inputs remain `not_evidenced`.
21
21
 
22
22
  Primary-source lineage for these boundaries:
23
23
 
@@ -0,0 +1,32 @@
1
+ {
2
+ "$id": "citable://schemas/connection.schema.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Optional connector state registry",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["version", "kind", "updated", "entries"],
8
+ "properties": {
9
+ "version": { "const": 1 },
10
+ "kind": { "const": "connections" },
11
+ "updated": { "type": "string", "format": "date-time" },
12
+ "entries": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["connection_id", "provider", "state", "authentication", "scopes", "limitations"],
18
+ "properties": {
19
+ "connection_id": { "type": "string", "pattern": "^CONNECTION-[A-Z0-9][A-Z0-9_-]*$" },
20
+ "provider": { "type": "string", "minLength": 1 },
21
+ "property_id": { "type": ["string", "null"] },
22
+ "state": { "type": "string", "enum": ["not_configured", "configured", "synchronized", "partial", "authorization_expired", "permission_denied", "quota_limited", "temporarily_unavailable"] },
23
+ "authentication": { "type": "string", "enum": ["none", "environment", "os_keychain", "external_secret_manager", "owner_import"] },
24
+ "scopes": { "type": "array", "items": { "type": "string" } },
25
+ "last_synchronized_at": { "type": ["string", "null"], "format": "date-time" },
26
+ "cursor": { "type": ["string", "null"] },
27
+ "limitations": { "type": "array", "items": { "type": "string" } }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$id": "citable://schemas/intervention.schema.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Intervention registry",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["version", "kind", "updated", "entries"],
8
+ "properties": {
9
+ "version": { "const": 1 },
10
+ "kind": { "const": "interventions" },
11
+ "updated": { "type": "string", "format": "date-time" },
12
+ "entries": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["intervention_id", "name", "status", "deployed_at", "affected_urls", "finding_ids", "objective_ids", "limitations"],
18
+ "properties": {
19
+ "intervention_id": { "type": "string", "pattern": "^INTERVENTION-[A-Z0-9][A-Z0-9_-]*$" },
20
+ "name": { "type": "string", "minLength": 1 },
21
+ "status": { "type": "string", "enum": ["planned", "deployed", "rolled_back", "superseded"] },
22
+ "deployed_at": { "type": ["string", "null"], "format": "date-time" },
23
+ "commit": { "type": ["string", "null"] },
24
+ "pull_request": { "type": ["string", "null"] },
25
+ "affected_urls": { "type": "array", "items": { "type": "string" } },
26
+ "finding_ids": { "type": "array", "items": { "type": "string" } },
27
+ "objective_ids": { "type": "array", "items": { "type": "string", "pattern": "^OBJECTIVE-" } },
28
+ "limitations": { "type": "array", "items": { "type": "string" } }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$id": "citable://schemas/metric.schema.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Metric registry",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["version", "kind", "updated", "entries"],
8
+ "properties": {
9
+ "version": { "const": 1 },
10
+ "kind": { "const": "metrics" },
11
+ "updated": { "type": "string", "format": "date-time" },
12
+ "entries": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["metric_id", "name", "provider", "external_name", "unit", "value_type", "aggregation", "direction", "dimensions", "limitations"],
18
+ "properties": {
19
+ "metric_id": { "type": "string", "pattern": "^METRIC-[A-Z0-9][A-Z0-9_-]*$" },
20
+ "name": { "type": "string", "minLength": 1 },
21
+ "description": { "type": "string" },
22
+ "provider": { "type": "string", "minLength": 1 },
23
+ "external_name": { "type": "string", "minLength": 1 },
24
+ "unit": { "type": "string", "enum": ["count", "ratio", "percent", "currency", "duration_ms", "position", "score", "custom"] },
25
+ "custom_unit": { "type": "string", "minLength": 1 },
26
+ "value_type": { "type": "string", "enum": ["integer", "number"] },
27
+ "aggregation": { "type": "string", "enum": ["sum", "average", "minimum", "maximum", "latest", "provider_defined"] },
28
+ "direction": { "type": "string", "enum": ["increase", "decrease", "maintain", "contextual"] },
29
+ "dimensions": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
30
+ "limitations": { "type": "array", "items": { "type": "string", "minLength": 1 } },
31
+ "status": { "type": "string", "enum": ["active", "deprecated"] }
32
+ },
33
+ "allOf": [
34
+ {
35
+ "if": { "properties": { "unit": { "const": "custom" } } },
36
+ "then": { "required": ["custom_unit"] }
37
+ }
38
+ ]
39
+ }
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$id": "citable://schemas/objective.schema.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Objective registry",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["version", "kind", "updated", "entries"],
8
+ "properties": {
9
+ "version": { "const": 1 },
10
+ "kind": { "const": "objectives" },
11
+ "updated": { "type": "string", "format": "date-time" },
12
+ "entries": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["objective_id", "name", "status", "primary_metrics", "supporting_metrics", "guardrails", "cohort", "comparison"],
18
+ "properties": {
19
+ "objective_id": { "type": "string", "pattern": "^OBJECTIVE-[A-Z0-9][A-Z0-9_-]*$" },
20
+ "name": { "type": "string", "minLength": 1 },
21
+ "description": { "type": "string" },
22
+ "owner": { "type": ["string", "null"] },
23
+ "status": { "type": "string", "enum": ["draft", "active", "paused", "archived"] },
24
+ "primary_metrics": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/definitions/metricRef" } },
25
+ "supporting_metrics": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/definitions/metricRef" } },
26
+ "guardrails": { "type": "array", "items": { "$ref": "#/definitions/guardrail" } },
27
+ "cohort": { "$ref": "#/definitions/cohort" },
28
+ "comparison": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["baseline_days", "evaluation_days", "minimum_observations"],
32
+ "properties": {
33
+ "baseline_days": { "type": "integer", "minimum": 1 },
34
+ "evaluation_days": { "type": "integer", "minimum": 1 },
35
+ "minimum_observations": { "type": "integer", "minimum": 1 }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "definitions": {
43
+ "metricRef": { "type": "string", "pattern": "^METRIC-[A-Z0-9][A-Z0-9_-]*$" },
44
+ "guardrail": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["metric_id", "operator", "threshold"],
48
+ "properties": {
49
+ "metric_id": { "$ref": "#/definitions/metricRef" },
50
+ "operator": { "type": "string", "enum": ["gte", "lte", "increase_by", "decrease_by", "no_regression"] },
51
+ "threshold": { "type": "number" }
52
+ }
53
+ },
54
+ "cohort": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["urls", "queries", "labels"],
58
+ "properties": {
59
+ "urls": { "type": "array", "items": { "type": "string" } },
60
+ "queries": { "type": "array", "items": { "type": "string" } },
61
+ "labels": { "type": "array", "items": { "type": "string" } }
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$id": "citable://schemas/observation.schema.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Collected observation envelope",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["observation_id", "kind", "state", "collected_at", "collection_method", "confidence", "source", "evidence_hash", "data"],
8
+ "properties": {
9
+ "observation_id": { "type": "string", "minLength": 1 },
10
+ "kind": { "type": "string", "enum": ["render", "index", "citation", "citation_review", "crawler_log", "passage", "canonical_freshness", "performance", "corroboration", "metric"] },
11
+ "state": { "type": "string", "enum": ["observed", "not_observed", "not_evidenced", "incomplete", "review_required", "failed"] },
12
+ "collected_at": { "type": "string", "format": "date-time" },
13
+ "collection_method": { "type": "string", "enum": ["live_api", "browser", "owner_import", "synthetic_fetch", "static_analysis", "human_review"] },
14
+ "confidence": { "type": "string", "enum": ["confirmed", "high", "medium", "low", "unknown"] },
15
+ "source": { "type": "string", "minLength": 1 },
16
+ "evidence_hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
17
+ "data": { "type": "object" },
18
+ "limitations": { "type": "array", "items": { "type": "string" } }
19
+ }
20
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$id": "citable://schemas/remediation-spec.schema.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Guarded remediation specification",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["source_run_id", "operations"],
8
+ "properties": {
9
+ "source_run_id": { "type": "string" },
10
+ "operations": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["operation_id", "file", "find", "replace", "expected_file_hash", "finding_ids"],
16
+ "properties": {
17
+ "operation_id": { "type": "string" },
18
+ "file": { "type": "string", "minLength": 1 },
19
+ "find": { "type": "string", "minLength": 1 },
20
+ "replace": { "type": "string" },
21
+ "expected_file_hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
22
+ "finding_ids": { "type": "array", "minItems": 1, "items": { "type": "string" } },
23
+ "reviewer": { "type": "string" }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }