Skip to content

Commit 6ac188e

Browse files
chore: Improve Claude setup (#550)
1 parent ab4af5f commit 6ac188e

3 files changed

Lines changed: 12 additions & 28 deletions

File tree

.github/prompts/update-agent-docs.md

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The prompt includes a mode indicator (e.g., `mode: full-audit` or `mode: last-co
3434

3535
For `push` triggers, read the diff and determine which documentation files are affected by the changes. For `workflow_dispatch` triggers, review all documentation files against the current codebase.
3636

37-
Also check whether recent changes contain architectural decisions that lack an ADR. Read existing ADRs in `agent-docs/adr/` first. If you find a new pattern, a replaced dependency, an infrastructure change, or a choice between viable approaches — and no existing ADR covers it — write a new ADR following the process in `agent-docs/adr/README.md`. Set its status to `proposed`. When writing the ADR, follow the ADR vs docs boundary rules below — record the decision rationale, not operational details.
37+
Also check whether recent changes contain architectural decisions that lack an ADR. Read existing ADRs in `agent-docs/adr/` first. If you find a new pattern, a replaced dependency, an infrastructure change, or a choice between viable approaches — and no existing ADR covers it — write a new ADR following the process in `agent-docs/adr/README.md`. Set its status to `proposed`. When writing the ADR, follow the ADR/ODR vs topic docs boundary rules below — record the decision rationale, not operational details.
3838

3939
### Context
4040

@@ -83,39 +83,23 @@ When documenting Squide:
8383
- ONLY modify files under `agent-docs/` and `CLAUDE.md` at the root. Modifying files outside this set will cause an infinite workflow loop.
8484
- Do NOT modify `CLAUDE.md`.
8585

86-
### ADR vs docs boundary
86+
### ADR/ODR vs topic docs boundary
8787

88-
ADRs record **why** a decision was made (the problem, the alternatives, the chosen option, and the trade-offs accepted). Operational details about **how** the decision is implemented belong in `agent-docs/`.
88+
Decision records (`adr/`, `odr/`) record **why** a decision was made. Topic docs (`design/`, `references/`, `quality/`, `specs/`) describe **how** it is implemented.
8989

90-
- **Belongs in an ADR:** the problem that motivated the decision, options evaluated, which option was chosen and why, architectural trade-offs accepted.
91-
- **Belongs in `agent-docs/`:** file paths and storage locations, URL rewriting patterns, CLI commands and flags, permissions and access controls, step-by-step operational procedures, server start/build commands.
90+
- **Belongs in a decision record:** the problem that motivated the decision, options evaluated, which option was chosen and why, trade-offs accepted.
91+
- **Belongs in a topic doc:** file paths and storage locations, URL rewriting patterns, CLI commands and flags, permissions and access controls, step-by-step operational procedures, server start/build commands.
9292

9393
Examples:
9494

9595
- **Good ADR sentence:** "Evidence is stored on an orphan branch so GitHub issue links remain stable across runs. See [ci-cd.md](../references/ci-cd.md) for operational details."
9696
- **Bad ADR sentence:** "Evidence files are pushed to the `dogfood-evidence` branch using `git push --force`, and URLs are rewritten from `./screenshots/` to `https://raw.githubusercontent.com/...`."
9797

98-
**Never put operational details (commands, paths, configs, permissions, URL patterns) into an ADR.** State the decision and its rationale, then link to the relevant `agent-docs/` file for implementation specifics. Operational content in ADRs drifts from the actual implementation and misleads agents into following stale procedures instead of reading the source of truth.
98+
**Never put operational details (commands, paths, configs, permissions, URL patterns) into a decision record.** State the decision and its rationale, then link to the relevant topic doc for implementation specifics. Operational content in decision records drifts from the actual implementation and misleads agents into following stale procedures instead of reading the source of truth.
9999

100100
### CLAUDE.md requirements
101101

102-
CLAUDE.md must stay between 80–150 lines. It must contain:
103-
104-
1. **Purpose** — 1–2 short paragraphs identifying the repository.
105-
2. **How to Navigate** — table linking to `agent-docs/ARCHITECTURE.md` and `agent-docs/` categories.
106-
3. **"If You Are Working On…"** — routing table mapping tasks to documents.
107-
108-
If any section grows too large, extract it into an `agent-docs/` file and replace with a link.
109-
110-
### agent-docs/ARCHITECTURE.md requirements
111-
112-
`agent-docs/ARCHITECTURE.md` must contain:
113-
114-
1. **What is Squide** — framework identity and purpose (not a bundler/micro-frontend tool).
115-
2. **Repository Structure** — directory tree overview.
116-
3. **Key Concepts** — FireflyRuntime, modules, two-phase registration, AppRouter, data fetching, route types, environment variables.
117-
4. **Package Domains** — tables grouping packages by domain (core, integrations, build tooling).
118-
5. **Sample Applications** — table of sample apps.
102+
Follow [ODR-0010](../../agent-docs/odr/0010-claude-md-progressive-disclosure-design.md) for CLAUDE.md structure and line-count constraints.
119103

120104
## Step 3 — Validate coherence
121105

@@ -126,7 +110,7 @@ Spawn an **opus** subagent to validate the documentation as a whole. Pass it the
126110
> - **Cross-references:** All markdown links between documents point to files that actually exist.
127111
> - **Consistency:** Information is not contradicted across documents (e.g., a package listed in one place but missing or renamed in another).
128112
> - **Stale content:** Verify that document contents align with the actual codebase (check real file paths, package names, etc.).
129-
> - **CLAUDE.md line count:** Must be between 80–150 lines.
113+
> - **CLAUDE.md:** Must conform to [ODR-0010](../../agent-docs/odr/0010-claude-md-progressive-disclosure-design.md) (structure and line count).
130114
> - **Architecture Decision Records:** Every ADR in `agent-docs/adr/` follows the template (has Status, Context, Options Considered, Decision, Consequences sections) and is listed in the `## Index` section of `agent-docs/adr/README.md`.
131115
>
132116
> Return a list of issues found. If no issues, return "No issues found."

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
2. Before API, dependency, or inter-module changes, read [adr/index.md](./agent-docs/adr/index.md). To reverse a decision, supersede the record — do not silently ignore it.
99
3. Before changing build tooling, CI pipelines, or agent workflows, read [odr/index.md](./agent-docs/odr/index.md).
1010

11-
## Memory Index
11+
## Index
1212

1313
### Architecture
1414

agent-docs/odr/0010-claude-md-progressive-disclosure-design.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ An earlier version (~95 lines) had two navigation mechanisms: a routing table ("
1414

1515
1. **Routing table + ToC** — Two structures, ~95 lines. Task-oriented framing and section-level anchors. High duplication; every document appears twice. Maintenance burden: new docs require updates in two places.
1616
2. **Routing table only** — Task-oriented framing is natural for agents, but misses "miss-handling": tasks not anticipated by the table have no fallback. Noun-based keyword summaries handle unexpected queries better than verb-based task descriptions.
17-
3. **Memory Index only** — Single structure, ~50 lines. Each file listed once with keyword-rich content summaries. Inline section anchors only where they earn their token cost. No duplication.
17+
3. **Index only** — Single structure, ~50 lines. Each file listed once with keyword-rich content summaries. Inline section anchors only where they earn their token cost. No duplication.
1818

1919
## Decision
2020

21-
Option 3: Single Memory Index with keyword-rich summaries and selective inline anchors.
21+
Option 3: Single Index with keyword-rich summaries and selective inline anchors.
2222

2323
### Structure rules
2424

@@ -30,7 +30,7 @@ Option 3: Single Memory Index with keyword-rich summaries and selective inline a
3030

3131
### Content rules
3232

33-
6. **Never add a routing table.** The Memory Index already embeds task-routing signal in keyword summaries.
33+
6. **Never add a routing table.** The Index already embeds task-routing signal in keyword summaries.
3434
7. **Keep the file under ~55 lines.** Before adding a line, identify which existing line can be shortened or removed.
3535
8. **Behavioral instructions stay in CLAUDE.md.** The "never guess" directive and the adr/index.md gate are prerequisites for the index to work — moving them to a separate file creates a bootstrapping paradox.
3636
9. **No content enumeration that duplicates the index.** Do not describe what `agent-docs/` contains in prose — the index itself shows this.

0 commit comments

Comments
 (0)