You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The repo docs linked to a fleet-level ../AGENTS.md that lives outside every
published repository, so on GitHub those links 404 and the standard the code is
held to was invisible to anyone reading the code. The standard now lives in
this repo's AGENTS.md, and no doc links outside the repository.
AGENTS.md also states the commit convention, and CONFIG_DEFAULTS documents why
it is exported: nothing imports it but the parity test, and that export is the
seam the test needs.
**Logic and presentation are separate, always.** Extraction, analysis and
154
+
conversion modules compute and return data. They never call
155
+
`vscode.window.*`, never format a user-facing sentence, never decide whether a
156
+
notification is shown. `ui/` renders; `commands/` orchestrates. The test for
157
+
whether you got this right: a logic module should be unit-testable without the
158
+
`vscode` mock at all.
159
+
160
+
**Where a UI framework is involved, the same rule applies to the render.**
161
+
Compute above, return markup below. A render body holds no conditionals beyond
162
+
a trivial ternary, no data shaping, no derivation — those are named values or
163
+
functions above it. Anything else produces JSX no one can read, and it hides
164
+
the logic from the tests.
165
+
166
+
**Commands are thin.** A command reads config, calls logic, hands the result to
167
+
the UI layer, and handles failure. When a command file grows a parser or a
168
+
formatter, that code belongs in `extraction/` or `ui/`.
169
+
170
+
**No god files.** Past ~300 lines, a file is doing more than one job and wants
171
+
splitting along the seam that is already visible in its exports. `types.ts`
172
+
holds types only — no logic, ever.
173
+
174
+
**Separation of concerns, without ceremony.** One module per real concept, not
175
+
one per function. A `utils/` folder of single-line files is as unmaintainable
176
+
as a god file; both make you read the whole tree to understand one path.
177
+
178
+
**Define it once.** Duplicate regexes, duplicate `fullDocumentRange`,
179
+
duplicate "is this a supported scheme" checks — each has already shipped as a
180
+
bug in this family, because copies drift and only one copy gets fixed. When you
181
+
find yourself writing something that exists elsewhere, move it to a shared
182
+
module in the same commit.
183
+
184
+
### Comments
185
+
186
+
Comments explain **why**, never what. A comment restating the code is noise
187
+
that goes stale. A comment recording the reason a non-obvious choice was made —
188
+
the constraint, the bug it prevents, the API quirk it works around — is the
189
+
most valuable line in the file, and it is what keeps the next person from
190
+
"simplifying" it back into a defect.
191
+
192
+
---
67
193
68
194
## Invariants (things that were once broken — keep them true)
69
195
@@ -107,6 +233,13 @@ The pre-2.0 README carried hand-written test counts and throughput figures that
107
233
-**Branch safety:** a `main-safety` ruleset blocks deletion and force-push. Pushes to `main` are otherwise unrestricted by design.
108
234
- Secret scanning and push protection are enabled. `VSCE_PAT` and `OVSX_PAT` live in repo secrets and in Doppler (`extensions` / `prd`).
109
235
236
+
## Commits
237
+
238
+
Subjects use a conventional prefix — `feat:`, `fix:`, `docs:`, `test:`, `ci:`,
239
+
`build:`, `chore:`, `refactor:` — followed by an imperative summary. The body
240
+
says why the change was needed and what it prevents; a subject alone is rarely
241
+
enough to reconstruct a decision six months later.
242
+
110
243
## Release
111
244
112
245
1. Bump `version` in package.json and write the CHANGELOG entry. The entry must describe what actually changed, including bug fixes — it ships inside the VSIX and renders on the listing page.
0 commit comments