chore(repo): untrack generated static/docs and restore its .gitignore rules (TE-22943) - #3320
Open
chaitanyas-maker wants to merge 1 commit into
Open
Conversation
… rules (TE-22943) The .gitignore block covering the auto-generated static/docs/ output kept its comment header but lost every one of its patterns, so 1,316 build artifacts were tracked in git. Because .gitignore does not affect files already in the index, restoring the patterns alone is a no-op; the generated files have to be untracked as well. The patterns were correct in d06a24f and were dismantled the same day: 5952ebd dropped the !SKILL.md negation and llms.txt, then 07ac7ff dropped /static/docs/*.md. Both look like the rule was deleted so a hand-written file it was excluding could be committed, instead of using git add -f. Impact before this change: from a clean tree, running only the generators that prestart/prebuild already run produced 74 modified files and +483/-221 lines with zero source edits. That churn leaked into unrelated docs PRs and caused avoidable conflicts. static/docs/SKILL.md and static/docs/OpenAPI.md are hand-written and have no docs/ source, so they stay tracked via negation entries. SKILL.md is served at /support/docs/SKILL.md (referenced from custom.js:456) and is an input to generate-skill-index.js, so losing it would break the skills index on a clean checkout. Nothing is removed from disk, only from the index. All deploy workflows run npm run build, whose prebuild hook regenerates static/docs before docusaurus build, so published output is unaffected. Verified by simulating a fresh clone: the generators recreated all 1,315 pages plus llms.txt, the skills index built, and git status stayed clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PNoANgSH6WwKYwRs1RnkbX
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
Part of TE-22943. Found while reviewing #3313, pre-existing and unrelated to it.
The
.gitignoreblock covering the auto-generatedstatic/docs/output kept its comment header but lost every one of its patterns, so 1,316 build artifacts are tracked in git and everynpm start/npm run buildrewrites them.Why the diff is large
.gitignoredoes not affect files already in the index, so restoring the patterns alone would be a no-op. The generated files have to be untracked too. Hence 1,314 deletions.Nothing is deleted from disk. This is
git rm --cachedonly, so every file stays in your working copy.How it broke
The patterns were correct in
d06a24f8and were dismantled the same day (2026-07-09):5952ebdd("gitignore updated") dropped the!/static/docs/SKILL.mdnegation and/static/docs/llms.txt07ac7fff("openapi md file") dropped/static/docs/*.mdBoth look like the rule was deleted so a hand-written file it was excluding could be committed, instead of using
git add -f. What survived is an orphaned comment ending in a comma, plus/static/.well-known/.Impact before this change
From a clean tree, running only the generators that
prestart/prebuildalready run:Starting the dev server with zero source edits produced 74 modified files. That churn leaked into unrelated docs PRs and caused avoidable conflicts.
Two files deliberately stay tracked
static/docs/SKILL.mdandstatic/docs/OpenAPI.mdare hand-written and have nodocs/source, so a blanket ignore would have destroyed them. They are kept via negation entries.SKILL.mdespecially: it is served at/support/docs/SKILL.md(referenced fromcustom.js:456) and is read as an input bygenerate-skill-index.jsto buildstatic/.well-known/skills/index.json. Losing it breaks the skills index on a clean checkout.I confirmed the split by resolving every
docs/page through the generator's ownresolveSlug()rather than by filename: of the 1,316 tracked files, 1,313 were generated, 1 wasllms.txt, and exactly those 2 are hand-written.Deploy safety
All three deploy workflows (
testmucom-prod-deployment.yml→testmuCom,testmucom-stage-deployment.yml→stage,prod-deployment.yml) runnpm install --legacy-peer-deps && npm run build. Theprebuildhook regeneratesstatic/docsbeforedocusaurus build, and the workflows syncbuild/, not the repo copy. Published output is unaffected.Verified by simulating a fresh clone (deleting everything untracked under
static/docs, leaving only what git restores):All pages regenerate, the skills index builds, and the tree stays clean.
Resulting
.gitignoreNote for reviewers
After merging, anyone with a local clone will see
static/docs/become untracked. Their files stay on disk; no action needed.One known follow-up, not addressed here:
generate-static-md.jswrites but never prunes, so a renamed or deleted docs page leaves a stale.mdthat is still advertised to AI agents viallms.txt. Currently harmless, worth a separate cleanup step.🤖 Generated with Claude Code
https://claude.ai/code/session_01PNoANgSH6WwKYwRs1RnkbX