clhbid/agent-context

writing-lean

Lean writing and fluent code.

ソースを見る
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Writing lean

The code and its specs are the first source of truth: a reader new to the project should learn it by reading them. Writing is lean when it carries only what they cannot say.

  • Code first. Reach for a clearer name, a smaller function or a sharper spec before a longer

explanation.

  • One word per idea. Use the project's term for a concept, from GLOSSARY.md or the code, every

time; a synonym reads as a second concept.

  • Say what to do. State the target ("one-line comments"), not the ban; a prohibition earns its

place only as a hard guardrail, paired with what to do instead.

  • Once, where it bites. Each fact has a single source of truth, below; anywhere else, link

to it.

  • History goes to the story. What was weighed and what was rejected belong in the issue, pull

request or commit, where the discussion and the diff sit beside them and git blame leads back.

The deletion test is the bar for every sentence you write or touch: delete it and ask what a competent reader loses. If nothing, the code already said it, and it stays deleted.

Where it goes

ChannelIts one job
CodeFluent: concise function and variable names that say what it does
Code commentA constraint, trap, citation or non-obvious why, at the line it bites
Doc commentWhat the member is for, in one sentence
READMEThe common path: what it is, how to use it, where to go next
Repo docsA decision or context the code cannot show
IssueWhat's wanted and why, in the issue form's fields
Agent briefThe contract: behaviour, acceptance criteria, scope
Pull requestWhat changed and why, linked to its issue
Commit messageWhat changed, and why when the diff cannot show it
Review commentOne finding and its fix
Thread commentThe new fact or decision, linked to what it answers
Skill, AGENTS.mdHow an agent does the work: the steps and the reference behind them

Links from code

Cite an issue in code only when it changes how the code may be modified later: a workaround to remove when clhbid/api#123 ships, or a constraint an open decision still holds. Otherwise git blame leads to the pull request and its issue.

同じリポジトリから

関連する Skills

すべての Skills