Skip to content

Commit db81bb1

Browse files
authored
Create codex /init (#789)
1 parent 405043c commit db81bb1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

AGENTS.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `docs/` — MkDocs source for the public documentation. Edit Markdown here.
5+
- `mkdocs.yml` — site configuration (nav, theme, plugins).
6+
- `plugins/filters/<FilterName>/` — gitStream filter plugins: `index.js`, `README.md`, optional `reference.md`, and example `.cm` files.
7+
- `assets/` — shared images and downloadable assets used by the docs.
8+
- `automations/` — pointers and examples that reference the docs library.
9+
- `site/` — generated output from MkDocs. Do not edit by hand.
10+
- `.venv/`, `.python-version`, `requirements.txt` — local Python environment for docs.
11+
12+
## Build, Test, and Development Commands
13+
- Create env: `python -m venv .venv && . ./.venv/bin/activate`
14+
- Install deps: `pip install -r requirements.txt`
15+
- Run docs live: `mkdocs serve` (http://127.0.0.1:8000)
16+
- Build docs: `mkdocs build --strict` (fails on broken links/config)
17+
- Smoke‑test a filter: `node plugins/filters/<FilterName>/index.js` (many files include `console.assert` samples)
18+
19+
## Coding Style & Naming Conventions
20+
- Markdown: concise headings, relative links, fenced code blocks; prefer images under `assets/`.
21+
- JavaScript filters: CommonJS (`module.exports`), semicolons, 2‑space indent, small pure functions; keep file names `index.js` inside `plugins/filters/<FilterName>/`.
22+
- CM examples: use snake_case for filenames (e.g., `compare_semver.cm`), two‑space indentation in YAML‑like blocks.
23+
- Filenames/paths referenced in docs must match the repo layout exactly.
24+
25+
## Testing Guidelines
26+
- Docs: run `mkdocs build --strict` before pushing; fix warnings and link errors.
27+
- Filters: include minimal `console.assert(...)` cases at the bottom of `index.js`; run with Node installed.
28+
- When adding new examples, validate they render in the docs and copy correctly under `docs/downloads/` if intended for download.
29+
30+
## Commit & Pull Request Guidelines
31+
- Commit messages: imperative mood, clear scope, and short subject (e.g., `Fix hyphen in code_experts command (#788)`).
32+
- PRs must include: purpose, screenshots for visual changes, and links to related issues/discussions.
33+
- Keep changes focused; update or add examples/snippets when plugin behavior changes.
34+
- Do not commit secrets; redact tokens in code and `.cm` examples (use placeholders like `${JIRA_TOKEN}`).

0 commit comments

Comments
 (0)