Skip to content

The default election reference is the ratified docs/project-repo-schema.md - #19

Merged
brettheap merged 3 commits into
mainfrom
docs/ratified-reference
Sep 4, 2026
Merged

brettheap merged 3 commits into
mainfrom
docs/ratified-reference

Conversation

@brettheap

@brettheap brettheap commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Lane: repo-shape

Brett Heap's edits from his workstation clone: the default reference: a scaffolded/adopted project.yaml records switches from the staged fragment's path to the ratified openxFactory docs/project-repo-schema.md (ratified 2026-09-02); a project elected before that date keeps the staged path as a valid reference. README and the manifest template updated to match. Merged with main (#18) before opening.

🤖 Generated with Claude Code

https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T

Summary by Sourcery

Use the ratified project repository schema as the default election reference while retaining support for pre-ratification project elections.

Enhancements:

  • Update project election references to use the ratified openxFactory docs/project-repo-schema.md by default while preserving the staged path for projects elected before ratification.

Documentation:

  • Align the README and project manifest template with the ratified schema reference and its historical compatibility.

Tests:

  • Adjust the README length guard for the expanded election-reference guidance.

brettheap and others added 2 commits September 4, 2026 00:26
…staged fragment

add-project-repo-schema was ratified 2026-09-02 and its doctrine now lives at
openxFactory docs/project-repo-schema.md; a project elected earlier recorded
the staged fragment's path, and that remains a valid reference for it.

Edits by Brett Heap in his workstation clone; committed by lane repo-shape.

Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T
Copilot AI lite review requested due to automatic review settings September 4, 2026 04:28
@sourcery-ai

sourcery-ai Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the default project-schema reference from the staged fragment to the ratified openxFactory docs/project-repo-schema.md, with documentation clarifying that projects elected before 2026-09-02 may retain the staged reference.

File-Level Changes

Change Details Files
Switch the scaffolded project reference to the ratified repository-schema document while preserving compatibility for projects elected before ratification.
  • Replace the materializer’s default reference with openxFactory docs/project-repo-schema.md.
  • Document the ratification-date cutoff and legacy staged-path references in the README.
  • Update the project manifest template comments to explain current and pre-ratification references.
scripts/shape_materialize.py
README.md
templates/assembly-root/project.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="scripts/shape_materialize.py" line_range="41" />
<code_context>
-DEFAULT_REFERENCE = (
-    "openxFactory ideation/staging/project-repo-schema/project-repo-schema.md"
-)
+DEFAULT_REFERENCE = "openxFactory docs/project-repo-schema.md"

 #: One name, used in three places below: the source path, the target path and
</code_context>
<issue_to_address>
**issue (bug_risk):** A scaffold or adoption explicitly dated before 2026-09-02 still records `openxFactory docs/project-repo-schema.md` when the caller omits `--reference`, so the generated manifest falsely claims that the earlier election followed the ratified document instead of preserving the staged reference required for pre-ratification projects.

**Triggers:** When `scaffold-project.py` or `adopt-project.py` is invoked with `--elected-on` earlier than 2026-09-02 and without an explicit `--reference`.

**Suggested fix:** Choose the reference from the election date, using the staged path before 2026-09-02 and the ratified path on or after that date, or refuse a pre-ratification election unless its staged reference is supplied explicitly.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and newly scaffolded projects will persist the ratified document path in their project manifest, so an incorrect default would leave a bounded set of provenance references needing correction. Reverting the code does not fix manifests already generated, but those records can be updated without data loss or other irreversible effects.

Blocking findings: scripts/shape_materialize.py:41


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

DEFAULT_REFERENCE = (
"openxFactory ideation/staging/project-repo-schema/project-repo-schema.md"
)
DEFAULT_REFERENCE = "openxFactory docs/project-repo-schema.md"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): A scaffold or adoption explicitly dated before 2026-09-02 still records openxFactory docs/project-repo-schema.md when the caller omits --reference, so the generated manifest falsely claims that the earlier election followed the ratified document instead of preserving the staged reference required for pre-ratification projects.

Triggers: When scaffold-project.py or adopt-project.py is invoked with --elected-on earlier than 2026-09-02 and without an explicit --reference.

Suggested fix: Choose the reference from the election date, using the staged path before 2026-09-02 and the ratified path on or after that date, or refuse a pre-ratification election unless its staged reference is supplied explicitly.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is a low-risk constant/documentation update that aligns the default manifest reference with the ratified schema location and keeps historical references explicitly valid.

Pull request overview

This PR updates the default reference: recorded in newly scaffolded/adopted project.yaml manifests to point at the ratified openxFactory schema document (docs/project-repo-schema.md), and updates the surrounding documentation/comments to clarify that older projects may legitimately retain the prior staged reference path.

Changes:

  • Switch DEFAULT_REFERENCE in the materializer to openxFactory docs/project-repo-schema.md.
  • Update the scaffolded templates/assembly-root/project.yaml comment to explain post-/pre-ratification reference expectations.
  • Update README wording to reflect the ratified schema location and continued validity of historical staged references.
File summaries
File Description
templates/assembly-root/project.yaml Clarifies the intended meaning of reference: around the 2026-09-02 ratification cutover.
scripts/shape_materialize.py Updates the default reference string used by scaffold/adopt materialization.
README.md Updates top-level documentation to point at the ratified schema doc and note historical staged references remain valid.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 4, 2026 04:30
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are narrowly scoped to updating the default reference string plus aligned documentation and a corresponding hygiene-test cap update, with no behavioral validation rules tightened that could break existing projects.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap
brettheap merged commit 60e9e69 into main Sep 4, 2026
4 checks passed
brettheap added a commit that referenced this pull request Sep 4, 2026
…ay the tool runs (#27)

Sourcery on #19: `scaffold-project.py` and `adopt-project.py` wrote
`DEFAULT_REFERENCE` — the ratified `openxFactory docs/project-repo-schema.md`
— whenever `--reference` was omitted, whatever `--elected-on` said. A project
dated before the 2026-09-02 ratification therefore recorded a manifest
claiming its election followed a document that did not exist that day, when
the doctrine's own sentence is that an earlier election followed the staged
fragment.

`shape_materialize.default_reference(elected_on)` now chooses: the staged
fragment path strictly before 2026-09-02, the ratified document on or after.
`election_date()` parses the date first and REFUSES a malformed value
(`election-date-malformed`) before anything is created, whether or not an
explicit `--reference` would have made the date irrelevant to the choice —
a manifest field no reader can parse is not something an override should let
through. Both tools resolve the reference through it: the scaffold at plan
time (the printed plan marks a date-chosen default), adopt at `plan` time and
again at `execute` for a plan file that omits `reference:`, resolved from the
plan's OWN `elected_on`, never from the machine's calendar. An explicit
`--reference` still wins. `DEFAULT_REFERENCE` keeps its name and value.

README and the manifest template say the rule; `tests/test_reference_default.py`
covers the boundary dates, the refusal, both tools end to end offline, and the
override. README cap 509 -> 513.

Closes #26.

Lane: codex-intake-shape

Co-authored-by: Claude Fable 5.1 <[email protected]>
@brettheap
brettheap deleted the docs/ratified-reference branch September 11, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants