Skip to content

[codex] Plan submission artifact policy foundation#26

Open
Abiorh001 wants to merge 34 commits into
mainfrom
codex/submission-artifact-policy-loop-plan
Open

[codex] Plan submission artifact policy foundation#26
Abiorh001 wants to merge 34 commits into
mainfrom
codex/submission-artifact-policy-loop-plan

Conversation

@Abiorh001

@Abiorh001 Abiorh001 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds the zero-trust planning package for WS-POL-001 - Submission Artifact Policy Foundation.

It does not implement product runtime changes yet. It locks intent, discovery, decisions, plan, chunk map, first chunk contract, review evidence, and external-review response before backend implementation starts.

Chunk

WS-POL-001-01 - Guide Policy Bundle Foundation

Goal

Lock the architecture and implementation contract for Workstream-derived submission artifact policy before backend work begins.

The core path is:

ProjectGuide
-> GuideSourceSnapshot bundle
-> GuideSufficiencyReport
-> ProjectSubmissionArtifactPolicy
-> EffectiveProjectSubmissionArtifactPolicy
-> project PreSubmitCheckerPolicy
-> tasks lock references
-> deterministic pre-submit execution

Human-Approved Intent

Project owners provide guide material, business terms, and payment terms. Workstream performs the internal setup work: source snapshotting, guide sufficiency review, policy derivation, effective policy merge, checker compilation, and admin/project_manager approval.

Tasks do not derive policies or compile checker bundles by default. They lock references to the applicable guide snapshot, effective project policy hash, and project pre-submit checker policy hash.

Scope Control

In scope:

  • planning artifacts for WS-POL-001
  • first chunk contract for guide/source/policy bundle foundation
  • ADR/spec/template/operations wording alignment
  • stale rejected-model wording gate hardening
  • internal and external review evidence

Out of scope:

  • backend runtime implementation
  • task submission runtime rewiring
  • frontend work
  • payment execution
  • blockchain/external settlement
  • source adapter implementation

Product Behavior Locked By This Plan

  • ProjectGuide is human-facing project material.
  • GuideSourceSnapshot is an immutable bundle manifest for exact evaluated guide/source material.
  • ProjectGuideSufficiencyAgent checks guide coverage against the project task set.
  • SubmissionArtifactPolicy is the Workstream-derived machine-readable intake contract.
  • Legacy evidence_policy is construction state, not a compatibility alias.
  • Workstream defaults cannot be weakened by project policy or task runtime parameters.
  • PreSubmitCheckerPolicy is generated once at project-guide scope from the effective project policy.
  • Preflight returns PreSubmitCheckResponse.
  • Blocked submission creation returns DomainError(code="pre_submission_checker_failed").
  • Blocking pre-submit failures create no submission row, submission version, durable checker run, or submission-created audit event.
  • Worker-facing review outcomes remain accept, needs_revision, and reject.

Acceptance Criteria Proof

  • Guide source snapshot bundle canonicalization is documented as sha256(canonical_json(manifest_json)).
  • Compiler semantic coverage requirements are documented for omitted required artifacts, skipped evidence coverage, weakened severity, missing defaults, and untraceable compiled rules.
  • Runtime parameters are constrained to trusted task-contract fields only.
  • Final activation boundary is documented: guide activation requires the compiled project PreSubmitCheckerPolicy after Chunk 2.
  • Chunk 1/2/3 sequencing is explicit and avoids claiming runtime behavior before its implementation chunk.
  • Stale rejected-model wording is blocked by scripts/check_stale_workstream_wording.py and covered by scripts/test_agent_gates.py.

Validation

Local validation run on the pushed head:

python3 scripts/check_internal_review_evidence.py
python3 scripts/check_stale_workstream_wording.py
python3 scripts/test_agent_gates.py
python3 scripts/check_markdown_links.py
python3 scripts/check_loop_memory_state.py
python3 scripts/workstream_agent_gate.py --base origin/main --head HEAD --format json
git diff --check

Results:

Internal review evidence gate passed.
Stale wording check passed.
24 agent gate tests passed.
Markdown link check passed for 39 changed Markdown files.
Loop memory state check passed.
git diff --check passed.
workstream_agent_gate returned REVIEW_REQUIRED as expected for this risk-sensitive planning PR, with evidence supplied.

GitHub Actions on current head are passing:

  • Agent Gates
  • Backend
  • Week 1 API Demo UI

Internal Review

Required tracks ran and valid findings were addressed:

  • senior engineering: PASS AFTER FIXES
  • QA/test: PASS AFTER FIXES
  • security/auth: PASS WITH LOW RISKS
  • product/ops: PASS WITH LOW RISKS
  • architecture: PASS WITH LOW RISKS
  • ci integrity: PASS
  • docs: PASS AFTER FIXES
  • reuse/dedup: PASS WITH LOW RISKS
  • test delta: PASS WITH LOW RISKS

Evidence file: .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-internal-review-evidence.md.

External Review

External review responses are tracked separately from internal evidence:

.agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-external-review-response.md

Known prior CodeRabbit comments have been checked against current head. The response-schema wording and immutable compiled-bundle data model wording are already addressed.

CI / Gate Integrity

  • No CI bypass was added.
  • The stale-wording gate was strengthened, not weakened.
  • The new gate patterns are covered by scripts/test_agent_gates.py.
  • Internal review evidence is bound to reviewed SHA 2892c9d4cbe6d8e8e33fcbe37a84384193f003af.
  • After the reviewed SHA, only evidence changed.

Test Delta

The only executable test change is the strengthened stale-wording gate test in scripts/test_agent_gates.py. Test-delta review passed with low risk and no required fixes.

Human Review Focus

Please review:

  • whether the project-scoped checker model is correct;
  • whether guide-source snapshot bundle canonicalization is clear enough for implementation;
  • whether Chunk 1/2/3 boundaries are realistic;
  • whether runtime parameter constraints prevent a hidden per-task policy channel;
  • whether the final activation boundary belongs at guide activation after Chunk 2.

Stop Condition

Do not begin backend implementation from this PR until this planning contract is approved and merged.

Summary by CodeRabbit

  • Documentation

    • Clarified guide, policy, and submission requirements across product workflows and reference docs.
    • Added clearer guidance on activation readiness, policy approval, and submission checks.
  • Bug Fixes

    • Improved blocking submission feedback so failures now return structured, consistent messages.
    • Tightened handling to prevent submissions from progressing when required checks are not met.
  • Chores

    • Standardized terminology and updated status/planning records to reflect the current initiative flow.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR advances the agent loop to WS-POL-001, adds initiative planning artifacts for the submission artifact policy foundation, records review evidence, updates architecture/spec/ops docs for the new policy model and pre-submit checker semantics, and expands stale-wording detection coverage.

Changes

WS-POL-001 Initiative Planning and Documentation

Layer / File(s) Summary
Loop state and queue updates
.agent-loop/LOOP_STATE.md, .agent-loop/WORK_QUEUE.md
LOOP_STATE.md switches the active initiative to WS-POL-001 with updated branch, status, and gate fields. WORK_QUEUE.md adds WS-POL-001-01 to active planning, expands completed entries, and changes proposed-next guidance.
Initiative intent, discovery, decisions, plan, and status
.agent-loop/initiatives/WS-POL-001-.../INTENT.md, DISCOVERY.md, DECISIONS.md, PLAN.md, STATUS.md, RISKS.md
These files define the WS-POL-001 contract chain, scope, rollout order, status tracking, and risk table for the submission artifact policy foundation.
WS-POL-001-01 chunk contract and review evidence
.agent-loop/initiatives/WS-POL-001-.../chunks/WS-POL-001-01-....md, reviews/WS-POL-001-01-*.md
The chunk contract sets allowed files, acceptance criteria, verification, reviewer roles, and stop conditions. Internal and external review evidence records the reviewed SHA, findings, rerun commands, and final review state.
Architecture data model and checker flow updates
docs/architecture_*.md
Architecture docs add guide sufficiency reporting, immutable guide snapshots, effective project policy fields, locked pre-submit checker policy semantics, task/submission provenance fields, and updated checker flow behavior.
Lifecycle, operations, and user-flow specs
docs/architecture_lifecycle_state_machine.md, docs/architecture_lockdown.md, docs/current_system_data_flow.html, docs/decision_*.md, docs/glossary.md, docs/operations_*.md, docs/principles.md, docs/product_first_user_flows.md, docs/roadmap_*.md, docs/spec_*.md, docs/template_*.md
These docs are rewritten to use project-scoped policy names, activation gates, locked hashes, structured pre-submit failure semantics, and updated policy/provenance wording across lifecycle, operations, roadmap, template, and flow descriptions.
Stale wording detection updates
scripts/check_stale_workstream_wording.py, scripts/test_agent_gates.py
Regex coverage and regression tests are expanded to catch additional WS-POL-001 naming variants and related policy terms.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Flow-Research/workstream#14: Both PRs update checker-framework documentation to formalize blocking pre-submit failure semantics and separate them from review decisions.
  • Flow-Research/workstream#15: Both PRs touch the checker contract and pre-submit/post-submit boundary docs across the architecture and spec surfaces.
  • Flow-Research/workstream#23: Both PRs update scripts/test_agent_gates.py and the stale-wording gate behavior around detection coverage.

Poem

🐇 Hop, hop, the plan is set in stone,
A policy trail from guide to clone.
Locked hashes shine, the queue stays clear,
Pre-submit bells now ring sincere.
I nibble docs and leave a trace—
No backend leap before approval space!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately matches the planning-focused submission artifact policy foundation changes.
Description check ✅ Passed The description covers the goal, scope, validation, reviews, and human-review focus; a few template sections are abbreviated or omitted.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/submission-artifact-policy-loop-plan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Abiorh001 Abiorh001 marked this pull request as ready for review June 22, 2026 11:50

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
.agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md (1)

155-158: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Refactor repetitive acceptance criteria wording for clarity.

Three successive acceptance criteria sentences in WS-POL-001-03 begin with "Blocking pre-submit failure creates no...". While the criteria are correct and verifiable, restructuring would improve readability without losing meaning.

🔧 Proposed restructuring
 Acceptance criteria:

-- Blocking pre-submit failure creates no submission row.
-- Blocking pre-submit failure creates no submission version.
-- Blocking pre-submit failure creates no submitted transition.
-- Blocking pre-submit failure creates no durable checker run.
+- Blocking pre-submit failure creates no submission row, version, submitted transition, or durable checker run.
 - Passing pre-submit creates a submission stamped with locked policy context.

Alternatively, if preserving line-item structure is preferred:

 Acceptance criteria:

 - Blocking pre-submit failure creates no submission row.
 - Blocking pre-submit failure creates no submission version.
-- Blocking pre-submit failure creates no submitted transition.
-- Blocking pre-submit failure creates no durable checker run.
+- Pre-submit failure also creates no submitted transition or durable checker run.
 - Passing pre-submit creates a submission stamped with locked policy context.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
@.agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md
around lines 155 - 158, The acceptance criteria in the WS-POL-001-03 section
contains three consecutive lines that repetitively begin with "Blocking
pre-submit failure creates no...", which impacts readability. Restructure these
four acceptance criteria by consolidating the common phrase into a single
introductory statement followed by a bulleted or enumerated list of the distinct
outcomes (submission row, submission version, submitted transition, and durable
checker run) to eliminate the repetition while preserving all the meaning and
verifiability of the criteria.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
@.agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md:
- Around line 155-158: The acceptance criteria in the WS-POL-001-03 section
contains three consecutive lines that repetitively begin with "Blocking
pre-submit failure creates no...", which impacts readability. Restructure these
four acceptance criteria by consolidating the common phrase into a single
introductory statement followed by a bulleted or enumerated list of the distinct
outcomes (submission row, submission version, submitted transition, and durable
checker run) to eliminate the repetition while preserving all the meaning and
verifiability of the criteria.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a3b8fb4-fdba-4243-9f76-339677bd94e5

📥 Commits

Reviewing files that changed from the base of the PR and between e36a5fe and 1c90508.

📒 Files selected for processing (11)
  • .agent-loop/LOOP_STATE.md
  • .agent-loop/WORK_QUEUE.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DECISIONS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DISCOVERY.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/INTENT.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/PLAN.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/RISKS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/STATUS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/chunks/WS-POL-001-01-submission-artifact-policy-foundation.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-internal-review-evidence.md

@Abiorh001

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/architecture_data_model.md (1)

311-351: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

PreSubmitCheckerPolicy is properly linked to EffectiveSubmissionArtifactPolicy hash with deterministic generation order.

The field design correctly includes the effective policy hash linkage and generated-at provenance. The deterministic checker order is explicit. The blocking behavior specification (no submission row/version/audit event, no review decision values) is consistent across all documentation.

One implementation note: The data model lists individual fields (checker_names, checker_configs, etc.) but the chunk contract requires the policy to be "persisted, hashed, and locked." Clarify during implementation whether this is a structured schema or an immutable snapshot blob—this affects query strategies for loading locked policies.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture_data_model.md` around lines 311 - 351, The
PreSubmitCheckerPolicy documentation lists individual fields like checker_names,
checker_configs, and blocking_severities, but also specifies the policy must be
persisted, hashed, and locked as an immutable snapshot. Clarify in the data
model whether PreSubmitCheckerPolicy uses a structured schema with separate
columns for each field or stores the entire policy as an immutable blob (like
JSONB). This decision impacts query strategies for loading locked policies and
how the hash linkage to effective_submission_artifact_policy_hash is validated.
Ensure the documentation explicitly states which approach is taken so
implementation decisions about schema design and policy retrieval are clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/decision_0011_submission_artifact_policy_drives_pre_submit.md`:
- Around line 70-86: The decision document describes the required separation
between pre-submit failures and review decision values but lacks verification
that the backend implementation actually enforces this constraint. Add a new
section to this decision document that verifies and documents the three
implementation enforcement points: (1) confirm the API response schemas for
pre_submission_checker_failed responses explicitly prevent inclusion of decision
value fields like accept/needs_revision/reject, (2) verify that any
worker-facing UI components rendering pre-submit results do not display or use
review decision terminology or outcomes, and (3) check that database table
schemas or constraints prevent pre-submit checker result rows from containing
decision value columns or enforce null values for those fields. Reference the
specific backend code locations (API endpoint handlers, response schemas,
database migrations, UI templates) where each enforcement is implemented to
provide concrete evidence supporting the documented separation.

---

Nitpick comments:
In `@docs/architecture_data_model.md`:
- Around line 311-351: The PreSubmitCheckerPolicy documentation lists individual
fields like checker_names, checker_configs, and blocking_severities, but also
specifies the policy must be persisted, hashed, and locked as an immutable
snapshot. Clarify in the data model whether PreSubmitCheckerPolicy uses a
structured schema with separate columns for each field or stores the entire
policy as an immutable blob (like JSONB). This decision impacts query strategies
for loading locked policies and how the hash linkage to
effective_submission_artifact_policy_hash is validated. Ensure the documentation
explicitly states which approach is taken so implementation decisions about
schema design and policy retrieval are clear.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f0fc67bf-cb4f-4159-a8bd-56401c0de69c

📥 Commits

Reviewing files that changed from the base of the PR and between fc48d23 and 03906f8.

📒 Files selected for processing (32)
  • .agent-loop/LOOP_STATE.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DECISIONS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DISCOVERY.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/INTENT.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/PLAN.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/RISKS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/STATUS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/chunks/WS-POL-001-01-submission-artifact-policy-foundation.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-external-review-response.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-internal-review-evidence.md
  • docs/architecture_checker_framework.md
  • docs/architecture_data_model.md
  • docs/architecture_lifecycle_state_machine.md
  • docs/architecture_lockdown.md
  • docs/current_system_data_flow.html
  • docs/decision_0003_project_guides_are_first_class.md
  • docs/decision_0011_submission_artifact_policy_drives_pre_submit.md
  • docs/glossary.md
  • docs/operations_project_operating_manual.md
  • docs/operations_workspace_packet_convention.md
  • docs/product_first_user_flows.md
  • docs/spec_chunk_3_project_guide_foundation.md
  • docs/spec_chunk_5_submission_packet_foundation.md
  • docs/spec_chunk_6_checker_contract_records.md
  • docs/spec_chunk_7_checker_runner_registry.md
  • docs/spec_chunk_8_submission_artifact_policy_checkers.md
  • docs/spec_week2_checker_framework.md
  • docs/template_checker_policy.md
  • docs/template_project_guide.md
  • docs/template_submission_artifact_policy.md
  • docs/template_submission_packet.md
✅ Files skipped from review due to trivial changes (14)
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/STATUS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/RISKS.md
  • docs/template_submission_packet.md
  • docs/operations_workspace_packet_convention.md
  • docs/spec_chunk_7_checker_runner_registry.md
  • .agent-loop/LOOP_STATE.md
  • docs/spec_chunk_8_submission_artifact_policy_checkers.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-external-review-response.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DECISIONS.md
  • docs/current_system_data_flow.html
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-internal-review-evidence.md
  • docs/spec_chunk_3_project_guide_foundation.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DISCOVERY.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md

Comment thread docs/decision_0011_submission_artifact_policy_drives_pre_submit.md Outdated

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/architecture_checker_framework.md (1)

201-207: 🎯 Functional Correctness | 🟡 Minor

Clarify response contract: use actual PreSubmitCheckResponse schema in documentation.

Line 201-207 documents that blocking failures "return pre_submission_checker_failed", but the actual response schema is PreSubmitCheckResponse with status: Literal["passed", "failed"] and eligible_to_submit: bool. The service returns PreSubmitCheckResponse(status="failed", eligible_to_submit=False, ...) for blocking failures, not a response type named pre_submission_checker_failed. Reword to reference the actual schema contract: "...return PreSubmitCheckResponse with status='failed' and eligible_to_submit=False..." to match the implemented and documented schema.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture_checker_framework.md` around lines 201 - 207, In the
documentation section describing PreSubmitCheckerPolicy (lines 201-207), the
phrase "return `pre_submission_checker_failed`" incorrectly names the response
type. Replace this with accurate documentation referencing the actual response
schema: reword to state that blocking failures "return `PreSubmitCheckResponse`
with `status='failed'` and `eligible_to_submit=False`" to correctly represent
the actual response contract with the PreSubmitCheckResponse schema and its
status and eligible_to_submit fields.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/architecture_checker_framework.md`:
- Around line 201-207: In the documentation section describing
PreSubmitCheckerPolicy (lines 201-207), the phrase "return
`pre_submission_checker_failed`" incorrectly names the response type. Replace
this with accurate documentation referencing the actual response schema: reword
to state that blocking failures "return `PreSubmitCheckResponse` with
`status='failed'` and `eligible_to_submit=False`" to correctly represent the
actual response contract with the PreSubmitCheckResponse schema and its status
and eligible_to_submit fields.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b9620d37-8647-4540-950f-6e0b586cbd79

📥 Commits

Reviewing files that changed from the base of the PR and between 4acf31b and 1f4cf31.

📒 Files selected for processing (10)
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DECISIONS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/INTENT.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/PLAN.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/chunks/WS-POL-001-01-submission-artifact-policy-foundation.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-external-review-response.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-internal-review-evidence.md
  • docs/architecture_checker_framework.md
  • docs/architecture_data_model.md
  • docs/decision_0011_submission_artifact_policy_drives_pre_submit.md
✅ Files skipped from review due to trivial changes (7)
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-external-review-response.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DECISIONS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/chunks/WS-POL-001-01-submission-artifact-policy-foundation.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/INTENT.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/PLAN.md
  • docs/architecture_data_model.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-internal-review-evidence.md
  • docs/decision_0011_submission_artifact_policy_drives_pre_submit.md

@Abiorh001

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/product_first_user_flows.md (1)

10-25: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Refer to the immutable snapshot, not the guide version.

This step still reads like sufficiency runs against mutable guide data, while the surrounding contract already requires immutable guide-source snapshot semantics.

Proposed fix
- 4. Workstream runs `ProjectGuideSufficiencyAgent` against the guide version.
+ 4. Workstream runs `ProjectGuideSufficiencyAgent` against the immutable guide-source snapshot.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/product_first_user_flows.md` around lines 10 - 25, The sufficiency flow
still refers to the mutable guide version, but this step should operate on the
immutable guide-source snapshot. Update the wording around
ProjectGuideSufficiencyAgent and the acceptance criteria to reference the
immutable snapshot semantics explicitly, using the existing terms “guide-source
snapshot” and “immutable guide source snapshot” so the contract is consistent
and unambiguous.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
@.agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md:
- Around line 90-92: The chunk map entry uses a shortened policy identifier,
which should match the full name used elsewhere in the plan. Update the relevant
bullet in CHUNK_MAP.md so the identifier is consistent and includes the
“project” qualifier, keeping the same policy name wording across the policy hash
reference and the surrounding artifact policy sections.

In
@.agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/chunks/WS-POL-001-01-submission-artifact-policy-foundation.md:
- Around line 24-26: The policy wording is too vague because “effective project
policy hash” does not clearly identify the artifact being approved. Update the
policy text in the submission-artifact-policy foundation section to name the
submission-artifact-policy hash explicitly, and keep the approval boundary tied
to the bundle approval performed by the Workstream actor with the admin or
project_manager role. Ensure the identifiers used in this section are consistent
with the surrounding terms like guide-source snapshots and guide activation.

In `@docs/architecture_lifecycle_state_machine.md`:
- Around line 75-80: Use one canonical policy name in the READY gate description
to match the model doc. The lifecycle state machine currently references
ProjectSubmissionArtifactPolicy, which conflicts with SubmissionArtifactPolicy
elsewhere; update the READY requirements text to use the same policy identifier
consistently so the gate, persisted hash, and related policy references all
point to the same object.

In `@docs/roadmap_day_by_day_execution_plan.md`:
- Around line 70-71: The activation gate wording is mixing guide activation with
project-scoped prerequisites and should use project activation terminology
consistently. Update the bullet in the roadmap plan so it refers to project
activation and aligns with the rules in
docs/operations_project_operating_manual.md, making it clear that missing guide
snapshot, submission artifact policy, effective project policy hash, post-submit
checker, review, revision, payment policy, or project pre-submit checker policy
hash blocks project activation rather than guide activation.

In `@docs/template_submission_artifact_policy.md`:
- Around line 42-45: The source-material table row is malformed because the
Source Kind placeholder contains unescaped pipe characters, which breaks the
Markdown table structure. Update the table in the artifact policy doc so the
Source Kind placeholder is rendered as a single cell, using an escaped or
otherwise safe representation in the row alongside the existing Durable Ref,
Ingestion Adapter, Content Hash, Content CID, and Media Type columns.

In `@scripts/check_stale_workstream_wording.py`:
- Around line 13-15: The stale-term checks for ApprovedTaskArtifactBinding,
EffectiveTaskSubmissionArtifactPolicy, and ProjectPreSubmitCheckerSpec are
currently case-sensitive, so mixed-case variants can slip through. Update the
regex patterns in check_stale_workstream_wording.py to match case-insensitively,
keeping the existing stale wording scan behavior intact. Use the existing
pattern list in the scan logic as the place to apply the change so all three
terms are caught regardless of casing.

---

Outside diff comments:
In `@docs/product_first_user_flows.md`:
- Around line 10-25: The sufficiency flow still refers to the mutable guide
version, but this step should operate on the immutable guide-source snapshot.
Update the wording around ProjectGuideSufficiencyAgent and the acceptance
criteria to reference the immutable snapshot semantics explicitly, using the
existing terms “guide-source snapshot” and “immutable guide source snapshot” so
the contract is consistent and unambiguous.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a2aa17b-10a9-41f3-b5d2-ff2ec946681c

📥 Commits

Reviewing files that changed from the base of the PR and between 4acf31b and 17da702.

📒 Files selected for processing (40)
  • .agent-loop/LOOP_STATE.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/CHUNK_MAP.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DECISIONS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DISCOVERY.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/INTENT.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/PLAN.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/STATUS.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/chunks/WS-POL-001-01-submission-artifact-policy-foundation.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-external-review-response.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-internal-review-evidence.md
  • docs/architecture_checker_framework.md
  • docs/architecture_data_model.md
  • docs/architecture_lifecycle_state_machine.md
  • docs/architecture_lockdown.md
  • docs/architecture_system_architecture.md
  • docs/current_system_data_flow.html
  • docs/decision_0003_project_guides_are_first_class.md
  • docs/decision_0011_submission_artifact_policy_drives_pre_submit.md
  • docs/glossary.md
  • docs/operations_project_operating_manual.md
  • docs/operations_queue_policy.md
  • docs/operations_workspace_packet_convention.md
  • docs/principles.md
  • docs/product_first_user_flows.md
  • docs/roadmap_day_by_day_execution_plan.md
  • docs/roadmap_implementation_backlog.md
  • docs/roadmap_week1_backend_plan.md
  • docs/spec_chunk_3_project_guide_foundation.md
  • docs/spec_chunk_5_submission_packet_foundation.md
  • docs/spec_chunk_6_checker_contract_records.md
  • docs/spec_chunk_7_checker_runner_registry.md
  • docs/spec_chunk_8_submission_artifact_policy_checkers.md
  • docs/spec_week2_checker_framework.md
  • docs/template_checker_policy.md
  • docs/template_preflight_evidence.md
  • docs/template_project_guide.md
  • docs/template_submission_artifact_policy.md
  • docs/template_submission_packet.md
  • scripts/check_stale_workstream_wording.py
  • scripts/test_agent_gates.py
✅ Files skipped from review due to trivial changes (17)
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/STATUS.md
  • docs/template_preflight_evidence.md
  • docs/architecture_system_architecture.md
  • docs/operations_workspace_packet_convention.md
  • docs/operations_queue_policy.md
  • docs/principles.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DISCOVERY.md
  • docs/roadmap_week1_backend_plan.md
  • docs/glossary.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/DECISIONS.md
  • docs/template_project_guide.md
  • docs/spec_chunk_6_checker_contract_records.md
  • docs/current_system_data_flow.html
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/reviews/WS-POL-001-01-internal-review-evidence.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/PLAN.md
  • .agent-loop/initiatives/WS-POL-001-submission-artifact-policy-foundation/INTENT.md
  • docs/decision_0011_submission_artifact_policy_drives_pre_submit.md
🚧 Files skipped from review as they are similar to previous changes (7)
  • docs/template_checker_policy.md
  • docs/template_submission_packet.md
  • docs/architecture_lockdown.md
  • docs/decision_0003_project_guides_are_first_class.md
  • docs/spec_chunk_3_project_guide_foundation.md
  • docs/spec_chunk_5_submission_packet_foundation.md
  • docs/architecture_checker_framework.md

Comment thread docs/architecture_lifecycle_state_machine.md
Comment thread docs/roadmap_day_by_day_execution_plan.md Outdated
Comment thread docs/template_submission_artifact_policy.md
Comment thread scripts/check_stale_workstream_wording.py Outdated
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.

1 participant