Skip to content

Commit 0485ec3

Browse files
committed
docs: add cross-doc links + explain repos (one project, several repos)
1 parent 5074dc1 commit 0485ec3

9 files changed

Lines changed: 77 additions & 35 deletions

File tree

docs/DESIGN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ For the full cascade detail and all recognized label forms, see [`resolution.md`
294294
in v1 (no server, no webhook). On each tick it:
295295

296296
1. Counts issues currently `In Progress` and `In Review` against the project's
297-
capacity caps (`limits.inProgress`, `limits.inReview` in `config.json`).
297+
capacity caps ([`limits.inProgress`, `limits.inReview`](config.md#projects) in `config.json`).
298298
2. If under cap, fetches `Todo` issues ordered by priority.
299299
3. Filters out issues that are quarantined (label `beflow:quarantined`), blocked
300300
by unfinished dependencies (`blockedBy`), or (when `scheduling.activeCycleOnly`
@@ -306,10 +306,10 @@ in v1 (no server, no webhook). On each tick it:
306306
continuation prompt (the review comment thread as context).
307307
- Issues in `In Review` with `needs-decision` → move to Needs Input with the
308308
open question surfaced as a comment.
309-
- When `ci.autoReworkOnRed` is enabled, CI-failing PRs trigger a rework
309+
- When [`ci.autoReworkOnRed`](config.md#projects) is enabled, CI-failing PRs trigger a rework
310310
dispatch with the failure details as continuation context. Loop-safe: never
311311
reworks the same head SHA twice; quarantines a perpetually red PR once the
312-
attempt counter hits the dead-letter threshold.
312+
attempt counter hits the [`deadLetter`](config.md#defaults) threshold.
313313
- Stale `In Progress` issues past the configured SLA window get a nudge comment.
314314
6. Sleeps for `--interval` seconds (default 30) and repeats.
315315

docs/OPERATING-MODEL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ narrow dispatch to the active cycle, but the core model does not require them.
3232
Instead of estimating how much work fits in a period, beflow enforces
3333
**work-in-progress limits** on the active lanes:
3434

35-
- **In Progress** is capped (`limits.inProgress`, default 3) — beflow dispatches
35+
- **In Progress** is capped ([`limits.inProgress`](config.md#projects), default 3) — beflow dispatches
3636
from Todo only up to the remaining headroom under this cap.
3737
- **In Review** is capped (`limits.inReview`, default 5) — this is the lane that
3838
protects _you_. Pull requests pile up here waiting on human review, and the cap
@@ -95,7 +95,7 @@ code they govern. When standards change, you change them in one place — the re
9595
## One project, several repos
9696

9797
A project on the board can span several git repositories. A single work item maps
98-
to the repo (or repos) its code area lives in via `module_repo_map`: a **module**
98+
to the repo (or repos) its code area lives in via [`module_repo_map`](config.md#projects): a **module**
9999
names a code area, and the map resolves that module to the repository beflow
100100
should check out and open a PR against.
101101

docs/acp-events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ acpx --format json --json-strict --cwd <repo> <permission-flag> \
1717
- `--format json` emits the **raw ACP JSON-RPC** wire stream as NDJSON (one JSON
1818
object per line). `--json-strict` suppresses non-JSON noise on stderr — always
1919
pair them.
20-
- `<permission-flag>`: `--approve-all` in autonomous mode; `--approve-reads` in
20+
- `<permission-flag>`: `--approve-all` in [autonomous mode](resolution.md#run-mode); `--approve-reads` in
2121
supervised mode.
22-
- `--append-system-prompt` carries the jobKind contract when one is configured.
22+
- `--append-system-prompt` carries the [jobKind](resolution.md#job-kind) contract when one is configured.
2323
- `--timeout` asks acpx to cooperatively stop after that many seconds; beflow adds
2424
a hard-kill grace window on top.
2525
- `prompt -s <SESSION-KEY>` sends a prompt to a named, resumable session scoped by

docs/adapters.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ workspace-level toggle). When `opts.prune` is true, also delete orphan entities
133133
(those present in the tracker but absent from the template) and record them in
134134
`pruned`. When `opts.resolveModuleChanges` is provided, call it with the
135135
`ModuleChange` diff before pruning modules so the caller can rename instead of
136-
delete.
136+
delete. Called by [`beflow setup`](commands.md#setup-project--update-project).
137137

138138
**`createProject(spec)`** — Create a new project from `ProjectCreateSpec`.
139139
Return `ProjectCreateResult`, which carries the tracker-internal project ID in
@@ -163,7 +163,7 @@ interface Issue {
163163
}
164164
```
165165

166-
`areas` drives repo resolution via `module_repo_map` in
166+
`areas` drives repo resolution via [`module_repo_map`](config.md#projects) in
167167
`config.json`'s `projects.<KEY>`.
168168

169169
### `StateGroup`
@@ -175,7 +175,7 @@ type StateGroup = "backlog" | "unstarted" | "started" | "completed" | "cancelled
175175
Map your tracker's statuses onto this five-value enum. beflow's default board
176176
uses: `Backlog``backlog`, `Todo``unstarted`, `In Progress``started`,
177177
`Needs Input``started`, `In Review``started`, `Done``completed`,
178-
`Cancelled``cancelled`.
178+
`Cancelled``cancelled`. See [lifecycle.md](lifecycle.md) for the full board state reference.
179179

180180
### `IssueMeta`
181181

docs/config.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,48 @@ or a Linear team) and the local repos its work lands in.
112112
Per-project `deadLetter`, `inputQuality`, `qualityGate`, `review`, `sla`, and
113113
`telemetry` mirror their [Defaults](#defaults) counterparts and override them.
114114

115+
### Repos: one project, several repositories
116+
117+
A beflow project is a single board, but the work on it often lands in **more
118+
than one git repository** — say a backend service, a marketing site, and a
119+
shared library. `repos` is the map from a short **repo key** to that
120+
repository's absolute path on disk; it is the set of repositories a run is
121+
allowed to touch. (`root` is just the common parent directory; `beflow doctor`
122+
checks that `root` and every `repos` path exist.)
123+
124+
When beflow runs a work item it resolves **which** repo the agent works in, then
125+
runs the agent in a git worktree of that repo:
126+
127+
1. `--repo <key>` on the command line wins, if given.
128+
2. otherwise `module_repo_map` routes by the item's module — the board module
129+
maps to a repo key.
130+
3. otherwise `default_repo` is the fallback.
131+
132+
See [resolution](resolution.md#repo) for the full cascade.
133+
134+
```json
135+
"APP": {
136+
"name": "My App",
137+
"root": "/home/you/projects/app",
138+
"default_repo": "api",
139+
"repos": {
140+
"api": "/home/you/projects/app/api",
141+
"web": "/home/you/projects/app/web",
142+
"shared": "/home/you/projects/app/shared"
143+
},
144+
"module_repo_map": {
145+
"Backend": "api",
146+
"Frontend": "web",
147+
"Shared Library": "shared"
148+
}
149+
}
150+
```
151+
152+
With the above, a work item filed under the **Backend** module runs in `api`, a
153+
**Frontend** item in `web`, and a **Shared Library** item in `shared`. An item
154+
with no module (or one not in the map) falls back to `default_repo` (`api`).
155+
Override per run with `beflow run APP-42 --repo web`.
156+
115157
## Agents
116158

117159
Each entry defines how to launch one coding-agent CLI.

docs/issue-templates.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ and write the issue for you.
2727

2828
The frontmatter is a YAML object. Only `name` and `description` are required.
2929

30-
| Field | Type | Meaning |
31-
| ------------- | ------------------------------------------------- | ------------------------------------------------------------------------------ |
32-
| `name` | string (**required**) | The template id — the file stem and the argument to `beflow new <KEY> <name>`. |
33-
| `description` | string (**required**) | One-line summary shown in the interactive template picker. |
34-
| `agent` | string | Pins the agent → emits an `agent:<name>` picker label on the new card. |
35-
| `jobKind` | `triage` \| `spec` \| `implement` | Pins the lifecycle job kind → emits a `jobkind:<jobKind>` picker label. |
36-
| `runMode` | `autonomous` \| `supervised` | Pins the run mode → emits a `run:<mode>` picker label. |
37-
| `type` | string | The work-item type (e.g. `Bug`, `Feature`, `Spike`). |
38-
| `priority` | `urgent` \| `high` \| `medium` \| `low` \| `none` | The work-item priority. |
39-
| `state` | string | The state the issue is created into (defaults to `Backlog`). |
40-
| `labels` | string[] | Extra labels attached on creation, on top of the picker labels. |
41-
| `enrich` | bool (default `false`) | Run the agent read-only to author the body before the preview. |
42-
| `title` | string | A `{{key}}` pattern for the title (see [Title](#title)). |
43-
| `questions` | question[] (default `[]`) | The typed inputs collected from the operator (see [Questions](#questions)). |
30+
| Field | Type | Meaning |
31+
| ------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
32+
| `name` | string (**required**) | The template id — the file stem and the argument to `beflow new <KEY> <name>`. |
33+
| `description` | string (**required**) | One-line summary shown in the interactive template picker. |
34+
| `agent` | string | Pins the agent → emits an `agent:<name>` picker label on the new card. |
35+
| `jobKind` | `triage` \| `spec` \| `implement` | Pins the lifecycle [job kind](resolution.md#job-kind) → emits a `jobkind:<jobKind>` picker label. |
36+
| `runMode` | `autonomous` \| `supervised` | Pins the [run mode](resolution.md#run-mode) → emits a `run:<mode>` picker label. |
37+
| `type` | string | The work-item type (e.g. `Bug`, `Feature`, `Spike`). |
38+
| `priority` | `urgent` \| `high` \| `medium` \| `low` \| `none` | The work-item priority. |
39+
| `state` | string | The state the issue is created into (defaults to `Backlog`). |
40+
| `labels` | string[] | Extra labels attached on creation, on top of the picker labels. |
41+
| `enrich` | bool (default `false`) | Run the agent read-only to author the body before the preview. |
42+
| `title` | string | A `{{key}}` pattern for the title (see [Title](#title)). |
43+
| `questions` | question[] (default `[]`) | The typed inputs collected from the operator (see [Questions](#questions)). |
4444

4545
## Questions
4646

@@ -99,7 +99,7 @@ by giving it a new name.
9999

100100
A template's `agent`, `jobKind`, and `runMode` are translated to the board's **picker
101101
labels** on creation: `agent:<name>`, `jobkind:<jobKind>`, `run:<mode>`. The board
102-
provisions these labels through `beflow setup` / `beflow update` — the `jobkind:*`
102+
provisions these labels through [`beflow setup` / `beflow update`](commands.md#setup-project--update-project) — the `jobkind:*`
103103
labels (`jobkind:triage`, `jobkind:spec`, `jobkind:implement`) are seeded alongside the
104104
`run:*` pickers. After adding a template that pins a new `jobKind`, run
105105
`beflow update <KEY>` once so the label exists. `createIssue` resolves each picker

docs/mcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MCP servers (per-run, via acpx)
22

33
beflow can hand the coding agent a set of **MCP servers** on a per-run basis. When
4-
`mcp.enabled` is `true` in `config.json`, beflow reads a user `.mcp.json`, translates
4+
[`mcp.enabled`](config.md#top-level) is `true` in `config.json`, beflow reads a user `.mcp.json`, translates
55
it to the ACP `McpServer` shape, and injects it as a managed `.acpxrc.json` into the
66
agent's working directory. acpx merges `<cwd>/.acpxrc.json` and forwards its
77
`mcpServers` to the ACP `session/new` request.

docs/prompts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ issue fields.
3232

3333
### Issue-authoring template (`issue-enrich.md`)
3434

35-
`issue-enrich.md` is a separate prompt used only by `beflow new --enrich`. It is
35+
`issue-enrich.md` is a separate prompt used only by [`beflow new`](commands.md#new-project-template) `--enrich`. It is
3636
**not** part of `PromptSet` and is loaded on demand by `loadEnrichPrompt`. It rides
3737
the same override cascade as the rest of the templates. For the `beflow new`
3838
issue-template system (the per-type Markdown frontmatter files), see
@@ -62,7 +62,7 @@ For each template, beflow resolves the first readable file in this order
6262
(highest priority first) and falls back to the compiled-in default if none exist:
6363

6464
1. `<configDir>/prompts/<name>.md` — project-local, beside the `config.json` beflow loaded.
65-
2. `<prompts.dir>/<name>.md` — the directory named by the optional `prompts.dir`
65+
2. `<prompts.dir>/<name>.md` — the directory named by the optional [`prompts.dir`](config.md#top-level)
6666
config key (a leading `~` expands to your home directory).
6767
3. `~/.beflow/prompts/<name>.md` — your personal global override.
6868
4. The compiled-in default (embedded in the binary at build time).

docs/resolution.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ the first non-`undefined` value in a priority-ordered list wins. Empty string an
1010

1111
Each field can be supplied from up to four sources, in priority order:
1212

13-
| Source | What it is |
14-
| ------------------ | ------------------------------------------------------------------------- |
15-
| `cli` | Command-line flags passed to `beflow run` for this invocation. |
16-
| `meta` | Per-issue metadata parsed from the issue body and labels (see below). |
17-
| `project.defaults` | The `defaults` object inside the matching project entry in `config.json`. |
18-
| `global.defaults` | The top-level `defaults` object in `config.json` (`fileSchema.defaults`). |
13+
| Source | What it is |
14+
| ------------------ | ------------------------------------------------------------------------------------- |
15+
| `cli` | Command-line flags passed to [`beflow run`](commands.md#run-key) for this invocation. |
16+
| `meta` | Per-issue metadata parsed from the issue body and labels (see below). |
17+
| `project.defaults` | The `defaults` object inside the matching project entry in `config.json`. |
18+
| `global.defaults` | The top-level `defaults` object in `config.json` (`fileSchema.defaults`). |
1919

2020
### Per-issue metadata (`meta`)
2121

@@ -112,7 +112,7 @@ filesystem path).
112112

113113
Area-derived uses only the **primary area** (first element of `issue.areas`):
114114
`project.module_repo_map[areas[0]]`. If the issue has no areas, or the primary
115-
area has no entry in `module_repo_map`, this slot is skipped.
115+
area has no entry in [`module_repo_map`](config.md#projects), this slot is skipped.
116116

117117
If all four slots are `undefined`, beflow throws:
118118

0 commit comments

Comments
 (0)