Skip to content

refactor(scripts): symlink-aware index generation with local override#370

Merged
notque merged 2 commits intomainfrom
refactor/symlink-aware-index
Apr 11, 2026
Merged

refactor(scripts): symlink-aware index generation with local override#370
notque merged 2 commits intomainfrom
refactor/symlink-aware-index

Conversation

@notque
Copy link
Copy Markdown
Owner

@notque notque commented Apr 11, 2026

What

Refactor generate-skill-index.py and related index generators to skip
symlinked directories by default. Add an opt-in --include-private flag
and a separate --output target so local workflows can maintain an
enriched index without committing it.

Why

The generators walk directory trees under skills/ and agents/ and
follow symlinks, so the tracked index files end up with entries for
symlinked directories that are not part of the public tree. The public
index should reflect the public tree.

Changes

  • scripts/generate-skill-index.py: skip symlinks by default, --include-private flag, --output flag
  • scripts/generate-agent-index.py: same filtering and CLI flags
  • scripts/routing-manifest.py: prefer skills/INDEX.local.json when present, fall back to skills/INDEX.json
  • Regenerate skills/INDEX.json, agents/INDEX.json, skills/do/references/routing-tables.md
  • .gitignore: add skills/INDEX.local.json, agents/INDEX.local.json
  • scripts/README.md: document local workflow
  • scripts/scan-negative-framing.py: generalize header comment
  • scripts/toolkit-evolution-cron.sh: instruct cron to use default mode
  • scripts/tests/test_generate_skill_index.py: new tests for default exclusion, flag override, output path, non-symlink preservation

Local workflow

```
python3 scripts/generate-skill-index.py --include-private --output skills/INDEX.local.json
python3 scripts/generate-agent-index.py --include-private --output agents/INDEX.local.json
```

The router prefers the local file when present, so local runs see all entries while the tracked index stays public.

Testing

  • New tests pass: 6 of 6
  • Full suite: all passing
  • Ruff check and format pass
  • Generator runs cleanly in default mode

notque added 2 commits April 11, 2026 08:50
The index generators walk skills/ and agents/ and follow symlinks, so
the tracked index files end up containing entries for symlinked
directories that are not part of the public tree. Refactor the
generator to skip symlinks by default and add an --include-private
flag for local workflows that want to see everything.

- generate-skill-index.py: skip symlinked directories by default
- Add --include-private flag to preserve prior behavior
- Add --output flag for writing to an alternate target
- generate-agent-index.py: same symlink filtering and CLI flags
- routing-manifest.py prefers skills/INDEX.local.json when present
- Regenerate skills/INDEX.json, agents/INDEX.json, and
  routing-tables.md to match the new generator behavior
- scripts/README.md: document local workflow with --include-private
- scan-negative-framing.py: generalize header comment
- toolkit-evolution-cron.sh: instruct cron to use default mode
- Tests for symlink exclusion, flag override, output path, and
  non-symlink preservation
@notque notque merged commit 9ddadda into main Apr 11, 2026
4 checks passed
@notque notque deleted the refactor/symlink-aware-index branch April 11, 2026 15:57
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.

1 participant