documents
Lyngon conventions for a repository's steering documents (INTENT.md, .claude/CLAUDE.md, the rule files under .claude/rules/, CONCEPTS.md) and for README.md, at the root and in packages. Invoke before writing or editing one of them.
- License 许可
- Apache-2.0
- 所属仓库
- lyngon/devkit
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- documents
- paths
- [ "**/INTENT.md", "**/CONCEPTS.md", "**/README.md", "**/.claude/CLAUDE.md", ".claude/rules/*.md" ]
- description
- Lyngon conventions for a repository's steering documents (INTENT.md, .claude/CLAUDE.md, the rule files under .claude/rules/, CONCEPTS.md) and for README.md, at the root and in packages. Invoke before writing or editing one of them.
- user-invocable
- false
02 资源文件 1
- 参考文档CONCEPTS-FORMAT.md37 B
03 SKILL.md 正文
Steering documents
A steering document states what the code cannot show, and an agent must follow it. One test decides whether any text enters one:
Write it down only when a competent agent, seeing just the files it opened, would plausibly contradict it, wrongly, with nothing failing. When a check can fail instead, write the check.
| Path | Holds | Loaded |
|---|---|---|
INTENT.md |
Product, audiences, done, failure, non-goals, priorities, horizon; in a package, only the sections that differ from the root's | Through the agent file beside it: at the root every session, in a package when an agent works on a file of the package |
.claude/CLAUDE.md, the agent file |
Only imports of the Markdown files directly in its directory, @../INTENT.md among them |
At the root every session; in a package when an agent reads, writes or edits a file of the package |
.claude/rules/<name>.md |
One repository principle, or one rule that has no check yet | At launch without paths:, otherwise when a matching file is read or edited |
CONCEPTS.md |
Terms | On demand, unless the agent file of its directory imports it |
docs/decisions/<name>.md |
One decision record | On demand, and through discover:why |
Rules
- No
AGENTS.mdexists anywhere, and aCLAUDE.mdexists only directly in a.claude/directory, at the repository root or in a package. - An agent file holds only lines of the form
@../<name>.md, each naming a tracked Markdown file directly in the directory that holds its.claude/, such asINTENT.md,CONCEPTS.mdorREADME.md. - Every agent file holds the line
@../INTENT.md. Other imports are allowed, and nothing writes one by default. - An agent file holds no free text, at the root either. A principle goes into a rule file under
.claude/rules/, withpaths:when it concerns part of the tree. - The organization's principles are in no repository. They come from the
principlesplugin, which the agent reads throughprinciples:index, and are never copied in. README.mdis not a steering document. It says how to use the repository and links toINTENT.mdinstead of repeating it.- A rule file is named after its principle in kebab-case. It holds that name as its heading, the statement in one or two sentences, then one sentence starting
Why:. It carries apaths:field whenever the principle concerns part of the tree, such as one package. - A rule file with
paths:imports nothing with@, because Claude Code loads an imported file at launch whateverpaths:say. INTENT.mdhas the sections Product, For whom, Done means, Failure means, Non-goals and Horizon, stays within 50 lines, and changes only when the purpose changes.INTENT.mdmay have one more section,## Priorities, between## Non-goalsand## Horizon, with each line of the form "X over Y". A line enters only after an owner answered a real question from an agent, so the section starts absent.CONCEPTS.mdfollows CONCEPTS-FORMAT.md, and a decision record follows thedecision-recordconventions.- A repository-specific convention too long for a rule file goes to
docs/conventions/<topic>.md, and the message of its check or a rule file points there.
Package documents
A package gets an INTENT.md only when it has its own audience, its own done or failure, or its own non-goals that the root does not state.
That file uses the root's section names and holds only the sections that differ, and the package's README.md links to it.
A package with its own INTENT.md holds .claude/CLAUDE.md, with the line @../INTENT.md, and no other package holds an agent file.
Claude Code loads the agent file and the intent it imports when an agent reads, writes or edits a file of the package, and a session that works on no file of the package does not carry them.
An agent that changes the package only through the shell, or searches it only with Grep and Glob, does not load them.
A package with a CONCEPTS.md and no INTENT.md gets no agent file, and its glossary stays on demand.
Checks
Checked by the validate-documents, markdownlint and prose-lint hooks.
With the Lyngon structure
validate-structure checks that every app and library has a README.md.
04 同仓库更多 Skills
unslop
Remove AI writing patterns from prose and give it a voice. Use whenever writing or editing non-code text (docs, READMEs, decision records, posts, commit messages, PR descriptions), before handing it over, and on request: "unslop", "humanize", "make this sound human", "clean up this writing", "edit for voice", "de-AI this text".
technical
Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use before writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages, every time, however small the document.
simpler
Restate the last message in plain human language, with no jargon. Use when the reader did not follow the last message and says so: "bro", "say that simpler", "in plain words", "no jargon".
init
Set up a fresh repository, or adopt an existing one, to Lyngon conventions. Interviews the owner relentlessly about purpose, failure modes, audiences, stack and constraints, then writes INTENT.md, .claude/CLAUDE.md, README.md, CONCEPTS.md, decision records, devenv, git hooks, CI and every package in the kind-first Lyngon layout. User-invoked only.
add-package
Create a package in a Lyngon repository in the directory its kind decides (apps/, libs/, contracts/, tools/, infra/), with README.md, devenv.nix and the layer lint, and register it in its workspace and devenv. Use whenever a new app, service, CLI, library, adapter, contract, schema, tool, infra module or environment is needed, including when one feature needs several packages. Never create a package by hand.
index
The index of Lyngon's principles, one line per principle saying when it applies and what it demands, each with a file under references/. Invoke before work that takes judgment, such as a design choice, a refactor, a bug fix, a test, a measurement, a script, a document or a question to the owner; then read the file of each principle that applies.