feat: smarter weekly snippets - Claude summaries and prettier formatting - #94
Merged
Conversation
Wrap authored and reviewed PRs under '## Activity' with '### Authored' and '### Reviewed' subheadings. Repos become bold bullets with PRs nested under them, replacing the previous per-repo h2 headings and ensuring authored/reviewed share the same shape. Also guarantee a blank line between an entry's '---' separator and the next heading when prepending to a snippets file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wire buildbuddy-io/rules_claude into the generator so it produces hand-written-style summary sections (## Glydways, ## Open Source) above the activity block. The summary pass runs after gh+jq has assembled the activity Markdown and feeds that activity, along with a static prompt, to claude -p; if Claude errors or --no_summary is passed, the script falls back to an activity-only entry. Tests pass --no_summary so they don't depend on Claude auth at test time. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bring prettier into the Bazel workspace via aspect_rules_js + aspect_rules_lint and a pnpm-managed package.json that pins prettier@3.8.3. Expose it as a runnable //:prettier target via npm_link_all_packages and the package's bin macro, then wire it into the generator as a runfile so the script invokes 'prettier --print-width 100 --prose-wrap always --write' on the year file after prepending the new entry. BAZEL_BINDIR=. is set because the js_binary launcher runs outside a Bazel action. A --no_format flag short-circuits the prettier pass. The Claude summary prompt loses its wrap instructions now that prettier handles line wrapping. Test coverage gains two assertions: the create-file sub-test verifies prettier ran (blank line between '### Authored' and the first bullet), and a new --no_format sub-test verifies prettier was skipped. The test sh_test gets matching env / toolchains entries so the script's CLAUDE_BIN and PRETTIER_BIN_RUNFILE references resolve when the .sh is invoked directly. node_modules/ is gitignored. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
##while authored/reviewed PRs move under a single## Activityblock with### Authoredand### Reviewedsubsections (bold-bullet repo labels with nested PR links).buildbuddy-io/rules_claude(use_latest) into the generator: after the gh+jq activity pass, the script feeds the activity Markdown toclaude -pand slots its## Glydways/## Open Sourceoutput above the activity. Graceful fallback to activity-only when Claude errors or--no_summaryis passed.aspect_rules_js+aspect_rules_lint+ pnpm-managedpackage.json(prettier@3.8.3); the generator runsprettier --print-width 100 --prose-wrap always --writeon the year file after prepending the new entry, so Claude's summaries are wrapped consistently.--no_formatskips it.Test plan
bazel test //...— all 24 tests pass.### Authoredand the first bullet).--no_formatskips prettier (no blank line in that case).🤖 Generated with Claude Code