@nebulacomponents/citable 1.17.0 → 1.18.1

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 (164) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/universal/.agents/skills/citable/SKILL.md +41 -1
  3. package/dist/universal/.agents/skills/citable/VERSION +1 -1
  4. package/dist/universal/.agents/skills/citable/agents/citable-remediator.md +43 -0
  5. package/dist/universal/.agents/skills/citable/agents/citable-sow-architect.md +43 -0
  6. package/dist/universal/.agents/skills/citable/commands/README.md +13 -0
  7. package/dist/universal/.agents/skills/citable/commands/remediation.md +55 -0
  8. package/dist/universal/.agents/skills/citable/commands/reporting.md +28 -0
  9. package/dist/universal/.agents/skills/citable/commands/sow.md +95 -0
  10. package/dist/universal/.agents/skills/citable/manifest.json +12 -7
  11. package/dist/universal/.agents/skills/citable/schemas/sow.schema.json +409 -0
  12. package/dist/universal/.claude/agents/citable/citable-remediator.md +43 -0
  13. package/dist/universal/.claude/agents/citable/citable-sow-architect.md +43 -0
  14. package/dist/universal/.claude/agents/citable/manifest.json +6 -4
  15. package/dist/universal/.claude/skills/citable/SKILL.md +41 -1
  16. package/dist/universal/.claude/skills/citable/VERSION +1 -1
  17. package/dist/universal/.claude/skills/citable/agents/citable-remediator.md +43 -0
  18. package/dist/universal/.claude/skills/citable/agents/citable-sow-architect.md +43 -0
  19. package/dist/universal/.claude/skills/citable/commands/README.md +13 -0
  20. package/dist/universal/.claude/skills/citable/commands/remediation.md +55 -0
  21. package/dist/universal/.claude/skills/citable/commands/reporting.md +28 -0
  22. package/dist/universal/.claude/skills/citable/commands/sow.md +95 -0
  23. package/dist/universal/.claude/skills/citable/manifest.json +16 -9
  24. package/dist/universal/.claude/skills/citable/schemas/sow.schema.json +409 -0
  25. package/dist/universal/.cursor/skills/citable/SKILL.md +41 -1
  26. package/dist/universal/.cursor/skills/citable/VERSION +1 -1
  27. package/dist/universal/.cursor/skills/citable/agents/citable-remediator.md +43 -0
  28. package/dist/universal/.cursor/skills/citable/agents/citable-sow-architect.md +43 -0
  29. package/dist/universal/.cursor/skills/citable/commands/README.md +13 -0
  30. package/dist/universal/.cursor/skills/citable/commands/remediation.md +55 -0
  31. package/dist/universal/.cursor/skills/citable/commands/reporting.md +28 -0
  32. package/dist/universal/.cursor/skills/citable/commands/sow.md +95 -0
  33. package/dist/universal/.cursor/skills/citable/manifest.json +12 -7
  34. package/dist/universal/.cursor/skills/citable/schemas/sow.schema.json +409 -0
  35. package/dist/universal/.gemini/skills/citable/SKILL.md +41 -1
  36. package/dist/universal/.gemini/skills/citable/VERSION +1 -1
  37. package/dist/universal/.gemini/skills/citable/agents/citable-remediator.md +43 -0
  38. package/dist/universal/.gemini/skills/citable/agents/citable-sow-architect.md +43 -0
  39. package/dist/universal/.gemini/skills/citable/commands/README.md +13 -0
  40. package/dist/universal/.gemini/skills/citable/commands/remediation.md +55 -0
  41. package/dist/universal/.gemini/skills/citable/commands/reporting.md +28 -0
  42. package/dist/universal/.gemini/skills/citable/commands/sow.md +95 -0
  43. package/dist/universal/.gemini/skills/citable/manifest.json +12 -7
  44. package/dist/universal/.gemini/skills/citable/schemas/sow.schema.json +409 -0
  45. package/dist/universal/.github/skills/citable/SKILL.md +41 -1
  46. package/dist/universal/.github/skills/citable/VERSION +1 -1
  47. package/dist/universal/.github/skills/citable/agents/citable-remediator.md +43 -0
  48. package/dist/universal/.github/skills/citable/agents/citable-sow-architect.md +43 -0
  49. package/dist/universal/.github/skills/citable/commands/README.md +13 -0
  50. package/dist/universal/.github/skills/citable/commands/remediation.md +55 -0
  51. package/dist/universal/.github/skills/citable/commands/reporting.md +28 -0
  52. package/dist/universal/.github/skills/citable/commands/sow.md +95 -0
  53. package/dist/universal/.github/skills/citable/manifest.json +12 -7
  54. package/dist/universal/.github/skills/citable/schemas/sow.schema.json +409 -0
  55. package/dist/universal/.kiro/skills/citable/SKILL.md +41 -1
  56. package/dist/universal/.kiro/skills/citable/VERSION +1 -1
  57. package/dist/universal/.kiro/skills/citable/agents/citable-remediator.md +43 -0
  58. package/dist/universal/.kiro/skills/citable/agents/citable-sow-architect.md +43 -0
  59. package/dist/universal/.kiro/skills/citable/commands/README.md +13 -0
  60. package/dist/universal/.kiro/skills/citable/commands/remediation.md +55 -0
  61. package/dist/universal/.kiro/skills/citable/commands/reporting.md +28 -0
  62. package/dist/universal/.kiro/skills/citable/commands/sow.md +95 -0
  63. package/dist/universal/.kiro/skills/citable/manifest.json +12 -7
  64. package/dist/universal/.kiro/skills/citable/schemas/sow.schema.json +409 -0
  65. package/dist/universal/.opencode/skills/citable/SKILL.md +41 -1
  66. package/dist/universal/.opencode/skills/citable/VERSION +1 -1
  67. package/dist/universal/.opencode/skills/citable/agents/citable-remediator.md +43 -0
  68. package/dist/universal/.opencode/skills/citable/agents/citable-sow-architect.md +43 -0
  69. package/dist/universal/.opencode/skills/citable/commands/README.md +13 -0
  70. package/dist/universal/.opencode/skills/citable/commands/remediation.md +55 -0
  71. package/dist/universal/.opencode/skills/citable/commands/reporting.md +28 -0
  72. package/dist/universal/.opencode/skills/citable/commands/sow.md +95 -0
  73. package/dist/universal/.opencode/skills/citable/manifest.json +12 -7
  74. package/dist/universal/.opencode/skills/citable/schemas/sow.schema.json +409 -0
  75. package/dist/universal/.pi/agent/skills/citable/SKILL.md +41 -1
  76. package/dist/universal/.pi/agent/skills/citable/VERSION +1 -1
  77. package/dist/universal/.pi/agent/skills/citable/agents/citable-remediator.md +43 -0
  78. package/dist/universal/.pi/agent/skills/citable/agents/citable-sow-architect.md +43 -0
  79. package/dist/universal/.pi/agent/skills/citable/commands/README.md +13 -0
  80. package/dist/universal/.pi/agent/skills/citable/commands/remediation.md +55 -0
  81. package/dist/universal/.pi/agent/skills/citable/commands/reporting.md +28 -0
  82. package/dist/universal/.pi/agent/skills/citable/commands/sow.md +95 -0
  83. package/dist/universal/.pi/agent/skills/citable/manifest.json +12 -7
  84. package/dist/universal/.pi/agent/skills/citable/schemas/sow.schema.json +409 -0
  85. package/dist/universal/.qoder/skills/citable/SKILL.md +41 -1
  86. package/dist/universal/.qoder/skills/citable/VERSION +1 -1
  87. package/dist/universal/.qoder/skills/citable/agents/citable-remediator.md +43 -0
  88. package/dist/universal/.qoder/skills/citable/agents/citable-sow-architect.md +43 -0
  89. package/dist/universal/.qoder/skills/citable/commands/README.md +13 -0
  90. package/dist/universal/.qoder/skills/citable/commands/remediation.md +55 -0
  91. package/dist/universal/.qoder/skills/citable/commands/reporting.md +28 -0
  92. package/dist/universal/.qoder/skills/citable/commands/sow.md +95 -0
  93. package/dist/universal/.qoder/skills/citable/manifest.json +12 -7
  94. package/dist/universal/.qoder/skills/citable/schemas/sow.schema.json +409 -0
  95. package/dist/universal/.rovodev/skills/citable/SKILL.md +41 -1
  96. package/dist/universal/.rovodev/skills/citable/VERSION +1 -1
  97. package/dist/universal/.rovodev/skills/citable/agents/citable-remediator.md +43 -0
  98. package/dist/universal/.rovodev/skills/citable/agents/citable-sow-architect.md +43 -0
  99. package/dist/universal/.rovodev/skills/citable/commands/README.md +13 -0
  100. package/dist/universal/.rovodev/skills/citable/commands/remediation.md +55 -0
  101. package/dist/universal/.rovodev/skills/citable/commands/reporting.md +28 -0
  102. package/dist/universal/.rovodev/skills/citable/commands/sow.md +95 -0
  103. package/dist/universal/.rovodev/skills/citable/manifest.json +12 -7
  104. package/dist/universal/.rovodev/skills/citable/schemas/sow.schema.json +409 -0
  105. package/dist/universal/.trae/skills/citable/SKILL.md +41 -1
  106. package/dist/universal/.trae/skills/citable/VERSION +1 -1
  107. package/dist/universal/.trae/skills/citable/agents/citable-remediator.md +43 -0
  108. package/dist/universal/.trae/skills/citable/agents/citable-sow-architect.md +43 -0
  109. package/dist/universal/.trae/skills/citable/commands/README.md +13 -0
  110. package/dist/universal/.trae/skills/citable/commands/remediation.md +55 -0
  111. package/dist/universal/.trae/skills/citable/commands/reporting.md +28 -0
  112. package/dist/universal/.trae/skills/citable/commands/sow.md +95 -0
  113. package/dist/universal/.trae/skills/citable/manifest.json +12 -7
  114. package/dist/universal/.trae/skills/citable/schemas/sow.schema.json +409 -0
  115. package/dist/universal/.trae-cn/skills/citable/SKILL.md +41 -1
  116. package/dist/universal/.trae-cn/skills/citable/VERSION +1 -1
  117. package/dist/universal/.trae-cn/skills/citable/agents/citable-remediator.md +43 -0
  118. package/dist/universal/.trae-cn/skills/citable/agents/citable-sow-architect.md +43 -0
  119. package/dist/universal/.trae-cn/skills/citable/commands/README.md +13 -0
  120. package/dist/universal/.trae-cn/skills/citable/commands/remediation.md +55 -0
  121. package/dist/universal/.trae-cn/skills/citable/commands/reporting.md +28 -0
  122. package/dist/universal/.trae-cn/skills/citable/commands/sow.md +95 -0
  123. package/dist/universal/.trae-cn/skills/citable/manifest.json +12 -7
  124. package/dist/universal/.trae-cn/skills/citable/schemas/sow.schema.json +409 -0
  125. package/dist/universal/manifest.json +150 -88
  126. package/package.json +1 -1
  127. package/schemas/sow.schema.json +409 -0
  128. package/skill/SKILL.md +41 -1
  129. package/skill/agents/citable-remediator.md +43 -0
  130. package/skill/agents/citable-sow-architect.md +43 -0
  131. package/skill/commands/README.md +13 -0
  132. package/skill/commands/remediation.md +55 -0
  133. package/skill/commands/reporting.md +28 -0
  134. package/skill/commands/sow.md +95 -0
  135. package/src/analysis/behavioral.js +126 -0
  136. package/src/analysis/croAudit.js +302 -0
  137. package/src/analysis/croRoadmap.js +121 -0
  138. package/src/analysis/eeat.js +300 -0
  139. package/src/analysis/funnelAnalysis.js +171 -0
  140. package/src/analysis/iceMatrix.js +205 -0
  141. package/src/analysis/offpage.js +228 -0
  142. package/src/analysis/readiness.js +253 -0
  143. package/src/analysis/schemaRecommendations.js +173 -0
  144. package/src/analysis/strategicRoadmap.js +148 -0
  145. package/src/cli/index.js +149 -3
  146. package/src/commands/answerEngineReadiness.js +48 -0
  147. package/src/commands/auditBacklinks.js +79 -0
  148. package/src/commands/croBacklog.js +182 -0
  149. package/src/commands/croSuite.js +156 -0
  150. package/src/commands/executive.js +6 -0
  151. package/src/commands/executiveCro.js +30 -0
  152. package/src/commands/executiveSearch.js +28 -0
  153. package/src/commands/inspectCro.js +7 -0
  154. package/src/commands/inspectEeat.js +53 -0
  155. package/src/commands/prioritize.js +42 -6
  156. package/src/commands/roadmapCmd.js +69 -0
  157. package/src/commands/schemaCmd.js +10 -2
  158. package/src/commands/sowCmd.js +84 -0
  159. package/src/commands/sweep.js +357 -0
  160. package/src/reporting/executiveCroReport.js +731 -0
  161. package/src/reporting/executiveExport.js +62 -0
  162. package/src/reporting/executiveSearchReport.js +704 -0
  163. package/src/sow/admissibilityGate.js +364 -0
  164. package/src/sow/generateSow.js +1178 -0
@@ -0,0 +1,55 @@
1
+ ---
2
+ command: /citable remediate --finding <id> [--target <file>] [--write]
3
+ purpose: Apply safe, validated AST code patches for deterministic defects with automated rollback snapshots, structural syntax validation, and confidence gating.
4
+ preconditions: [valid finding from audit run; target source file identified and writeable]
5
+ failure_behaviour: unknown framework -> fail closed; invalid syntax after patch -> rollback and refuse; confidence < 0.7 -> refuse write; semantic microcopy changes -> always refuse automated write (human editorial decision required)
6
+ artifacts_created: [.citable/remediation/snapshots/<snapshot-id>/, unified diff on stdout]
7
+ ---
8
+
9
+ # Closed-Loop Code Remediation & Verification
10
+
11
+ The remediation suite provides safe, gated code fixes for deterministic technical, schema, and CRO defects discovered during audits. It bridges the gap between audit findings and customer-verified pull requests.
12
+
13
+ ## 1. Safe Patch Application (`citable remediate`)
14
+
15
+ 1. **Framework Detection**: Identifies target source syntax (`jsx`, `tsx`, `vue`, `html`). Fails closed on unknown or ambiguous frameworks.
16
+ 2. **Idempotent AST Patching**: Patches are mathematically verified to be idempotent (`applyPatchDetailed`): applying the patch a second time produces an identical AST (a fixed point).
17
+ 3. **Structural Validation Gate**: Runs `validatePatchedSource` to confirm that the patch does not break AST structure, introduce syntax errors, or alter unrelated code blocks.
18
+ 4. **Confidence Threshold**: Computes an explicit multi-factor confidence score (`computeConfidence`). `--write` is refused if confidence falls below `0.70`.
19
+ 5. **Editorial Boundary (Semantic Microcopy Refusal)**: Automated `--write` is strictly refused for semantic copy, CTA wording, or headline changes (e.g. `CRO-012`, `COMP-003`). Microcopy is a human editorial and brand judgment (fact ≠ inference).
20
+ 6. **Rollback Snapshot**: Every `--write` automatically snapshots the target file under `.citable/remediation/snapshots/<timestamp>/` with a SHA-256 manifest before making any disk modifications.
21
+
22
+ ## 2. Closed-Loop Verification (`citable verify remediation`)
23
+
24
+ Running a patch is NOT proof that a defect is resolved:
25
+
26
+ ```bash
27
+ citable verify remediation --run <run-id> --finding <id> [--target <file>] [--apply]
28
+ ```
29
+
30
+ 1. **Deterministic Detector Rerun**: Re-executes the exact source detector (`detector_to_rerun`) against the patched target.
31
+ 2. **Regression Sweep**: Sweeps for newly introduced critical or high severity defects compared to the baseline run.
32
+ 3. **Verification Envelopes**: Emits a checksum-bound before/after verification envelope conforming to `schemas/remediation-verification.schema.json`.
33
+ 4. **Verdict Classification**:
34
+ * `verified`: Target detector no longer reports the defect; zero regressions introduced.
35
+ * `not_resolved`: Target detector still detects the condition on the patched surface.
36
+ * `blocked`: Prerequisite dependencies, build tools, or environments unavailable.
37
+ * `patch_refused`: Confidence below threshold, semantic copy gated, or syntax check failed.
38
+ 5. **Outcome Boundary**: Resolution means the detector no longer flags the subject — **it is never an outcome guarantee of rankings, AI citations, or conversion lift**.
39
+
40
+ ## 3. Customer Implementation Kits (`citable kit export`)
41
+
42
+ Produce an engineer-ready delivery kit for customer development teams:
43
+
44
+ ```bash
45
+ citable kit export --run <run-id> --finding <id> [--target <file>]
46
+ ```
47
+
48
+ Creates a self-contained directory containing:
49
+ * Verbatim finding with evidence lineage.
50
+ * Exact unified diff for code review.
51
+ * Reusable Nebula design system component template (React / Vue / HTML).
52
+ * Rendering-evidence manifest (real captured DOM/visual state; synthetic evidence forbidden).
53
+ * Acceptance test criteria and re-audit verification script.
54
+ * Deployment and rollback instructions.
55
+ * Explicit technical limitations and non-guarantee disclosures.
@@ -71,3 +71,31 @@ any observed change to a specific intervention.
71
71
  authoritative index guarantees. Divergences are reported as factual observations,
72
72
  never fabricated or interpolated.
73
73
 
74
+ # Enterprise Search Intelligence Briefing (`citable report search`)
75
+
76
+ 1. Run `citable report search [--target <dir|url>] [--run <id>] [--format md|html|json] [--output <file>]`
77
+ to generate the 19-pillar Executive Search Intelligence Briefing.
78
+ 2. Synthesizes technical crawlability, indexation, Core Web Vitals readiness,
79
+ AEO answer-extractability, GEO citation frequency, knowledge graph schema
80
+ architecture, and competitor SERP landscape into an executive document.
81
+ 3. Every recommendation binds to a verified finding in the Evidence Register.
82
+ 4. Facts and inferences are strictly segregated: deterministic observations are
83
+ reported in green data panels; strategic hypotheses and inferences are explicitly
84
+ labeled with confidence ratings.
85
+ 5. Refusal boundary: Never promises rankings, algorithmic immunity, or indexing
86
+ guarantees.
87
+
88
+ # Enterprise CRO & Customer Journey Briefing (`citable report cro`)
89
+
90
+ 1. Run `citable report cro [--target <dir|url>] [--input <file>] [--format md|html|json] [--output <file>]`
91
+ to generate the 25-pillar Executive Conversion & Customer Journey Briefing.
92
+ 2. Covers end-to-end conversion paths: above-the-fold clarity, message-match
93
+ scoring, cognitive load, checkout friction, trust and objection analysis, offer
94
+ architecture, and prioritized A/B experiment blueprints.
95
+ 3. Strictly adheres to the **Observation vs Hypothesis vs Causation** taxonomy:
96
+ - **Observations**: Verbatim DOM defects (e.g. missing autocomplete, undersized touch targets).
97
+ - **Hypotheses**: Falsifiable experiment statements with measurable primary metrics and guardrails.
98
+ - **Causation**: Statistical lift attribution requiring concluded, SRM-clean A/B experiments.
99
+ 4. Refusal boundary: Revenue lift, conversion percentage improvements, and visual
100
+ saliency scores are modeled heuristic indices, never observed behavior or guaranteed revenue.
101
+
@@ -0,0 +1,95 @@
1
+ ---
2
+ command: /citable sow generate [--target <dir|url>] [--run <id>] [--budget <amount>] [--budget-minor <cents>] [--format md|html|json] [--output <path>] [--sample] [--draft]
3
+ purpose: Generate a contractually binding, evidence-traceable enterprise Statement of Work (SOW) from verified audit findings through a formal 7-gate scope admissibility filter and 7-column traceability matrix.
4
+ preconditions: [at least one finalized audit run with verified findings or live target; sample mode required for synthetic demonstrations]
5
+ failure_behaviour: absent or unverified findings in contractual mode -> NoFindingsError; all findings refused -> NoAdmissibleRequirementsError; non-existent run -> RunNotFoundError; negative or sub-cent budget -> BudgetCalculationError; invariant drift -> SowInvariantError
6
+ artifacts_created: [SOW.md, SOW.html, or SOW.json at specified output path]
7
+ ---
8
+
9
+ # Enterprise Statement of Work (SOW) Contract
10
+
11
+ The `citable sow` command generates enterprise-grade, evidence-backed Statements of Work derived from verified technical SEO, AEO, GEO, schema, and CRO audit findings. It establishes rigid, downward traceability:
12
+
13
+ ```text
14
+ Evidence (observation envelope)
15
+
16
+ Observation (deterministic DOM / HTTP probe)
17
+
18
+ Finding (verified defect / friction)
19
+
20
+ Recommendation (governed remediation)
21
+
22
+ SOW Requirement (contractual scope)
23
+
24
+ Deliverable (code patch / AST modification)
25
+
26
+ Acceptance Test (automated closed-loop detector rerun)
27
+ ```
28
+
29
+ ## 1. Operating Premises & Commercial Disclaimers
30
+
31
+ 1. **Fee Binding**: Supplier fees are bound exclusively to verified deliverable acceptance and closed-loop test execution.
32
+ 2. **Strict Outcome Disclaimers**: In strict compliance with Citable governance principles, **no search engine crawling, indexation, ranking, AI answer citation, or conversion revenue is guaranteed**.
33
+ 3. **No Synthetic Data in Contracts**: Attempting to generate a `CONTRACTUAL` SOW without verified empirical findings immediately fails closed with `NoFindingsError`. Synthetic findings are strictly confined to `--sample` / `--demo`.
34
+
35
+ ## 2. The Scope Admissibility Gate
36
+
37
+ Audit findings do NOT automatically become contractual obligations. Every candidate finding must pass 7 admissibility gates:
38
+
39
+ | Gate | Verification Check | Failure Refusal Code | Contractual Handling |
40
+ | :--- | :--- | :--- | :--- |
41
+ | **1. Exclusion Gate** | Check against explicit excluded detectors list | `REFUSE-EXCLUDED` | Track in internal backlog; execute under separate advisory engagement. |
42
+ | **2. Discipline Authorization** | Check if discipline is authorized under contract | `REFUSE-DISCIPLINE-NOT-AUTHORIZED` | Expand authorized disciplines in SOW engagement terms or contract under separate SOW. |
43
+ | **3. Evidence Maturity** | Require deterministic/observed confidence & evidence | `REFUSE-EXPERIMENTAL` / `REFUSE-NO-EVIDENCE` | Run controlled observation probes before considering for contractual obligation. |
44
+ | **4. Scope Boundary** | Verify URL matches authorized host, subdomain, or path | `REFUSE-OUT-OF-SCOPE` | Escalate domain ownership verification or expand contractual executive scope. |
45
+ | **5. Feasibility Gate** | Reject legal, trademark, GDPR, or unfeasible remediation | `REFUSE-UNFEASIBLE-REMEDIATION` | Refer to specialized legal or compliance counsel outside scope. |
46
+ | **6. Materiality Gate** | Require critical/high severity or ICE score >= threshold | `REFUSE-LOW-MATERIALITY` | Log to internal product maintenance backlog; omit from high-value SOW. |
47
+ | **7. Acceptance Gate** | Require automated rerun detector or objective pass/fail test | `REFUSE-UNVERIFIABLE` | Define deterministic verification criteria before adding to scope. |
48
+ | **8. Ownership Clarity** | Resolve accountable owner from finding or role mappings | `REFUSE-OWNER-UNRESOLVED` | Specify delivery_owner on finding or map discipline to accountable role. |
49
+
50
+ All refused findings are recorded in the SOW's `admissibility_gate.refusal_log` with standard refusal codes and contractual handling guidance.
51
+
52
+ ## 3. The 7-Column Traceability Matrix
53
+
54
+ Every admitted requirement must satisfy complete 7-column bidirectional traceability:
55
+
56
+ 1. **Finding ID**: Verbatim identifier of the empirical defect (e.g. `F-TECH-001`).
57
+ 2. **Recommendation**: Governed, safe remediation instruction.
58
+ 3. **SOW Requirement ID**: Contractual clause identifier (`REQ-SOW-001`).
59
+ 4. **Deliverable ID**: Accountable work package deliverable (`DELIV-01`).
60
+ 5. **Acceptance Test ID**: Automated closed-loop test (`ACC-TEST-001`).
61
+ 6. **Responsible Owner**: Named lead dev, architect, or agency practice owner.
62
+ 7. **Source Evidence IDs**: Array of cryptographic observation IDs (`['EVD-CWV-001']`).
63
+
64
+ ## 4. Commercial Currency & Minor-Unit Semantics
65
+
66
+ To eliminate commercial fee drift and rounding leaks, all internal calculations use exact **integer minor units (cents, exponent 2, currency `USD`)**:
67
+
68
+ * `currency`: Declared as `USD`.
69
+ * `currency_minor_unit_exponent`: Declared as `2`.
70
+ * `commercial_total_fee_minor`: Integer cents (e.g. `$50,000.00` = `5000000` cents).
71
+ * `milestones[].fee_minor`: Integer floor allocation across milestones with remainder pennies distributed deterministically to initial milestones.
72
+ * `commercial_total_fee_usd` / `milestones[].fee_usd`: Derived dollar representation formatted at presentation boundaries (`$33.34`, `$50,000`).
73
+ * Sub-cent fractional budgets (`100.001`) and negative budgets are strictly rejected.
74
+
75
+ ## 5. Generation Modes & Machine-Readable Provenance
76
+
77
+ Every generated SOW embeds an immutable `generation_provenance` block:
78
+
79
+ * **`CONTRACTUAL`**: Generated from verified historical run findings or live target; synthetic evidence forbidden.
80
+ * **`DRAFT`**: Generated with preliminary scope or unfinalized commercial terms; requires executive sign-off.
81
+ * **`NON_CONTRACTUAL_SAMPLE`**: Generated with synthetic baseline findings strictly for evaluation/demo (`--sample`).
82
+
83
+ Provenance tracks:
84
+ * `generator_version`: Exact Citable semver.
85
+ * `generated_at`: ISO 8601 timestamp.
86
+ * `source_type`: `HISTORICAL_RUN`, `LIVE_INSPECTION`, `DIRECT_FINDINGS`, or `SAMPLE_BASELINE`.
87
+ * `source_identifier`: Target URL, run ID, or sample identifier.
88
+ * `source_findings_count`: Integer count of evaluated findings.
89
+ * `findings_integrity_hash`: SHA-256 hash of input findings.
90
+
91
+ ## 6. SOW Verification Command
92
+
93
+ Run `citable sow validate <sow.json>` to verify:
94
+ 1. Strict schema compliance against `schemas/sow.schema.json` (`additionalProperties: false`).
95
+ 2. Cross-object invariants via `validateSowInvariants` (fee balancing, work package and deliverable parity, non-empty evidence links).
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "citable",
3
- "version": "1.17.0",
3
+ "version": "1.18.1",
4
4
  "managedBy": "citable-cli",
5
5
  "provider": "opencode",
6
6
  "providerName": "OpenCode",
7
7
  "scope": "bundle",
8
- "sourcePackage": "@nebulacomponents/citable@1.17.0",
8
+ "sourcePackage": "@nebulacomponents/citable@1.18.1",
9
9
  "variantPath": ".opencode/skills/citable",
10
10
  "agentProfiles": {
11
11
  "status": "unsupported",
@@ -13,7 +13,9 @@
13
13
  },
14
14
  "files": {
15
15
  "agents/citable-auditor.md": "sha256:06fe8d84834b2c09b7e7083aa6f57e94e837e0643dbe4ead4bbecf651fb41cad",
16
+ "agents/citable-remediator.md": "sha256:c990e929f411fc2f2de3aca759333502c956e96924b3a0f809ab0927062623dc",
16
17
  "agents/citable-semantic-reviewer.md": "sha256:77582263a048ea41ae3f7ee326dbd036222fab81ed83bda98034ec83ee21ef2e",
18
+ "agents/citable-sow-architect.md": "sha256:d55cf8bc2ab8f364c0d95ec39fc44406684110d1e4d1ff2e34702ded003094b4",
17
19
  "commands/action-findings.md": "sha256:b1d5c4d8d8b1092bc73b99430bea0a2e460031658e42bed33eb94da9a3c0e48f",
18
20
  "commands/artifact-interchange.md": "sha256:18d56fbfa6bb3f23f08593a9a8135e51c268618b049e53c793969b68000875c3",
19
21
  "commands/delivery.md": "sha256:3b29250f9e9f84442812e320a70d5d2784b4286e91af3866f99cb6062a85a10f",
@@ -26,9 +28,11 @@
26
28
  "commands/optimize-page.md": "sha256:35866f3d7cdeef0376ea7a7d7036085a9b9cf95bbb300ecf4bd77610ebd74d85",
27
29
  "commands/page-work.md": "sha256:965a66e59bdf7b0da482d26fade53b3d265885ece5d463fe83b0789ebefaef3e",
28
30
  "commands/plan-audit.md": "sha256:69875c9654e13b84566dafb16afe5afe08cffb9f3bded1f2d8d2261ae871c869",
29
- "commands/README.md": "sha256:9c25573c8af30a8cf02f450f5f3812769aca01ebb422d600e830e78955f18c4a",
30
- "commands/reporting.md": "sha256:ae89f8620acfef645d52bfe715efa332fdb8f464d890e45240ea341b24adb985",
31
+ "commands/README.md": "sha256:683b226020582dd93e24a2fb59ce6264735f44eb26353f977153034a615f871c",
32
+ "commands/remediation.md": "sha256:7f983ecf63ec6741fa7e291243c6faeb44a5b140655a5ec3a62bcbc4c16d8870",
33
+ "commands/reporting.md": "sha256:f560f3c8349fcdaf6d3c3a27968016e20ef42ef2473292f7b83260cfb4b3b2e6",
31
34
  "commands/reviews.md": "sha256:902904aaa405fe5724cf0662c7a5a36eab9a4fe0eb81cbd95ffa2fff946e0ac8",
35
+ "commands/sow.md": "sha256:576c0ff119e5a9193476c20aee65019dbe91502d624d3a8fc8469915a3bc2b19",
32
36
  "commands/validate-render.md": "sha256:a8e1d04d40b84d57c35039250d98c6a7302cd44a148a8c3b9d9cfb92678c4347",
33
37
  "policies/crawler-policy-template.md": "sha256:15c88a4eeb21f53f71e5250dd3eb2d2791a814b304eaefce8bb30e2bdf2e2e59",
34
38
  "references/aeo-geo-validation.md": "sha256:4b0041764f2fdbfbff1e1a2907eaed02cf0aef491254a9c98ec9250ff1084e80",
@@ -108,11 +112,12 @@
108
112
  "schemas/scenario.schema.json": "sha256:3f5bc2032d08f973600db068f475176a0e4706b33be42f99c778fe755a0ff38b",
109
113
  "schemas/schedule.schema.json": "sha256:645df065bf33577a960c0bf8bb97e141e9326840303569468dae8a553d468482",
110
114
  "schemas/source-identity-chain.schema.json": "sha256:a65d9c12eaed1bd6b637c66a2f9362c17287fdfcb454d8676fb611d2d28aa019",
115
+ "schemas/sow.schema.json": "sha256:14ff2e24e03f678d3c72f97c27b0a68e117472dcc640aab7491bba1a82457906",
111
116
  "schemas/variance.schema.json": "sha256:68389f64f0a3be13ff8951e8eefba9a5c31d0738325cb47e37c1a8435bea48f0",
112
117
  "scripts/README.md": "sha256:9eee4e8beb4579a183bd714c9dd24b83abd020753eada5caeffae004739d60b5",
113
- "SKILL.md": "sha256:f39e0863bbcaf178c46afed4ae95834451d96e6b1d07af3883733de707e692ea",
118
+ "SKILL.md": "sha256:d50cc48a120fee6ad3c3bf0d1bfa8ceb5bba3614bdc6af8aacc4293b9e4a1970",
114
119
  "templates/finding-review.md": "sha256:b270a83d3f015150aac80249ae9314979c0befea39ff92ec455f9a5aaa73404c",
115
- "VERSION": "sha256:00afc49f1599e59129a59b64c2b019de3fe35300c05bb9d96cb25002576ff43b"
120
+ "VERSION": "sha256:71fc7bd16b1bc9b3681085fb0be8aea0b3a37d90d1685938dc2e8a31bf8c9b94"
116
121
  },
117
- "treeHash": "sha256:e4c2165da7ae3106c3bfa358445d2e51dd974f656d058bc03f22fd0604d2d4b3"
122
+ "treeHash": "sha256:96d4589fced40f7030b6c1e48132abf2d37ebae771a1401d6f2a74e4f8fc52d1"
118
123
  }
@@ -0,0 +1,409 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "citable://schemas/sow.schema.json",
4
+ "title": "Enterprise Statement of Work (SOW)",
5
+ "type": "object",
6
+ "required": [
7
+ "sow_id",
8
+ "version",
9
+ "generation_mode",
10
+ "title",
11
+ "client",
12
+ "supplier",
13
+ "effective_date",
14
+ "term_days",
15
+ "currency",
16
+ "currency_minor_unit_exponent",
17
+ "commercial_total_fee_minor",
18
+ "commercial_total_fee_usd",
19
+ "executive_scope",
20
+ "admissibility_gate",
21
+ "work_packages",
22
+ "deliverables",
23
+ "acceptance_criteria",
24
+ "traceability_matrix",
25
+ "generation_provenance"
26
+ ],
27
+ "properties": {
28
+ "$schema": { "type": "string" },
29
+ "sow_id": { "type": "string", "pattern": "^SOW-[A-Za-z0-9_-]+$" },
30
+ "version": { "type": "string" },
31
+ "generation_mode": {
32
+ "type": "string",
33
+ "enum": ["CONTRACTUAL", "DRAFT", "NON_CONTRACTUAL_SAMPLE"]
34
+ },
35
+ "title": { "type": "string", "minLength": 1 },
36
+ "synthetic_evidence": { "type": "boolean" },
37
+ "client": {
38
+ "type": "object",
39
+ "required": ["name", "contact"],
40
+ "properties": {
41
+ "name": { "type": "string", "minLength": 1 },
42
+ "contact": { "type": "string", "minLength": 1 }
43
+ },
44
+ "additionalProperties": false
45
+ },
46
+ "supplier": {
47
+ "type": "object",
48
+ "required": ["name", "contact"],
49
+ "properties": {
50
+ "name": { "type": "string", "minLength": 1 },
51
+ "contact": { "type": "string", "minLength": 1 }
52
+ },
53
+ "additionalProperties": false
54
+ },
55
+ "effective_date": { "type": "string" },
56
+ "term_days": { "type": "integer", "minimum": 1 },
57
+ "currency": { "type": "string", "enum": ["USD"] },
58
+ "currency_minor_unit_exponent": { "type": "integer", "enum": [2] },
59
+ "commercial_total_fee_minor": { "type": "integer", "minimum": 0 },
60
+ "commercial_total_fee_usd": { "type": "number", "minimum": 0 },
61
+ "executive_scope": {
62
+ "type": "object",
63
+ "required": ["business_objective", "in_scope_properties", "in_scope_systems"],
64
+ "properties": {
65
+ "business_objective": { "type": "string", "minLength": 1 },
66
+ "in_scope_properties": { "type": "array", "items": { "type": "string" } },
67
+ "in_scope_systems": { "type": "array", "items": { "type": "string" } },
68
+ "channels": { "type": "array", "items": { "type": "string" } },
69
+ "geographies": { "type": "array", "items": { "type": "string" } },
70
+ "organizational_boundaries": { "type": "string" }
71
+ },
72
+ "additionalProperties": false
73
+ },
74
+ "admissibility_gate": {
75
+ "type": "object",
76
+ "required": ["total_findings_evaluated", "admitted_count", "refused_count", "admissibility_rate_pct", "refusal_log"],
77
+ "properties": {
78
+ "total_findings_evaluated": { "type": "integer", "minimum": 0 },
79
+ "admitted_count": { "type": "integer", "minimum": 0 },
80
+ "refused_count": { "type": "integer", "minimum": 0 },
81
+ "admissibility_rate_pct": { "type": "integer", "minimum": 0, "maximum": 100 },
82
+ "refusal_log": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "object",
86
+ "required": ["finding_id", "subject", "gate_failed", "refusal_code", "refusal_rationale"],
87
+ "properties": {
88
+ "finding_id": { "type": "string" },
89
+ "detector_id": { "type": "string" },
90
+ "subject": { "type": "string" },
91
+ "gate_failed": { "type": "string" },
92
+ "refusal_code": { "type": "string" },
93
+ "refusal_rationale": { "type": "string" },
94
+ "suggested_handling": { "type": "string" }
95
+ },
96
+ "additionalProperties": false
97
+ }
98
+ },
99
+ "methodology": { "type": "string" }
100
+ },
101
+ "additionalProperties": false
102
+ },
103
+ "assumptions_and_constraints": {
104
+ "type": "object",
105
+ "required": ["assumptions", "dependencies", "exclusions", "constraints", "unresolved_unknowns"],
106
+ "properties": {
107
+ "assumptions": { "type": "array", "items": { "type": "string" } },
108
+ "dependencies": { "type": "array", "items": { "type": "string" } },
109
+ "exclusions": { "type": "array", "items": { "type": "string" } },
110
+ "constraints": { "type": "array", "items": { "type": "string" } },
111
+ "unresolved_unknowns": { "type": "array", "items": { "type": "string" } }
112
+ },
113
+ "additionalProperties": false
114
+ },
115
+ "work_packages": {
116
+ "type": "array",
117
+ "minItems": 1,
118
+ "items": {
119
+ "type": "object",
120
+ "required": ["work_package_id", "name", "deliverable_id", "owner", "requirements"],
121
+ "properties": {
122
+ "work_package_id": { "type": "string" },
123
+ "name": { "type": "string" },
124
+ "deliverable_id": { "type": "string" },
125
+ "owner": { "type": "string" },
126
+ "requirements": { "type": "array", "minItems": 1 }
127
+ },
128
+ "additionalProperties": false
129
+ }
130
+ },
131
+ "deliverables": {
132
+ "type": "array",
133
+ "minItems": 1,
134
+ "items": {
135
+ "type": "object",
136
+ "required": ["deliverable_id", "work_package_id", "title", "artifact_type", "format", "owner", "delivery_criteria"],
137
+ "properties": {
138
+ "deliverable_id": { "type": "string" },
139
+ "work_package_id": { "type": "string" },
140
+ "title": { "type": "string" },
141
+ "artifact_type": { "type": "string" },
142
+ "format": { "type": "string" },
143
+ "owner": { "type": "string" },
144
+ "delivery_criteria": { "type": "string" }
145
+ },
146
+ "additionalProperties": false
147
+ }
148
+ },
149
+ "technical_requirements": {
150
+ "type": "object",
151
+ "properties": {
152
+ "supported_frameworks": { "type": "array", "items": { "type": "string" } },
153
+ "git_branching_model": { "type": "string" },
154
+ "rollback_mechanism": { "type": "string" },
155
+ "access_requirements": { "type": "array", "items": { "type": "string" } }
156
+ },
157
+ "additionalProperties": false
158
+ },
159
+ "acceptance_criteria": {
160
+ "type": "array",
161
+ "minItems": 1,
162
+ "items": {
163
+ "type": "object",
164
+ "required": ["acceptance_test_id", "sow_requirement_id", "test_description", "validation_method", "pass_threshold", "evidence_required"],
165
+ "properties": {
166
+ "acceptance_test_id": { "type": "string" },
167
+ "sow_requirement_id": { "type": "string" },
168
+ "test_description": { "type": "string" },
169
+ "validation_method": { "type": "string" },
170
+ "pass_threshold": { "type": "string" },
171
+ "evidence_required": { "type": "string" }
172
+ },
173
+ "additionalProperties": false
174
+ }
175
+ },
176
+ "baseline_and_target_metrics": {
177
+ "type": "object",
178
+ "properties": {
179
+ "disclaimer": { "type": "string" },
180
+ "metrics": {
181
+ "type": "array",
182
+ "items": {
183
+ "type": "object",
184
+ "required": ["metric", "baseline", "target", "validation"],
185
+ "properties": {
186
+ "metric": { "type": "string" },
187
+ "baseline": { "type": "string" },
188
+ "target": { "type": "string" },
189
+ "validation": { "type": "string" }
190
+ },
191
+ "additionalProperties": false
192
+ }
193
+ }
194
+ },
195
+ "additionalProperties": false
196
+ },
197
+ "experiment_specifications": {
198
+ "type": "object",
199
+ "properties": {
200
+ "standard": { "type": "string" },
201
+ "stopping_criteria": { "type": "string" },
202
+ "guardrails": { "type": "array", "items": { "type": "string" } }
203
+ },
204
+ "additionalProperties": false
205
+ },
206
+ "raci_matrix": {
207
+ "type": "array",
208
+ "items": {
209
+ "type": "object",
210
+ "required": ["role", "r", "raci"],
211
+ "properties": {
212
+ "role": { "type": "string" },
213
+ "r": { "type": "string" },
214
+ "raci": { "type": "string" }
215
+ },
216
+ "additionalProperties": false
217
+ }
218
+ },
219
+ "customer_obligations": {
220
+ "type": "array",
221
+ "items": { "type": "string" }
222
+ },
223
+ "delivery_schedule": {
224
+ "type": "object",
225
+ "required": ["total_duration_weeks", "milestones"],
226
+ "properties": {
227
+ "total_duration_weeks": { "type": "integer", "minimum": 1 },
228
+ "milestones": {
229
+ "type": "array",
230
+ "minItems": 1,
231
+ "items": {
232
+ "type": "object",
233
+ "required": ["milestone_id", "work_package_id", "name", "fee_minor", "fee_usd", "billing_trigger", "target_delivery_week"],
234
+ "properties": {
235
+ "milestone_id": { "type": "string" },
236
+ "work_package_id": { "type": "string" },
237
+ "name": { "type": "string" },
238
+ "fee_minor": { "type": "integer", "minimum": 0 },
239
+ "fee_usd": { "type": "number", "minimum": 0 },
240
+ "billing_trigger": { "type": "string" },
241
+ "target_delivery_week": { "type": "integer", "minimum": 1 }
242
+ },
243
+ "additionalProperties": false
244
+ }
245
+ }
246
+ },
247
+ "additionalProperties": false
248
+ },
249
+ "change_control_process": {
250
+ "type": "object",
251
+ "properties": {
252
+ "procedure": { "type": "string" },
253
+ "authorization": { "type": "string" },
254
+ "superceding_rules": { "type": "string" }
255
+ },
256
+ "additionalProperties": false
257
+ },
258
+ "risk_register": {
259
+ "type": "array",
260
+ "items": {
261
+ "type": "object",
262
+ "required": ["id", "category", "description", "mitigation"],
263
+ "properties": {
264
+ "id": { "type": "string" },
265
+ "category": { "type": "string" },
266
+ "description": { "type": "string" },
267
+ "mitigation": { "type": "string" }
268
+ },
269
+ "additionalProperties": false
270
+ }
271
+ },
272
+ "data_governance": {
273
+ "type": "object",
274
+ "properties": {
275
+ "authorized_sources": { "type": "array", "items": { "type": "string" } },
276
+ "retention_period": { "type": "string" },
277
+ "processing_purpose": { "type": "string" },
278
+ "deletion_upon_termination": { "type": "string" }
279
+ },
280
+ "additionalProperties": false
281
+ },
282
+ "security_requirements": {
283
+ "type": "array",
284
+ "items": { "type": "string" }
285
+ },
286
+ "platform_dependencies": {
287
+ "type": "array",
288
+ "items": { "type": "string" }
289
+ },
290
+ "qa_plan": {
291
+ "type": "object",
292
+ "properties": {
293
+ "methodology": { "type": "string" },
294
+ "evidence_package": { "type": "string" }
295
+ },
296
+ "additionalProperties": false
297
+ },
298
+ "governance_model": {
299
+ "type": "object",
300
+ "properties": {
301
+ "weekly_sync": { "type": "string" },
302
+ "written_reports": { "type": "string" },
303
+ "decision_logging": { "type": "string" }
304
+ },
305
+ "additionalProperties": false
306
+ },
307
+ "commercial_terms": {
308
+ "type": "object",
309
+ "required": ["total_fixed_fee_minor", "total_fixed_fee_usd", "currency", "payment_terms", "milestones"],
310
+ "properties": {
311
+ "total_fixed_fee_minor": { "type": "integer", "minimum": 0 },
312
+ "total_fixed_fee_usd": { "type": "number", "minimum": 0 },
313
+ "currency": { "type": "string", "enum": ["USD"] },
314
+ "payment_terms": { "type": "string" },
315
+ "milestones": { "type": "array" }
316
+ },
317
+ "additionalProperties": false
318
+ },
319
+ "out_of_scope": {
320
+ "type": "array",
321
+ "items": { "type": "string" }
322
+ },
323
+ "warranty_terms": {
324
+ "type": "object",
325
+ "properties": {
326
+ "warranty_window_days": { "type": "integer", "minimum": 0 },
327
+ "defect_definition": { "type": "string" },
328
+ "exclusion": { "type": "string" }
329
+ },
330
+ "additionalProperties": false
331
+ },
332
+ "completion_and_handoff": {
333
+ "type": "object",
334
+ "properties": {
335
+ "handoff_assets": { "type": "array", "items": { "type": "string" } },
336
+ "operational_signoff": { "type": "string" }
337
+ },
338
+ "additionalProperties": false
339
+ },
340
+ "termination_provisions": {
341
+ "type": "object",
342
+ "properties": {
343
+ "convenience": { "type": "string" },
344
+ "compensation": { "type": "string" },
345
+ "asset_transfer": { "type": "string" }
346
+ },
347
+ "additionalProperties": false
348
+ },
349
+ "traceability_matrix": {
350
+ "type": "array",
351
+ "minItems": 1,
352
+ "items": {
353
+ "type": "object",
354
+ "required": [
355
+ "finding_id",
356
+ "recommendation",
357
+ "sow_requirement_id",
358
+ "work_package_id",
359
+ "deliverable_id",
360
+ "acceptance_test_id",
361
+ "owner",
362
+ "evidence_id",
363
+ "evidence_ids"
364
+ ],
365
+ "properties": {
366
+ "finding_id": { "type": "string" },
367
+ "detector_id": { "type": "string" },
368
+ "recommendation": { "type": "string" },
369
+ "sow_requirement_id": { "type": "string" },
370
+ "work_package_id": { "type": "string" },
371
+ "deliverable_id": { "type": "string" },
372
+ "acceptance_test_id": { "type": "string" },
373
+ "owner": { "type": "string" },
374
+ "owner_source": { "type": "string" },
375
+ "owner_mapping_version": { "type": "string" },
376
+ "evidence_id": { "type": "string" },
377
+ "evidence_ids": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
378
+ "severity": { "type": "string" },
379
+ "target_subject": { "type": "string" },
380
+ "acceptance_criteria": { "type": "string" }
381
+ },
382
+ "additionalProperties": false
383
+ }
384
+ },
385
+ "generation_provenance": {
386
+ "type": "object",
387
+ "required": [
388
+ "generated_at",
389
+ "generator_version",
390
+ "generation_mode",
391
+ "source_type",
392
+ "source_findings_count",
393
+ "synthetic_evidence"
394
+ ],
395
+ "properties": {
396
+ "generated_at": { "type": "string" },
397
+ "generator_version": { "type": "string" },
398
+ "generation_mode": { "type": "string", "enum": ["CONTRACTUAL", "DRAFT", "NON_CONTRACTUAL_SAMPLE"] },
399
+ "source_type": { "type": "string" },
400
+ "source_identifier": { "type": ["string", "null"] },
401
+ "source_findings_count": { "type": "integer", "minimum": 0 },
402
+ "findings_integrity_hash": { "type": ["string", "null"] },
403
+ "synthetic_evidence": { "type": "boolean" }
404
+ },
405
+ "additionalProperties": false
406
+ }
407
+ },
408
+ "additionalProperties": false
409
+ }