Repository navigation
feat(templates): enhance YAML templates with comprehensive guidance [OMN-964] #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
eaccb2b
feat(templates): enhance YAML templates with comprehensive guidance […
jonahgabriel 5d48b7a
fix(templates): address PR review feedback [OMN-964]
jonahgabriel 262eb40
docs(day_close): add day close reports for Dec 21-23
jonahgabriel 57726ed
fix(templates): address PR review feedback - update day close files a…
jonahgabriel f195e9a
refactor(templates): extract guidance to TEMPLATE_GUIDE.md and extrac…
jonahgabriel 5e5e26b
fix(ci): apply pre-commit formatting fixes [OMN-964]
jonahgabriel 082ee0f
docs(day_close): add day close report for Dec 24 [OMN-964]
jonahgabriel 6a9e064
fix(day_close): remove circular PR reference in PR #87 title [OMN-964]
jonahgabriel e856188
fix(pre-commit): configure ruff-format to fail when files are modifie…
jonahgabriel 07e354b
fix(pre-commit): simplify ruff-format hook to check/format all files …
jonahgabriel 7a392f0
fix(pre-commit): add pass_filenames=false to ruff-format hook [OMN-964]
jonahgabriel d3dffd8
fix(pre-commit): simplify ruff-format to use --check flag only [OMN-964]
jonahgabriel 79d4656
fix(pre-commit): use official ruff-pre-commit hooks for consistency […
jonahgabriel 2c8f130
fix(templates): address PR review feedback [OMN-964]
jonahgabriel e327357
fix(security): upgrade ruff-pre-commit to v0.14.2 for CVE-2025-62518 …
jonahgabriel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,222 @@ | ||
| # Template Guide for ONEX Change Control | ||
|
|
||
| This guide provides detailed documentation for using the YAML templates in the `templates/` directory. For quick reference, see the inline comments in the templates themselves. | ||
|
|
||
| ## Table of Contents | ||
|
|
||
| - [Day Close Template](#day-close-template) | ||
| - [Ticket Contract Template](#ticket-contract-template) | ||
| - [Common Patterns](#common-patterns) | ||
|
|
||
| ## Day Close Template | ||
|
|
||
| ### Overview | ||
|
|
||
| The Day Close template (`day_close.template.yaml`) is used to create daily reconciliation reports that track planned vs. actual work across the ONEX ecosystem. | ||
|
|
||
| **Goal**: Deterministic daily reconciliation of plan vs. actual work across repos. | ||
| **Rule**: Every actual item must map to a plan item OR be recorded as `drift_detected`. | ||
|
|
||
| ### Field Reference | ||
|
|
||
| #### `schema_version` | ||
| - **Type**: String | ||
| - **Required**: Yes | ||
| - **Value**: `"1.0.0"` (current schema version) | ||
| - **Description**: Schema version for validation compatibility | ||
|
|
||
| #### `date` | ||
| - **Type**: String (ISO date format) | ||
| - **Required**: Yes | ||
| - **Format**: `YYYY-MM-DD` (e.g., `"2025-12-21"`) | ||
| - **Description**: The date this day close report covers | ||
|
|
||
| #### `process_changes_today` | ||
| - **Type**: List of objects | ||
| - **Required**: Yes (can be empty list `[]`) | ||
| - **Description**: Daily process evolution (keep agility reviewable + rollbackable) | ||
| - **Fields**: | ||
| - `change`: What changed in the process today | ||
| - `rationale`: Why we changed it | ||
| - `replaces`: What it replaces / previous behavior | ||
|
|
||
| #### `plan` | ||
| - **Type**: List of objects | ||
| - **Required**: Yes (can be empty list `[]`) | ||
| - **Description**: Planned requirements for today | ||
| - **Fields**: | ||
| - `requirement_id`: Identifier for the requirement (e.g., `"MVP-2WAY-REGISTRATION"`) | ||
| - `summary`: Brief description of the requirement | ||
|
|
||
| #### `actual_by_repo` | ||
| - **Type**: List of objects | ||
| - **Required**: Yes (can be empty list `[]`) | ||
| - **Description**: Actual work completed by repository | ||
| - **Fields**: | ||
| - `repo`: Repository identifier (e.g., `"OmniNode-ai/omnibase_core"`) | ||
| - `prs`: List of PR objects, each containing: | ||
| - `pr`: PR number (must be >= 1) | ||
| - `title`: PR title | ||
| - `state`: `"merged"` or `"open"` | ||
| - `notes`: Why it matters / what it unblocks | ||
|
|
||
| #### `drift_detected` | ||
| - **Type**: List of objects | ||
| - **Required**: Yes (can be empty list `[]`) | ||
| - **Description**: Work that happened but wasn't in plan | ||
| - **Unknown Handling**: If you're unsure about drift, record it here with category and mark `correction_for_tomorrow` as `"TBD - requires investigation"` | ||
| - **Fields**: | ||
| - `drift_id`: Unique identifier (e.g., `"DRIFT-001"`, `"DRIFT-002"`) | ||
| - `category`: Valid values: `"scope"` | `"architecture"` | `"interfaces"` | `"dependencies"` | `"infra"` | `"process"` | ||
| - `evidence`: What changed / where (PRs, commits, files) | ||
| - `impact`: Why it matters | ||
| - `correction_for_tomorrow`: Specific fix / decision / ticket | ||
|
|
||
| #### `invariants_checked` | ||
| - **Type**: Object | ||
| - **Required**: Yes | ||
| - **Description**: ONEX architectural invariants | ||
| - **Unknown Handling**: Use `"unknown"` if invariant status cannot be determined (e.g., tests not run yet, investigation pending) | ||
| - **Valid values for each field**: `"pass"` | `"fail"` | `"unknown"` | ||
| - **Fields**: | ||
| - `reducers_pure`: Reducers are pure (no I/O) | ||
| - `orchestrators_no_io`: Orchestrators perform no I/O | ||
| - `effects_do_io_only`: Effects perform I/O only | ||
| - `real_infra_proof_progressing`: Real infrastructure proof is progressing | ||
|
|
||
| #### `corrections_for_tomorrow` | ||
| - **Type**: List of strings | ||
| - **Required**: Yes (can be empty list `[]`) | ||
| - **Description**: Actionable corrections for tomorrow | ||
|
|
||
| #### `risks` | ||
| - **Type**: List of objects | ||
| - **Required**: Yes (can be empty list `[]`) | ||
| - **Description**: Risks identified today | ||
| - **Fields**: | ||
| - `risk`: Short risk description | ||
| - `mitigation`: Short mitigation description | ||
|
|
||
| ## Ticket Contract Template | ||
|
|
||
| ### Overview | ||
|
|
||
| The Ticket Contract template (`ticket_contract.template.yaml`) is used to create acceptance specifications for tickets that touch cross-repo interfaces. | ||
|
|
||
| ### Field Reference | ||
|
|
||
| #### `schema_version` | ||
| - **Type**: String | ||
| - **Required**: Yes | ||
| - **Value**: `"1.0.0"` (current schema version) | ||
| - **Description**: Schema version for validation compatibility | ||
|
|
||
| #### `ticket_id` | ||
| - **Type**: String | ||
| - **Required**: Yes | ||
| - **Format**: Ticket identifier (e.g., `"OMN-962"`) | ||
| - **Description**: The Linear ticket identifier | ||
|
|
||
| #### `summary` | ||
| - **Type**: String | ||
| - **Required**: Yes | ||
| - **Description**: One-line summary of the ticket | ||
|
|
||
| #### `is_seam_ticket` | ||
| - **Type**: Boolean | ||
| - **Required**: Yes | ||
| - **Description**: If `true`, this ticket touches cross-repo interfaces and must be drift-controlled. Set to `true` if the ticket affects interfaces between repositories (events, topics, protocols, etc.) | ||
|
|
||
| #### `interface_change` | ||
| - **Type**: Boolean | ||
| - **Required**: Yes | ||
| - **Description**: If `true`, this ticket changes interface surfaces. If `false`, `interfaces_touched` must be explicitly empty (`[]`). If `true`, `interfaces_touched` should list all affected interface surfaces. | ||
|
|
||
| #### `interfaces_touched` | ||
| - **Type**: List of strings | ||
| - **Required**: Yes (can be empty list `[]`) | ||
| - **Valid values**: `"events"` | `"topics"` | `"protocols"` | `"envelopes"` | `"public_api"` | ||
| - **Rules**: | ||
| - If `interface_change=false`, this must be empty: `[]` | ||
| - If `interface_change=true`, this should list all affected surfaces | ||
| - **Unknown Handling**: If unsure which interfaces are affected, set `interface_change=true` and leave this empty temporarily. **NOTE**: The `contract.is_complete` property will return `False` until `interfaces_touched` is populated. Populate before ticket completion. | ||
|
|
||
| #### `evidence_requirements` | ||
| - **Type**: List of objects | ||
| - **Required**: Yes (can be empty list `[]`) | ||
| - **Description**: What proof is required for this ticket to be considered complete | ||
| - **Unknown Handling**: If evidence requirements are not yet known, leave empty but document in ticket description that requirements will be added | ||
| - **Fields**: | ||
| - `kind`: Valid values: `"tests"` | `"docs"` | `"ci"` | `"benchmark"` | `"manual"` | ||
| - `description`: What evidence must exist | ||
| - `command`: How to reproduce, if applicable (optional: `null` or omit if not applicable) | ||
|
|
||
| **Evidence Kinds**: | ||
| - `"tests"`: Automated test coverage (unit, integration, property-based) | ||
| - `"docs"`: Documentation updates (ADRs, guides, API docs) | ||
| - `"ci"`: CI/CD pipeline changes (new checks, validation gates) | ||
| - `"benchmark"`: Performance benchmarks (latency, throughput, memory) | ||
| - `"manual"`: Manual verification steps (testing checklist, manual QA) | ||
|
|
||
| **Examples**: | ||
| ```yaml | ||
| # Example with command: | ||
| - kind: "tests" | ||
| description: "Unit tests for ModelDayClose date validation" | ||
| command: "poetry run pytest tests/test_models.py::test_day_close_date_validation" | ||
|
|
||
| # Example without command (docs don't need reproduction commands): | ||
| - kind: "docs" | ||
| description: "Update ADR for ticket contract schema" | ||
| command: null # or simply omit this field | ||
| ``` | ||
|
|
||
| #### `emergency_bypass` | ||
| - **Type**: Object | ||
| - **Required**: Yes | ||
| - **Description**: Allows temporary bypass of drift control enforcement | ||
| - **WARNING**: Use only in genuine emergencies (production incidents, critical blockers) | ||
| - **Fields**: | ||
| - `enabled`: Boolean - Set to `true` only in genuine emergencies | ||
| - `justification`: String - Required if `enabled=true`: explain why bypass is necessary | ||
| - `follow_up_ticket_id`: String - Required if `enabled=true`: ticket that will properly address this | ||
| - **Unknown Handling**: If you're unsure whether bypass is needed, set `enabled=false` and document the situation in the ticket description for review | ||
|
|
||
| **Example of emergency bypass (DO NOT USE unless genuine emergency)**: | ||
| ```yaml | ||
| emergency_bypass: | ||
| enabled: true | ||
| justification: "Production incident requires immediate hotfix. Full contract will be created in follow-up ticket." | ||
| follow_up_ticket_id: "OMN-999" | ||
| ``` | ||
|
|
||
| ## Common Patterns | ||
|
|
||
| ### Unknown Handling | ||
|
|
||
| Both templates support "unknown" states for fields where the status cannot be determined: | ||
|
|
||
| - **Day Close**: Use `"unknown"` for invariant statuses when tests haven't run yet or investigation is pending | ||
| - **Ticket Contract**: Leave `interfaces_touched` empty temporarily if unsure, but note that `is_complete` will be `False` until populated | ||
|
|
||
| ### Empty Lists | ||
|
|
||
| All list fields accept empty lists (`[]`) as valid values. Use empty lists when: | ||
| - No items exist for that field | ||
| - Items are not yet known (document in notes/description) | ||
|
|
||
| ### Validation | ||
|
|
||
| After filling out a template, validate it against the schema: | ||
| ```bash | ||
| poetry run python scripts/validate_yaml_against_schema.py | ||
| ``` | ||
|
|
||
| ### Schema Alignment | ||
|
|
||
| Both templates are schema-aligned with their corresponding Pydantic models: | ||
| - Day Close → `ModelDayClose` | ||
| - Ticket Contract → `ModelTicketContract` | ||
|
|
||
| See `src/onex_change_control/models/` for the model definitions. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| schema_version: "1.0.0" | ||
| date: "2025-12-21" | ||
|
|
||
| process_changes_today: [] | ||
|
|
||
| plan: | ||
| - requirement_id: "MVP-2WAY-REGISTRATION" | ||
| summary: "Continue 2-way registration workflow - focus on unblocking critical path" | ||
| - requirement_id: "M1-SCHEMA-MODELS" | ||
| summary: "Complete Pydantic schema models v1 (Day Close + Ticket Contract) - OMN-962" | ||
| - requirement_id: "M1-SCHEMA-EXPORT" | ||
| summary: "Add deterministic JSON Schema export + manifest (hashes + tool version) - OMN-963" | ||
|
|
||
| actual_by_repo: | ||
| - repo: "OmniNode-ai/omnibase_core" | ||
| prs: [] | ||
| - repo: "OmniNode-ai/omnibase_infra" | ||
| prs: [] | ||
| - repo: "OmniNode-ai/omnibase_spi" | ||
| prs: [] | ||
| - repo: "OmniNode-ai/onex_change_control" | ||
| prs: | ||
| - pr: 4 | ||
| title: "M1: Implement Pydantic schema models v1 (Day Close + Ticket Contract)" | ||
| state: "merged" | ||
| notes: "Completed OMN-962 - schema models for day close and ticket contract" | ||
| - pr: 5 | ||
| title: "feat(export): implement JSON schema export script (OMN-963)" | ||
| state: "open" | ||
| notes: "Work in progress on OMN-963 - JSON schema export functionality" | ||
|
|
||
| drift_detected: [] | ||
|
|
||
| invariants_checked: | ||
| reducers_pure: "pass" | ||
| orchestrators_no_io: "pass" | ||
| effects_do_io_only: "pass" | ||
| real_infra_proof_progressing: "unknown" | ||
|
|
||
| corrections_for_tomorrow: [] | ||
|
|
||
| risks: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| schema_version: "1.0.0" | ||
| date: "2025-12-22" | ||
|
|
||
| process_changes_today: [] | ||
|
|
||
| plan: | ||
| - requirement_id: "MVP-2WAY-REGISTRATION" | ||
| summary: "Continue 2-way registration workflow - focus on unblocking critical path" | ||
| - requirement_id: "M1-SCHEMA-MODELS" | ||
| summary: "Complete Pydantic schema models v1 (Day Close + Ticket Contract) - OMN-962" | ||
| - requirement_id: "M1-SCHEMA-EXPORT" | ||
| summary: "Add deterministic JSON Schema export + manifest (hashes + tool version) - OMN-963" | ||
| - requirement_id: "M1-TEMPLATES" | ||
| summary: "Create YAML templates for Day Close + Ticket Contract - OMN-964" | ||
|
|
||
| actual_by_repo: | ||
| - repo: "OmniNode-ai/omnibase_core" | ||
| prs: [] | ||
| - repo: "OmniNode-ai/omnibase_infra" | ||
| prs: [] | ||
| - repo: "OmniNode-ai/omnibase_spi" | ||
| prs: [] | ||
| - repo: "OmniNode-ai/onex_change_control" | ||
| prs: | ||
| - pr: 5 | ||
| title: "feat(export): implement JSON schema export script (OMN-963)" | ||
| state: "open" | ||
| notes: "Continued work on OMN-963 - preparing for merge" | ||
|
|
||
| drift_detected: [] | ||
|
|
||
| invariants_checked: | ||
| reducers_pure: "pass" | ||
| orchestrators_no_io: "pass" | ||
| effects_do_io_only: "pass" | ||
| real_infra_proof_progressing: "unknown" | ||
|
|
||
| corrections_for_tomorrow: [] | ||
|
|
||
| risks: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| schema_version: "1.0.0" | ||
| date: "2025-12-23" | ||
|
|
||
| process_changes_today: [] | ||
|
|
||
| plan: | ||
| - requirement_id: "MVP-2WAY-REGISTRATION" | ||
| summary: "Continue 2-way registration workflow - focus on unblocking critical path" | ||
| - requirement_id: "M1-SCHEMA-MODELS" | ||
| summary: "Complete Pydantic schema models v1 (Day Close + Ticket Contract) - OMN-962" | ||
| - requirement_id: "M1-SCHEMA-EXPORT" | ||
| summary: "Add deterministic JSON Schema export + manifest (hashes + tool version) - OMN-963" | ||
| - requirement_id: "M1-TEMPLATES" | ||
| summary: "Create YAML templates for Day Close + Ticket Contract - OMN-964" | ||
|
|
||
| actual_by_repo: | ||
| - repo: "OmniNode-ai/omnibase_core" | ||
| prs: [] | ||
| - repo: "OmniNode-ai/omnibase_infra" | ||
| prs: [] | ||
| - repo: "OmniNode-ai/omnibase_spi" | ||
| prs: [] | ||
| - repo: "OmniNode-ai/onex_change_control" | ||
| prs: | ||
| - pr: 5 | ||
| title: "feat(export): implement JSON schema export script (OMN-963)" | ||
| state: "merged" | ||
| notes: "Completed OMN-963 - JSON schema export with manifest and hashes" | ||
| - pr: 6 | ||
| title: "feat(templates): enhance YAML templates with comprehensive guidance [OMN-964]" | ||
| state: "open" | ||
| notes: "Work in progress on OMN-964 - comprehensive template guidance and validation tests" | ||
|
|
||
| drift_detected: [] | ||
|
|
||
| invariants_checked: | ||
| reducers_pure: "pass" | ||
| orchestrators_no_io: "pass" | ||
| effects_do_io_only: "pass" | ||
| real_infra_proof_progressing: "unknown" | ||
|
|
||
| corrections_for_tomorrow: [] | ||
|
|
||
| risks: [] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add newline at end of file to fix pre-commit hook.
The end-of-file-fixer hook failed because the file is missing a newline at the end. This is a standard POSIX text file requirement and many editors/linters enforce it.
🔎 Fix: Add newline at end of file
Ensure the file ends with a single newline character after line 222. Most editors have a setting to automatically add this (e.g., VS Code's "files.insertFinalNewline": true).
🧰 Tools
🪛 GitHub Actions: CI
[error] 1-1: End-of-file-fixer hook failed. The hook modified files (docs/TEMPLATE_GUIDE.md).
🤖 Prompt for AI Agents