Skip to content

Commit 53b9a76

Browse files
authored
Merge pull request #21 from rhyek/docs/move-internals-to-maintenance
Move the contributor docs out of the site's folder
2 parents 63e24f2 + 990e71b commit 53b9a76

10 files changed

Lines changed: 82 additions & 20 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
paths:
3+
- "CHANGELOG.md"
4+
- "README.md"
5+
- "docs/**"
6+
- "packages/stackctl/skills/stackctl/SKILL.md"
7+
- "packages/stackctl/assets/agent-rules.md"
8+
---
9+
10+
# Changelog and public docs — written for the people who use stackctl
11+
12+
**Every entry and every sentence is for a software developer who runs their project's services
13+
with stackctl, and for the coding agent working beside them.** That developer works in any
14+
language and any stack: a Go or Rust service runs under stackctl as well as a Node one, and
15+
`stackctl.config.ts` may be the only TypeScript they touch. Never add an item that only a
16+
maintainer of stackctl would care about.
17+
18+
This covers `CHANGELOG.md`, `README.md`, everything under `docs/` (the site, which `llms.txt`
19+
and the package's copy are built from) and what stackctl installs for agents,
20+
`packages/stackctl/skills/stackctl/SKILL.md` and `packages/stackctl/assets/agent-rules.md`.
21+
Maintainers' notes, including the contributor internals and Superpowers' specs and plans, live in
22+
`maintenance/docs/`, which this rule does not cover.
23+
24+
## Only what a user acts on
25+
26+
The test: **would someone using stackctl act on it, or need it to use stackctl?** If not, it
27+
stays out.
28+
29+
Out, however much work it was:
30+
31+
- Refactors, moved or merged files, deleted internal code, renamed internals.
32+
- The unit, type and end-to-end tests, CI, lint and format config, release tooling.
33+
- The docs site's tooling, the terminal recordings and how they are made, the agent eval.
34+
- Dependency bumps that change nothing a user sees.
35+
- A bug that never shipped in a release on npm.
36+
37+
In, however technical it looks:
38+
39+
- Anything that breaks a user's `stackctl.config.ts`, scripts, CI or agent setup, with what to do
40+
about it.
41+
- New capabilities, config options, CLI commands and flags, control API endpoints and SDK
42+
exports; changed defaults; what the terminal UI shows and which keys it takes.
43+
- What stackctl installs or offers to install in a user's repo: the skill, the rules file, the
44+
`AGENTS.md` block.
45+
- Supported versions of Node.js and TypeScript.
46+
- Fixes to behavior a released version had.
47+
- Performance a user feels: startup time, memory, how the terminal UI keeps up with logs.
48+
49+
## The docs describe stackctl as it is now
50+
51+
Every doc but `CHANGELOG.md` describes the current stackctl only, never its past behavior,
52+
options or names: [`docs-no-history.md`](docs-no-history.md) has the rule. History belongs in
53+
`CHANGELOG.md` and in commit messages.
54+
55+
## The changelog
56+
57+
Released versions are on npm (`npm view stackctl versions`); the `v<version>` git tag is the
58+
commit each was published from. A version not on npm is unreleased, and its changelog section
59+
describes the difference from the latest released one, not the work in between: a bug introduced
60+
and fixed inside it gets no entry, and an entry for something it changed again is rewritten to
61+
the final behavior.

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dist/
88
# A link to files this machine needs that git must never see, such as the agent recording's
99
# API key. A symlink, so no trailing slash.
1010
/.local
11-
docs/superpowers/
11+
maintenance/docs/superpowers/
1212
.superpowers/
1313

1414
# npm pack output

‎CLAUDE.md‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ The documentation is one set of Markdown pages in `docs/`, read three ways:
6060
| `docs/reference/` | The CLI, the control API (endpoints and payloads), the SDK. |
6161
| `docs/ai/` | `overview.md`: how stackctl serves coding agents. `playbook.md`: recipes written for the agent, the page `llms.txt` sends one to first. |
6262

63-
`docs/index.md` is the site's home page. `docs/architecture/` is contributor internals and
64-
`docs/superpowers/` working notes: neither is part of the site (`srcExclude`).
63+
`docs/index.md` is the site's home page. Contributor internals (how stackctl is built) are not
64+
part of the site: they live in `maintenance/docs/architecture/`.
6565

6666
`README.md` (repo root) is a short landing page: what stackctl is, the demo, install, a quick
6767
start, and links to the site. Its links are absolute, so npm and GitHub render it alike;
@@ -105,7 +105,7 @@ reconcile every hit.
105105
- **Agents read the same pages.** There is no separate agent guide. Whatever an agent needs to
106106
get a call right goes in the page that owns the topic.
107107
- **Short and familiar.** Lead with an example, then a table of options, then one-line bullets
108-
for the rules. Internals (how a feature is built) belong in `docs/architecture/`.
108+
for the rules. Internals (how a feature is built) belong in `maintenance/docs/architecture/`.
109109
- **Links between pages are relative and end in `.md`** (`../config/infra.md#callbacks`), so
110110
they work on the site, on GitHub and in the packaged copies. Heading anchors are GitHub's
111111
(the site's `slugify` matches). `pnpm docs:build` fails on a dead link, and
@@ -120,6 +120,9 @@ reconcile every hit.
120120
- **Only the current surface, no history:** see
121121
[`.claude/rules/docs-no-history.md`](.claude/rules/docs-no-history.md), which loads whenever
122122
one of these files is read or edited.
123+
- **Written for the people who use stackctl**, any developer on any stack and their agent, never
124+
for its maintainers; the changelog too: see
125+
[`.claude/rules/public-docs-audience.md`](.claude/rules/public-docs-audience.md).
123126
- **Hand-formatted.** Never run a Markdown formatter on the docs or the README.
124127
- **A `ts` snippet stays within 75 columns**, which is what the site's code block shows without
125128
scrolling. `maintenance/scripts/format-docs-snippets.ts` keeps it there: `pnpm format` and
@@ -167,6 +170,8 @@ with neither the package nor the site.
167170
| Path | What it is |
168171
| --------------------------------------------- | ------------------------------------------------ |
169172
| `maintenance/docs/agent-guidance-experiment.md` | How stackctl tells coding agents about itself: the research, the eval and the decision. Read it before changing the skill, the rules file or the playbook. |
173+
| `maintenance/docs/architecture/` | Contributor internals: the terminal UI's rendering, shutdown, the dev reverse proxy. |
174+
| `maintenance/docs/superpowers/` | Superpowers' specs (`specs/`) and plans (`plans/`): working notes, gitignored. |
170175
| `maintenance/scripts/agent-eval/` | The agent eval: Claude Code under each guidance setup, graded. Its README has the commands. |
171176
| `maintenance/scripts/demo/` | The docs' terminal recordings and the agent conversations they replay. See its `CLAUDE.md`. |
172177
| `maintenance/scripts/package-docs.ts` | Copies the built site's `llms.txt` and pages into the package (`pnpm docs:package`). |
@@ -179,6 +184,9 @@ with neither the package nor the site.
179184
row here. A script runs from the repo root, as `node maintenance/scripts/<name>.ts`.
180185
- **What a run produces stays out of the repo**: transcripts and reports go in
181186
`.local/agent-runs/`, since they hold the machine's paths.
187+
- **Superpowers writes to `maintenance/docs/superpowers/`**, not its default `docs/superpowers/`:
188+
brainstorming's specs go in `specs/YYYY-MM-DD-<topic>-design.md` and writing-plans' plans in
189+
`plans/YYYY-MM-DD-<feature-name>.md`. The folder is gitignored, so they are never committed.
182190

183191
## Type-level tests — assert types, not "some error"
184192

@@ -270,11 +278,11 @@ selection is **app-managed** (SGR mouse reporting + drag-to-copy) since native
270278
selection can't survive Ink's in-place repaints. Before changing anything about
271279
the log viewport, scrolling, the footer, the commands menu, the picker, clicks,
272280
selection, or how output reaches the screen, read
273-
[`docs/architecture/rendering.md`](docs/architecture/rendering.md) — it has the
281+
[`maintenance/docs/architecture/rendering.md`](maintenance/docs/architecture/rendering.md) — it has the
274282
module map, the layouts and hit-testing, the virtualization
275283
(`log-window.ts`/`scroll.ts`), the store subscription, and the
276284
mouse/selection/clipboard handling. Shutdown (the one path in
277285
`Session.shutdown`, the screen's part in `tui/shutdown.ts`, the exit line,
278286
releasing the mouse) is in
279-
[`docs/architecture/exiting.md`](docs/architecture/exiting.md). (Internal
287+
[`maintenance/docs/architecture/exiting.md`](maintenance/docs/architecture/exiting.md). (Internal
280288
contributor docs — not part of the site.)

‎docs/.vitepress/config.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ export default defineConfig({
3030
"A terminal UI and CLI for a monorepo's services, infrastructure, tests and CI during development.",
3131
cleanUrls: true,
3232
lastUpdated: false,
33-
// Contributor internals and working notes live in docs/ too, but aren't part of the site.
34-
srcExclude: ['architecture/**', 'superpowers/**'],
3533
sitemap: { hostname: site },
3634
// The icon at its small size (logo/logo-small.svg, linked into docs/public/) in the browser
3735
// tab, with a PNG for browsers that don't take an SVG one, and the square one iOS rounds for a

docs/architecture/dev-reverse-proxy.md renamed to maintenance/docs/architecture/dev-reverse-proxy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The dev reverse proxy
22

33
How the proxy carries requests to services, and why. This is a **contributor** document; the
4-
user-facing reference is [`../dev-reverse-proxy.md`](../dev-reverse-proxy.md).
4+
user-facing reference is [`docs/config/reverse-proxy.md`](../../../docs/config/reverse-proxy.md).
55

66
**It is a development tool, not a production proxy.** It listens on loopback, trusts every client,
77
does no auth, serves self-signed certificates, and sends each service to one local port with no
File renamed without changes.
File renamed without changes.

‎maintenance/scripts/format-docs-snippets.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ const { ignorePatterns: _ignored, overrides: _overrides, ...options } = config;
3535
* is kept shorter than that by hand.
3636
*/
3737
function pages(): string[] {
38-
const docs = fs
39-
.globSync('docs/**/*.md', {
40-
cwd: root,
41-
exclude: ['docs/architecture/**', 'docs/superpowers/**'],
42-
})
43-
.toSorted();
38+
const docs = fs.globSync('docs/**/*.md', { cwd: root }).toSorted();
4439
const all = ['README.md', 'docs/.vitepress/theme/HomeConfig.md', ...docs];
4540
return named.length === 0 ? all : all.filter((page) => named.includes(page));
4641
}

‎packages/stackctl/src/mouse.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* app-managed drag-to-select-and-copy. The terminal's own text selection can't
44
* survive our in-place repaints (scrolling and new log lines rewrite the cells
55
* under the highlight), so we replace it with a selection anchored to the log
6-
* content — see docs/architecture/rendering.md.
6+
* content — see maintenance/docs/architecture/rendering.md.
77
*
88
* We enable button-event tracking (`?1002h` — reports press, drag-motion while a
99
* button is held, and release) with SGR extended coordinates (`?1006h` — 1-based,

‎packages/stackctl/src/tui/shutdown.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { MOUSE_DISABLE } from '../mouse.js';
55
import type { Session } from '../session/session.js';
66

77
/**
8-
* The screen's part of the one shutdown path (`docs/architecture/exiting.md`; run-screen §9). The
9-
* session owns the rest: stopping the children, closing the proxy, acknowledging a held quit,
10-
* closing the control server. Whatever started it (Ctrl+C, a signal, `/command/quit`, a branch
11-
* change), the screen follows the session's `stopping` phase.
8+
* The screen's part of the one shutdown path (`maintenance/docs/architecture/exiting.md`;
9+
* run-screen §9). The session owns the rest: stopping the children, closing the proxy,
10+
* acknowledging a held quit, closing the control server. Whatever started it (Ctrl+C, a signal,
11+
* `/command/quit`, a branch change), the screen follows the session's `stopping` phase.
1212
*/
1313

1414
/** Leaves the alternate screen and shows the cursor, with the mouse released first. */

0 commit comments

Comments
 (0)