Skip to content

feat(rsr): read the capability profile from the repo deed's (rsr-profile …) clause - #1015

Merged
hyperpolymath merged 3 commits into
mainfrom
claude/gifted-thompson-vsrzhw-pr2
Nov 5, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
claude/gifted-thompson-vsrzhw-pr2

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

The RSR scorer reads a repo's capability profile only from <machine tree>/rsr-profile.a2ml. A deed-era repo keeps its profile as an (rsr-profile …) clause in <repo>_chora.deed and has no .a2ml. The scorer therefore treats it as having no profile:

  • only universal criteria apply;
  • every capability-gated criterion scores :na;
  • 3.2.2 (profile present) fails.

rsr-template-repo, the spine, is exactly that repo.

Changes

  • Capabilities from the deed first. declared_capabilities/1 reads a top-level (rsr-profile …) clause of the repo deed first, and falls back to the .a2ml only when the deed has no such clause. This is the same precedence as metadatastician/standards scripts/check-rsr-profile.sh.
    • Same fields as before. Only the :capabilities list is read, strings and symbols alike, as the .a2ml path already did.
    • Fail closed. Two clauses, a nested clause, or a clause without the list declare nothing.
  • 3.2.2 takes either carrier. It passes for the clause or the legacy .a2ml.
  • Unblocks the canon's move. With this in, standards can move its own profile from .machine_readable/rsr-profile.a2ml into standards_chora.deed, which the owner approved on 2026-11-05, without the oracle losing the canon's applicable set.

Test plan

  • Four new tests:
    • a deed-only profile activates gated criteria;
    • the deed wins over an .a2ml beside it;
    • two clauses or a nested one declare nothing;
    • 3.2.2 passes on the clause against the real SSOT.
  • Standalone run. I compiled the scorer with its own module graph, stubbing Hypatia.CLI because hex.pm is blocked here. All four pass.
    • With the deed reader disabled, three of them fail.
    • With 3.2.2 back on the .a2ml alone, the 3.2.2 test fails.
    • Three other failures, the two scanner-delegation tests and the 3.2.1 markup-manifest test, fail identically on main under the same stub.
  • Real trees. Scanner delegation is stubbed, so treat these numbers as indicative:
    • rsr-template-repo goes from profile=false, 69.04, to its 13 declared capabilities, 74.83, and 3.2.2 now passes.
    • standards, which still has its .a2ml, is unchanged at 74.18.
  • mix format --check-formatted passes.
  • Full mix test in CI.

Notes


Generated by Claude Code

…ile …) clause

The scorer read capabilities only from <machine tree>/rsr-profile.a2ml.
A deed-era repo, whose profile is an (rsr-profile …) clause of its
<repo>_chora.deed and which carries no .a2ml, therefore scored as
"no profile": only universal criteria were applicable, every
capability-gated criterion was :na, and 3.2.2 (profile present) failed.
rsr-template-repo, the spine, is exactly that repo.

declared_capabilities/1 now reads a top-level (rsr-profile …) clause
first, and the .a2ml only when the deed carries none, the same precedence
as metadatastician/standards scripts/check-rsr-profile.sh. As before, only
the capabilities list is read (strings and symbols). Two clauses, or a
clause without the list, declare nothing. 3.2.2 accepts either carrier.

Tests (4 new) against the scorer compiled with its own module graph
(Hypatia.CLI stubbed; hex.pm is blocked here): all pass; with the deed
reader disabled three fail, and with 3.2.2 back on the .a2ml alone one
fails. The 3 other failures (scanner delegation x2, 3.2.1 markup
manifest) fail identically on main under the same stub.

On the real trees, with scanner delegation stubbed so the numbers are
indicative: rsr-template-repo goes from profile=false, 69.04 to its 13
declared capabilities, 74.83, with 3.2.2 passing; standards (still on
its .a2ml) is unchanged at 74.18.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E294yTkKk127qgKEXFFDBE
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T18:20:27.094237Z 7096d43 New commits
ℹ️ 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: d415e3bb81

ℹ️ 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 lib/rules/rsr_conformance.ex Resolved
claude and others added 2 commits November 5, 2026 07:47
…r does

Codex review on #1015: with two top-level (rsr-profile …) clauses, or
one without a :capabilities list, the capability reader declares
nothing (profile_present false), yet 3.2.2 passed because it only
checked that a clause existed. 3.2.2 now asks deed_profile_capabilities/1
itself, with the reader's precedence: no clause falls back to the
legacy .a2ml, a rejected clause fails (no fallback), an accepted one
passes. The new test fails against the old detector.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E294yTkKk127qgKEXFFDBE
@hyperpolymath
hyperpolymath merged commit 32a3659 into main Nov 5, 2026
5 checks passed
@hyperpolymath
hyperpolymath deleted the claude/gifted-thompson-vsrzhw-pr2 branch November 5, 2026 18:19
@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

hyperpolymath added a commit to metadatastician/standards that referenced this pull request Nov 5, 2026
…eed; archive the .a2ml (#1416)

## Summary

On 2026-11-05 the owner chose to fold the canon's own capability profile
into its repo deed. `.machine_readable/rsr-profile.a2ml` becomes the
`(rsr-profile …)` clause of `standards_chora.deed`, and the `.a2ml` is
archived.

- **The clause.** It takes the shape the spine's deed already uses:
`:version`, `:spec`, `:declares-against`, `:role "canon"`,
`:capabilities`, and a `(notes …)` with `:omitted-rationale`. The
`.a2ml`'s rationale comes along as deed comments: what each capability
rests on, and what is deliberately not declared and why.
- **One thing deliberately not carried over: the `[canon]` block.**
Nothing reads it: Gate A reads `canon.lock` and the spine's pin.
`canon.adoc` also limits the `(canon …)` clause to the spine and the
repos minted from it. A self-pin on the canon would be a second copy of
`canon.lock` that someone has to bump by hand. The block is preserved in
the archived file, so this is easy to revisit.

## Readers

- **`check-rsr-profile.sh`** already preferred the deed clause. It now
also prints the role it resolved, as a new `role:` line. The line is
additive, and existing consumers parse only `effective capabilities:`.
- **Gate A assertion 5** used to grep `role = "canon"` from the `.a2ml`.
It now asks the resolver the canon ships, so both carriers count exactly
as they do for every repo, and there is no second reader.
- **`check-package-policy.sh`** finds the clause when no `.a2ml` exists.
- **Hypatia's RSR scorer** reads the clause from
hyperpolymath/hypatia#1015. **Merge #1015 first.** Without it, the
oracle would treat the canon as having no profile.

## Archive

The `.a2ml` moves unchanged to `9-archive/a2ml/`. Its ledger entry is
dropped (168 → 167, which the ratchet records as debt paid down), and
`9-archive/MOVED.adoc` records the move.

## Test plan

- [x] **Resolver.** It returns OK under both the AST parser and the awk
parser, with `role: canon` and the capabilities unchanged (`bash
docs-site governance-tier reproducible-build rust`).
- [x] **Gate A** passes, and assertion 5 reads the role from the deed.
Assertion 3, against the spine at 2.1.4, passes too.
- [x] **Other gates.** Package policy, the A2ML archive gate (`--base
origin/main`), Gate D, `deed_lint`, and the exemption and debt ratchets
all pass.
- [x] **Suites.** All pass:
  - rsr-profile: 46 of 46
  - package-policy: 18 of 18
  - lockstep-deed: 11 of 11
  - archive: 25 of 25
  - governance shape: 14 of 14
  - governance-gates-505: 42 of 42
- [ ] CI

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

Co-authored-by: Claude <[email protected]>
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