Skip to content

docs: sync counts after skill-forge-essentials merge - #615

Merged
wshobson merged 1 commit into
mainfrom
docs/post-577-count-sync
Jul 7, 2026
Merged

wshobson merged 1 commit into
mainfrom
docs/post-577-count-sync

Conversation

@wshobson

@wshobson wshobson commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Post-merge count sync for #577: 90 plugins (87 local + 3 external), 161 skills across 45 plugins, verified against the filesystem. Includes the docs/usage.md and docs/plugins.md lines that previous syncs missed. Gates: validate STRICT=1 OK, garden 0 errors, markdownlint clean.

… skills)

Recounted from the filesystem: 90 plugins (87 local + 3 external),
161 skills across 45 plugins. Also catches docs/usage.md and
docs/plugins.md install-note lines missed by earlier syncs.
@claude

claude Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @wshobson's task in 1m 49s —— View job


Claude PR Review

  • Read PR diff and changed files
  • Verify counts against filesystem (plugins, agents, skills, commands)
  • Check for catalog drift across AGENTS.md / README.md / docs
  • Check existing bot comments to avoid duplication
  • Post review findings

Filesystem verification

All updated numbers are correct against the tree on this branch:

Count Doc value Filesystem
Plugins (local) 87 87 (ls plugins/)
Plugins (total, +3 externals) 90 90 (grep -c '"source": "git-subdir"' .claude-plugin/marketplace.json = 3)
Agents 199 199 (find plugins -path "*/agents/*.md")
Skills 161 161 (find plugins -name SKILL.md)
Plugins with skills 45 45 (find plugins -maxdepth 2 -type d -name skills)
Commands 106 106 (find plugins -path "*/commands/*.md")

Findings

Two stale 158 references remain — ironic given the PR body says "Includes the docs/usage.md and docs/plugins.md lines that previous syncs missed":

  • docs/usage.md:388 — See [Agent Skills](./agent-skills.md) for details on the 158 specialized skills. → should be 161
  • docs/plugins.md:408 — - [Agent Skills](./agent-skills.md) - 158 specialized skills across plugins → should be 161

(Tried to post these as inline suggestions but neither line is in the PR diff, so GitHub rejected the review-comment API call — surfacing them here instead.)

Suggested fix:

--- a/docs/usage.md
+++ b/docs/usage.md
@@ -388 +388 @@
-See [Agent Skills](./agent-skills.md) for details on the 158 specialized skills.
+See [Agent Skills](./agent-skills.md) for details on the 161 specialized skills.

--- a/docs/plugins.md
+++ b/docs/plugins.md
@@ -408 +408 @@
-- [Agent Skills](./agent-skills.md) - 158 specialized skills across plugins
+- [Agent Skills](./agent-skills.md) - 161 specialized skills across plugins

Fix this →

Everything else

  • No touches to generated artifacts (.codex/, .cursor-plugin/, .cursor/rules/, .opencode/, top-level skills//agents//commands/) — source-of-truth invariant respected. ✅
  • AGENTS.md still under the ~150-line cap. ✅
  • No frontmatter, portability, or Codex 8 KB skill-cap concerns — pure Markdown text edits. ✅
  • Sweep for other stale numbers turned up no other 88/89/158 catalog references outside these two lines. ✅

Recommendation

Land the two missed-line fixes above (single follow-up commit) and this PR is otherwise good.
· Branch: docs/post-577-count-sync

@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Updated marketplace and skills counts across the docs to reflect the latest totals.
    • Revised plugin catalog references to show 90 plugins and 161 skills.
    • Aligned architecture and usage references with the current marketplace inventory.
    • Improved wording and formatting in the documentation map and setup guidance.

Walkthrough

Documentation files (AGENTS.md, ARCHITECTURE.md, README.md, docs/agent-skills.md, docs/architecture.md, docs/plugins.md, docs/usage.md) were updated to reflect increased marketplace inventory totals: plugins increased from 89 to 90 (local plugins 86 to 87), and skills increased from 158 to 161. README.md also had minor formatting adjustments to documentation map bullets.

Changes

Marketplace count documentation update

Layer / File(s) Summary
Top-level repo docs count updates
AGENTS.md, ARCHITECTURE.md, README.md
Plugin count updated from 89 to 90 (local plugins 86 to 87) and skill count from 158 to 161 in headline figures, inventory tables, install snippet comments, and documentation map bullets.
docs/ directory count updates
docs/agent-skills.md, docs/architecture.md, docs/plugins.md, docs/usage.md
Same plugin (89→90) and skill (158→161) totals updated across introductions, specification compliance statements, reference sections, and repository structure snippets, with the plugin count in docs/usage.md changed from 88 to 90.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • wshobson/agents#522: Updates the same plugin/agent/skill count documentation across docs/agent-skills.md, docs/plugins.md, docs/architecture.md, and docs/usage.md.
  • wshobson/agents#613: Updates the same documentation count references in AGENTS.md, ARCHITECTURE.md, and README.md to resync catalog inventory numbers.
  • wshobson/agents#576: Updates plugin catalog totals in the same set of docs following a plugin addition.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the PR’s main change: syncing documentation counts after the merge.
Description check ✅ Passed The description is directly related and accurately summarizes the documentation count updates and validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/post-577-count-sync
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch docs/post-577-count-sync

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.

@wshobson
wshobson merged commit 9c56144 into main Jul 7, 2026
9 checks passed

@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/usage.md (1)

388-394: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the skills total consistent in this section.

This page still mixes the new plugin count with an older 158 skills reference nearby, so the documentation remains internally inconsistent. Please update the remaining count as well.

🤖 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/usage.md` around lines 388 - 394, The usage docs still contain an
outdated skills count alongside the newer plugin reference, so update the
remaining “158 specialized skills” text to match the current total. Make the
change in the Agent Skills mention within the usage section so the counts stay
consistent with the existing Agent Reference and Plugin Reference entries.
🤖 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/usage.md`:
- Around line 388-394: The usage docs still contain an outdated skills count
alongside the newer plugin reference, so update the remaining “158 specialized
skills” text to match the current total. Make the change in the Agent Skills
mention within the usage section so the counts stay consistent with the existing
Agent Reference and Plugin Reference entries.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3f73ce3b-6939-4cd3-bfc8-451e8a8de938

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea6aad and 41d13d3.

📒 Files selected for processing (7)
  • AGENTS.md
  • ARCHITECTURE.md
  • README.md
  • docs/agent-skills.md
  • docs/architecture.md
  • docs/plugins.md
  • docs/usage.md
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: claude-review
⚠️ CI failures not shown inline (10)

GitHub Actions: Code Quality / JSON _ TOML _ YAML syntax: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run set -e
 �[36;1mset -e�[0m
 �[36;1mshopt -s globstar nullglob�[0m
 �[36;1mfailed=0�[0m
 �[36;1mfor f in **/*.toml; do�[0m
 �[36;1m  case "$f" in�[0m
 �[36;1m    .codex/*|.cursor/*|.cursor-plugin/*|.opencode/*|node_modules/*|commands/*) continue ;;�[0m
 �[36;1m  esac�[0m
 �[36;1m  if ! uv run python -c "import tomllib, sys; tomllib.loads(open(sys.argv[1]).read())" "$f" 2>/dev/null; then�[0m
 �[36;1m    echo "::error file=$f::invalid TOML"�[0m

GitHub Actions: Code Quality / JSON _ TOML _ YAML syntax: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run set -e
 �[36;1mset -e�[0m
 �[36;1mshopt -s globstar nullglob�[0m
 �[36;1mfailed=0�[0m
 �[36;1mfor f in **/*.json; do�[0m
 �[36;1m  # Skip generated trees and node_modules�[0m
 �[36;1m  case "$f" in�[0m
 �[36;1m    .codex/*|.cursor/*|.cursor-plugin/*|.opencode/*|node_modules/*|skills/*|agents/*|commands/*) continue ;;�[0m
 �[36;1m  esac�[0m
 �[36;1m  if ! uv run python -m json.tool "$f" > /dev/null 2>&1; then�[0m
 �[36;1m    echo "::error file=$f::invalid JSON"�[0m

GitHub Actions: Code Quality / 2_JSON _ TOML _ YAML syntax.txt: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run set -e
 �[36;1mset -e�[0m
 �[36;1mshopt -s globstar nullglob�[0m
 �[36;1mfailed=0�[0m
 �[36;1mfor f in **/*.json; do�[0m
 �[36;1m  # Skip generated trees and node_modules�[0m
 �[36;1m  case "$f" in�[0m
 �[36;1m    .codex/*|.cursor/*|.cursor-plugin/*|.opencode/*|node_modules/*|skills/*|agents/*|commands/*) continue ;;�[0m
 �[36;1m  esac�[0m
 �[36;1m  if ! uv run python -m json.tool "$f" > /dev/null 2>&1; then�[0m
 �[36;1m    echo "::error file=$f::invalid JSON"�[0m

GitHub Actions: Code Quality / JSON _ TOML _ YAML syntax: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run set -e
 �[36;1mset -e�[0m
 �[36;1mshopt -s globstar nullglob�[0m
 �[36;1mfailed=0�[0m
 �[36;1mfor f in **/*.yml **/*.yaml; do�[0m
 �[36;1m  case "$f" in�[0m
 �[36;1m    .codex/*|.cursor/*|.cursor-plugin/*|.opencode/*|node_modules/*) continue ;;�[0m
 �[36;1m  esac�[0m
 �[36;1m  # Use safe_load_all to handle multi-document YAML (e.g. Kubernetes manifests�[0m
 �[36;1m  # with `---` document separators — valid YAML, but safe_load only reads the�[0m
 �[36;1m  # first doc and would mis-flag the file as invalid).�[0m
 �[36;1m  if ! uv run --with pyyaml python -c "import yaml, sys; list(yaml.safe_load_all(open(sys.argv[1]).read()))" "$f" 2>/dev/null; then�[0m
 �[36;1m    echo "::error file=$f::invalid YAML"�[0m

GitHub Actions: Validate / Cross-harness generation + validation: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run if [ -n "$(git status --porcelain)" ]; then
 �[36;1mif [ -n "$(git status --porcelain)" ]; then�[0m
 �[36;1m  echo "::error::Generated artifacts drifted from the committed tree. Run 'make generate-all' and commit the result."�[0m

GitHub Actions: Validate / Validate JSON files: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run set -e
 �[36;1mset -e�[0m
 �[36;1mshopt -s globstar nullglob�[0m
 �[36;1mfailed=0�[0m
 �[36;1mfor f in plugins/*/.claude-plugin/plugin.json; do�[0m
 �[36;1m  if ! python3 -m json.tool "$f" > /dev/null 2>&1; then�[0m
 �[36;1m    echo "::error file=$f::invalid JSON"�[0m

GitHub Actions: Validate / Validate JSON files: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run set -e
 �[36;1mset -e�[0m
 �[36;1mshopt -s globstar nullglob�[0m
 �[36;1mfailed=0�[0m
 �[36;1mfor f in plugins/*/hooks/*.json; do�[0m
 �[36;1m  if ! python3 -m json.tool "$f" > /dev/null 2>&1; then�[0m
 �[36;1m    echo "::error file=$f::invalid JSON"�[0m

GitHub Actions: Validate / Validate JSON files: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run python3 - <<'PY'
 �[36;1mpython3 - <<'PY'�[0m
 �[36;1mimport json, os, posixpath, sys�[0m
 �[36;1mfrom urllib.parse import urlparse�[0m
 �[36;1mwith open('.claude-plugin/marketplace.json') as f:�[0m
 �[36;1m    mp = json.load(f)�[0m
 �[36;1merrors = []�[0m
 �[36;1mfor p in mp.get('plugins', []):�[0m
 �[36;1m    src = p.get('source')�[0m
 �[36;1m    if isinstance(src, str) and src.startswith('./plugins/'):�[0m
 �[36;1m        path = src.lstrip('./')�[0m
 �[36;1m        if not os.path.isdir(path):�[0m
 �[36;1m            errors.append(f"{p['name']}: source {src} does not exist")�[0m
 �[36;1m        elif not os.path.isfile(os.path.join(path, '.claude-plugin', 'plugin.json')):�[0m
 �[36;1m            errors.append(f"{p['name']}: missing .claude-plugin/plugin.json in {src}")�[0m
 �[36;1m    elif isinstance(src, dict):�[0m
 �[36;1m        if src.get('source') != 'git-subdir':�[0m
 �[36;1m            errors.append(f"{p['name']}: unsupported source object {src.get('source')!r}")�[0m
 �[36;1m            continue�[0m
 �[36;1m�[0m
 �[36;1m        extra_keys = set(src) - {'source', 'url', 'path'}�[0m
 �[36;1m        if extra_keys:�[0m
 �[36;1m            errors.append(f"{p['name']}: git-subdir entry has unsupported keys: {sorted(extra_keys)}")�[0m
 �[36;1m�[0m
 �[36;1m        url = src.get('url')�[0m
 �[36;1m        path = src.get('path')�[0m
 �[36;1m�[0m
 �[36;1m        if not url:�[0m
 �[36;1m            errors.append(f"{p['name']}: git-subdir entry missing url")�[0m
 �[36;1m        else:�[0m
 �[36;1m            parsed = urlparse(url)�[0m
 �[36;1m            if parsed.scheme != 'https' or parsed.netloc != 'github.com' or not parsed.path.endswith('.git'):�[0m
 �[36;1m                errors.append(f"{p['name']}: git-subdir url must be an https://github.com/*.git URL")�[0m
 �[36;1m�[0m
 �[36;1m        if not path:�[0m
 �[36;1m            errors.append(f"{p['name']}: git-subdir entry missing path")�[0m
 �[36;1m        elif path != '.':�[0m
 �[36;1m            norm...

GitHub Actions: Validate / 4_Validate JSON files.txt: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run set -e
 �[36;1mset -e�[0m
 �[36;1mshopt -s globstar nullglob�[0m
 �[36;1mfailed=0�[0m
 �[36;1mfor f in plugins/*/.claude-plugin/plugin.json; do�[0m
 �[36;1m  if ! python3 -m json.tool "$f" > /dev/null 2>&1; then�[0m
 �[36;1m    echo "::error file=$f::invalid JSON"�[0m

GitHub Actions: Validate / 3_Cross-harness generation + validation.txt: docs: sync counts after skill-forge-essentials merge

Conclusion: failure

View job details

##[group]Run if [ -n "$(git status --porcelain)" ]; then
 �[36;1mif [ -n "$(git status --porcelain)" ]; then�[0m
 �[36;1m  echo "::error::Generated artifacts drifted from the committed tree. Run 'make generate-all' and commit the result."�[0m
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

Never hand-edit generated harness artifacts; regenerate committed outputs from plugins/ with make generate-all before committing source changes.

Files:

  • ARCHITECTURE.md
  • docs/usage.md
  • docs/agent-skills.md
  • AGENTS.md
  • docs/plugins.md
  • docs/architecture.md
  • README.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: wshobson/agents

Timestamp: 2026-07-07T23:45:56.844Z
Learning: Keep the canonical context file as a short table of contents and do not let it grow beyond about 150 lines; put detail in `docs/`, `docs/authoring.md`, or `docs/harnesses.md` instead.
Learnt from: CR
Repo: wshobson/agents

Timestamp: 2026-07-07T23:45:56.844Z
Learning: Use `uv` for Python package management, `ruff` for linting/formatting, and `ty` for type checking; do not use `pip`, `mypy`, or `black`.
Learnt from: CR
Repo: wshobson/agents

Timestamp: 2026-07-07T23:45:56.844Z
Learning: Never commit secrets.
Learnt from: CR
Repo: wshobson/agents

Timestamp: 2026-07-07T23:45:56.844Z
Learning: Never run destructive git operations such as force-push, `reset --hard`, or `branch -D` unless explicitly asked.
Learnt from: CR
Repo: wshobson/agents

Timestamp: 2026-07-07T23:45:56.844Z
Learning: Before pushing, run the required quality gates: `make validate STRICT=1`, `make garden`, `make test`, and `make smoke-test`.
🔇 Additional comments (6)
AGENTS.md (1)

3-3: LGTM!

Also applies to: 13-13, 55-55

ARCHITECTURE.md (1)

29-29: LGTM!

README.md (1)

3-4: LGTM!

Also applies to: 22-22, 50-52, 128-130

docs/agent-skills.md (1)

3-3: LGTM!

Also applies to: 395-395

docs/architecture.md (1)

39-39: LGTM!

Also applies to: 72-84, 197-197, 396-396

docs/plugins.md (1)

3-3: LGTM!

Also applies to: 365-365

@wshobson
wshobson deleted the docs/post-577-count-sync branch July 13, 2026 22:08
wshobson added a commit that referenced this pull request Aug 23, 2026
…sts (#676)

* feat(garden): detect stale doc counts and diverged agent copies

Two checks close gaps that kept surfacing in PR review.

check_doc_counts compares the plugin/agent/skill/command totals quoted in
README.md and AGENTS.md against the live counts, at error severity. Only the
two canonical context files are scanned, because docs/ carries per-category
subtotals that legitimately differ. Plugins count marketplace entries rather
than plugins/ directories, so external git-subdir entries are included the way
the headline figure counts them. Four manual sync PRs (#522, #613, #615, #616)
existed because nothing caught this.

check_agent_divergence groups agent files by filename and compares bodies with
the plugin-namespaced frontmatter name normalized away. Without that
normalization no two copies can ever hash alike, which is why #643 read the
duplication as total divergence. Of 30 duplicated names, 19 are verbatim copies
and 11 have genuinely drifted. Verbatim copies are expected while plugins
install standalone, so they report as info; drifted bodies report as warning.

* test(adapters): pin strip_claude_tool_refs output

The method rewrites Claude tool names in Copilot command bodies and had no test
coverage, so a refactor could change its output silently. #642 did exactly that
while claiming no behavioral change: replacements lost their backticks,
tool_case=normal stopped returning 'read', and a bare `Grep` mapped to rg
instead of `grep`.

These assert the exact output for both tool_case values, both prose forms, and
every mapped tool.

* docs(contributing): rule out payment and access-control tooling in payloads

The commercial section covered funnels to paid products but not a payload that
sells something itself. #670 shipped a Telegram sales bot, USDT payment
verification, and a script granting GitHub collaborator access on payment.

* fix(garden): widen count matching and stop reporting verbatim agent copies

Review feedback on PR #676.

COUNT_RE required two digits, so a drop to single-digit totals would go
unnoticed. It now matches any decimal. It also missed `202 subagents` in the
cross-harness section of AGENTS.md, which is the same total under a different
name, so `subagents` is now an alias for the agent count.

check_agent_divergence no longer reports verbatim copies. A copy that matches
byte for byte once the namespaced name is normalized is expected, not drift,
and 19 info findings only added noise. The divergence warning still fires when
bodies actually differ.

* docs(contributing): distinguish payment machinery from payment guidance

The first wording banned 'payment processing ... tooling in a plugin payload',
which reads as barring the existing payment-processing plugin. That plugin is
Markdown-only guidance for building Stripe and PayPal integrations in the user's
own application, which was never the target.

The rule now turns on whether the payload runs a commercial transaction itself,
and names payment-processing as the reference example of what stays allowed.

* test(adapters): pin every tool mapping in both tool_case modes

Review nitpick on PR #676. The mapping loop ran only the default case. That
default is already `lower`, so the lower path was covered, but the assertion
did not say so and normal mode was pinned for Read alone.

The loop now asserts both modes for all nine tools, and a separate test pins
that the default is lower, which is what Copilot emission relies on.

* fix(garden): scope agent name normalization to the frontmatter block

Review feedback on PR #676. The substitution used a MULTILINE pattern with
count=1, which lands on the frontmatter name in every agent the repo has today
but would blank a body `name:` line in an agent whose frontmatter lacked one.

Normalization is now scoped to the opening frontmatter block, so a `name:` in
the body stays content and still counts toward a divergence. Three tests cover
differing body names, matching body names, and a file with no frontmatter.

No change to current output: still 11 divergent, 0 verbatim reported.

* fix(garden): match singular component nouns in doc counts

Review feedback on PR #676. COUNT_RE only matched plurals, so a total of one
written as `1 plugin` would not have been compared against anything.

Singular forms now resolve to the same key. Neither README.md nor AGENTS.md
contains a singular count today, so the live result is unchanged and the counts
check stays silent.

* fix(garden): treat an unreadable marketplace as an unknown plugin count

Review feedback on PR #676. A JSON syntax error in marketplace.json set the
plugin count to 0, so check_doc_counts flagged every documented plugin count as
stale and told the reader to write 0. The real parse error was reported once by
check_marketplace_consistency and buried under the noise.

The count is now None when the manifest is missing or unparseable, and the
comparison skips it. Other component counts are still checked.

* fix(garden): handle CRLF frontmatter and malformed marketplace shapes

Review feedback on PR #676, both confirmed by running them.

AGENT_FRONTMATTER_RE required LF delimiters and a newline after the closing
---, so a CRLF agent or one ending at its frontmatter got no normalization at
all and two copies read as divergent. Scoping normalization to the frontmatter
block in 4798d40 introduced that: the MULTILINE pattern it replaced matched
CRLF fine. The pattern now accepts \r?\n and a closing delimiter at EOF.

actual_counts() also assumed the manifest parsed to a mapping with a list under
plugins. A root of [] raised AttributeError and {"plugins": null} raised
TypeError, crashing the gardener rather than reporting an unknown count. The
shape is now checked before len().

Four regression tests. No repo agent uses CRLF today, so live output is
unchanged at 11 divergent.

* refactor(garden): compare agents through the shared frontmatter parser

Review rounds four and seven were both about my own frontmatter regex being
stricter than the files it reads. Rather than widen it a third time, agent
comparison now goes through parse_frontmatter, the same parser the adapters use,
and drops the plugin-namespaced name field.

A copy is judged on its frontmatter fields and body, so delimiter formatting no
longer decides drift. Verified locally across 16 input shapes: CRLF, BOM,
leading blank line, trailing space after a delimiter, closing --- at EOF, no
trailing newline, block scalars and inline lists all compare equal when only the
name differs, while body text, model tier, an added field, a differing body
name: line and files with no frontmatter still register as drift.

Real-repo output is unchanged: 11 divergent, 19 verbatim, same names and counts.

* fix(garden): read a thousands separator as one number

Found by a local battery over check_doc_counts rather than by review. COUNT_RE
matched bare digit runs, so `1,234 agents` matched the `234` and reported a
stale count of 234 at error severity. A comma-formatted total anywhere in
README.md or AGENTS.md would have failed CI with wrong advice.

The pattern now takes the whole number and strips separators before comparing,
so 1,234 reads as 1234 and is checked properly rather than skipped.

Also pinned that counts inside code fences are checked, because README.md
quotes the plugin total inside a bash fence.

* fix(garden): survive an unreadable file instead of killing the run

Pre-existing across the module, not new to this PR. Five of the seven checks
died with UnicodeDecodeError on a single non-UTF-8 file, and
check_oversized_context_files read without an encoding at all. One bad file took
down every other check's output with it.

All reads now go through read_text_or_none, which reports UNREADABLE_FILE
against that path and lets the rest of the run finish. actual_counts has no
Report to write to, so an unreadable manifest joins a malformed one as an
unknown count. Also drops the unused frontmatter binding in
check_codex_skill_caps.

Real-repo output is unchanged.

* fix(garden): keep body indentation, report an unreadable manifest, drop dead guard

Four review findings on PR #676, all confirmed by running them.

normalized_agent_text used body.strip(), so an indented body compared equal to
the same text unindented and real drift went unreported. Leading whitespace is
content in Markdown; only trailing whitespace is formatting. Now rstrip.

actual_counts read the manifest directly, so a non-UTF-8 marketplace.json
quietly became an unknown plugin count with no UNREADABLE_FILE finding. It now
takes the Report and reads through read_text_or_none like everything else.

check_dead_links kept a try/except OSError around the new reader, which already
catches OSError and returns None. Dead code, removed.

CONTRIBUTING's closing sentence narrowed the payment rule to running a
transaction, which would have permitted a tool that consumes an external payment
result and only flips access. Verification, entitlement checks and access
changes are now each covered on their own.

Battery re-run at 18 cases, all pass. Real-repo output unchanged at 11 divergent.

* fix(garden): keep indentation without frontmatter, reject malformed manifest entries

Three findings on PR #676, all reproduced first.

normalized_agent_text stripped leading whitespace before deciding whether
frontmatter existed, so two frontmatter-free agents differing only by
indentation compared equal. Blank lines ahead of a frontmatter block are
formatting; ahead of anything else they are body content. Same mistake as the
body.strip() fix in the previous commit, one level up.

A plugins list holding a non-object entry was counted as valid, letting garbage
drive an error-severity stale-count finding. The count is unknown unless every
entry is an object.

check_marketplace_consistency then crashed outright on that input with
AttributeError, and on a non-object root as well. Both now report
MARKETPLACE_SHAPE and carry on. That crash predates this PR.

* fix(garden): keep ty clean after the manifest shape guard

The isinstance narrowing added in aaf76f6 turned the entry from Any into
dict[Unknown, Unknown], so .get("name") failed with invalid-argument-type. Two
ty errors, which I pushed without reading the output. The entry is cast once
after the guard.

make lint is clean: ruff check, ruff format --check and ty all pass.

* fix(garden): match CRLF against LF, validate name, test the real Copilot path

Three findings on PR #676.

parse_frontmatter strips a leading newline but leaves the carriage return, so a
CRLF copy never matched its LF twin and reported false drift. My own CRLF test
missed it because it compared CRLF against CRLF, which passes without
normalizing anything. Body line endings are normalized now, newlines stripped
but never spaces so indentation stays content, and the test mixes the two
endings. A second test proves normalizing does not flatten real drift.

check_marketplace_consistency added entry['name'] to a set without checking its
type, so a list-valued name raised TypeError. It now reports MARKETPLACE_SHAPE.

test_lower_is_the_default_tool_case only protected the method default, while
Copilot's two call sites pass tool_case explicitly, so generated commands could
regress with the test green. Replaced with one that emits a command through
CopilotAdapter and asserts the rewritten body.

* fix(garden): strip closing-delimiter residue, assert Copilot output per file

Two findings on PR #676.

parse_frontmatter leaves the spaces from a `--- ` closing line at the head of
the body, so an agent whose closing delimiter carried a trailing space never
matched its clean twin. My earlier trailing-space test put the space on the
opening delimiter, which parse_frontmatter already tolerates, so it proved
nothing about this. Leading whitespace-only lines are now dropped as delimiter
residue while a line that starts with spaces then real text keeps its
indentation.

The Copilot integration test joined every emitted file, so one emitter could
regress to `read` while the other's `open` satisfied the assertion. It now
reads each command artifact separately and rejects `read`. Scoping that
exposed a second problem with my own test: it had asserted over every emitted
markdown file including the plugin index, which carries no command body and only
passed because the join diluted it.

* refactor(garden): one entry rule for both marketplace readers

Review feedback on PR #676. actual_counts counted {"name": ["bad"]} because it
is a dictionary, while check_marketplace_consistency rejected the same entry as
MARKETPLACE_SHAPE. A counts-only run could report a stale total from a manifest
the other check calls invalid.

Rather than copy the name rule into the second place, both now call
marketplace_entry_problem, which returns why an entry is unusable or None. That
also collapses the two near-identical report blocks in the consistency check
into one.

Parametrized coverage of the rule itself, plus a case proving a list-valued name
leaves the count unknown.

* style(tests): sort the doc_gardener test imports

I001 from adding marketplace_entry_problem to the import block in e7bd51c. I
pushed that commit without reading the ruff output, for the second time in this
review. Adding a pre-push habit of running make lint rather than eyeballing it.

* fix(garden): canonicalize nested frontmatter before hashing

Review feedback on PR #676. parse_frontmatter supports one-level mappings, and
repr preserves insertion order, so two agents whose metadata block listed the
same keys in a different order hashed differently and reported false drift. Only
the top-level keys were sorted.

Mapping keys are now sorted recursively. List order is left alone because it is
meaningful: reordering tools: [Read, Write] is a real change, and three tests
pin that distinction alongside a changed nested value still counting as drift.

No agent in the repo uses nested frontmatter today, so live output is unchanged
at 11 divergent. Skills do use it, and agents are free to.
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