Skip to content

docs: agent skills for the recurring task types (#10) - #72

Merged
michaelstonis merged 4 commits into
mainfrom
10-agent-skills
Oct 9, 2026
Merged

michaelstonis merged 4 commits into
mainfrom
10-agent-skills

Conversation

@michaelstonis

Copy link
Copy Markdown
Owner

Closes #10

Phase 0 row 0.10: agent skills for the recurring task types.

Summary

Adds .claude/skills/, one directory per skill with a SKILL.md (frontmatter name and description, step-by-step instructions, a worked example that references files in this repository today, a checklist), plus .claude/skills/README.md as the index.

Skill What it covers
picking-up-an-issue CLAUDE.md/CONTRIBUTING.md flow made operational: milestone and unblocked-issue search (gh issue list --search "no:assignee" plus a ### Blocked by extraction), self-assign and label, worktree and branch from origin/main, reading clauses from Specs/, verification commands, commit trailers via -F (sandbox quirk noted), PR via --body-file, Phase 0–1 self-merge vs later owner review, rebasing over Broadside.slnx conflicts, cleanup.
updating-the-conformance-map Which file and row, cell formats (backticked fully qualified types; backticked Namespace.Class.Method tests, as #7 formalizes), when and how to split to third-level rows (with the real §7.2 sub-clause titles read from Specs/), <remarks> citations, the #7 checker command marked as arriving. Worked example: §7.2 partial.
writing-a-corpus-file generate.py building blocks (serialization helpers, File, filters, encryption, determinism, minimal_truetype), naming rule, scratch regeneration and diff -rq, qpdf/pdfinfo/pdftotext/pdffonts verification, README row, Corpus.cs lists, Verify snapshot refresh. Worked example: text-type1-embedded.pdf, described only.
adding-a-benchmark bench/ layout, [MemoryDiagnoser] and --job conventions (no job attributes; BenchmarkConfig supplies the job), zero-allocation proof (Allocated reads - plus a GC.GetAllocatedBytesForCurrentThread test), dry/short/full/JSON runs, what the Phase 3I gate needs. Worked example: CorpusBenchmarks.
adding-a-fuzz-target FuzzTargets.All registration, the contract (span in, lenient mode, any escaping exception is a finding), seeds from tests/Corpus/ and raw-stream seeds via qpdf --show-object, --list/--smoke/--run/--fuzz/--afl, same-PR rule. Worked example: pdf-header.
adding-a-filter Design brief for the Broadside.Filters extension point (#18): responsibilities, managed default, registration through PdfOptions (no static registry), deliverables. Worked example: LZWDecode against lzw-stream.pdf.
adding-a-font-program-parser Design brief for the Broadside.Fonts extension point (Phase 2A): responsibilities, managed default, registration, deliverables. Worked example: the TrueType parser against text-truetype-embedded.pdf.
adding-a-rendering-backend Design brief for the Broadside.Rendering backend contract (Phase 3A, ADR 0006): responsibilities, software rasterizer as default and oracle, package rules, deliverables. Worked example: the Skia backend project that already exists.

The three design-brief skills open with a note that the interface is defined by #18 / Phase 2A / Phase 3A and that their contract section is to be replaced with the real signatures when those land. They describe responsibilities and do not invent method signatures.

CLAUDE.md change

Additive only: a "Skills" subsection under "Picking up work" listing the eight skills and saying to invoke the matching one before starting that kind of task. Justification: CONTRIBUTING.md already says agent-specific guidance lives in CLAUDE.md and .claude/skills/, and the issue's acceptance criterion is that agents use these skills; without a pointer in the file every agent reads first, the skills would not be found. No existing rule, term or decision changes.

Deliverables

  • Code with XML docs citing clauses: n/a (documentation only)
  • Tests: n/a (no code); the commands in the skills were run in this checkout (below)
  • Conformance map rows updated: n/a (no clause implemented)
  • PublicAPI.Unshipped.txt updated if the public surface changed: none
  • Benchmark if on a hot path: n/a
  • Commits signed off and follow Conventional Commits

Public API changes

none

Verification

Every command a skill tells the reader to run was run in this worktree, except the tools/ConformanceCheck command, which the skill marks as arriving with #7, and gh pr merge, which this PR does not exercise (flags confirmed with gh pr merge --help).

gh api repos/michaelstonis/Broadside/milestones --jq ...              -> 7 milestones, Phase 0 open=4
gh issue list ... --search "no:assignee" --state open --json ... --jq  -> 15 Phase 1 issues with their "blocked by" lists
gh issue view 2 --json state --jq .state                               -> CLOSED
git fetch origin && git worktree add <scratch>/wt-test -b 999-worktree-test origin/main   (then removed)
dotnet build Broadside.Core.slnf -warnaserror                          -> 0 Error(s)
dotnet test tests/Broadside.Tests                                      -> 33 passed
dotnet format Broadside.Core.slnf --verify-no-changes                  -> exit 0
python3 -I tests/Corpus/generate.py <scratch>/corpus-regen && diff -rq ... -> identical
qpdf --check / pdfinfo / pdftotext / pdffonts tests/Corpus/text-truetype-embedded.pdf -> clean, 1 page, "HI", TrueType emb=yes
qpdf --show-object=4 --raw-stream-data tests/Corpus/lzw-stream.pdf     -> 44 bytes
dotnet run -c Release --project tests/Broadside.Fuzz -- --list         -> pdf-header
dotnet run -c Release --project tests/Broadside.Fuzz -- --smoke pdf-header 5 12345 -> 30 corpus files passed, 19984706 mutated inputs, no failures
dotnet run -c Release --project bench/Broadside.Benchmarks -- --list flat            -> Broadside.Benchmarks.CorpusBenchmarks.ReadAllCorpusFiles
dotnet run -c Release --project bench/Broadside.Benchmarks -- --filter '*CorpusBenchmarks*' --job dry [--exporters json] -> 7.612 ms, 22.13 KB, exit 0; JSON report in BenchmarkDotNet.Artifacts/results/
pdftotext Specs/ISO_32000-2_sponsored_EC3.pdf - | grep -nE '^7\.2\.[0-9] '  -> 7.2.1 General, 7.2.2 Representation, 7.2.3 Character set, 7.2.4 Comments

Frontmatter of every SKILL.md parses as YAML with exactly name and description, and name matches the directory. Each skill is 58–127 lines.

🤖 Generated with Claude Code

Adds .claude/skills/ with one SKILL.md per recurring task type, each
with frontmatter, step-by-step instructions whose commands were run in
this checkout, a worked example that references files in the repository,
and a checklist:

- picking-up-an-issue: the CLAUDE.md/CONTRIBUTING.md flow made
  operational (unblocked-issue search, claim, worktree and branch,
  verification commands, commit trailers via -F, PR body via
  --body-file, Phase 0-1 self-merge vs later owner review, rebasing
  over Broadside.slnx conflicts, cleanup).
- updating-the-conformance-map: file and row lookup, cell formats
  (backticked fully qualified types and Namespace.Class.Method tests,
  as #7 formalizes), third-level splits, XML doc citations, the #7
  checker command marked as arriving.
- writing-a-corpus-file: generate.py building blocks, naming, scratch
  regeneration and diff, qpdf/poppler verification, README row,
  Corpus.cs lists, Verify snapshot refresh; worked example
  text-type1-embedded.pdf (described, not added).
- adding-a-benchmark: bench layout, MemoryDiagnoser and --job
  conventions, zero-allocation proof, dry/short/full runs, what the
  Phase 3I regression gate needs.
- adding-a-fuzz-target: FuzzTargets.All registration, the contract,
  seeds, modes, same-PR rule; worked example pdf-header.
- adding-a-filter, adding-a-font-program-parser,
  adding-a-rendering-backend: design briefs for the extension points
  that #18, Phase 2A and Phase 3A define, with a note to replace the
  contract section once the real signatures land.

Adds .claude/skills/README.md as the index and a "Skills" subsection
under "Picking up work" in CLAUDE.md that lists the skills and says to
invoke the matching one before starting that kind of task.

Signed-off-by: Michael Stonis <120685+michaelstonis@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 16:59
michaelstonis and others added 2 commits October 9, 2026 12:02
Phase 1 issues 11-25 were superseded by vertical slices under #33.
Filter contract is now #38, font program contract #50, COS parser #36.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI 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.

🟡 Changes recommended

Several recurring commands and examples are incorrect or internally inconsistent and could misdirect future contributors.

4 open findings
What changed in this PR

Adds reusable agent skills for Broadside’s recurring development workflows and links them from the primary contributor guidance.

Changes:

  • Adds workflow skills for issue handling, conformance, corpus, benchmarking, and fuzzing.
  • Adds design briefs for filters, font parsers, and rendering backends.
  • Adds a skill index and discovery guidance.
File Description
CLAUDE.md Introduces and indexes skills.
.claude/​skills/​README.md Summarizes available skills.
.../​picking-up-an-issue/​SKILL.md Documents issue-to-merge workflow.
.../​updating-the-conformance-map/​SKILL.md Documents conformance updates.
.../​writing-a-corpus-file/​SKILL.md Documents corpus generation.
.../​adding-a-benchmark/​SKILL.md Documents benchmark requirements.
.../​adding-a-fuzz-target/​SKILL.md Documents fuzz-target integration.
.../​adding-a-filter/​SKILL.md Defines the filter design brief.
.../​adding-a-font-program-parser/​SKILL.md Defines the font-parser design brief.
.../​adding-a-rendering-backend/​SKILL.md Defines the backend design brief.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

}
```

Put only the per-item work inside `RunHotPath`; one-time buffers (`ArrayPool<T>` rentals, the output list) are allowed per call, so size the input to make per-token allocations visible.

```sh
gh api repos/michaelstonis/Broadside/milestones --jq '.[] | "\(.number) \(.title) open=\(.open_issues)"'
gh issue list --repo michaelstonis/Broadside --milestone "Phase 1: COS layer" --search "no:assignee" --state open
dotnet run --project tools/ConformanceCheck -- --root . --summary
```

It fails on a `done` row without a test and prints counts per status; CI runs it on every PR. Until it lands, check by hand that each row you touched has backticked identifiers in both cells and that every test named exists (`grep -rn 'Tokenizes_names' tests/`).
2. Regenerate into a scratch directory and diff. Only your new file may differ ("Only in"); any other difference means you changed shared code and must explain it in the PR:

```sh
python3 -I tests/Corpus/generate.py /tmp/corpus-regen
@michaelstonis
michaelstonis merged commit 6b76755 into main Oct 9, 2026
@michaelstonis
michaelstonis deleted the 10-agent-skills branch October 9, 2026 17:15
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.

[Scaffold] Agent skills

2 participants