Skip to content

Add Claude Code documentation agents and workflow#444

Closed
samgutentag wants to merge 13 commits intomainfrom
feat/claude-code-agents
Closed

Add Claude Code documentation agents and workflow#444
samgutentag wants to merge 13 commits intomainfrom
feat/claude-code-agents

Conversation

@samgutentag
Copy link
Member

@samgutentag samgutentag commented Feb 17, 2026

Summary

Claude Code agent system for documentation workflows. Five agents that turn raw notes (Slack threads, engineer scribbles, Linear tickets) into polished docs with full project tracking.

Agents

Agent Model Purpose
notes-processor Opus End-to-end pipeline: notes → research → draft → branch/PR/Linear → changelog → Slack → report
doc-writer Opus Documentation drafting with structured outputs
doc-researcher Sonnet Context gathering from Linear + existing docs
changelog-writer Sonnet Changelog/release note entries
branch-manager Sonnet Git branches, PRs, Linear ticket lifecycle

Pipeline (8 phases)

  1. Parse notes → 2. Research (Linear + docs) → 3. Sources audit trail → 4. Draft docs → 5. Branch/PR/Linear → 6. Changelog → 7. Slack post → 8. HTML review report

Files

  • .claude/agents/ — 5 agent definitions + README with Mermaid diagrams
  • .claude/drafts/TEMPLATE.md — notes file template
  • .claude/tmp/ (gitignored) — all agent outputs (report.html, changelogs/, slack/, sources/)

Key conventions

  • PR titles: [TRUNK-XXXXX] Short descriptive title
  • PR bodies include clickable Linear ticket URLs
  • Linear tickets get PR links, context links, and related ticket links
  • One draft = one branch = one PR = one Linear ticket
  • All outputs consolidated under .claude/tmp/

Validated with 8 documentation PRs

Draft PR Linear
google-cloud.md #438 TRUNK-17580
atlassian-bamboo.md #436 TRUNK-17578
flaky-tests-rules-engine.md #434 TRUNK-17576
new-merge-graph-ui.md #433 TRUNK-17575
merge-queue-api-endpoints.md #439 TRUNK-17581
falky-test-cyprus.md #435 TRUNK-17577
concurrency-settings.md #437 TRUNK-17579
run-tests-private-fork.md #445 TRUNK-17582

Test plan

  • Process 7 existing drafts — updated PRs and Linear tickets
  • Process 1 new draft — created new branch, PR, and Linear ticket
  • All PR titles prefixed with [TRUNK-XXXXX]
  • All PR bodies contain Linear ticket links
  • All Linear tickets have PR link comments
  • Report.html contains review cards for all 8 drafts
  • Review each PR individually via GitBook Change Request preview

🤖 Generated with Claude Code

samgutentag and others added 13 commits February 17, 2026 10:59
Set up three subagents for accelerating Trunk docs workflows:
- doc-writer (Opus): full documentation drafting with structured outputs
- doc-researcher (Sonnet): context gathering from Linear and existing docs
- changelog-writer (Sonnet): focused changelog/release note entries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add branch-manager agent for git branch, PR, and Linear ticket lifecycle
- Update agents README with branch-manager in the available agents table
- Add Local Development section to repo README with GitBook preview workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add notes-processor agent for end-to-end pipeline: notes file in,
  branch/PR/Linear ticket out
- Add .claude/drafts/ directory with template for Slack pastes and
  engineer notes
- Update agents README with new workflow documentation
- Add .gitignore rules to keep personal drafts out of git

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Explainers enhance existing docs with examples and scenarios based on
customer questions, with guidelines to keep workflow guides clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agents now produce a .sources.md file alongside each notes file,
listing every Linear ticket, GitHub PR, existing doc, code snippet,
and external reference used as input. Provides a human-readable
audit trail for accuracy checks and cross-referencing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add review report generation (Phase 6) to notes-processor agent
- Add Slack link extraction and attachment to Linear tickets
- Add automatic search and linking of related engineering tickets
- Enrich PR bodies with Slack context and related ticket references
- Add Slack Links field to notes template
- Create session report at .claude/reports/2026-02-17-docs-backlog.md
- Replace Claude Squad references with sequential workflow docs
- Add "What the Agent Does" section to README explaining all 6 phases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agents now extract and attach all URLs from notes files — Slack, Slite,
Loom, Google Docs, Notion, and any other context links. All are attached
to Linear tickets and referenced in PR bodies. Template field renamed
from "Slack Links" to "Context Links".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Changelog entries now staged to .claude/staging/changelog/ for DatoCMS upload
- Review reports output as HTML (open in browser with clickable links and checkboxes)
- Remove old markdown report format
- Add .claude/staging/ and .claude/reports/*.html to .gitignore
- Update notes-processor with Phase 5.5 (changelog) and updated Phase 6 (HTML report)
- Broaden template "Slack Links" to "Context Links" (Slack, Slite, Loom, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move all agent outputs to .claude/tmp/ (report.html, changelogs/, slack/, sources/)
- Add Phase 5.6: Slack post generation for internal team notification
- Remove console text summary output format
- Require clickable Linear links in all sources files
- Simplify .gitignore to single .claude/tmp/ entry
- Clean up old staging/, reports/, and drafts/*.sources.md locations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ensure GitHub PRs and Linear tickets cross-reference each other by
requiring a Linear ticket ID prefix in PR titles and clickable Linear
URLs in PR bodies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Visual diagrams showing the 8-phase notes-processor pipeline flow
and how the 5 agents collaborate with external services.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Mar 12, 2026

Claude finished @samgutentag's task in 2m 49s —— View job


Review complete

  • Read all changed files
  • Review for typos, grammar, and formatting issues
  • Review documentation best practices
  • Post inline comments for specific issues
  • Final summary

Summary

Overall this is a well-structured addition. The agent definitions are clear, the pipeline is well-documented with Mermaid diagrams, and the template/gitignore setup is sensible. Three issues flagged inline:

  1. Missing Phase 3 header (.claude/agents/notes-processor.md:123) — Phases jump from 2.5 directly to 4; the draft documentation section is missing its ### Phase 3 heading. Fix this →

  2. Inconsistent sources file location (.claude/agents/doc-researcher.md:32) — doc-researcher writes .sources.md alongside the notes file, while notes-processor and the README both point to .claude/tmp/sources/. Recommend aligning to one location.

  3. Hardcoded sam/ branch prefix (.claude/agents/README.md:57) — Branch names are hardcoded as sam/<topic> throughout. Fine for personal use, but worth a note for other contributors on how to customize the author name.

No typos or grammar issues found in any of the 9 changed files.

information came from and check accuracy against primary sources.


Based on everything gathered, write the documentation changes:
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing Phase 3 header

The document has phases 1, 2, 2.5, then jumps directly to Phase 4. The draft documentation instructions starting here are effectively "Phase 3" but the section heading is absent, making the structure inconsistent and harder to follow.

Suggested change
Based on everything gathered, write the documentation changes:
### Phase 3: Draft Documentation
Based on everything gathered, write the documentation changes:

- **Suggested Scope**: What the doc-writer agent should focus on

If a notes file path was provided, also write a `.sources.md` file
alongside it (same directory, same name with `.sources.md` suffix)
Copy link
Contributor

Choose a reason for hiding this comment

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

Inconsistent sources file location

This agent writes a .sources.md file alongside the notes file (e.g., .claude/drafts/my-feature.sources.md), but notes-processor.md writes sources to .claude/tmp/sources/sources-<featurename>.md and the README's directory structure shows tmp/sources/ as the canonical location.

When doc-researcher is invoked directly (not through notes-processor), the output ends up in a different place. Consider aligning both to use .claude/tmp/sources/ so the directory structure section in README stays accurate.

- Search existing docs to find what needs updating
- Draft the documentation changes
- Apply changes to the repo
- Create a branch (`sam/<topic>`), commit, push, and open a PR
Copy link
Contributor

Choose a reason for hiding this comment

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

Hardcoded sam/ branch prefix

The branch prefix sam/<topic> is hardcoded in both the README (here and line 81) and in notes-processor.md. This is fine for personal use, but consider adding a note that other contributors should update the author name in notes-processor.md/branch-manager.md, or parametrize it with a config variable so the tooling is ready for team adoption.

@github-actions
Copy link

/trunk merge

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Auto-approved: Claude code review passed.

@trunk-staging-io
Copy link

trunk-staging-io bot commented Mar 12, 2026

🚫 This pull request was closed by @samgutentag, so it was removed from the merge queue. See more details here.

@samgutentag
Copy link
Member Author

Superseded by new PR from renamed branch sam-gutentag/write-docs-skill

@samgutentag samgutentag deleted the feat/claude-code-agents branch March 12, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant