Skip to content

Commit afd1aa7

Browse files
Garfield-yinclaude
andcommitted
docs: fold contracts/ into docs/
The contracts/ directory carried 369 lines, most of which restated docs/: the capability matrix lived in three places, the --json envelope in three, the error and exit code tables in two each. Readers had to work out which copy was authoritative, and every change had to land in several files. Only three things were unique to it, and they go where they belong: - artifact layout rules -> docs/cli.md, next to the -o flag they describe - credential file format and login flow -> docs/configuration.md - the @deckops/sdk source citations -> internal/, since they justify design decisions to a reviewer rather than telling a user what the tool does The promises themselves are unchanged; CONTRIBUTING now names them directly instead of pointing at a directory. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent f173498 commit afd1aa7

21 files changed

Lines changed: 94 additions & 402 deletions

File tree

CONTRIBUTING.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The pipeline runs `resolve → plan → execute → write`. Everything except `e
4040

4141
## Where things go
4242

43-
**Adding a route.** Edit `ROUTES` in `src/core/routes.ts`, add the task's capabilities to `TASK_CAPABILITIES`, then update `contracts/render-matrix.md` with a source citation. Every claim in that table has to be checkable against `@deckops/sdk`.
43+
**Adding a route.** Edit `ROUTES` in `src/core/routes.ts`, add the task's capabilities to `TASK_CAPABILITIES`, then update the matrix in `docs/formats.md`.
4444

4545
Probe the backend before writing the route down. Several formats look like they should work and do not — `doc2pdf` rejects `.xlsx`, and no task accepts `.pages` or `.numbers` — so a route added from the type definitions alone can be wrong. Then run `pnpm test:conformance` to confirm it end to end.
4646

@@ -50,11 +50,18 @@ Probe the backend before writing the route down. Several formats look like they
5050

5151
If the flag can also come from a profile or config, add it to `SOFT_OPTION_KEYS` so an inherited value is dropped with a warning instead of failing. See `docs/profiles.md`.
5252

53-
**Touching credentials.** `contracts/credentials.md` is shared with other DeckFlow tools. Changing the file format or the resolution chain needs an RFC update and coordination, and `tests/unit/credentials.test.ts` must keep passing — it guards the PRD requirement that DeckHTML and DeckRender share auth.
53+
**Touching credentials.** The credential file is shared with other DeckFlow tools, and its format is specified in `docs/configuration.md`. Changing the format or the resolution chain needs coordination with those tools, and `tests/unit/credentials.test.ts` must keep passing — it guards the requirement that logging in once works everywhere.
5454

55-
## Contracts
55+
## What counts as a breaking change
5656

57-
Files under `contracts/` are frozen. They describe promises other people's scripts depend on: the `--json` envelope, exit codes, the render matrix, the credential format. Changing one is a breaking change — say so in the PR description and update `CHANGELOG.md` in the same commit.
57+
Four things are promises other people's scripts depend on:
58+
59+
- the `--json` result and error envelopes
60+
- error codes and exit codes
61+
- the render matrix
62+
- the shared credential file format
63+
64+
Changing any of them is breaking. Say so in the PR description and update `CHANGELOG.md` in the same commit.
5865

5966
## Testing
6067

@@ -74,4 +81,4 @@ Comments should explain _why_, especially where the code works around a backend
7481
- `pnpm check` green
7582
- New behaviour comes with tests
7683
- User-facing changes update the relevant page in `docs/`
77-
- Contract changes update `contracts/` and `CHANGELOG.md`
84+
- Breaking changes update `docs/` and `CHANGELOG.md`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Image output supports `png`, `jpg` and `webp` via `--image-format`.
9292
9393
"chained" means DeckRender runs more than one backend task — slower, and sometimes with a fidelity note. Every render reports the exact task chain it used in `--json`'s `route` field, so nothing is hidden. Unsupported pairs fail with a clear message rather than producing something approximate.
9494
95-
Full detail, including which flags each route accepts: [`contracts/render-matrix.md`](contracts/render-matrix.md).
95+
Full detail, including which flags each route accepts: [`docs/formats.md`](docs/formats.md).
9696
9797
## Authentication is optional
9898

contracts/cli-output.md

Lines changed: 0 additions & 147 deletions
This file was deleted.

contracts/credentials.md

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)