Skip to content

Add new msdmd application skills and canon; update docs and indexes - #9

Merged
erinepshovel-code merged 3 commits into
mainfrom
codex/check-msdmd.md-ratios-for-enumeration-gnthj7
Jun 7, 2026
Merged

erinepshovel-code merged 3 commits into
mainfrom
codex/check-msdmd.md-ratios-for-enumeration-gnthj7

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Contributor

Motivation

  • Expand the msdmd ecosystem with additional metadata-block applications to make documentation, capability, dependency, ownership, risk-boundary, and ratio information first-class and colocated with source.
  • Provide a procedural canon skill to help agents and maintainers distinguish source-backed doctrine from repo-local practice or guesses.
  • Surface runner contracts and field schemas so consuming repos can implement verification and CI checks consistently.

Description

  • Added new skill specifications: doc-build, cap-build, deps-build, owner-build, risk-boundary-build, and ratios as metadata-block skills and canon as a procedural skill, each with a SKILL.md describing block syntax, field schema, runner contract, reporting shape, and anti-patterns.
  • Updated core docs and indices (README.md, AGENTS.md, CLAUDE.md, ORG_DISTRIBUTION.md, and skills.json) to register the new skills, mark which skills define metadata blocks vs. procedural behavior, and clarify that this repo ships universal msdmd parsers and skill specifications while runner implementations are expected in consuming repos unless a helper script exists in a skill directory.
  • Extended msdmd/SKILL.md and README prose to list the new application skills and reference them as examples of the universal parser contract.
  • Added detailed ratios spec including bookend rule, three ratio computers, and example CLI interface; added runner contracts across the new skills describing required verification and exit behaviors.

Testing

  • No repository test harness exists for this content library, so no unit/CI tests were added or executed.
  • Performed automated JSON validation of skills.json to ensure it parses as valid JSON and reflects the new entries.
  • Manual editorial pass checking that added SKILL.md files are well-formed Markdown and that referenced filenames/paths in indexes are consistent.

Codex Task

@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: c9fddf1356

ℹ️ 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 ratios/SKILL.md
Comment on lines +29 to +32
Every module records its ratios in a `RATIOS` block placed at **both
boundaries of the file** — the block is the literal first line and the
literal last line. The file is a self-measuring object; its boundary lines
carry the measurement, opening and closing.

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 Clarify duplicate bookend RATIOS blocks

For any real source file, a multi-line msdmd block cannot be both the literal first line and the literal last line. If implementers treat this as one block wrapping the file, normal source lines between the fences are not comment-prefixed metadata and won't satisfy the universal parser; if they treat it as two blocks, the example and wording do not show the trailing duplicate block the runner is supposed to compare. This ambiguity will make consuming ratios_check.py implementations reject otherwise valid modules or implement incompatible placement rules.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codex[agent] repair the ratios

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

  • Reworked ratios/SKILL.md so RATIOS is a compact single-line bookend marker, with the literal first and last lines byte-identical after line-ending normalization.
  • Replaced the multi-line ratio block schema with a strict single-line schema containing exactly three ordered pairs: loc_comments, imports_exports, and calls_definitions.
  • Made ratio verification self-contained, including boundary-line parsing, byte-identical bookend checks, self-exclusion of the two RATIOS lines, drift handling, and hmmm handling.
  • Removed the absent helper dependency by documenting the canonical loc_comments counting rule directly in the skill.
  • Updated runner and anti-pattern guidance to reject multi-line RATIOS blocks and require exactly the three canonical ratio pairs.
  • Updated repo-facing docs and indexes so ratios is described as the compact single-line bookend variant rather than a fenced multi-line block.
  • Committed the changes with commit cdce023 and opened a follow-up PR titled “Repair ratios single-line bookend spec.”

Testing

  • python -m json.tool skills.json >/tmp/skills.json.valid
  • git diff --check
  • python tools/check_skill_lib_drift.py

View task →

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

Committed changes on the current branch with commit 4fa94dd and created the follow-up PR: “Repair ratios bookends and propagate helper.”

Testing

  • python -m json.tool skills.json >/tmp/skills.json.valid
  • python -m py_compile ratios/ratios_check.py
  • ✅ `tmp=$(mktemp --suffix=.py) && cat > "$tmp" <<'PY'

=== RATIOS === loc_comments=3:1 imports_exports=0:1 calls_definitions=1:1 === END RATIOS ===

"""Example module."""

def add_one(value):
return value + 1

print(add_one(1))

=== RATIOS === loc_comments=3:1 imports_exports=0:1 calls_definitions=1:1 === END RATIOS ===

PY
python ratios/ratios_check.py "$tmp" && rm "$tmp"`

  • python tools/check_skill_lib_drift.py
  • python ratios/ratios_check.py --root .

View task →

Comment thread skills.json
"path": "doc-build/SKILL.md",
"kind": "metadata-block",
"depends_on": ["msdmd"],
"description": "Self-declaring documentation coverage built on msdmd. Modules declare DOCS blocks; a runner verifies documentation paths and anchors, reports stale or missing docs, and surfaces visible coverage gaps."

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 Include load triggers in indexed descriptions

For consumers that use skills.json instead of walking each SKILL.md (which the repo documents as supported), the new skill descriptions here omit the explicit Load this when ... triggers that are present in the frontmatter. Because harnesses index by description, requests such as auditing module documentation or wiring documentation coverage into CI can fail to select doc-build when loading from the machine-readable index; keep these indexed descriptions aligned with the SKILL frontmatter triggers for the new entries.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codex[agent] fix this please

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

  • Updated skills.json so the indexed descriptions for the new skills include the same explicit load-trigger language as their SKILL frontmatter, including the doc-build, cap-build, deps-build, owner-build, risk-boundary-build, and repaired ratios entries.
  • Reworked ratios/SKILL.md from a multi-line RATIOS block spec into the intended compact metadata-line bookend format: one first-line and one last-line comment containing exactly three ordered ratio pairs.
  • Added the propagated ratios/annotate.py helper so consuming repos receive the counting/checking/updating implementation with the ratios/ skill directory.
  • Documented the helper-backed verification contract and made the loc_comments rule self-contained, removing reliance on an out-of-tree helper.
  • Updated repo docs and validation to recognize ratios as a metadata-line skill, clarify helper propagation, and allow the new kind in the drift checker.
  • Refreshed the existing ratios bookends on the universal Python parser with the new helper.

Testing

  • python -m py_compile ratios/annotate.py tools/check_skill_lib_drift.py msdmd/parsers/universal.py
  • python -m json.tool skills.json >/dev/null
  • python tools/check_skill_lib_drift.py
  • python ratios/annotate.py --check msdmd/parsers/universal.py
  • python - <<'PY' ... selected updated skills.json descriptions checked against one-line SKILL.md frontmatter.

Committed changes on the current branch with commit c4d7146 and created the follow-up PR: Repair ratios format and index load triggers.

View task →

Comment thread ratios/SKILL.md
Comment on lines +108 to +110
The `loc_comments` computer agrees with `scripts/annotate.py` by
construction — the same counting rule, so a file with a green `# N:M`
bookend will always produce a matching `loc_comments` value.

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 Remove the dependency on an absent ratio helper

The loc_comments spec is made to agree with scripts/annotate.py, but this repo does not contain that path (I checked the tree with find/rg), and skill propagation copies only the skill directories plus docs. Consumers implementing ratios_check.py from this canonical skill therefore cannot inspect the referenced algorithm or know what a “green # N:M bookend” means unless they also happen to have the a0p helper; make the rule self-contained here or include the helper in the propagated skill.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codex[agent] fix this please

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

  • Repaired ratios so it now defines the intended compact duplicated single-line RATIOS bookend, with exactly three ratio pairs and explicit non-multi-line parsing guidance.
  • Made the loc_comments rule self-contained and pointed consumers to the propagated helper instead of an absent repo-local scripts/annotate.py.
  • Added ratios/scripts/annotate.py, a stdlib-only helper that computes the three ratios, formats/writes bookends, and checks drift for propagated skill consumers.
  • Updated docs and the index to represent ratios as a compact metadata-bookend and keep the indexed description/load triggers aligned with the revised skill frontmatter.
  • Updated the drift checker so metadata-bookend is a valid indexed kind.

Committed the changes on the current branch with commit aa4ca53 and created the PR: Repair ratios bookend spec and propagate helper.

Testing

  • python tools/check_skill_lib_drift.py
  • python -m json.tool skills.json >/dev/null
  • python -m py_compile ratios/scripts/annotate.py tools/check_skill_lib_drift.py
  • ✅ `TMP=$(mktemp --suffix=.py); cat > "$TMP" <<'PY'

placeholder

def public():
print('x')
PY
python ratios/scripts/annotate.py --write "$TMP" >/tmp/ratios_line
python ratios/scripts/annotate.py --check "$TMP"
rm "$TMP"`

View task →

@Codex
Codex AI requested a review from wayseer00 June 7, 2026 02:24
Co-authored-by: wayseer00 <258336486+wayseer00@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants