Skip to content

Commit ab4af5f

Browse files
chore: Improve Claude setup (#549)
1 parent 68bfcc2 commit ab4af5f

18 files changed

Lines changed: 33 additions & 33 deletions

.github/prompts/code-review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Before reviewing, consult the directory index in `CLAUDE.md` to identify relevan
2222

2323
## Agent skills
2424

25-
When performing code reviews, load and use agent skills from `.agents/skills/`. Apply the skill mapping defined in [agent-skills.md](../../agent-docs/docs/references/agent-skills.md) (both "By file type" and "By import" tables) to the changed lines in the PR diff.
25+
When performing code reviews, load and use agent skills from `.agents/skills/`. Apply the skill mapping defined in [agent-skills.md](../../agent-docs/references/agent-skills.md) (both "By file type" and "By import" tables) to the changed lines in the PR diff.
2626

2727
## Issues reporting
2828

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ When documenting Squide:
5555

5656
- `CLAUDE.md` is a **table of contents** — short, routing-focused, link-heavy.
5757
- `agent-docs/ARCHITECTURE.md` is a **high-level map** — key concepts and package domains.
58-
- `agent-docs/docs/` is the **structured knowledge base** — categorized, detailed, but concise.
58+
- `agent-docs/` is the **structured knowledge base** — categorized, detailed, but concise.
5959

6060
### File layout
6161

6262
- `CLAUDE.md` — workspace root. Table of contents / navigation map.
6363
- `agent-docs/` — structured knowledge base:
6464
- `ARCHITECTURE.md` — high-level architecture overview
65-
- `docs/design/` — design patterns: routing, data fetching, registrations, communication
66-
- `docs/specs/` — package specifications and APIs
67-
- `docs/references/` — build tooling, CI/CD, infrastructure
68-
- `docs/quality/` — testing and quality standards
65+
- `design/` — design patterns: routing, data fetching, registrations, communication
66+
- `specs/` — package specifications and APIs
67+
- `references/` — build tooling, CI/CD, infrastructure
68+
- `quality/` — testing and quality standards
6969
- `adr/` — Architecture Decision Records
7070

7171
### Rules
@@ -79,33 +79,33 @@ When documenting Squide:
7979
- **Reference real paths.** Always cite actual file paths as evidence (e.g., `packages/core/src/`).
8080
- **No duplication.** If information exists in one document, link to it from others.
8181
- **No invention.** Only document what you can verify from actual files.
82-
- **Never use advisory language in agent instructions.** Use prohibition framing and state consequences. See [writing-agent-instructions.md](../../agent-docs/docs/references/writing-agent-instructions.md).
82+
- **Never use advisory language in agent instructions.** Use prohibition framing and state consequences. See [writing-agent-instructions.md](../../agent-docs/references/writing-agent-instructions.md).
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

8686
### ADR vs 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/docs/`.
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/`.
8989

9090
- **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/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.
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.
9292

9393
Examples:
9494

95-
- **Good ADR sentence:** "Evidence is stored on an orphan branch so GitHub issue links remain stable across runs. See [ci-cd.md](../docs/references/ci-cd.md) for operational details."
95+
- **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/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 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.
9999

100100
### CLAUDE.md requirements
101101

102102
CLAUDE.md must stay between 80–150 lines. It must contain:
103103

104104
1. **Purpose** — 1–2 short paragraphs identifying the repository.
105-
2. **How to Navigate** — table linking to `agent-docs/ARCHITECTURE.md` and `agent-docs/docs/` categories.
105+
2. **How to Navigate** — table linking to `agent-docs/ARCHITECTURE.md` and `agent-docs/` categories.
106106
3. **"If You Are Working On…"** — routing table mapping tasks to documents.
107107

108-
If any section grows too large, extract it into an `agent-docs/docs/` file and replace with a link.
108+
If any section grows too large, extract it into an `agent-docs/` file and replace with a link.
109109

110110
### agent-docs/ARCHITECTURE.md requirements
111111

CLAUDE.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@
1616

1717
### Design
1818

19-
- [routing-and-navigation.md](./agent-docs/docs/design/routing-and-navigation.md) — Route types (public, protected, hoisted, nested), navigation items, AppRouter
20-
- [data-fetching.md](./agent-docs/docs/design/data-fetching.md) — TanStack Query, usePublicDataQueries, useProtectedDataQueries, orchestration flow, error handling, error boundaries
21-
- [deferred-registrations.md](./agent-docs/docs/design/deferred-registrations.md) — Two-phase registration, conditional routes/nav based on data, feature flags, or LaunchDarkly
22-
- [cross-module-communication.md](./agent-docs/docs/design/cross-module-communication.md) — Event bus (pub/sub), plugins, shared types
19+
- [routing-and-navigation.md](./agent-docs/design/routing-and-navigation.md) — Route types (public, protected, hoisted, nested), navigation items, AppRouter
20+
- [data-fetching.md](./agent-docs/design/data-fetching.md) — TanStack Query, usePublicDataQueries, useProtectedDataQueries, orchestration flow, error handling, error boundaries
21+
- [deferred-registrations.md](./agent-docs/design/deferred-registrations.md) — Two-phase registration, conditional routes/nav based on data, feature flags, or LaunchDarkly
22+
- [cross-module-communication.md](./agent-docs/design/cross-module-communication.md) — Event bus (pub/sub), plugins, shared types
2323

2424
### References
2525

26-
- [development.md](./agent-docs/docs/references/development.md) — pnpm workspace rules, env vars, JIT packages, dependency versioning, Retype docs, pre-commit hook, full command reference, adding packages
27-
- [agent-skills.md](./agent-docs/docs/references/agent-skills.md) — Skill directories, editing skills
28-
- [build-tooling.md](./agent-docs/docs/references/build-tooling.md) — Rslib, Rsbuild, Turborepo task graph, shared configs
29-
- [ci-cd.md](./agent-docs/docs/references/ci-cd.md) — GitHub Actions workflows, concurrency, caching, dogfood workflow, smoke tests
30-
- [release-process.md](./agent-docs/docs/references/release-process.md) — Changesets workflow, changelogs, npm publishing, PR preview packages
31-
- [writing-agent-instructions.md](./agent-docs/docs/references/writing-agent-instructions.md) — Principles for writing instructions agents follow, CLAUDE.md design rules
26+
- [development.md](./agent-docs/references/development.md) — pnpm workspace rules, env vars, JIT packages, dependency versioning, Retype docs, pre-commit hook, full command reference, adding packages
27+
- [agent-skills.md](./agent-docs/references/agent-skills.md) — Skill directories, editing skills
28+
- [build-tooling.md](./agent-docs/references/build-tooling.md) — Rslib, Rsbuild, Turborepo task graph, shared configs
29+
- [ci-cd.md](./agent-docs/references/ci-cd.md) — GitHub Actions workflows, concurrency, caching, dogfood workflow, smoke tests
30+
- [release-process.md](./agent-docs/references/release-process.md) — Changesets workflow, changelogs, npm publishing, PR preview packages
31+
- [writing-agent-instructions.md](./agent-docs/references/writing-agent-instructions.md) — Principles for writing instructions agents follow, CLAUDE.md design rules
3232

3333
### Quality
3434

35-
- [testing.md](./agent-docs/docs/quality/testing.md) — Vitest, smoke tests, browser validation, test infrastructure
35+
- [testing.md](./agent-docs/quality/testing.md) — Vitest, smoke tests, browser validation, test infrastructure
3636

3737
### Other
3838

39-
- [specs/README.md](./agent-docs/docs/specs/README.md) — All `@squide/*` packages: key APIs, source locations (i18next, MSW, LaunchDarkly, module federation, Storybook)
39+
- [specs/README.md](./agent-docs/specs/README.md) — All `@squide/*` packages: key APIs, source locations (i18next, MSW, LaunchDarkly, module federation, Storybook)
4040
- [adr/README.md](./agent-docs/adr/README.md) — Creating ADRs: when to write, template, status lifecycle
4141
- [odr/README.md](./agent-docs/odr/README.md) — Creating ODRs: when to write, template, status lifecycle

agent-docs/ARCHITECTURE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ For detailed patterns and APIs, read the design docs linked below. This section
3131

3232
- **FireflyRuntime** — Central runtime object (`initializeFirefly()`). Manages module registration, routes, navigation, event bus, logging, env vars, feature flags, and plugins.
3333
- **Modules** — Domain-specific units exporting a register function (`ModuleRegisterFunction`). Autonomous — they never import from other modules.
34-
- **Two-Phase Registration** — (1) Initial registration at bootstrap, (2) deferred registration re-runs when global data or feature flags change. See [deferred-registrations.md](./docs/design/deferred-registrations.md).
35-
- **AppRouter** — Wraps React Router, assembles routes from all modules, orchestrates data fetching lifecycle. See [routing-and-navigation.md](./docs/design/routing-and-navigation.md).
36-
- **Global Data Fetching** — Built on TanStack Query (`usePublicDataQueries`, `useProtectedDataQueries`). See [data-fetching.md](./docs/design/data-fetching.md).
37-
- **Route Types** — Protected (default), Public, Hoisted, Nested. See [routing-and-navigation.md](./docs/design/routing-and-navigation.md).
34+
- **Two-Phase Registration** — (1) Initial registration at bootstrap, (2) deferred registration re-runs when global data or feature flags change. See [deferred-registrations.md](./design/deferred-registrations.md).
35+
- **AppRouter** — Wraps React Router, assembles routes from all modules, orchestrates data fetching lifecycle. See [routing-and-navigation.md](./design/routing-and-navigation.md).
36+
- **Global Data Fetching** — Built on TanStack Query (`usePublicDataQueries`, `useProtectedDataQueries`). See [data-fetching.md](./design/data-fetching.md).
37+
- **Route Types** — Protected (default), Public, Hoisted, Nested. See [routing-and-navigation.md](./design/routing-and-navigation.md).
3838
- **Environment Variables** — Runtime-attached (not `process.env`). Registered via `initializeFirefly()` or `runtime.registerVariable()`.
39-
- **Cross-Module Communication** — Event bus (pub/sub), plugins, shared types. See [cross-module-communication.md](./docs/design/cross-module-communication.md).
39+
- **Cross-Module Communication** — Event bus (pub/sub), plugins, shared types. See [cross-module-communication.md](./design/cross-module-communication.md).
4040

4141
## Sample Applications
4242

@@ -51,5 +51,5 @@ Each sample follows: **host** → **shell** (layout, bootstrapping route) → **
5151

5252
## Further Reading
5353

54-
- All `@squide/*` packages and APIs: [specs/](./docs/specs/)
54+
- All `@squide/*` packages and APIs: [specs/](./specs/)
5555
- See [CLAUDE.md](../CLAUDE.md) for the full documentation index.
File renamed without changes.
File renamed without changes.
File renamed without changes.

agent-docs/odr/0009-ai-driven-browser-qa-in-ci.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ Evidence: `.github/workflows/smoke-test.yml`, `.github/workflows/dogfood.yml`, `
3434
- The dogfood session can discover issues outside the fixed page list, providing broader coverage.
3535
- AI-driven tests are less deterministic than scripted tests. False positives (AI misreads the UI) are possible but expected to be rare for binary PASS/FAIL outcomes.
3636
- Both workflows use `agent-browser install --with-deps` and `pnpm serve-endpoints` (production-like build). The dogfood session takes longer (~5–10 min including build and QA time) due to its exploratory nature vs the smoke test's fixed page list.
37-
- Dogfood evidence is stored on the `dogfood-evidence` orphan branch so GitHub issue links remain stable across runs. See [ci-cd.md](../docs/references/ci-cd.md#dogfood-workflow) for operational details.
37+
- Dogfood evidence is stored on the `dogfood-evidence` orphan branch so GitHub issue links remain stable across runs. See [ci-cd.md](../references/ci-cd.md#dogfood-workflow) for operational details.
3838
- Dogfood findings are filed as GitHub issues for human triage — the workflow does not block PRs or deployments.

agent-docs/odr/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
| Decision | ODR |
2626
|---|---|
2727
| Skill SKILL.md body keeps only critical patterns; everything else lives in reference files. Body should not grow past ~250 lines. | [0008](./0008-skill-body-reference-split.md) |
28-
| CLAUDE.md uses a single Memory Index with keyword summaries — never a separate routing table. Section anchors are added only for files over ~80 lines with distinct, high-frequency sub-tasks. Never add foler links to category headings. Keep the file under ~55 lines. | [0010](./0010-claude-md-progressive-disclosure-design.md) |
28+
| CLAUDE.md uses a single Memory Index with keyword summaries — never a separate routing table. Section anchors are added only for files over ~80 lines with distinct, high-frequency sub-tasks. Never add folder links to category headings. Keep the file under ~55 lines. | [0010](./0010-claude-md-progressive-disclosure-design.md) |
2929

0 commit comments

Comments
 (0)