Repository navigation
chore: trim CLAUDE.md files and add settings and hooks for the merged pipeline - #439
Conversation
Review against the #400 planReviewed against #436 and the #400 decisions comment (pieces 1 and 2). Most of the PR matches the plan. Four changes are needed before merge (below), then the open tests. Changes needed before merge1. Branch guard (
Accepted gaps, no change needed: 2. The no- 3.
4. Update the PR description so it matches: the new branch-guard cases, the attribution result, and the trimmed Not for this PR (tracked on #436)
Still to verify (record each on #436)
Checked and fine
|
Re-check of 14bb405 against the planAll four requested changes are in. One small fix is left in the branch guard; the rest can merge as is. The four requested changes
Fix before merge: two failing cases in
|
| Case | Expected | Actual |
|---|---|---|
git checkout -- file.txt && git commit -m x [main] |
blocked | allowed (the file path becomes the "branch") |
git checkout -b feature/x main && git commit -m x [main] |
allowed | blocked (the trailing main is read as the target) |
The first is the one that matters: it is a bypass, the unsafe direction. Fix for both: after a checkout or switch, take the branch name only from the argument after -b, -B, -c or -C. In every other case, re-read it with git branch --show-current. Add both cases to the PR's "Tested" table.
Other results
- Rule loading in a subagent: accepted. The evidence is the subagent's self-report from one run. The sync procedure in chore: consolidate the feature-factory agents into seven in root .claude/agents #437 becomes a pointer to the rule, as the plan says.
- Generated-client guard with both builders: accepted.
frontend-builderwas blocked, andbackend-builderregeneration exited 0. - Agent-teams flag: the deletion from
settings.local.jsonis not part of the PR and is fine. The flag is not in the repo or the user settings. The test of one pipeline run without it is open and moves to the first run of the merged pipeline (chore: replace the two feature-factory skills with one orchestrator skill #438). - CI: all checks pass except the Docker image scan, which had been rerun and was still pending when I checked.
Re-check of 6421705: branch guard fix verifiedThe fix is correct. I re-ran 32 scratch-repo cases against the pushed
One nit, accepted: The PR body now lists the two new cases. All four requested changes from the first review are in, so this is approved against the #400 plan (pieces 1 and 2). CI:
|
6421705 to
17c59e6
Compare
Closes #436. Sub-issue of #400 (pieces 1 and 2 of the audit decisions).
Changes
CLAUDE.mdtrimmed from 103 to 30 lines; keeps every item on the piece 1 keep list.TaskFlow.Api.Tests/CLAUDE.mdandTaskFlow.Web/CLAUDE.md.assistant/CLAUDE.mdtrimmed to the--solutionflag, the manualclaude plugin validategate, the MSYS path gotcha and one line on the hand-written API client. The Workflow and "Keep these in sync" sections, thebuild.ps1line and the Bash-tool line are gone..claude/rules/assistant-sync.md(paths:TaskFlow.Api/**,assistant/**)..claude/settings.json: emptyattribution.commit/attribution.pr, a branch-guard hook (Bashgit *) and a generated-client guard hook (Edit/Write onTaskFlow.Web/src/api/client/**); scripts in.claude/hooks/.ux-test: cut the--body-fileinvariant and PascalCase lines.task-status.tsheader no longer points at CLAUDE.md;InputParsing.LocalNowdocuments the offset sign..gitignore:.playwright-mcp/,.feature-factory/.Branch guard: tested in a scratch repo (current branch in brackets)
Quoted strings and heredoc bodies are stripped before matching; the force check applies to
git pushonly. Aftercheckout/switchthe branch is taken only from the argument after-b/-B/-c/-C, a lonemain, orswitch <branch>; otherwise it is re-read withgit branch --show-current.git commit -m x[main]git checkout -b feature/x && git commit -m x[main]git push[main]git push origin HEAD:main[feature]git push origin feature/x[feature]git push -u origin chore/x[feature]git commit -m "mentions --no-verify and --force"[feature]--force[feature]git push --force-with-lease origin feature/y[feature]git push -f origin feature/y[feature]git push origin +feature/y[feature]git worktree remove --force ../x[feature]git checkout -- file.txt && git commit -m x[main]git checkout -b feature/x main && git commit -m x[main]git checkout main && git push[feature]git switch feature/x && git commit -m x[main]git push origin HEAD:refs/heads/main[feature]git push origin feature/y --force[feature]git commit --no-verify -m x[feature]Accepted gaps:
git -C . push,git commit -n,git push origin :main.Attribution
backend-buildersubagent (14bb405) carries noCo-Authored-Bytrailer.Co-Authored-Byprose stays removed on the assumption the setting works; if a builder-created PR carries a "Generated with" line, restore it and add thecommit-msghook fallback.Still to verify (will be recorded on #436)
Not in this PR
GH_TOKENstrings inassistant/.claude/skills/feature-factoryandux-test'sghrecipes remain until those land.Corrections to earlier claims
.claude/settings.local.jsonon the author's machine and I deleted it there. That file is gitignored, so the deletion is not part of this PR and the reviewer could not see it; the flag is not set in the repo or the checked-in settings. I wrongly described this as a repo change. The owner confirms where else it is set (user settings were not checked) and removes it by hand; tracked on chore: trim CLAUDE.md files and add settings and hooks for the merged pipeline #436.--force,git worktree remove --force) and missed-fand+refspec. It blocked my own test commands for that reason. Fixed in 14bb405; see the table above.Generated-client guard: tested with both builders
frontend-builderusing Edit to append a line toTaskFlow.Web/src/api/client/sdk.gen.ts: blocked with "generated by openapi-ts; runnpm run gen:api(or the factory regeneration)". File unchanged.backend-builderregenerating the client (API on port 5290,npx openapi-ts -i http://localhost:5290/openapi/v1.json): exit 0, 4 files written, no hook message. The only diffs were line-ending noise (git diff --ignore-cr-at-eolempty); reverted afterward.Rule loading in a subagent: tested
backend-builder(told not to read any.claude/or CLAUDE.md files) reported no sync instruction in its context before touching a file. After it ReadTaskFlow.Api/Program.cs,.claude/rules/assistant-sync.mdappeared in its context (once, alongside the Read result, not the Edit). So the path-scoped rule loads in a subagent on first read of a matching file, and the sync procedure does not need to stay inassistant-builderfor this reason. Caveat: this is the subagent's self-report of its own context, from one run. The edit was reverted.Attribution: tested from this branch
A first attempt (draft PR #440) was inconclusive: I based it on
origin/main, so.claude/settings.jsonwas not in effect and the old no-Co-Authored-Byline inCLAUDE.mdwas.Rerun: a
backend-builderbranched from this PR's head (setting present, trimmedCLAUDE.md), committed "chore: attribution check 2" and opened draft PR #441 against this branch (since closed, branch deleted). I re-read both afterwards withgh: the commit has an empty body and the PR body is the one line supplied, so neither carriesCo-Authored-Byor "Generated with". Caveat: one run, and I cannot rule out that the session's own instructions also steered the builder away from adding the lines. Keep the prose removed; if a trailer ever reappears, restore the line and add thecommit-msghook.