Skip to content

Commit 3068db7

Browse files
committed
chore: doc writing rules for the agents
1 parent c7f875f commit 3068db7

2 files changed

Lines changed: 36 additions & 17 deletions

File tree

AGENTS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,16 @@ Use the `.agent/skills/add-integration-test` skill while creating new tests.
288288
- **Safety**: `#![forbid(unsafe_code)]` in all crates
289289
- **Release profile**: `opt-level = "z"`, LTO enabled, symbol stripping (optimized for embedded)
290290

291+
## Markdown style
292+
293+
When writing or editing Markdown documents, use [semantic line breaks](https://sembr.org/):
294+
start a new line after each sentence, and optionally break long sentences
295+
at clause boundaries (after commas, semicolons, colons, or dashes).
296+
297+
When editing existing documents that don't use semantic line breaks,
298+
apply them only to the lines you add or modify.
299+
Do not reformat the rest of the document.
300+
291301
## Troubleshooting
292302

293303
### Build Issues

openspec/config.yaml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
schema: spec-driven
22

3-
# Project context (optional)
4-
# This is shown to AI when creating artifacts.
5-
# Add your tech stack, conventions, style guides, domain knowledge, etc.
6-
# Example:
7-
# context: |
8-
# Tech stack: TypeScript, React, Node.js
9-
# We use conventional commits
10-
# Domain: e-commerce platform
3+
context: |
4+
Writing style (all artifacts): plain, direct English.
5+
Clear, complete sentences. Prefer concise, but never at the cost of ambiguity.
6+
Bullets for lists of items; short paragraphs for explanations and context.
7+
No hedging or filler.
8+
Avoid restating well known MQTT and thin-edge concepts.
9+
State each decision and its reason. Skip elaboration unless a reader would
10+
need to infer a non-obvious connection.
11+
Never let terseness introduce ambiguity about scope — if a phrase could be
12+
read two ways, spell out which reading is meant.
1113
12-
# Per-artifact rules (optional)
13-
# Add custom rules for specific artifacts.
14-
# Example:
15-
# rules:
16-
# proposal:
17-
# - Keep proposals under 500 words
18-
# - Always include a "Non-goals" section
19-
# tasks:
20-
# - Break tasks into chunks of max 2 hours
14+
rules:
15+
proposal:
16+
- After "Why", add a "Proposed solution" section that introduces the feature from the
17+
user's point of view with short usage examples —before any internal mechanism.
18+
- In "What Changes", lead with what the feature introduces —
19+
what a user or consumer would interact with —
20+
before stating its properties or constraints (opt-in, security model,
21+
correctness guarantees).
22+
Don't qualify something the reader hasn't met yet.
23+
design:
24+
- Do not restate the problem or motivation — that lives in the proposal. Link the
25+
proposal instead of repeating its "Why".
26+
- "Open with a brief Context: name the problem being solved (one sentence, link the
27+
proposal for detail) and the constraints that shape the design decisions."
28+
- Assume a reader who already knows the problem and the user-facing surface.
29+
Spend the words on how it is built and why this design over the alternatives.

0 commit comments

Comments
 (0)