Skip to content

Feat/hooks llm.txt#1399

Open
soheimam wants to merge 6 commits intomasterfrom
feat/hooks-llm.txt
Open

Feat/hooks llm.txt#1399
soheimam wants to merge 6 commits intomasterfrom
feat/hooks-llm.txt

Conversation

@soheimam
Copy link
Copy Markdown
Collaborator

@soheimam soheimam commented May 7, 2026

added new hook for llm.txt and llm-full.txt

soheimam and others added 4 commits May 7, 2026 14:00
Adds scripts/llms.js generator (strict llmstxt.org spec for docs/llms.txt,
spec-aligned + preserved hand-written extras for docs/llms-full.txt). Extends
githooks/post-commit so commits whose message mentions agents.md or llms.txt
re-run the matching generator and create a follow-up chore commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented May 7, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 7, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
base 🟢 Ready View Preview May 7, 2026, 12:36 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

soheimam added 2 commits May 7, 2026 20:54
…st-merge

Addresses 8 review points:
  1. Auto-detect structural docs/ A/D/R changes (opt-out via [skip-docs])
  2. SKIP_DOCS_HOOK=1 escape hatch for one-off bypass
  3. Diff check anchored to HEAD (immune to pre-staged generated files)
  4. Visible "[docs] ..." line on success (no DEBUG mode required)
  5. --no-verify rationale documented at the call site
  6. New post-merge hook warns on structural docs changes (no auto-mod)
  7. Repo-scoped install.sh using git config --local (never --global)
  8. Auto-commit subject includes (post-commit of <short-sha>) for traceability
The hook logic stays the same; trigger keyword + script + outputs now come
from a JSON config so devs can wire their own custom commands without
editing shell. New files:

  githooks/config.json — committed defaults (the two existing generators)
  githooks/_lib.sh     — shared loader, sourced by both hooks; reads via
                          jq with a safe fallback to built-in defaults if
                          jq or config is missing/malformed

Refactor:
  post-commit: loops over configured generators; auto-commit subject lists
               actual changed files instead of a hardcoded label
  post-merge:  exclusion regex + warning text built from config, so adding
               a generator extends both automatically
  install.sh:  warns once at install time if jq isn't installed

Tested end-to-end: trigger / skip / no-trigger paths all behave correctly,
plus a custom-trigger entry was verified to fire its own generator without
touching the others.
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.

2 participants