cox-protocol-package 1.0.2 → 1.2.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 (74) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/COX_FILE_FORMAT_SPECIFICATION_v1.0.md +40 -200
  3. package/FINALIZATION.md +50 -0
  4. package/LocalAppManager/Dashboard/analytics_sidebar_panels/analytics_sidebar_panels.cox +56 -0
  5. package/LocalAppManager/Dashboard/analytics_sidebar_panels/analytics_sidebar_panels_screenshot.placeholder.txt +1 -0
  6. package/LocalAppManager/Dashboard/dashboard.cox +62 -0
  7. package/LocalAppManager/Dashboard/dashboard_screenshot.placeholder.txt +1 -0
  8. package/LocalAppManager/Dashboard/left_navigation_sidebar/left_navigation_sidebar.cox +56 -0
  9. package/LocalAppManager/Dashboard/left_navigation_sidebar/left_navigation_sidebar_screenshot.placeholder.txt +1 -0
  10. package/LocalAppManager/Dashboard/projects_grid_cards/projects_grid_cards.cox +56 -0
  11. package/LocalAppManager/Dashboard/projects_grid_cards/projects_grid_cards_screenshot.placeholder.txt +1 -0
  12. package/LocalAppManager/Dashboard/top_header_stats_bar/top_header_stats_bar.cox +56 -0
  13. package/LocalAppManager/Dashboard/top_header_stats_bar/top_header_stats_bar_screenshot.placeholder.txt +1 -0
  14. package/MANIFEST.in +20 -0
  15. package/README.md +67 -154
  16. package/bin/cox-protocol.js +23 -97
  17. package/cox_protocol/__init__.py +2 -0
  18. package/cox_protocol/__main__.py +3 -0
  19. package/cox_protocol/compiler.py +273 -0
  20. package/cox_protocol/cox_cli.py +146 -0
  21. package/cox_protocol/cox_lib.py +599 -0
  22. package/cox_protocol/package_target.py +262 -0
  23. package/cox_protocol/react_target.py +306 -0
  24. package/cox_protocol/scaffold.py +56 -0
  25. package/cox_protocol/schemas/cox.component.v1.schema.json +180 -0
  26. package/cox_protocol/schemas/cox.crop_metadata.v1.schema.json +83 -0
  27. package/cox_protocol/schemas/cox.manifest.v1.schema.json +172 -0
  28. package/cox_protocol/schemas/cox.page.v1.schema.json +242 -0
  29. package/cox_protocol/schemas/cox.protocol.v1.schema.json +38 -0
  30. package/cox_protocol/starter/README.md +7 -0
  31. package/cox_protocol/starter/manifest.cox +26 -0
  32. package/cox_protocol/starter/page/action_button/action_button.cox +34 -0
  33. package/cox_protocol/starter/page/action_button/reference.svg +1 -0
  34. package/cox_protocol/starter/page/page.cox +39 -0
  35. package/cox_protocol/starter/page/reference.svg +1 -0
  36. package/editor-support/vscode/CHANGELOG.md +6 -0
  37. package/editor-support/vscode/README.md +2 -1
  38. package/editor-support/vscode/package.json +3 -3
  39. package/editor-support/vscode/snippets/cox-common.json +1 -1
  40. package/editor-support/vscode/snippets/cox-component.json +2 -1
  41. package/editor-support/vscode/snippets/cox-crop-metadata.json +1 -1
  42. package/editor-support/vscode/snippets/cox-manifest.json +1 -1
  43. package/editor-support/vscode/snippets/cox-page.json +2 -1
  44. package/editor-support/vscode/snippets/cox-protocol.json +1 -1
  45. package/examples/quickstart/README.md +7 -0
  46. package/examples/quickstart/manifest.cox +26 -0
  47. package/examples/quickstart/page/action_button/action_button.cox +34 -0
  48. package/examples/quickstart/page/action_button/reference.svg +1 -0
  49. package/examples/quickstart/page/page.cox +39 -0
  50. package/examples/quickstart/page/reference.svg +1 -0
  51. package/guides/contract-demo.md +24 -0
  52. package/guides/npm-installation.md +16 -287
  53. package/manifest.cox +7 -4
  54. package/package.json +30 -14
  55. package/protocols/recursive_decomposition_protocol.cox +8 -8
  56. package/pyproject.toml +17 -6
  57. package/schemas/cox.component.v1.schema.json +17 -4
  58. package/schemas/cox.crop_metadata.v1.schema.json +1 -1
  59. package/schemas/cox.manifest.v1.schema.json +1 -1
  60. package/schemas/cox.page.v1.schema.json +17 -4
  61. package/schemas/cox.protocol.v1.schema.json +1 -1
  62. package/scripts/check_distribution.py +87 -0
  63. package/scripts/demo.py +62 -0
  64. package/scripts/package-vscode.mjs +12 -0
  65. package/scripts/release_check.py +86 -0
  66. package/tests/conftest.py +21 -0
  67. package/tests/test_cli_and_typescript.py +123 -0
  68. package/tests/test_compiler.py +279 -0
  69. package/tests/test_validation.py +215 -0
  70. package/tools/__init__.py +2 -2
  71. package/tools/cox_cli.py +2 -123
  72. package/tools/cox_lib.py +2 -558
  73. package/tools/package_target.py +2 -214
  74. package/tools/react_target.py +2 -278
package/CHANGELOG.md ADDED
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ ## 1.2.0 — 2026-09-29
4
+
5
+ - Ship canonical schemas and a complete starter inside the namespaced Python package; align Python, npm and VS Code versions.
6
+ - Add `init`, `--json`, `--strict`, `--version` and `verify-package` CLI surfaces.
7
+ - Reject ambiguous YAML, invalid project paths and inconsistent manifest/page/component bindings with structured diagnostics.
8
+ - Support shared component folders within the project; prevent generated identifier and output-path collisions.
9
+ - Preserve evidence in safely escaped React comments and validate generated scaffolds with TypeScript.
10
+ - Stage builds before publication, track generated-file ownership, preserve unrelated files, refuse local-edit overwrites and remove only stale owned output.
11
+ - Support external output directories and deterministic archives containing the current run's compiled manifest and reports; verify inventory hashes, sizes, paths and modes.
12
+ - Reject non-portable filenames inside referenced source directories before packaging, and reject symlink metadata on every ZIP entry, including the inventory.
13
+ - Add regression tests, clean-install release checks, CI and a reproducible failing/corrected contract demonstration.
14
+ - Replace subjective readiness scores with explicit capability boundaries and verification evidence.
15
+
16
+ ### Migration
17
+
18
+ COX format remains 1.0. Duplicate YAML keys, aliases, non-JSON YAML values, unknown evidence labels, unsafe paths and mismatched bindings now fail validation. Quote textual YAML boolean words and dates. Use a new output folder for old builds without an ownership marker. The installed Python module is `cox_protocol`; source-checkout `tools` entry points remain compatibility shims. React output remains structural scaffolding.
19
+
20
+ ## Earlier releases
21
+
22
+ The baseline used Python 1.0.1, npm 1.0.2, and VS Code extension 1.1.0. It provided schema validation, JSON/React/package targets and syntax/snippet support. Historical intake notes remain under `guides/imported-packages/`.
@@ -1,236 +1,76 @@
1
- # COX File Format Specification v1.0
1
+ # COX file format 1.0
2
2
 
3
- ## 1. Status
3
+ This specification accompanies compiler 1.2.0. The executable field contract is defined by the five JSON Schemas in `schemas/`, mirrored in the installed `cox_protocol/schemas/` package.
4
4
 
5
- - Format name: `COX`
6
- - Version: `1.0`
7
- - File extension: `.cox`
8
- - MIME type: `application/vnd.cox+yaml`
9
- - Encoding: `UTF-8`
10
- - Syntax base: `YAML-compatible structured text`
11
- - Entry point: `manifest.cox`
5
+ ## Representation
12
6
 
13
- ## 2. Purpose
7
+ COX uses `.cox`, UTF-8, and the descriptive MIME type `application/vnd.cox+yaml`. Each project has one `manifest.cox` entry point. Documents are YAML mappings with JSON-compatible values: string keys; mappings; arrays; strings; booleans; finite numbers; null. Key order is not significant. Common headers should appear first for readability, but the parser does not require an order.
14
8
 
15
- COX is a structured file format for UI reconstruction, evidence tracking, component binding, implementation guidance, and agent-readable design specifications. A COX project is manifest-driven and intended to be both human-readable and machine-validatable.
16
-
17
- ## 3. Common Header
18
-
19
- Every `.cox` document must begin with the following versioned metadata header:
9
+ The implementation uses PyYAML's safe scalar resolution. Quote version strings, dates, and textual YAML boolean words such as `Yes`, `No`, `on`, and `off`. Duplicate keys, aliases (including merge aliases), non-string keys, YAML-specific object types, timestamps and non-finite numbers are rejected. Unsupported custom tags are rejected. Anchors without references add no semantics. One document per file is supported.
20
10
 
21
11
  ```yaml
22
12
  CoxVersion: "1.0"
23
13
  FileType: "component_spec"
24
- Slug: "projects_grid_cards"
14
+ Slug: "action_button"
25
15
  Schema: "cox.component.v1"
26
16
  ```
27
17
 
28
- Required header fields for all COX documents:
29
-
30
- - `CoxVersion`
31
- - `FileType`
32
- - `Slug`
33
- - `Schema`
34
-
35
- ## 4. Supported File Types
36
-
37
- ### `manifest`
38
-
39
- Project entrypoint that defines the package contract, referenced pages, guide documents, protocol documents, skill bundles, schemas, tooling, and build targets.
40
-
41
- Required top-level fields:
42
-
43
- - `CoxVersion`
44
- - `FileType`
45
- - `Slug`
46
- - `Schema`
47
- - `ProjectName`
48
- - `ProtocolExtension`
49
- - `MimeType`
50
- - `EntryPoint`
51
- - `Pages`
52
-
53
- Optional manifest file collections:
54
-
55
- - `ReferenceDocs`: human-facing root documentation files
56
- - `GuideDocs`: guide or tutorial files imported into `guides/`
57
- - `ProtocolDocs`: `.cox` methodology and system protocol documents
58
- - `SkillBundles`: LLM-agent skill bundle files or directories imported into `skills/`
59
- - `Schemas`: JSON Schema files used by the validator
60
- - `ToolingFiles`: compiler, editor, package, and distribution tooling files
61
-
62
- Supported build targets:
63
-
64
- - `json`
65
- - `react`
66
- - `package`
67
-
68
- ### `page_spec`
69
-
70
- Defines page-level evidence, visible regions, child component bindings, layout behavior, and page interactions.
71
-
72
- Required top-level fields:
73
-
74
- - `CoxVersion`
75
- - `FileType`
76
- - `PageName`
77
- - `Slug`
78
- - `Schema`
79
- - `ProjectName`
80
- - `EvidenceSummary`
81
- - `VisibleStructure`
82
- - `Interactions`
83
-
84
- ### `component_spec`
85
-
86
- Defines a reusable UI component, its evidence basis, visible structure, visual style, and interactions.
87
-
88
- Required top-level fields:
89
-
90
- - `CoxVersion`
91
- - `FileType`
92
- - `ComponentName`
93
- - `Slug`
94
- - `Schema`
95
- - `EvidenceSummary`
96
- - `VisibleStructure`
97
- - `Interactions`
98
-
99
- ### `protocol_doc`
100
-
101
- Defines COX process rules, naming conventions, orchestration rules, logic notes, design tokens, or validation checklists.
102
-
103
- Required top-level fields:
104
-
105
- - `CoxVersion`
106
- - `FileType`
107
- - `Slug`
108
- - `Schema`
109
- - `ProtocolName`
110
- - `Purpose`
111
-
112
- ### `crop_metadata`
113
-
114
- Defines crop planning metadata for derived screenshots.
115
-
116
- Required top-level fields:
117
-
118
- - `CoxVersion`
119
- - `FileType`
120
- - `Slug`
121
- - `Schema`
122
- - `SourceScreenshot`
123
- - `OutputScreenshot`
124
- - `BoundaryConfidence`
125
- - `EstimatedBoundingBox`
126
-
127
- ## 5. Slug Rules
128
-
129
- `Slug` values use lowercase snake case.
130
-
131
- Allowed pattern:
132
-
133
- ```text
134
- ^[a-z0-9]+(_[a-z0-9]+)*$
135
- ```
136
-
137
- Examples:
138
-
139
- - `dashboard`
140
- - `projects_grid_cards`
141
- - `deterministic_naming_convention`
18
+ All documents require these four fields. `CoxVersion` must be the string `1.0`. Slugs match `^[a-z0-9]+(_[a-z0-9]+)*$`. A document's `FileType` and `Schema` must correspond exactly.
142
19
 
143
- ## 6. Evidence Model
20
+ ## Document types
144
21
 
145
- When evidence is relevant, COX documents should separate claims into explicit evidence levels:
22
+ The following required fields are **in addition to the four common fields**. See the schemas for nested requirements, enums and optional fields.
146
23
 
147
- - `Visible`
148
- - `UserSpecified`
149
- - `Inferred`
150
- - `Intended`
151
- - `Recommended`
24
+ | FileType | Schema | Additional required fields |
25
+ |---|---|---|
26
+ | manifest | cox.manifest.v1 | ProjectName, ProtocolExtension, MimeType, EntryPoint, Pages |
27
+ | page_spec | cox.page.v1 | PageName, ProjectName, EvidenceSummary, VisibleStructure, Interactions, NamingDecision, Layout, Children, RecursiveDecompositionDecision |
28
+ | component_spec | cox.component.v1 | ComponentName, Role, EvidenceSummary, VisibleStructure, Interactions, NamingDecision |
29
+ | protocol_doc | cox.protocol.v1 | ProtocolName, Purpose |
30
+ | crop_metadata | cox.crop_metadata.v1 | SourceScreenshot, OutputScreenshot, BoundaryConfidence, EstimatedBoundingBox |
152
31
 
153
- The format does not permit inferred behavior to be represented as certain without explicit visible or user-provided evidence.
32
+ A manifest requires at least one page. `ProtocolExtension`, `MimeType`, and `EntryPoint` use the fixed values `.cox`, `application/vnd.cox+yaml`, and `manifest.cox`. Every page entry includes `PageName`, `Slug`, `Folder`, `PageInstruction`, `PageScreenshotPlaceholder`, and `Components`. Component entries include `Slug`, `Folder`, `ComponentInstruction`, and `ComponentScreenshotPlaceholder`. Empty component arrays are permitted.
154
33
 
155
- ## 7. Validation Model
34
+ `NamingDecision` records ChosenName, Reason, RejectedAlternatives, AmbiguityRisk, and EvidenceLevel. Layout requires Desktop, Tablet, and Mobile strings. COX v1 permits extensible prose fields in several objects; passing schema validation does not make those fields executable.
156
35
 
157
- COX documents are parsed as YAML and validated against JSON Schema Draft 2020-12.
36
+ ## Evidence
158
37
 
159
- Canonical schema ids:
38
+ `EvidenceSummary` and `Interactions` accept the five evidence labels `Visible`, `UserSpecified`, `Inferred`, `Intended`, and `Recommended`, each an array of strings. Unknown labels are rejected. A naming decision's EvidenceLevel must use the same vocabulary. These categories distinguish observation, supplied requirements, interpretation, desired behavior, and suggestions.
160
39
 
161
- - `cox.manifest.v1`
162
- - `cox.page.v1`
163
- - `cox.component.v1`
164
- - `cox.protocol.v1`
165
- - `cox.crop_metadata.v1`
40
+ The tool checks the representation and vocabulary, not whether an observation is true. Screenshot placeholders and generated reference illustrations must be described honestly. Crop metadata is a planning document: screenshot strings and bounding-box descriptions are not a pixel-analysis or file-existence guarantee.
166
41
 
167
- Validation must include:
42
+ ## References and bindings
168
43
 
169
- - UTF-8 decoding
170
- - YAML parsing
171
- - Schema validation
172
- - Manifest reference existence checks
173
- - Page/component path checks
174
- - Unreferenced `.cox` file detection as a warning
44
+ Manifest paths are relative POSIX paths within the project. Absolute paths, backslashes, parent traversal and symlink references are rejected. Referenced inputs must exist. Page/component instructions and their screenshot/placeholder files must be regular files inside the corresponding Folder. Instruction files use `.cox`.
175
45
 
176
- ## 8. Compilation Model
46
+ The page document's Slug, PageName and ProjectName must match its manifest entry and project. Page slugs are unique. A component document's Slug must match its manifest binding. A shared component slug may be reused when it names the same source; different source files may not claim the same component slug.
177
47
 
178
- The first professional compilation target for COX v1.0 is normalized JSON. The current compiler also supports React stubs and deterministic package ZIP output.
48
+ `Children.Components` must match that page's manifest component set, without duplicates. Each child's Folder is relative to the page instruction's directory. It may use `..` to reach a shared component **within** the project; it cannot escape the project or traverse symlinks.
179
49
 
180
- Expected pipeline:
50
+ Optional input collections are ReferenceDocs, GuideDocs, ProtocolDocs, SkillBundles, Schemas and ToolingFiles. ProtocolDocs must contain protocol document files. Referenced `.cox` files under GuideDocs and SkillBundles are also validated. Other collections include assets/documentation without interpreting arbitrary files as COX. The compiler always uses its installed canonical schemas; the Schemas collection packages supporting files and cannot override validation rules.
181
51
 
182
- ```text
183
- .cox files
184
- -> parse YAML
185
- -> validate against schema
186
- -> check references and paths
187
- -> emit normalized JSON
188
- -> generate verification report
189
- ```
52
+ Unreferenced `.cox` files produce a warning; `--strict` makes that warning an error. Nested independent projects, managed build outputs and transient directories are excluded from this scan. `VerificationRules` and protocol text are guidance, not dynamically executed code.
190
53
 
191
- Recommended commands:
54
+ ## Compilation
192
55
 
193
- ```bash
194
- cox validate ./cox_protocol_package
195
- cox compile ./cox_protocol_package --out ./build
196
- cox compile ./cox_protocol_package --target react --out ./build
197
- cox compile ./cox_protocol_package --target json --target react --target package --out ./build
198
- ```
56
+ Validation precedes every build. CLI targets are `json`, `react`, `package`, and `all`. Repeated/comma-separated target arguments are normalized into stable order. Without a target the compiler emits JSON. Manifest BuildTargets is descriptive project metadata.
199
57
 
200
- Expected build outputs:
201
-
202
- ```text
203
- build/
204
- manifest.compiled.json
205
- normalized/
206
- package/
207
- cox_protocol_package_corrected.zip
208
- cox_protocol_package_corrected.manifest.json
209
- reports/
210
- verification_report.txt
211
- ```
58
+ - **JSON:** normalized documents preserving data and evidence; compiled manifest records relative input/output paths.
59
+ - **React:** typed TSX page/component scaffolds with source evidence comments. Snake-case slugs become PascalCase; numeric starts receive `Cox`. Conflicting generated symbols are errors. ProjectName must be a portable single directory name. Prose is safely escaped. No finished CSS, event behavior, data fetching, AST conformance or rendered compliance is inferred.
60
+ - **Package:** a single-root ZIP named by PackageName or Slug. The root is the manifest slug, independent of checkout location. It contains declared sources and only artifacts from this invocation, including the compiled manifest and verification report.
212
61
 
213
- Optional React stub output:
214
-
215
- ```text
216
- build/
217
- react/
218
- components/
219
- pages/
220
- index.ts
221
- manifest.react.json
222
- ```
62
+ Relative output paths are relative to the discovered project. Absolute external outputs are supported. Output parents are canonicalized, including standard OS temporary-directory aliases. The output directory itself and managed paths within it may not be symlinks. Canonical output paths may not overlap source inputs, the project root or an ancestor. Builds stage independently and publish only owned files; `.cox-build.json` records their exact hashes. Unknown collisions and human-modified artifacts are preserved with a diagnostic. A target removed from the command removes only its prior owned files.
223
63
 
224
- The `react` target consumes the same normalized COX document model used by the JSON target and emits framework-neutral TSX stubs. COX v1.0 does not require the compiler to infer concrete CSS values or executable interaction logic from prose-only layout and evidence sections.
64
+ ## Archive contract
225
65
 
226
- The `package` target emits a deterministic ZIP archive from manifest-referenced source files and any generated outputs produced earlier in the same compilation pass. Package archives must use project-relative paths under a single archive root, sorted file ordering, fixed ZIP timestamps, and SHA-256 records for every packaged file. Local caches, virtual environments, raw intake ZIPs, and package output directories must not be included.
66
+ Names are sorted, timestamps fixed at 1980-01-01, permissions normalized to 0644 (or 0755 for executable source files), and archive paths use POSIX separators. Cache/build directories, Python bytecode, environment files and identified historical raw intake archives are excluded. Explicit references to excluded inputs fail packaging.
227
67
 
228
- Guide and skill bundle intake is intentionally explicit. The compiler supports `GuideDocs` and `SkillBundles`, but ZIP attachments must be inspected and curated before their paths are added to the manifest.
68
+ The embedded `package.manifest.json` inventories payload entries with path, source, kind, size, SHA-256 and mode. It excludes itself to avoid a self-referential hash. `fileCount` counts those payload entries; the ZIP has one additional inventory entry. An external `.manifest.json` additionally records the complete ZIP's size and SHA-256. The ZIP does not contain itself or this external inventory.
229
69
 
230
- ## 9. Editor Support
70
+ `cox verify-package` checks entry uniqueness, portable paths, a single root inventory, exact inventory coverage, sizes, hashes, permissions and absence of symlink entries. It does not establish author identity or protect against an attacker replacing both files and the inventory. Verify a trusted external checksum when provenance matters. Byte-for-byte reproducibility is scoped to identical input bytes/modes and compression toolchain.
231
71
 
232
- COX editor support should register `.cox` as its own language id and may initially inherit YAML-compatible tokenization. Header keys such as `CoxVersion`, `FileType`, `Slug`, and `Schema` should be highlighted distinctly.
72
+ ## Errors and compatibility
233
73
 
234
- ## 10. Compatibility
74
+ Commands support `--json`, returning `ok` and either result fields or `errors` with code, message, path and location. Invalid contracts/builds/archives exit 1. CLI usage errors exit 2 with the normal argument-parser message. `--strict` is supported for validation and compilation.
235
75
 
236
- COX v1.0 is compatible with YAML tooling that preserves mappings, lists, strings, and nested objects. COX-specific validity is determined by COX schemas rather than YAML parsing alone.
76
+ Tool versions and file-format versions are independent. Compiler 1.2.0 strengthens diagnostics and rejects previously ambiguous input (duplicate keys, aliases, schema-label typos, inconsistent bindings and unsafe paths). Existing valid format-1.0 projects remain supported. Legacy generated folders without `.cox-build.json` should be rebuilt into a fresh directory. The npm wrapper invokes Python; it is not an independent TypeScript implementation. The VS Code extension provides syntax and snippets, with validation through the CLI.
@@ -0,0 +1,50 @@
1
+ # COX finalisation acceptance record
2
+
3
+ Objective: fully finalise the existing COX v1 format and its validator/compiler product, including its distributable tools and an inspectable demonstration. The format remains a structured UI/evidence contract; React output is deliberately structural scaffolding, as specified, rather than an inferred finished application.
4
+
5
+ ## Requirements and proof
6
+
7
+ - [x] Canonical v1 schemas ship with an installed Python package and npm distribution; ordinary projects do not need a copy of the compiler repository.
8
+ - [x] All five document types validate; malformed UTF-8/YAML, duplicate keys, unsupported schemas/versions, broken references and inconsistent page/component bindings produce actionable errors without tracebacks.
9
+ - [x] Project-relative paths, source/output separation and generated code identifiers are checked; invalid inputs cannot escape the project/output root or silently overwrite another component.
10
+ - [x] JSON and React targets produce deterministic, valid outputs; React scaffolds compile with TypeScript and preserve evidence as explanatory comments.
11
+ - [x] Package target includes precisely this run's sources/artifacts with stable ordering/timestamps/permissions and verified SHA-256 records; external output directories work; stale outputs and unrelated files are not incorporated.
12
+ - [x] Recompilation safely replaces only tool-owned outputs and never destroys unrelated user files.
13
+ - [x] Fresh-project onboarding, human and JSON diagnostics, strict-warning mode and version reporting work through both Python and npm CLIs.
14
+ - [x] A small invalid → diagnostic → corrected → compiled fixture demonstrates the real contract, with a reproducible verification command and honest capability boundaries.
15
+ - [x] Python wheel/sdist, npm tarball and VS Code extension package cleanly; fresh isolated installs work away from this checkout. Versions, dependency requirements, metadata, schemas and snippets agree.
16
+ - [x] Automated regression/integration checks and CI cover the format, compiler, packaging and fresh-install paths. Documentation commands are exercised.
17
+ - [x] Release notes, installation guide, format specification, example guide, checksums and a final evidence report are complete. Public release status is explicitly recorded rather than assumed.
18
+
19
+ ## Initial evidence
20
+
21
+ - Baseline: commit `e5d616c`, matching remote `main`; work continues on `codex/cox-protocol-finalisation`.
22
+ - Pre-existing untracked `build/package/` is preserved.
23
+ - Baseline `python3 -m tools.cox_cli validate .` passes 17 documents, but reports CLI 1.0.1 while npm metadata says 1.0.2.
24
+ - No automated tests or CI are present in the baseline.
25
+ - Initial inspection found schema resources are not included in the Python distribution; malformed manifests are indexed before validation errors are handled; package output outside the source root fails; stale generated directories can enter archives; React output accepts unchecked names/content.
26
+
27
+ Completion requires checking every item above against the final current state. A successful baseline sample or a package build alone is insufficient.
28
+
29
+ ## Release verification — 29 September 2026
30
+
31
+ - 58 regression/integration tests pass on Python 3.9.6 and Python 3.12.14 using separately installed runtime dependencies. Generated TSX passes TypeScript 7.0.2 with React 19.3.0 types. Node 25.9.0 exercised the wrapper and packaging locally.
32
+ - Wheel installed in an isolated Python 3.9 environment; source distribution built and installed in an isolated Python 3.12 environment with an explicit preinstalled build backend. Both pass init, strict validation, invalid binding diagnostics, correction, all-target external compilation and ZIP verification away from the checkout.
33
+ - npm tarball installs into a local prefix; its bundled root project validates all 17 documents with zero warnings. The final tarball is checked again through the installed wrapper.
34
+ - COX Language Support 1.2.0 artifacts package successfully; all complete-document snippet expansions validate against the canonical schemas. Installation is checked in a separate VS Code data/extension directory.
35
+ - The full repository sample compiles to JSON, React and package targets. The generated archive verifies. Tests compare byte-identical builds across two checkout and output locations and exercise modification, collision, stale-file, traversal, symlink, archive-tamper and rollback paths.
36
+ - Static Python error/unused-import checks and Git whitespace checks pass. CI covers Python 3.9/3.12/3.14 with Node 22/24, separate wheel/sdist installs and npm/VSIX packaging. CI execution is tracked separately in the pull request; local checks do not establish a remote CI result.
37
+ - The baseline's tracked generated build artifacts are removed from version control and ignored. Existing local build files, including the pre-existing untracked package directory, are preserved.
38
+
39
+ ## Distribution status and scope
40
+
41
+ Release 1.2.0 is prepared as local wheel, sdist, npm tarball and VSIX artifacts with a developer handoff, reproducible demo and checksums. This task has not published to npm, PyPI or the VS Code Marketplace. Registry publication and merging the review branch are separate release actions. Artifact checksums and the final source revision belong in the external handoff record so they cannot create self-referential archive hashes.
42
+
43
+ The completed scope is the COX v1 design-contract toolchain. React remains typed structural scaffolding. Arbitrary prose rules, rendered UI checks, AST conformance, MCP integration and adoption claims are outside the implemented product. No Windows execution or visual editor interaction is claimed by this local verification. Two upstream Typer/Click deprecation warnings appeared on Python 3.12; all checks passed.
44
+
45
+ ## Pre-merge packaging review — 18 October 2026
46
+
47
+ - Directory references now reject non-portable descendant filenames before publishing outputs, so compilation cannot emit an archive that its own path verifier rejects.
48
+ - ZIP symlink checks now cover every entry, including the embedded inventory rather than only inventoried payload files.
49
+ - Six added regression cases cover these paths and bring the suite to 64 tests. The existing CI matrix continues to require generated TypeScript, isolated installs and all four distribution formats for the revised source.
50
+ - Registry publication remains a separate action and is outside this review.
@@ -0,0 +1,56 @@
1
+ CoxVersion: "1.0"
2
+ FileType: "component_spec"
3
+ ComponentName: "analytics_sidebar_panels"
4
+ Slug: "analytics_sidebar_panels"
5
+ Schema: "cox.component.v1"
6
+ Role: "Right-side analytics and status panels"
7
+ EvidenceSummary:
8
+ Visible: []
9
+ UserSpecified:
10
+ - "Component name appears in the approved COX naming examples or derived example structure."
11
+ Inferred:
12
+ - "Detailed behavior should be adapted to actual screenshots when supplied."
13
+ Intended: []
14
+ Recommended: []
15
+
16
+ NamingDecision:
17
+ ChosenName: "analytics_sidebar_panels"
18
+ Reason: "Clear domain + location + component group."
19
+ RejectedAlternatives:
20
+ - "generic_section"
21
+ - "nested_panel"
22
+ - "ambiguous_area"
23
+ AmbiguityRisk: "Low"
24
+ EvidenceLevel: "UserSpecified"
25
+
26
+ VisibleStructure:
27
+ Note: "Placeholder until real screenshot crop is supplied."
28
+ ExpectedRegions:
29
+ - "Container surface"
30
+ - "Primary content group"
31
+ - "Secondary controls or metadata where visible"
32
+
33
+ VisualStyle:
34
+ Tokens:
35
+ - "Color.SurfaceGlass"
36
+ - "Shape.CardRadius"
37
+ - "Typography.Body"
38
+ - "Motion.General"
39
+
40
+ Interactions:
41
+ Visible: []
42
+ Inferred:
43
+ - "Hover and selected states may be required if controls are interactive."
44
+ Intended: []
45
+ Recommended:
46
+ - "Add keyboard-focus states and accessible labels."
47
+
48
+ Responsive:
49
+ Desktop: "Use page-level placement."
50
+ Tablet: "Compress spacing and preserve hierarchy."
51
+ Mobile: "Stack or collapse only if layout requires it."
52
+
53
+ ImplementationHints:
54
+ - "Implement as reusable component mapped to this exact slug."
55
+ - "Do not rename without updating protocols/component_binding_graph.cox and manifest.cox."
56
+ ChildSubcomponents: []
@@ -0,0 +1 @@
1
+ Replace this placeholder with analytics_sidebar_panels_screenshot.png after real screenshot partitioning.
@@ -0,0 +1,62 @@
1
+ CoxVersion: "1.0"
2
+ FileType: "page_spec"
3
+ PageName: "Dashboard"
4
+ Slug: "dashboard"
5
+ Schema: "cox.page.v1"
6
+ ProjectName: "LocalAppManager"
7
+ PageType: "dashboard_overview"
8
+ EvidenceSummary:
9
+ Visible: []
10
+ UserSpecified:
11
+ - "Example directory organization uses LocalAppManager and Dashboard."
12
+ - "Component examples include projects_grid_cards and left_navigation_sidebar."
13
+ Inferred:
14
+ - "Dashboard may include sidebar, header, project grid, and analytics rail."
15
+ Intended: []
16
+ Recommended: []
17
+ VisibleStructure:
18
+ Regions:
19
+ - "left_navigation_sidebar"
20
+ - "top_header_stats_bar"
21
+ - "projects_grid_cards"
22
+ - "analytics_sidebar_panels"
23
+
24
+ NamingDecision:
25
+ ChosenName: "Dashboard"
26
+ Reason: "User-provided page name and common page-level role."
27
+ RejectedAlternatives: ["Overview", "Home", "Projects"]
28
+ AmbiguityRisk: "Low"
29
+ EvidenceLevel: "UserSpecified"
30
+
31
+ Layout:
32
+ Desktop: "App shell with left navigation, top header/stats bar, central projects grid, optional right analytics rail."
33
+ Tablet: "Collapse analytics rail below main content or into tabbed panel."
34
+ Mobile: "Stack header, filters, project cards, and analytics sections vertically."
35
+
36
+ Children:
37
+ Components:
38
+ - Slug: "left_navigation_sidebar"
39
+ Folder: "left_navigation_sidebar/"
40
+ Role: "Navigation and workspace filtering"
41
+ - Slug: "top_header_stats_bar"
42
+ Folder: "top_header_stats_bar/"
43
+ Role: "Page title, search/actions, KPI summaries"
44
+ - Slug: "projects_grid_cards"
45
+ Folder: "projects_grid_cards/"
46
+ Role: "Primary project discovery and launch grid"
47
+ - Slug: "analytics_sidebar_panels"
48
+ Folder: "analytics_sidebar_panels/"
49
+ Role: "Activity, usage, health, and chart summaries"
50
+
51
+ Interactions:
52
+ Visible: []
53
+ Inferred:
54
+ - "Users likely navigate between shell regions, search/filter projects, and inspect analytics summaries."
55
+ Intended: []
56
+ Recommended:
57
+ - "Preserve keyboard navigation across dashboard regions and child component focus targets."
58
+
59
+ RecursiveDecompositionDecision:
60
+ Complexity: "ComplexPage"
61
+ Reason: "Dashboard contains multiple distinguishable regions and likely interaction groups."
62
+ Action: "Use dashboard.cox for the page shell and child component .cox files for implementation details."
@@ -0,0 +1 @@
1
+ Replace this placeholder with dashboard_screenshot.png after a real Dashboard screenshot is supplied.
@@ -0,0 +1,56 @@
1
+ CoxVersion: "1.0"
2
+ FileType: "component_spec"
3
+ ComponentName: "left_navigation_sidebar"
4
+ Slug: "left_navigation_sidebar"
5
+ Schema: "cox.component.v1"
6
+ Role: "Global navigation, tags, and user/workspace controls"
7
+ EvidenceSummary:
8
+ Visible: []
9
+ UserSpecified:
10
+ - "Component name appears in the approved COX naming examples or derived example structure."
11
+ Inferred:
12
+ - "Detailed behavior should be adapted to actual screenshots when supplied."
13
+ Intended: []
14
+ Recommended: []
15
+
16
+ NamingDecision:
17
+ ChosenName: "left_navigation_sidebar"
18
+ Reason: "Clear left-side navigation role; avoids ambiguous left_sidebar."
19
+ RejectedAlternatives:
20
+ - "generic_section"
21
+ - "nested_panel"
22
+ - "ambiguous_area"
23
+ AmbiguityRisk: "Low"
24
+ EvidenceLevel: "UserSpecified"
25
+
26
+ VisibleStructure:
27
+ Note: "Placeholder until real screenshot crop is supplied."
28
+ ExpectedRegions:
29
+ - "Container surface"
30
+ - "Primary content group"
31
+ - "Secondary controls or metadata where visible"
32
+
33
+ VisualStyle:
34
+ Tokens:
35
+ - "Color.SurfaceGlass"
36
+ - "Shape.CardRadius"
37
+ - "Typography.Body"
38
+ - "Motion.General"
39
+
40
+ Interactions:
41
+ Visible: []
42
+ Inferred:
43
+ - "Hover and selected states may be required if controls are interactive."
44
+ Intended: []
45
+ Recommended:
46
+ - "Add keyboard-focus states and accessible labels."
47
+
48
+ Responsive:
49
+ Desktop: "Use page-level placement."
50
+ Tablet: "Compress spacing and preserve hierarchy."
51
+ Mobile: "Stack or collapse only if layout requires it."
52
+
53
+ ImplementationHints:
54
+ - "Implement as reusable component mapped to this exact slug."
55
+ - "Do not rename without updating protocols/component_binding_graph.cox and manifest.cox."
56
+ ChildSubcomponents: []
@@ -0,0 +1 @@
1
+ Replace this placeholder with left_navigation_sidebar_screenshot.png after real screenshot partitioning.
@@ -0,0 +1,56 @@
1
+ CoxVersion: "1.0"
2
+ FileType: "component_spec"
3
+ ComponentName: "projects_grid_cards"
4
+ Slug: "projects_grid_cards"
5
+ Schema: "cox.component.v1"
6
+ Role: "Project cards grid for browsing, sorting, and launching local projects"
7
+ EvidenceSummary:
8
+ Visible: []
9
+ UserSpecified:
10
+ - "Component name appears in the approved COX naming examples or derived example structure."
11
+ Inferred:
12
+ - "Detailed behavior should be adapted to actual screenshots when supplied."
13
+ Intended: []
14
+ Recommended: []
15
+
16
+ NamingDecision:
17
+ ChosenName: "projects_grid_cards"
18
+ Reason: "Clear domain + layout + component type."
19
+ RejectedAlternatives:
20
+ - "generic_section"
21
+ - "nested_panel"
22
+ - "ambiguous_area"
23
+ AmbiguityRisk: "Low"
24
+ EvidenceLevel: "UserSpecified"
25
+
26
+ VisibleStructure:
27
+ Note: "Placeholder until real screenshot crop is supplied."
28
+ ExpectedRegions:
29
+ - "Container surface"
30
+ - "Primary content group"
31
+ - "Secondary controls or metadata where visible"
32
+
33
+ VisualStyle:
34
+ Tokens:
35
+ - "Color.SurfaceGlass"
36
+ - "Shape.CardRadius"
37
+ - "Typography.Body"
38
+ - "Motion.General"
39
+
40
+ Interactions:
41
+ Visible: []
42
+ Inferred:
43
+ - "Hover and selected states may be required if controls are interactive."
44
+ Intended: []
45
+ Recommended:
46
+ - "Add keyboard-focus states and accessible labels."
47
+
48
+ Responsive:
49
+ Desktop: "Use page-level placement."
50
+ Tablet: "Compress spacing and preserve hierarchy."
51
+ Mobile: "Stack or collapse only if layout requires it."
52
+
53
+ ImplementationHints:
54
+ - "Implement as reusable component mapped to this exact slug."
55
+ - "Do not rename without updating protocols/component_binding_graph.cox and manifest.cox."
56
+ ChildSubcomponents: []
@@ -0,0 +1 @@
1
+ Replace this placeholder with projects_grid_cards_screenshot.png after real screenshot partitioning.