project-documentation
Documentation standards for code, README, API docs, and changelog for la-briguade
- License 许可
- MIT
- 最近更新
- 2026-09-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- project-documentation
- agents
- [ "coder" ]
- description
- Documentation standards for code, README, API docs, and changelog for la-briguade
03 SKILL.md 正文
Scope
- In scope: TSDoc/API contracts, README structure, changelog hygiene, and content-file documentation standards used by this repository.
- Out of scope: runtime behavior changes and build/tooling policies not tied to documentation.
Invariants
- Exported APIs MUST have accurate TSDoc describing parameters, returns, and failure modes.
- Documentation MUST reflect current behavior; stale guidance is treated as a defect.
- README sections MUST preserve the agreed ordering unless explicitly revised project-wide.
- Changelog entries MUST use Keep a Changelog categories.
- Comments in code MUST explain non-obvious rationale, not restate implementation.
Validation Checklist
- Verify updated public APIs include matching TSDoc.
- Verify README tables/sections still match current agents, skills, commands, and hooks.
- Verify changelog entries are categorized correctly (
Added/Changed/Fixed/...). - Verify content docs do not reference deprecated paths as canonical.
Failure Handling
- If documentation and code conflict, update docs in the same change before completion.
- If required release notes are missing, block release workflow until changelog is updated.
- If canonical path references are ambiguous, resolve to a single canonical source and note mirrors as optional.
Code Documentation
- Use TSDoc for all exported functions and types:
/** * Parse YAML frontmatter from a markdown string. * * @param content - Raw markdown file content * @returns Parsed frontmatter attributes and remaining body */ export function parseFrontmatter(content: string): ParsedFrontmatter { ... } - TSDoc tags to use:
@param,@returns,@throws,@example,@remarks - Inline comments: only for non-obvious why decisions — workarounds, invariants, business rules
- Good:
// Skip the opening "---" line/// Invariant: HEAD_SIZE + TAIL_SIZE ≤ TRUNCATION_THRESHOLD - Bad:
// increment i/// return result
- Good:
- Document all exported symbols from
src/index.tsand any module re-exporting them - Internal helpers: document only if their behavior is surprising or non-obvious
- Do NOT leave commented-out code in any committed file
README Format
Sections in this order (keep consistent with existing README.md):
- Description — one-line summary + brief paragraph
- Installation —
npm install la-briguade+npx la-briguade install - Usage — how the plugin integrates with opencode
- Agents table — name, type (primary/subagent), purpose
- Skills table — name, purpose
- Commands table — slash command, purpose
- Hooks — list hooks and what they do
- CLI —
install,uninstall,doctorcommands - Custom Content — how to add custom agents/skills/commands
- Requirements — Node ≥22, peer dependency
Keep README accurate with every release. The README is the primary consumer-facing documentation.
API Documentation
src/index.tsexports the defaultPlugin— document it with a full TSDoc block including@example- Content
.mdfiles (content/agents/*.md,content/skills/*/SKILL.md,content/commands/*.md) serve as their own "API documentation" via their YAML frontmatter - Frontmatter field documentation lives as comments in the relevant
register*.tssource file and must stay aligned with parser behavior. - No dedicated API doc site needed at current scale
Changelog
- Follow Keep a Changelog format: https://keepachangelog.com/
- File:
CHANGELOG.mdat repo root - Structure:
## [Unreleased] ### Added ### Changed ### Fixed ## [0.1.0] - 2026-01-01 ### Added - Initial release... - Categories: Added, Changed, Fixed, Removed, Security, Deprecated
- Create before the first public
npm publish
Content File Documentation
Each agent .md file in content/agents/ should:
- Have frontmatter with metadata keys actually consumed by
src/plugin/agents.ts(for exampledescription,mode,model,temperature,top_p,maxSteps,disable,variant,permission) - Avoid undocumented keys; unknown keys are ignored by registration and must not be treated as contract
- Have a body describing the agent's identity, mission, and key capabilities
- Keep the body concise — it is injected into the model system prompt at runtime
Each skill SKILL.md file should:
- Have frontmatter with
name,description, andagentsfor project auto-inject skills - Use optional frontmatter blocks (
mcp,permission,detect) only when the skill requires those behaviors - Open with a one-paragraph summary of what the skill covers
- Use
##sections for major topic areas - Keep content actionable — the AI reads this at task time, not for background reading
04 同仓库更多 Skills
unslop
Perform sequential slop-cleanup edits in bounded changed-file scope with behavior-preserving rules; do not use for read-only scanning.
unslop-reviewer
Run a read-only, pass-ordered slop scan covering abstraction and locally fixable boundary findings; never edit files.
unslop-coder
Apply unslop-reviewer findings as targeted in-scope code edits in pass order; do not run discovery/scanning in this skill.
serena
Semantic code retrieval, editing, refactoring and debugging tools using LSP servers
read-image
guidance to read images in a lightweight fashion using cwebp
playwright-cli
Drive browser UI checks with playwright-cli commands, snapshots, and test/debug workflows; do not use for backend-only or non-browser tasks.