Skip to content

docs: epic agent DX polish — docstrings, CLI tips, scaffold, RFC archive#241

Merged
lbliii merged 2 commits intomainfrom
lbliii/agent-dx-eval
Apr 20, 2026
Merged

docs: epic agent DX polish — docstrings, CLI tips, scaffold, RFC archive#241
lbliii merged 2 commits intomainfrom
lbliii/agent-dx-eval

Conversation

@lbliii
Copy link
Copy Markdown
Owner

@lbliii lbliii commented Apr 20, 2026

Summary

Closes the five agent-DX discoverability gaps identified in the 2026-04-20 cold-read evaluation, across five independently-shippable sprints tracked in plan/epic-agent-dx-polish.md:

  • S1 — Core-type docstrings: Site/Page/Section "When to use" intent coverage 1.2% → 71.6% (58/81 members), ~100% on the targeted non-trivial subset. Plain domain facets (config getters, word_count, parent) intentionally left alone per CLAUDE.md.
  • S2 — AGENTS.md "Extending Bengal" section: 91 lines covering 4 extension points (template functions, content types, CLI commands, build phases) with a 3-bullet Milo-vs-Click primer. End-to-end verified by a fresh-agent read.
  • S3 — bengal new content-type <name> scaffold: Generates a working ContentTypeStrategy subclass with When to use: docstring, default_template, sort_pages(), and register_strategy() call. 6 unit tests covering creation, import+register cycle, PascalCase, duplicates, invalid names.
  • S4 — CLI error-guidance pairing: Every cli.error(...) in bengal/cli/ now has a cli.tip/cli.info/cli.render_write follow-up within 3 lines (27.1% → 100%, 70/70). New AST gate test tests/unit/cli/test_cli_error_gates.py enforces the rule for new additions.
  • S5 — Stale RFC archive: Moved 4 bucket-B RFCs with unambiguous done-signals to plan/complete//plan/evaluated/. Root plan/*.md count 69 → 65. 3 cross-refs updated. plan/README.md gained an Archive Structure section.

Test plan

  • pytest tests/unit/cli/ — 123 passed (includes new gate test + 6 scaffold tests)
  • ruff check bengal/cli/ tests/unit/cli/ — clean
  • ty type checker — passes (pre-commit)
  • End-to-end: scaffolded content-type strategy imports, registers, and get_strategy() returns it
  • End-to-end: fresh agent reads "Extending Bengal" and writes a working bengal hello command
  • Re-run 2026-04-20 cold-read evaluation after merge to confirm gaps closed (success metric: 8.1/10 → 9.0/10)

🤖 Generated with Claude Code

lbliii and others added 2 commits April 20, 2026 17:59
Close the five agent-DX discoverability gaps identified in the 2026-04-20
cold-read evaluation:

- S1: Core-type docstrings. Site/Page/Section "When to use" intent coverage
  1.2% → 71.6% (58/81), ~100% on the targeted non-trivial subset.
- S2: AGENTS.md "Extending Bengal" section (91 lines) covering template
  functions, content types, CLI commands, build phases. Includes a
  3-bullet Milo-vs-Click primer.
- S3: `bengal new content-type <name>` scaffold generates a working
  ContentTypeStrategy subclass with register_strategy() call.
- S4: Every `cli.error(...)` in bengal/cli/ now pairs with a guidance
  follow-up (cli.tip/info/render_write) within 3 lines. Coverage 27.1%
  → 100% (70/70). AST gate test enforces the rule for new additions.
- S5: Archived 4 bucket-B RFCs with unambiguous done-signals to
  plan/complete/ and plan/evaluated/. Root plan/*.md count 69 → 65.

Full rationale and per-sprint changelog in plan/epic-agent-dx-polish.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@lbliii lbliii merged commit 0c49723 into main Apr 20, 2026
22 checks passed
@lbliii lbliii deleted the lbliii/agent-dx-eval branch April 20, 2026 22: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.

1 participant