Skip to content

fix(template): ship the AI guides AGENTS.md points to, with an opt-out - #1432

Merged
iammukeshm merged 1 commit into
mainfrom
fix/template-ships-agent-files
Oct 9, 2026
Merged

iammukeshm merged 1 commit into
mainfrom
fix/template-ships-agent-files

Conversation

@iammukeshm

Copy link
Copy Markdown
Member

Closes #1428.

Problem

fsh new / dotnet new fsh excluded .agents/**, CLAUDE.md and GEMINI.md but kept AGENTS.md, so every scaffolded project shipped a guide pointing at files that didn't exist (and CONTRIBUTING.md linked a missing CLAUDE.md). The exclusions dated from April, before AGENTS.md became the canonical guide.

Fix

  • Template: new agents bool symbol (default true). .agents/**, CLAUDE.md and GEMINI.md leave the unconditional exclude list; an (!agents) modifier drops all four files together, like (!aspire) / (!frontend).
  • CLI: fsh new --no-agents passes --agents false; the summary shows an "AI guides" line.
  • Maintainer-only content: AGENTS.md had sections that are wrong in a user's project (branching and CI gates, the "update the fullstackhero docs repo" golden rule, the src/Tools/CLI row, which is excluded). They are wrapped in <!--#if (includeTools) --> … <!--#endif -->, which are invisible HTML comments on GitHub. A new SpecialCustomOperations entry for **/*.md makes the template engine process them, so scaffolded projects get a clean guide. includeTools is the existing "FSH repo only" flag.
  • Also stop shipping superpowers/ (internal specs, plans and audits, ~260 KB) and a worktree-style .git file.

Verified

Installed the template into an isolated hive (--debug:custom-hive) and scaffolded Acme.Shop both ways:

  • default: .agents/ (rules, skills, workflows), AGENTS.md, CLAUDE.md, GEMINI.md present; CLAUDE.md still imports @AGENTS.md; names replaced (Acme.Shop.Api, …); no Branching, docs-repo rule, src/Tools or <!--# markers left in AGENTS.md; no superpowers/.
  • --agents false: none of the four.

CI's scaffold jobs cover the build of both variants.

🤖 Generated with Claude Code

A project created with `fsh new` / `dotnet new fsh` included AGENTS.md but
not CLAUDE.md, GEMINI.md or .agents/, so the guide pointed at files that
did not exist (#1428). They now ship together by default; `--agents false`
(template) / `--no-agents` (CLI) leaves out all four.

AGENTS.md sections that only apply to this repo (branching/CI gates, the
docs-repo rule, the CLI location) are wrapped in `<!--#if (includeTools) -->`
via a new Markdown conditional operation, so scaffolded projects get a
guide without them. Also stop shipping superpowers/ (internal specs and
audits) and a worktree-style `.git` file.

Closes #1428

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@iammukeshm
iammukeshm merged commit 74fca8e into main Oct 9, 2026
17 checks passed
@iammukeshm
iammukeshm deleted the fix/template-ships-agent-files branch October 9, 2026 04:09
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.

CLI 'fsh new' output has AGENTS.md but not the files it points to (.agents/, CLAUDE.md, GEMINI.md)

1 participant