Skip to content

docs: add workflow standards - #32

Merged
flyingrobots merged 5 commits into
mainfrom
docs/workflow-standards
Jun 24, 2026
Merged

docs: add workflow standards#32
flyingrobots merged 5 commits into
mainfrom
docs/workflow-standards

Conversation

@flyingrobots

Copy link
Copy Markdown
Owner

Summary

  • Add shared RED/GREEN testing workflow guidance for agents and contributors.
  • Add a documentation standards topic adapted from /Users/james/git/DOCUMENTATION_STANDARDS.md for Edict's topic-shelf/spec/release workflow.
  • Add CONTRIBUTING.md as the human contributor entry point.
  • Update README current status to reflect the landed initial compiler spine and remaining v0.3 encoder/golden work.
  • Add policy topic test-plan status support so human-review workflow policies are not misrepresented as executable software evidence.

Testing

  • RED observed for policy status behavior: cargo test -p xtask contract_graph_ -- --nocapture failed before implementation because policy rows were rejected and unknown requirement statuses were accepted.
  • GREEN: cargo test -p xtask contract_graph_ -- --nocapture
  • cargo xtask verify
  • markdownlint-cli2 AGENTS.md docs/topics/README.md docs/topics/tests/README.md docs/topics/tests/test-plan.md docs/topics/documentation/README.md docs/topics/documentation/test-plan.md

Notes

  • No issue is linked; this is workflow/documentation policy work.
  • The new testing policy explicitly states that tests must assert software behavior, not implementation detail, documentation detail, or repository structure.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@flyingrobots, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 24 minutes and 51 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7f3cc1dc-6fbb-465b-9ad5-eabde47a32be

📥 Commits

Reviewing files that changed from the base of the PR and between c15e496 and 3aa7234.

📒 Files selected for processing (3)
  • docs/topics/documentation/README.md
  • docs/topics/documentation/test-plan.md
  • xtask/src/main.rs

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.

@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

Caution

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

⚠️ Outside diff range comments (1)
xtask/src/main.rs (1)

170-190: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Centralize test-plan status validation for case rows too.

case.status and requirement status use separate allowlists. Reuse is_known_test_plan_status in the case match to prevent future drift between these contracts.

Suggested refactor
-        match case.status.as_str() {
-            "implemented" => {
+        match case.status.as_str() {
+            "implemented" => {
                 if case.evidence.trim().is_empty() || case.evidence.trim() == "-" {
                     return Err(format!("{} is implemented without evidence", case.id));
                 }
                 for evidence in split_cell_list(&case.evidence) {
                     let test_name = evidence.rsplit("::").next().unwrap_or(evidence);
                     if !tests.contains(test_name) {
                         return Err(format!(
                             "{} evidence `{}` does not match a Rust test function",
                             case.id, evidence
                         ));
                     }
                 }
                 for requirement in split_cell_list(&case.requirement) {
                     implemented_requirements.insert(requirement.to_owned());
                 }
             }
-            "planned" | "gap" | "policy" => {}
+            status if is_known_test_plan_status(status) => {}
             other => return Err(format!("{} has invalid status `{other}`", case.id)),
         }

Also applies to: 226-228

🤖 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 `@xtask/src/main.rs` around lines 170 - 190, The case-row status match in the
validation logic duplicates the test-plan status allowlist, so it can drift from
the shared contract. Update the match on case.status in the main validation flow
to reuse is_known_test_plan_status, just like the requirement-status check, and
keep the implemented branch handling unchanged except for using the shared
predicate before classifying unknown statuses.
🤖 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/topics/documentation/README.md`:
- Around line 8-10: The README text currently hardcodes a machine-local absolute
path in the documentation standards reference, which is not portable. Update the
wording in the affected README section to use a repository-relative path or a
generic plain-text reference instead of the `/Users/james/...` path, keeping the
intent tied to the documentation standards mention.

---

Outside diff comments:
In `@xtask/src/main.rs`:
- Around line 170-190: The case-row status match in the validation logic
duplicates the test-plan status allowlist, so it can drift from the shared
contract. Update the match on case.status in the main validation flow to reuse
is_known_test_plan_status, just like the requirement-status check, and keep the
implemented branch handling unchanged except for using the shared predicate
before classifying unknown statuses.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ddff1bb5-a7ed-47f0-a8bf-462945f98e16

📥 Commits

Reviewing files that changed from the base of the PR and between 0e2caf2 and c15e496.

📒 Files selected for processing (10)
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
  • docs/README.md
  • docs/topics/README.md
  • docs/topics/documentation/README.md
  • docs/topics/documentation/test-plan.md
  • docs/topics/tests/README.md
  • docs/topics/tests/test-plan.md
  • xtask/src/main.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
docs/topics/**

📄 CodeRabbit inference engine (AGENTS.md)

docs/topics/**: docs/topics/ is the living contract graph for landed behavior; topic shelves are not proposals, retrospectives, or design archaeology.
For every nontrivial behavior, contract, workflow, release, schema, validation, or public-surface change, identify the owning topic shelf before editing code, create one if none exists, and update its test-plan.md before or alongside tests with requirement IDs, case IDs, fixtures, and oracles.
Update the topic README.md only after the behavior exists in the branch; the README must describe current branch truth, not intended future behavior.
Mark planned cases in test-plan.md as implemented only when executable evidence exists.
Topic README.md files must not describe intended behavior before it lands.
test-plan.md may include planned cases and known gaps.
policy rows are for human-review workflow contracts and must not be used to avoid writing behavior tests for software behavior.
Tests must assert code behavior and stable contract artifacts, not prose, repository structure, implementation detail, or documentation detail.
When creating or changing documentation, give each page one primary reader job, keep user-facing task help separate from contributor architecture and evidence maps, use concrete valid examples, and put exact public facts in reference material when practical.
Update affected documentation in the same change as behavior, schema, release, workflow, or public-surface changes, or state docs-impact: none with a concise rationale.

Files:

  • docs/topics/documentation/test-plan.md
  • docs/topics/tests/test-plan.md
  • docs/topics/tests/README.md
  • docs/topics/documentation/README.md
  • docs/topics/README.md
**

⚙️ CodeRabbit configuration file

**: # AGENTS

Git Rules

NEVER amend git commits. Make a new commit instead.

NEVER use git rebase unless the user explicitly approves a rare exception.
Use regular merge commits.

NEVER force any git operation. If a force operation appears necessary, stop and
explain what happened and what options remain.

NEVER create draft pull requests.

NEVER use a codex prefix in branch names, PR titles, or commit messages.

Pull request bodies for issue work MUST include GitHub auto-close text such as
Closes #123`` for every issue the PR is intended to close.

Think

Think is durable memory for cross-session coordination.

  • Use codex-think --remember --json when starting a new session, changing into
    this repository, or regaining context after a context shift.
  • Use codex-think "..." --json when a cycle closes or a significant event
    should survive across turns.
  • Treat Think as memory, not repo truth. Anchor strong claims back to files,
    commits, commands, issues, or pull requests.
  • Claude memories are read-only. Use claude-think --remember --json only for
    additional context.

Topic Shelves

docs/topics/ contains the living contract graph for landed behavior. Topic
shelves are not proposals, retrospectives, or design archaeology.

Each shelf may contain:

  • README.md: what is true in HEAD.
  • test-plan.md: how those truths are verified, including requirements, cases,
    fixtures, oracles, implemented evidence, planned cases, and known gaps.
  • architecture.md: optional structure or dataflow notes when the machinery
    earns a separate page.
  • rationale.md: optional still-relevant tradeoffs and rejected approaches.

When To Update Topic Shelves

For every nontrivial behavior, contract, workflow, release, schema, validation,
or public-surface change:

  1. Identify the owning topic shelf before editing code.
  2. If no shelf owns durable behavior, create one.
  3. Update test-plan.md before or alongside tests with requirement IDs, case
    IDs,...

Files:

  • docs/topics/documentation/test-plan.md
  • docs/README.md
  • CONTRIBUTING.md
  • docs/topics/tests/test-plan.md
  • docs/topics/tests/README.md
  • docs/topics/documentation/README.md
  • AGENTS.md
  • docs/topics/README.md
  • README.md
  • xtask/src/main.rs
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Never amend git commits; make a new commit instead.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Never use `git rebase` unless the user explicitly approves a rare exception; use regular merge commits.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Never force any git operation; if a force operation appears necessary, stop and explain what happened and what options remain.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Never create draft pull requests.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Never use a `codex` prefix in branch names, PR titles, or commit messages.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Pull request bodies for issue work must include GitHub auto-close text such as `Closes `#123`` for every issue the PR is intended to close.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Use `codex-think --remember --json` when starting a new session, changing into this repository, or regaining context after a context shift.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Use `codex-think "..." --json` when a cycle closes or a significant event should survive across turns.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Treat Think as memory, not repository truth; anchor strong claims back to files, commits, commands, issues, or pull requests.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Claude memories are read-only; use `claude-think --remember --json` only for additional context.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: For behavior, contract, workflow, release, schema, validation, or public-surface changes, use RED/GREEN test-driven development: update the owning topic `test-plan.md` first or alongside the first test, write the deterministic test before implementation, run the narrowest relevant command and observe the RED failure, implement the smallest coherent change, then mark rows implemented only after executable evidence exists.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Report the RED command and GREEN command in the final report or pull request body.
Learnt from: CR
Repo: flyingrobots/edict

Timestamp: 2026-06-24T14:46:42.908Z
Learning: Use the local gate `cargo xtask verify` before claiming a branch is ready.
🪛 LanguageTool
docs/topics/documentation/test-plan.md

[style] ~73-~73: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...r maps public surfaces to page types. - No executable tutorial harness exists beca...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (10)
xtask/src/main.rs (1)

151-153: LGTM!

Also applies to: 200-200, 640-696

AGENTS.md (1)

77-78: LGTM!

Also applies to: 87-133

CONTRIBUTING.md (1)

1-40: LGTM!

docs/topics/tests/README.md (1)

1-84: LGTM!

README.md (1)

476-478: 📐 Maintainability & Code Quality

No change needed The compiler-spine API names already match current exports and usages.

docs/topics/tests/test-plan.md (1)

1-73: LGTM!

docs/topics/documentation/README.md (1)

14-117: LGTM!

docs/topics/documentation/test-plan.md (1)

1-75: LGTM!

docs/README.md (1)

10-13: LGTM!

docs/topics/README.md (1)

22-25: LGTM!

Also applies to: 38-47

Comment thread docs/topics/documentation/README.md Outdated

Copy link
Copy Markdown
Owner Author

Code Lawyer self-audit found one additional issue beyond the actionable CodeRabbit findings.

ID Severity Source File Lines Issue
CL-SELF-001 P5 Self docs/topics/documentation/test-plan.md 71-74 Open-gaps bullets repeat the same sentence opening, creating avoidable prose-style churn.

Cc @codex for second opinion.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: c15e496a4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Owner Author

Code Lawyer Activity Summary

ID Severity Source File Commit Outcome
CL-001 P3 PR docs/topics/documentation/README.md 5b85c6a Removed machine-local documentation standards path; resolved inline thread PRRT_kwDOS96-Us6L8UNU.
CL-002 P4 PR xtask/src/main.rs dc911b1 Reused is_known_test_plan_status for case rows; outside-diff review item has no thread to resolve manually.
CL-SELF-001 P5 Self docs/topics/documentation/test-plan.md 3aa7234 Varied open-gap wording to remove avoidable prose-style repetition.

Validation:

  • cargo test -p xtask contract_graph_ -- --nocapture
  • cargo xtask contract-check
  • cargo fmt --all --check
  • cargo xtask verify
  • markdownlint-cli2 AGENTS.md CONTRIBUTING.md README.md docs/README.md docs/topics/README.md docs/topics/tests/README.md docs/topics/tests/test-plan.md docs/topics/documentation/README.md docs/topics/documentation/test-plan.md

Notes:

  • No documentation-detail or implementation-detail regression tests were added. The only executable tests exercised contract-check software behavior, preserving the project rule that tests assert software behavior rather than prose, repository structure, or implementation shape.

@flyingrobots
flyingrobots merged commit 7dd4802 into main Jun 24, 2026
3 checks passed
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