Skip to content

fix(rhodibot): stop demanding A2ML; make CONTRIBUTING/CODE_OF_CONDUCT .adoc|.md toggleable - #678

Merged
hyperpolymath merged 5 commits into
mainfrom
rhodibot/deed-first-no-a2ml-demand
Nov 15, 2026
Merged

hyperpolymath merged 5 commits into
mainfrom
rhodibot/deed-first-no-a2ml-demand

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

What

rhodibot reported 12 errors on rsr-template-repo: nine demanded .a2ml files the estate has retired, two demanded CONTRIBUTING.md / CODE_OF_CONDUCT.md, one demanded .tool-versions. This removes the nine A2ML demands and the two .md demands.

How

  • src/deed.rs (new): a read-only s-expression reader for <repo>_chora.deed: top-level clauses, (rsr-profile ...), and rhodibot's (bot-directives (bot :name rhodibot (config ...))) entry. Conformance stays deed_lint.js's job (standards CI); rhodibot only reads structure.
  • src/canon/overlay.rs (new): re-targets 12 criteria as requirements (2.1.3, 2.1.4, 2.1.5, 2.3.1, 3.1.2–3.1.8, 3.2.2), suspends 2 (3.1.9 CLADE, deed form not landed; 3.2.1), and adds a "chora deed exists" check. Deed forms: (manifest …), descriptile STATE/META/ECOSYSTEM/AGENTIC.deed first with the chora clause as fallback (state: (status …)/(maturity …)), (neurosym …), (playbook …), (anchor …), (rsr-profile …). A legacy .a2ml is only a read fallback, reported as "migrate" (never "missing") and never named as the form to create.
  • Vendored canon untouched. rsr-criteria-v2.a2ml keeps its digest. The divergence is recorded under [overlay] in canon/pin.toml and a lockstep test fails if the record and the module disagree. Converting the canon to a deed is A7's (M5, parity gate); the overlay is deleted in the same commit that re-pins.
  • Profile comes from the deed's (rsr-profile …) clause (string shape; keys :version :spec :declares-against :role :capabilities :preset :add :remove :policy :omitted-rationale, anything else fails closed, exactly one clause). The legacy file is read only when the deed has none.
  • CONTRIBUTING / CODE_OF_CONDUCT / SECURITY: .adoc or .md satisfies, never both required. Default .adoc; (bot :name rhodibot (config :community-doc-format md)) makes .md the named form. A bad value is an error, not a silent default. Both canon and check.
  • Manual criteria: 9.1.4 (wellknown-served, "Deployed site serves its .well-known/ over HTTPS") is a deployment question the canon reader had turned into a file check. It is listed in overlay::MANUAL_ONLY (recorded in pin.toml) and reported as a visible manual finding, "manual check: not verified by rhodibot", with the path it is about (.well-known/). It is not graded, never trips --fail-on, and is never silently dropped. It is an explicit list, not a "detect = manual" rule, because 1.2.4 (.tool-versions) is detect = manual yet a real file question.
  • scripts/fleet-report-back.sh: the rhodibot translation maps severity manual to info.
  • check (rsr.rs), fleet rule ids/suggestions and the webhook checklist drop .a2ml/.scm and require <repo>_chora.deed.
  • .claude/CLAUDE.md invariant 1 rewritten: repo facts are deeds, no .a2ml should exist.

Field shapes were agreed with A7 (the :community-doc-format row goes into their mapping spec §6). 3.1.1 (descriptiles/) is kept: it is the home of the descriptile deeds.

Proof: the real rsr-template-repo main (563397a), via the fleet report-back driver

Before = gitbot-fleet main 14892a5; after = this branch (re-verified at 0e83966; d17c995 adds only the path on manual findings, to clear the driver's "finding with no path" warning).

before after
total findings 13 (12 errors, 1 info) 4 (1 error, 3 info)
.a2ml demands (0-AI-MANIFEST, 7 descriptiles, rsr-profile) 9 errors 0
CONTRIBUTING.md / CODE_OF_CONDUCT.md 2 errors 0
.tool-versions error error (unchanged, out of scope)
.well-known/ (9.1.4) not reported info, manual
.github/GOVERNANCE.adoc (2.1.8) not reported info, relocated
www/.well-known/security.txt (2.2.1) info info (unchanged)
findings without a path n/a 0 (after d17c995)

Why 9.1.4 and 2.1.8 now appear

The template declares docs-site and governance-tier in the (rsr-profile …) clause of its chora deed. The old code only looked for rsr-profile.a2ml, so it never saw them and every gated criterion was silently na. Reading the profile brings those two criteria into scope. 9.1.4 is shown as manual info (above); 2.1.8 expects docs/GOVERNANCE.adoc and the template keeps it under .github/, info only.

Tests

cargo test in bots/rhodibot passes (168 + 11 + 58 + 1); cargo fmt --check and cargo clippy --all-targets clean. Tests cover both document forms, both-present, the override, a bad override value, no A2ML in any expectation, deed-clause and descriptile satisfaction, the legacy fallback, a verbatim copy of standards' own (rsr-profile …) clause, manual findings (visible, pathed, not graded), and the pin/overlay lockstep.

Follow-ups

  • rsr-profile.abnf: A7 will add a clause module for (rsr-profile …) (after neurosym), so one grammar owns its keys. The key set in src/deed.rs is interim and should later come from, or be tested against, that module.
  • Criteria canon deed form (A7 M5): delete src/canon/overlay.rs and the [overlay] table in the same commit that re-pins.

Not done here

  • Moving FLEET_REF in rsr-template-repo fork-governance.yml after this merges (pins belong to Tsunami-breaker).
  • Merging. The owner merges: gitbot-fleet has no stamped proven-lock-gate workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_0136P7ZmM7wgb8pXfyFEuRHQ

Summary by CodeRabbit

  • New Features

    • Repository checks now use the Chora deed as the source for repository facts and profile capabilities, with legacy files supported as read-only fallbacks during migration.
    • Rhodibot’s canon reports recognize deed clauses, apply updated criteria, and distinguish manual checks from file-based findings.
    • Community documents can use AsciiDoc or Markdown, with a configurable preferred format.
    • Repository compliance checks and creation guidance now reflect the updated deed and document requirements.
  • Documentation

    • Updated guidance explains deed usage, legacy-file handling, and Rhodibot’s canon checks.

… .adoc|.md toggleable

The estate has retired A2ML: repo facts are clauses of <repo>_chora.deed.
rhodibot still demanded nine .a2ml files (0-AI-MANIFEST, STATE, META,
ECOSYSTEM, AGENTIC, NEUROSYM, PLAYBOOK, ANCHOR, rsr-profile) and, in `canon`,
CONTRIBUTING.md / CODE_OF_CONDUCT.md.

- New src/deed.rs: read-only s-expression reader for the chora deed (top-level
  clauses, (rsr-profile ...), (bot-directives (bot :name rhodibot (config ...)))).
  deed_lint.js stays the conformance gate; rhodibot only reads structure.
- New src/canon/overlay.rs: re-targets criteria 2.1.4, 2.1.5, 2.3.1, 3.1.2-3.1.8
  and 3.2.2 as requirements (deed clause or descriptile .deed), suspends 3.1.9 and
  3.2.1, and adds a chora-deed check. A legacy .a2ml is a read fallback only,
  reported as "migrate" and never named as the form to create. The vendored
  rsr-criteria-v2.a2ml is untouched; the divergence is recorded under
  [overlay] in canon/pin.toml and checked by a lockstep test.
- The profile now comes from the deed's (rsr-profile ...) clause, with the
  legacy file read only when the deed has none.
- CONTRIBUTING / CODE_OF_CONDUCT: either .adoc or .md satisfies, never both
  required. Default is .adoc; (config :community-doc-format md) in rhodibot's
  bot directive makes .md the named form. A bad value is an error.
- `check` (rsr.rs), fleet rule ids/suggestions and the webhook checklist drop
  the .a2ml/.scm entries and require <repo>_chora.deed instead.
- .claude/CLAUDE.md invariant 1 rewritten: deeds, not A2ML.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZmM7wgb8pXfyFEuRHQ
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

Rhodibot now reads repository facts and profile data from Chora deeds, applies a canon overlay when scoring criteria, and checks deed presence under repository policy. Community documents accept .adoc or .md with a configurable preference. Legacy A2ML inputs remain read-only fallbacks in specified paths.

Changes: Chora Deed Adoption

Layer / File(s) Summary
Deed parsing and profile declarations
bots/rhodibot/src/deed.rs, bots/rhodibot/src/lib.rs
A new deed reader parses s-expressions and extracts profile clauses and bot directives. It validates profile shape and community-document format settings.
RSR deed checks and document alternatives
bots/rhodibot/src/rsr.rs, bots/rhodibot/tests/integration_tests.rs, bots/rhodibot/src/github.rs
RSR checks retrieve and parse Chora deeds, score deed presence by policy, and accept .adoc or .md community documents. Tests cover deed validation, policy behavior, and document-format preferences.
Canon overlay and report scoring
bots/rhodibot/src/canon/overlay.rs, bots/rhodibot/src/canon/profile.rs, bots/rhodibot/src/canon/verdict.rs, bots/rhodibot/src/canon/report.rs, bots/rhodibot/canon/pin.toml, bots/rhodibot/tests/canon_lockstep.rs, bots/rhodibot/tests/fixtures/standards-rsr-profile.fragment, bots/rhodibot/tests/rsr_profile_shape.rs, bots/rhodibot/src/canon.rs
The overlay maps criteria to deed clauses and alternate document paths. Canon reports apply replacement, suspended, and manual-only rules, record an extra deed check, and render deed-clause paths descriptively. The pin and tests check overlay declarations against the vendored canon.
Canon input wiring
bots/rhodibot/src/canon/local.rs, bots/rhodibot/src/main.rs
Local and remote canon commands pass deed text and repository files through RepoInput. A deed profile takes precedence over a legacy profile.
Migration guidance and fleet output
.claude/CLAUDE.md, bots/rhodibot/README.adoc, bots/rhodibot/src/fleet.rs, bots/rhodibot/src/webhook.rs, scripts/fleet-report-back.sh
Guidance and repository checklists describe Chora deeds and legacy A2ML read fallbacks. Fleet suggestions use deed clauses, and manual findings map to informational output.

Estimated code review effort: 4 (Complex) | ~55 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant run_canon
  participant local_read as local::read
  participant GitHubClient
  participant CanonReportBuild as CanonReport::build_with
  alt Local checkout
    run_canon->>local_read: Read repository files and deed
    local_read-->>run_canon: Return files, deed, and legacy profile
  else Remote repository
    run_canon->>GitHubClient: Fetch repository files and deed
    GitHubClient-->>run_canon: Return files and deed text
  end
  run_canon->>CanonReportBuild: Pass RepoInput for report construction
Loading
Merge Risk: Moderate · up to d17c9

Rhodibot now reads repository facts from the chora deed. Some malformed deed inputs are silently accepted, and a crafted deed could crash the process. Deed-only repositories can still fail the bot-directives check, and missing deed clauses may not map to a file in the fleet report. These should be fixed or explicitly accepted before merge.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

…) clause

- (rsr-profile ...) accepts :spec and :declares-against, is exactly once, and
  needs :capabilities or :preset.
- 3.1.2 state: descriptile STATE.deed first, fallback chora (status ...) or
  (maturity ...); there is no (state ...) clause.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZmM7wgb8pXfyFEuRHQ
… doc toggle

- (rsr-profile ...) known keys now include :policy and :omitted-rationale,
  as in the estate's real clauses; nested children are ignored. A test parses
  a verbatim copy of standards' own clause.
- 2.1.3 / SECURITY follows the same .adoc|.md toggle as CONTRIBUTING and
  CODE_OF_CONDUCT, in both `canon` and `check`.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZmM7wgb8pXfyFEuRHQ
…g-file error

Criterion 9.1.4 ("Deployed site serves its .well-known/ over HTTPS") is a
deployment question that the canon reader turned into a file check for
`.well-known/`, flagging templates that serve it from www/. It is now listed in
overlay::MANUAL_ONLY (recorded in pin.toml) and reported as a `manual` finding
("manual check: not verified by rhodibot"): visible, not graded, never tripping
--fail-on. 1.2.4 (.tool-versions) is detect=manual but a real file question, so
the list is explicit rather than a rule. The fleet report-back driver maps
manual to info.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZmM7wgb8pXfyFEuRHQ
A manual finding had no path, so the fleet grid would grade it against every
change. It now carries the first path its description names (`.well-known/` for
9.1.4), else the canon's template path. Test asserts every manual finding has a
non-empty path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZmM7wgb8pXfyFEuRHQ
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 15, 2026 08:36
@hyperpolymath
hyperpolymath merged commit 5e8ec6a into main Nov 15, 2026
66 checks passed
@hyperpolymath
hyperpolymath deleted the rhodibot/deed-first-no-a2ml-demand branch November 15, 2026 08:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T08:42:54.838011Z d17c995 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-15T08:47:06.687355Z d17c995 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d17c9955e2

ℹ️ 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".

Comment thread bots/rhodibot/src/rsr.rs
/// community documents whose spelling (`.adoc` or `.md`) is toggleable.
fn community_stem(name: &str) -> Option<&str> {
name.strip_suffix(".adoc")
.filter(|stem| matches!(*stem, "CONTRIBUTING" | "CODE_OF_CONDUCT" | "SECURITY"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep SECURITY outside the community-doc toggle

When a deed sets :community-doc-format md, this match also reorders the SECURITY candidates, so a missing security policy is reported as SECURITY.md and the fleet suggestion claims the directive prefers Markdown. The documented directive only controls CONTRIBUTING and CODE_OF_CONDUCT, while SECURITY.adoc remains the estate default; restrict this match to those two documents. The canon overlay has the same unintended behavior through doc("SECURITY").

Useful? React with 👍 / 👎.

Comment on lines +339 to +341
// A copy only under a retired location is already "move
// it"; the new form is still what to move it to.
deprecated @ GroupVerdict::Deprecated { .. } => deprecated,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the deed destination for retired legacy files

When the only legacy file is under a retired location such as .machine_readable/6a2/STATE.a2ml, returning the original Deprecated verdict discards the replacement alternatives. Finding::of consequently reports the legacy A2ML path as deprecated but provides no STATE.deed or chora-clause destination, unlike the normal legacy fallback, so users are told to move a retired format without being told to migrate it to the deed form. Preserve alternatives in the resulting verdict, for example by converting this case to an Elsewhere result that still records the retired copy.

Useful? React with 👍 / 👎.

} => {
expected.extend(alternatives.iter().cloned());
let mut line = format!("absent — expected {}", alternatives.join(" or "));
expected.extend(alternatives.iter().map(|path| describe(path)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep machine paths separate from clause descriptions

When a required deed clause such as (manifest ...) is absent, this stores human prose like the (manifest ...) clause of widgets_chora.deed in expected. I checked the rhodibot arm in scripts/fleet-report-back.sh, which uses .expected[0] as the finding's file, while docs/REPORT-BACK.adoc requires a repository-relative path for diff-scope matching. The resulting error therefore cannot match a change to widgets_chora.deed, so removing a required clause can leave the gating finding outside the PR delta; retain the actual deed path in expected and use describe only for display text.

Useful? React with 👍 / 👎.

Comment thread bots/rhodibot/src/deed.rs
Comment on lines +320 to +322
Some(')') => bail!("unbalanced parentheses: a closing parenthesis with no opener"),
Some('"') => self.string(),
Some(_) => Ok(Node::Atom(self.atom())),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Parse quoted DEED profile values

For a valid profile that uses a quoted DEED value such as (rsr-profile :capabilities '(rust)), node parses the quote as a separate atom and the following list as another node, so rsr_profile sees :capabilities followed by "'" and rejects it as non-list. Quoted symbols and lists are part of the DEED value grammar already implemented in bots/panicbot/src/deed.rs; such a repository makes the canon command abort instead of producing a report. Handle the quote prefix and return the underlying symbol or list node.

Useful? React with 👍 / 👎.

Comment thread bots/rhodibot/src/main.rs
Comment on lines +263 to 267
let mut legacy_profile = None;
for candidate in LEGACY_PROFILE_PATHS {
if let Some(text) = client
.get_file_content_if_present(owner, repo, candidate)
.await?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Delay legacy-profile reads until the deed needs them

When a repository has a valid deed-level (rsr-profile ...) but retains an unreadable or API-failing legacy profile, this unconditional loop still fetches the legacy file and aborts the canon command even though CanonReport::build_with will never use it. The local path has the same behavior because local::read always calls profile(root)?. This makes migrated repositories depend on stale fallback data; inspect the deed first and read the legacy candidates only when its profile clause is absent.

Useful? React with 👍 / 👎.

Comment thread bots/rhodibot/src/deed.rs
Comment on lines +110 to +114
self.root
.members()
.iter()
.filter_map(Node::head)
.map(str::to_string)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Distinguish list-valued fields from child clauses

For a valid top-level list field such as :labels (manifest), the generic tree stores the field value as a List, and this iteration treats that list's first atom as a top-level clause. The overlay then creates a virtual #manifest path and incorrectly marks criterion 2.3.1 satisfied even though no (manifest ...) clause exists; the same collision can occur for the other migrated fact names. Preserve the DEED distinction between :key value fields and nested clauses instead of classifying every list member by its head.

Useful? React with 👍 / 👎.

Comment thread bots/rhodibot/src/deed.rs
Comment on lines +190 to +194
let directives = self.clause("bot-directives")?;
directives
.children("bot")
.find(|node| node.field(":name").and_then(Node::text) == Some(bot))
.map(|node| BotDirective { node })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject ambiguous duplicate rhodibot directives

When a deed contains two (bot :name rhodibot ...) entries with conflicting :community-doc-format values, this find silently selects the first one, making behavior depend on source order instead of reporting the ambiguous configuration. Multiple (bot-directives ...) or (config ...) clauses are similarly reduced to the first match. The deed reader already rejects duplicate rsr-profile clauses because silently choosing policy is unsafe; apply the same uniqueness validation before consuming rhodibot's directive.

Useful? React with 👍 / 👎.

hyperpolymath added a commit that referenced this pull request Nov 15, 2026
)

## What

Follow-up to #678. standards#1605 (merged 2026-11-15 10:39 UTC) defines
the `(rsr-profile ...)` key set; this makes rhodibot's reader match it,
as A7 asked.

## Changes (`bots/rhodibot/src/deed.rs`, tests only otherwise)

- Key set is now exactly `:version :spec :declares-against :role :preset
:capabilities :add :remove` (`RSR_PROFILE_KEYS`), matching `bun
1-formats/deed/tools/deed_lint.js --rsr-profile-keys` at standards 10:39
UTC. `(notes …)` is the one nested clause and is not scanned.
- Dropped the keys #678 had added for other clauses: `:policy` (belongs
to `(anchor …)` and `(egress …)`), `:omitted-rationale` (belongs inside
`(notes …)`), and `:schema-version`. Any other top-level key still fails
closed.
- `:capabilities`, `:add` and `:remove` must be lists of **strings**;
symbols are now refused, as the module requires.

A7 confirmed the real template conforms (`deed_lint.js --rsr-profile`
passes on rsr-template-repo main), so this should not change rhodibot's
result on the template. I have not re-run rhodibot against the template
myself; SysArch's driver run would confirm.

## Tests

`cargo test` in `bots/rhodibot` passes (172 + 11 + 58 + 1); `cargo fmt`
and `cargo clippy --all-targets` clean. New tests pin the key set, the
refused keys, `:omitted-rationale` inside `(notes …)`, and string-only
lists. The verbatim standards clause test still passes.

## Not done here

Left for A7's follow-up PR to #1605 (does not change the key set): empty
`:capabilities` with no `:preset` refused, `(notes …)` fields once each,
profile only on `*_chora.deed`. Rhodibot still accepts an empty
`:capabilities` until that is ruled.

---
_Generated by [Claude
Code](https://claude.ai/code/session_0136P7ZmM7wgb8pXfyFEuRHQ)_

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants