Skip to content

Commit 7fdaeed

Browse files
authored
docs: replace hardcoded content with source references (#88)
* docs: remove hardcoded versions and counts, point to source files CLAUDE.md: replace command table, ADR list, and pinned versions with references to src/commands/, .archgate/adrs/, and .prototools. README.md: remove commands table and CI section, defer to docs site. Homepage (en + pt-br): replace "Six ADRs" with open-ended text and link to the ADRs directory on GitHub. * docs: regenerate llms-full.txt
1 parent 3975be4 commit 7fdaeed

5 files changed

Lines changed: 15 additions & 67 deletions

File tree

CLAUDE.md

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,7 @@ bun run commit # conventional commit wizard
3131

3232
### Commands
3333

34-
Entry point: `src/cli.ts` (shebang `#!/usr/bin/env bun`). Commands registered via `register*Command(program)`.
35-
36-
| Command | File | Description |
37-
| ----------------------------- | ----------------------------------------- | --------------------------------------------------------------- |
38-
| `init` | `commands/init.ts` | Initialize Archgate governance in the current project |
39-
| `check` | `commands/check.ts` | Run ADR compliance checks |
40-
| `adr create` | `commands/adr/create.ts` | Create a new ADR |
41-
| `adr list` | `commands/adr/list.ts` | List all ADRs (`--json`, `--domain`) |
42-
| `adr show <id>` | `commands/adr/show.ts` | Show a specific ADR by ID |
43-
| `adr update` | `commands/adr/update.ts` | Update an existing ADR by ID |
44-
| `login` | `commands/login.ts` | Authenticate with GitHub to access archgate plugins |
45-
| `login status` | `commands/login.ts` | Show current authentication status |
46-
| `login logout` | `commands/login.ts` | Remove stored credentials |
47-
| `login refresh` | `commands/login.ts` | Re-authenticate and claim a new token |
48-
| `review-context` | `commands/review-context.ts` | Pre-compute review context with ADR briefings for changed files |
49-
| `session-context` | `commands/session-context/index.ts` | Read AI editor session transcripts |
50-
| `session-context claude-code` | `commands/session-context/claude-code.ts` | Read Claude Code session transcript for the project |
51-
| `session-context cursor` | `commands/session-context/cursor.ts` | Read Cursor agent session transcript for the project |
52-
| `plugin` | `commands/plugin/index.ts` | Manage archgate editor plugins |
53-
| `plugin install` | `commands/plugin/install.ts` | Install the archgate plugin for the specified editor |
54-
| `plugin url` | `commands/plugin/url.ts` | Print the authenticated plugin repository URL |
55-
| `upgrade` | `commands/upgrade.ts` | Upgrade Archgate to the latest version |
56-
| `clean` | `commands/clean.ts` | Clean the CLI temp files |
34+
Entry point: `src/cli.ts` (shebang `#!/usr/bin/env bun`). Commands registered via `register*Command(program)`. See `src/commands/` for all command implementations — each file exports a `register*Command(program)` function.
5735

5836
### Key Paths
5937

@@ -75,24 +53,13 @@ Zod schemas are the single source of truth. Types derived via `z.infer<>` — ne
7553
- Exit codes: 0 = success, 1 = violation, 2 = internal error
7654
- Deps: minimal; prefer Bun built-ins (see ARCH-006)
7755

78-
## Toolchain (`.prototools`)
56+
## Toolchain
7957

80-
Bun 1.3.9, Node LTS, npm 11.11.0. Minimum user-facing Bun: `>=1.2.21` (enforced in `src/cli.ts`).
58+
See `.prototools` for pinned tool versions. Minimum user-facing Bun version is enforced in `src/cli.ts`.
8159

82-
## Self-Governance ADRs (`.archgate/adrs/`)
60+
## Self-Governance ADRs
8361

84-
- `ARCH-001` — Command structure (register pattern, no business logic)
85-
- `ARCH-002` — Error handling (exit codes, log helpers)
86-
- `ARCH-003` — Output formatting (styleText, --json, no emoji)
87-
- `ARCH-004` — No barrel files (direct imports only)
88-
- `ARCH-005` — Testing standards (Bun test, fixtures, 80% coverage)
89-
- `ARCH-006` — Dependency policy (minimal deps, Bun built-ins)
90-
- `ARCH-007` — Cross-platform subprocess execution (Bun.spawn, no Bun.$)
91-
- `ARCH-008` — Typed command options (use addOption for choices/argParser)
92-
- `ARCH-009` — Centralized platform detection (use helpers/platform)
93-
- `ARCH-010` — Prefer Bun built-in JSON parsing (Bun.file().json())
94-
- `GEN-001` — Documentation site (Astro Starlight)
95-
- `GEN-002` — Documentation internationalization (en + pt-br parity)
62+
The CLI dogfoods itself — see `.archgate/adrs/` for the full list of ADRs and their companion `.rules.ts` files. Read them before making architectural changes.
9663

9764
## ADR Format
9865

README.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -95,29 +95,7 @@ archgate check
9595

9696
## Writing rules
9797

98-
Each ADR can have a companion `.rules.ts` file that exports a plain object typed with `satisfies RuleSet`. Rules receive the list of files to check and return an array of violations with file paths and line numbers.
99-
100-
See the [writing rules guide](https://cli.archgate.dev/guides/writing-rules/) for examples and the full [rule API reference](https://cli.archgate.dev/reference/rule-api/).
101-
102-
## Commands
103-
104-
| Command | Description |
105-
| ------------------------ | ---------------------------------------------------------- |
106-
| `archgate init` | Initialize `.archgate/` with example ADR and editor config |
107-
| `archgate check` | Run ADR compliance checks (`--staged` for pre-commit) |
108-
| `archgate adr create` | Create a new ADR interactively |
109-
| `archgate adr list` | List all ADRs (`--json`, `--domain`) |
110-
| `archgate adr show <id>` | Print a specific ADR |
111-
| `archgate adr update` | Update an ADR's frontmatter |
112-
| `archgate login` | Authenticate with GitHub for editor plugins |
113-
| `archgate upgrade` | Upgrade to the latest release |
114-
| `archgate clean` | Remove the CLI cache (`~/.archgate/`) |
115-
116-
See the [CLI reference](https://cli.archgate.dev/reference/cli-commands/) for full usage and options.
117-
118-
## CI and pre-commit hooks
119-
120-
Add `archgate check` to your CI pipeline or pre-commit hooks to block merges that violate ADRs. See the [CI integration guide](https://cli.archgate.dev/guides/ci-integration/) and [pre-commit hooks guide](https://cli.archgate.dev/guides/pre-commit-hooks/) for setup instructions.
98+
Each ADR can have a companion `.rules.ts` file that exports automated checks. See the [writing rules guide](https://cli.archgate.dev/guides/writing-rules/) for examples and the full [rule API reference](https://cli.archgate.dev/reference/rule-api/).
12199

122100
## Supercharge with AI plugins
123101

docs/public/llms-full.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ When you run `archgate check`, the CLI loads every ADR that has `rules: true` in
8787

8888

8989
Archgate governs its own development. The same tool that checks your code
90-
checks ours. Six ADRs enforce command structure, error handling, output
91-
formatting, testing, and more.
90+
checks ours. Our own ADRs enforce command structure, error handling, output
91+
formatting, testing, and more — [see them on
92+
GitHub](https://github.com/archgate/cli/tree/main/.archgate/adrs).
9293

9394

9495
## Editor plugins

docs/src/content/docs/index.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ When you run `archgate check`, the CLI loads every ADR that has `rules: true` in
5353
</Card>
5454
<Card title="Self-Governance" icon="approve-check-circle">
5555
Archgate governs its own development. The same tool that checks your code
56-
checks ours. Six ADRs enforce command structure, error handling, output
57-
formatting, testing, and more.
56+
checks ours. Our own ADRs enforce command structure, error handling, output
57+
formatting, testing, and more — [see them on
58+
GitHub](https://github.com/archgate/cli/tree/main/.archgate/adrs).
5859
</Card>
5960
</CardGrid>
6061

docs/src/content/docs/pt-br/index.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ Quando você executa `archgate check`, a CLI carrega cada ADR que possui `rules:
5353
</Card>
5454
<Card title="Auto-Governança" icon="approve-check-circle">
5555
O Archgate governa seu próprio desenvolvimento. A mesma ferramenta que
56-
verifica seu código verifica o nosso. Seis ADRs aplicam estrutura de
57-
comandos, tratamento de erros, formatação de saída, testes e mais.
56+
verifica seu código verifica o nosso. Nossos próprios ADRs aplicam estrutura
57+
de comandos, tratamento de erros, formatação de saída, testes e mais — [veja
58+
no GitHub](https://github.com/archgate/cli/tree/main/.archgate/adrs).
5859
</Card>
5960
</CardGrid>
6061

0 commit comments

Comments
 (0)