novel-writer
Copilot instructions959 starsChanged 13 months agoMITView on GitHub
This repository is an AI-first CLI tool and template collection for creating Chinese novels using a Spec-Driven Development (SDD) workflow. Key components: Keep instructions short and concrete: reference the exact file and function you changed and prefer small, self-contained edits. Files to check when changes affect agent commands or templates: - scripts/build/generate-commands.sh — generator used by npm run build:commands. - templates/ and dist/<agent>/ — where generated templates and command files live. - Use the actual CLI executable name as the…
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,336 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
13 rules. About 0 are common, 2 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Keep instructions short and concrete: reference the exact file and function you changed and prefer small, self-contained edits.
- Very specific: line 23
If an init action warns that a dist artifact is missing, run npm run build:commands and re-run the command.
- Very specific: line 31
Use the actual CLI executable name as the agent key (e.g., cursor-agent, not cursor).
- Very specific: line 36
When adding files to dist/ for an agent, update scripts/*/update-agent-context.(sh|ps1) and …
- Very specific: line 40
Update agent metadata in the single source of truth (AGENT_CONFIG in spec-kit implementation).
- Very specific: line 41
Update src/cli.ts help text (the --ai option) and any switch that creates AI directories.
- Very specific: line 42
Add generation support in scripts/build/generate-commands.sh (and release packaging scripts).
- Very specific: line 43
Add or update templates in templates/ and run npm run build:commands.
- Very specific: line 44
Update other/spec-kit/scripts/* (bash + PowerShell) that collect agent context files for README/CLAUDE/Copilot docs.
- Very specific: line 49
If you change how an agent is referenced, search src/cli.ts for the sourceMap and the switch(options.ai) branch that maps --ai values to …
- Very specific: line 50
If adding CLI detection or validation for a new agent, follow the requires_cli pattern described in other/spec-kit/AGENTS.md and update the …
- Very specific: line 55
Prefer modifying templates/ and running the generator instead of hand-editing dist/ files.
- Distinctive: line 65
If anything in this instruction page is unclear or you want more examples (for example: a sample TOML command converted from a Markdown …
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Quick context for AI coding agents
This repository is an AI-first CLI tool and template collection for creating Chinese novels using a Spec-Driven Development (SDD) workflow. Key components:
src/cli.ts— primary CLI entry (commands:init,upgrade, etc.). Look here for how projects are bootstrapped and how AI agent types map to filesystem layout.package.json— build/dev scripts.npm run buildcompiles TypeScript;npm run build:commandsgenerates per-agent command files from templates.dist/*— build artifacts containing pre-generated agent command sets (copied into user projects byinit)..specify/,spec/,stories/— runtime project layout produced bynovel init.other/spec-kit/AGENTS.md— long-form guidance and agent conventions; use it as authoritative reference when adding new agents.
Keep instructions short and concrete: reference the exact file and function you changed and prefer small, self-contained edits.
High-level architecture notes
- The CLI bootstraps a project by copying built artifacts from the package root (
dist/<agent>) into the target project and creating.specify/*scaffolding (src/cli.ts, copy logic aroundsourceMap). - Agent configuration is agent-centric: directories like
.claude/commands,.gemini/commands,.cursor/commandsare created and populated duringnovel init. - Agent metadata and behavioral decisions are centered in the Spec Kit patterns documented in
other/spec-kit/AGENTS.md. When adding agents, prefer updatingAGENT_CONFIG(in the spec-kit implementation) and thescripts/*update tooling.
Common developer workflows (how to run / build / test)
- Local development:
npm run dev(runstsx src/cli.ts) — fast way to iterate on CLI behavior without building. - Build:
npm run build(TypeScript ->dist/), thennpm run build:commandsto regenerate per-agent command files.prepareandprepublishOnlycall both. - If an
initaction warns that a dist artifact is missing, runnpm run build:commandsand re-run the command.
Files to check when changes affect agent commands or templates:
scripts/build/generate-commands.sh— generator used bynpm run build:commands.templates/anddist/<agent>/— where generated templates and command files live.
Project-specific conventions and gotchas (do not invent)
- Use the actual CLI executable name as the agent key (e.g.,
cursor-agent, notcursor). This is enforced across scripts and the tool-checking logic (other/spec-kit/AGENTS.md). - Command formats differ per agent:
- Markdown prompts (Claude, Cursor, opencode):
$ARGUMENTS,{SCRIPT}placeholders. - TOML prompts (Gemini, Qwen):
{{args}}placeholders andpromptkeys. Seeother/spec-kit/AGENTS.mdfor exact examples andsrc/cli.tshelpersgenerateMarkdownCommand/generateTomlCommand.
- Markdown prompts (Claude, Cursor, opencode):
- When adding files to
dist/for an agent, updatescripts/*/update-agent-context.(sh|ps1)and.github/workflows/scripts/create-release-packages.shto include the agent packaging case.
What to change when adding or updating an agent
- Update agent metadata in the single source of truth (AGENT_CONFIG in spec-kit implementation).
- Update
src/cli.tshelp text (the--aioption) and anyswitchthat creates AI directories. - Add generation support in
scripts/build/generate-commands.sh(and release packaging scripts). - Add or update templates in
templates/and runnpm run build:commands. - Update
other/spec-kit/scripts/*(bash + PowerShell) that collect agent context files for README/CLAUDE/Copilot docs.
Examples (explicit references)
- To regenerate commands after editing a template: run
npm run build:commands. If a CLIinitcannot finddist/<agent>, this is usually the fix. - If you change how an agent is referenced, search
src/cli.tsfor thesourceMapand theswitch(options.ai)branch that maps--aivalues to directories. - If adding CLI detection or validation for a new agent, follow the
requires_clipattern described inother/spec-kit/AGENTS.mdand update the scriptsscripts/bash/update-agent-context.shandscripts/powershell/update-agent-context.ps1.
Safety and style
- Small, focused patches are preferred. When editing templates, preserve frontmatter and
{SCRIPT}placeholders used by the generators. - Prefer modifying
templates/and running the generator instead of hand-editingdist/files.
Quick file map (start here)
src/cli.ts— CLI behavior and project bootstrapsrc/ai-interface.ts— AI-facing APIs and method-selection logicscripts/build/generate-commands.sh— command generator used in CI and local buildsother/spec-kit/AGENTS.md— agent conventions and integration steps (authoritative)package.json— build/dev scripts (dev,build,build:commands,prepare)
If anything in this instruction page is unclear or you want more examples (for example: a sample TOML command converted from a Markdown command in this codebase), tell me which area to expand and I will iterate.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

