Skip to content

Commit b7ca3fd

Browse files
committed
chore(agent): rename guidance directory to docs-ai
Move the repository-owned agent guidance from ai/ to docs-ai/ and update Codex, Claude Code, Cursor, README, docs, and area AGENTS pointers. Keep the directory tool-neutral while making its purpose more obvious as documentation.
1 parent a90cce4 commit b7ca3fd

36 files changed

Lines changed: 76 additions & 74 deletions

.cursor/rules/00-core.mdc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ alwaysApply: true
88

99
Hecate is an open-source AI gateway and agent-task runtime. The Go gateway embeds the React operator UI, mediates OpenAI- and Anthropic-shaped client traffic, runs queued `agent_loop` tasks with policy and approval gates, and emits OpenTelemetry traces for everything it does. Companion entrypoints such as `hecate-acp` handle protocols that need their own process lifecycle.
1010

11-
The canonical, vendor-neutral instruction layer for this repo lives in [`ai/`](../../ai/README.md). Start there. This file is a thin Cursor adapter listing the top-level non-negotiables.
11+
The canonical, vendor-neutral instruction layer for this repo lives in [`docs-ai/`](../../docs-ai/README.md). Start there. This file is a thin Cursor adapter listing the top-level non-negotiables.
1212

1313
## Non-negotiables
1414

@@ -25,7 +25,7 @@ The canonical, vendor-neutral instruction layer for this repo lives in [`ai/`](.
2525

2626
## Pointers
2727

28-
- Full project context: [`ai/core/project-context.md`](../../ai/core/project-context.md).
29-
- Project-wide conventions: [`ai/core/engineering-standards.md`](../../ai/core/engineering-standards.md).
30-
- Operating loop: [`ai/core/workflow.md`](../../ai/core/workflow.md).
31-
- Verification ladders: [`ai/core/verification.md`](../../ai/core/verification.md).
28+
- Full project context: [`docs-ai/core/project-context.md`](../../docs-ai/core/project-context.md).
29+
- Project-wide conventions: [`docs-ai/core/engineering-standards.md`](../../docs-ai/core/engineering-standards.md).
30+
- Operating loop: [`docs-ai/core/workflow.md`](../../docs-ai/core/workflow.md).
31+
- Verification ladders: [`docs-ai/core/verification.md`](../../docs-ai/core/verification.md).

.cursor/rules/10-planning.mdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ Substantial changes get a plan before code. Trivial changes (typo fixes, single-
3131

3232
`pkg/types/chat.go` → `internal/api/openai.go` (request struct) → `internal/api/handler_chat.go` (`normalizeChatRequest`) → `internal/providers/openai.go` (lowercase parallel struct) → **both `Chat` and `ChatStream` `wireReq` constructions** in that same file → `internal/providers/anthropic.go` `warnUnsupportedFieldsDropped` → tests at every layer. Forgetting the streaming `wireReq` is the most common bug.
3333

34-
Full chain with file references: [`ai/skills/providers/SKILL.md`](../../ai/skills/providers/SKILL.md).
34+
Full chain with file references: [`docs-ai/skills/providers/SKILL.md`](../../docs-ai/skills/providers/SKILL.md).
3535

3636
## Pointers
3737

38-
- Plan format: [`ai/tasks/planning.md`](../../ai/tasks/planning.md).
39-
- Architect skill (plan template, output shape, anti-patterns): [`ai/skills/architect/SKILL.md`](../../ai/skills/architect/SKILL.md).
38+
- Plan format: [`docs-ai/tasks/planning.md`](../../docs-ai/tasks/planning.md).
39+
- Architect skill (plan template, output shape, anti-patterns): [`docs-ai/skills/architect/SKILL.md`](../../docs-ai/skills/architect/SKILL.md).

.cursor/rules/20-testing.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ Race suite is the floor for any change touching `internal/gateway`, `internal/ro
3434

3535
## Pointers
3636

37-
- Full ladder and done criteria: [`ai/core/verification.md`](../../ai/core/verification.md).
38-
- Layer-choice matrix and edge cases: [`ai/skills/tester/SKILL.md`](../../ai/skills/tester/SKILL.md).
37+
- Full ladder and done criteria: [`docs-ai/core/verification.md`](../../docs-ai/core/verification.md).
38+
- Layer-choice matrix and edge cases: [`docs-ai/skills/tester/SKILL.md`](../../docs-ai/skills/tester/SKILL.md).

.cursor/rules/30-review.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ For each change, run a pass on each axis. Cite `file:line` for every finding.
2727

2828
## Pointer
2929

30-
Full rubric and discussion: [`ai/tasks/code-review.md`](../../ai/tasks/code-review.md).
30+
Full rubric and discussion: [`docs-ai/tasks/code-review.md`](../../docs-ai/tasks/code-review.md).

AGENTS.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ This file is the orientation entry — the codebase map, the runtime
1111
invariants, and the gotchas that bite often. It is what an agent
1212
(Claude Code, Codex, Cursor, or human) reaches for when starting work
1313
on this repo. Conventions, workflow, verification, and longer-form
14-
guidance live in [`ai/`](ai/README.md).
14+
guidance live in [`docs-ai/`](docs-ai/README.md).
1515

1616
## Where guidance lives
1717

1818
| Surface | What it carries |
1919
|---|---|
20-
| [`ai/`](ai/README.md) | Canonical agent guidance — project context, conventions, workflow, verification, task shapes, area + posture skills |
20+
| [`docs-ai/`](docs-ai/README.md) | Canonical agent guidance — project context, conventions, workflow, verification, task shapes, area + posture skills |
2121
| `AGENTS.md` (this) and `ui/AGENTS.md`, `internal/providers/AGENTS.md` | Codebase map per area |
22-
| [`CLAUDE.md`](CLAUDE.md) | Thin Claude Code adapter pointing to `ai/` |
23-
| [`.cursor/rules/`](.cursor/rules/) | Thin Cursor adapter pointing to `ai/` |
22+
| [`CLAUDE.md`](CLAUDE.md) | Thin Claude Code adapter pointing to `docs-ai/` |
23+
| [`.cursor/rules/`](.cursor/rules/) | Thin Cursor adapter pointing to `docs-ai/` |
2424
| [`.claude/commands/`](.claude/commands/) | Slash commands: `/race`, `/typecheck`, `/test-affected` |
2525
| [`docs/`](docs/) | Long-form references (architecture, runtime API, events, telemetry) |
2626

27-
When in doubt: read [`ai/core/project-context.md`](ai/core/project-context.md) and [`ai/core/workflow.md`](ai/core/workflow.md).
27+
When in doubt: read [`docs-ai/core/project-context.md`](docs-ai/core/project-context.md) and [`docs-ai/core/workflow.md`](docs-ai/core/workflow.md).
2828

2929
## Codebase map
3030

@@ -44,7 +44,7 @@ scripts/
4444
stamp-version.ts stamp Tauri version files to current git tag / TAURI_VERSION
4545
e2e/ binary-startup tests; build tag e2e (sub-tags: ollama, docker)
4646
docs/ long-form references (architecture, runtime API, events, ...)
47-
ai/ canonical agent guidance (this file points there for depth)
47+
docs-ai/ canonical agent guidance (this file points there for depth)
4848
4949
internal/
5050
api/ inbound HTTP shapes + handlers (OpenAIChatMessage, uppercase)
@@ -85,7 +85,7 @@ pkg/types/ ← internal/api/ ← internal/providers/
8585
internal/orchestrator/ (sits above api, drives runs through providers)
8686
```
8787

88-
The api↔providers parallel-struct duplication (`OpenAIChatMessage``openAIChatMessage`) is intentional — it keeps `internal/providers/` free of `internal/api/` imports. Full rationale: [`ai/skills/providers/SKILL.md`](ai/skills/providers/SKILL.md).
88+
The api↔providers parallel-struct duplication (`OpenAIChatMessage``openAIChatMessage`) is intentional — it keeps `internal/providers/` free of `internal/api/` imports. Full rationale: [`docs-ai/skills/providers/SKILL.md`](docs-ai/skills/providers/SKILL.md).
8989

9090
**Storage tier rule**: every backend-bound concern mirrors two tiers —
9191
memory (default) and sqlite (`modernc.org/sqlite`, no CGO).
@@ -105,7 +105,7 @@ touches request handling, persistence, or tool execution.
105105

106106
## Conventions (in brief)
107107

108-
Full standards: [`ai/core/engineering-standards.md`](ai/core/engineering-standards.md).
108+
Full standards: [`docs-ai/core/engineering-standards.md`](docs-ai/core/engineering-standards.md).
109109

110110
- **Comments explain *why***, not what. State the trade-off.
111111
- **Pointer vs value for optional fields**: pointer when zero is a valid
@@ -118,7 +118,7 @@ Full standards: [`ai/core/engineering-standards.md`](ai/core/engineering-standar
118118

119119
## Verification
120120

121-
Full ladder: [`ai/core/verification.md`](ai/core/verification.md).
121+
Full ladder: [`docs-ai/core/verification.md`](docs-ai/core/verification.md).
122122

123123
- **Race suite is the floor for runtime/backend changes**: `go test -race -timeout 10m ./...` (or `/race`). Race builds are large; if your default `$GOCACHE` is on a small volume, point it at the repo: `GOCACHE="$(pwd)/.gocache" go test -race ...`.
124124
- **Iteration**: `/test-affected` for narrow runs.
@@ -129,11 +129,11 @@ Full ladder: [`ai/core/verification.md`](ai/core/verification.md).
129129

130130
| Task | Where |
131131
|---|---|
132-
| Add a passthrough wire field (the seven-step chain — most-redone task here) | [`ai/skills/providers/SKILL.md`](ai/skills/providers/SKILL.md) |
133-
| Add an MCP tool / persisted run-event type / test helper cheat-sheet | [`ai/skills/backend/SKILL.md`](ai/skills/backend/SKILL.md) |
134-
| UI recipes (SSE-driven state field, paired pickers, snapshot refresh) | [`ai/skills/ui/SKILL.md`](ai/skills/ui/SKILL.md) |
135-
| Native desktop app (sidecar lifecycle, bundling, Tauri commands) | [`ai/skills/tauri/SKILL.md`](ai/skills/tauri/SKILL.md) |
136-
| Cut a release tag | `bun scripts/release.ts vX.Y.Z` — checks worktree, snapshot dry-run, stamps Tauri versions, tags, pushes. Full procedure: [`ai/tasks/release.md`](ai/tasks/release.md) |
132+
| Add a passthrough wire field (the seven-step chain — most-redone task here) | [`docs-ai/skills/providers/SKILL.md`](docs-ai/skills/providers/SKILL.md) |
133+
| Add an MCP tool / persisted run-event type / test helper cheat-sheet | [`docs-ai/skills/backend/SKILL.md`](docs-ai/skills/backend/SKILL.md) |
134+
| UI recipes (SSE-driven state field, paired pickers, snapshot refresh) | [`docs-ai/skills/ui/SKILL.md`](docs-ai/skills/ui/SKILL.md) |
135+
| Native desktop app (sidecar lifecycle, bundling, Tauri commands) | [`docs-ai/skills/tauri/SKILL.md`](docs-ai/skills/tauri/SKILL.md) |
136+
| Cut a release tag | `bun scripts/release.ts vX.Y.Z` — checks worktree, snapshot dry-run, stamps Tauri versions, tags, pushes. Full procedure: [`docs-ai/tasks/release.md`](docs-ai/tasks/release.md) |
137137
| Stamp Tauri version files | `bun scripts/stamp-version.ts` (or `make tauri-version`) — syncs Cargo.toml, package.json, tauri.conf.json to current git tag |
138138

139139
## Gotchas
@@ -142,7 +142,7 @@ Full ladder: [`ai/core/verification.md`](ai/core/verification.md).
142142
- **modernc/sqlite TIME-as-text format**: the driver writes `time.Time` using Go's default `time.Time.String()` format, which doesn't lex-compare with RFC3339Nano cutoffs and silently breaks the retention sweep. Always write timestamps as `t.UTC().Format(time.RFC3339Nano)` when the column is TEXT (see `internal/taskstate/sqlite.go` `AppendRunEvent`).
143143
- **OpenAI/openAI parallel structs are intentional**: don't unify. Mirror fields when adding on either side.
144144
- **Streaming `wireReq` plumbing**: when adding a passthrough field, plumb it into BOTH `Chat` and `ChatStream` `wireReq` constructions in `internal/providers/openai.go`. Forgetting one is the most common provider bug — non-stream tests pass; the field silently drops in production for any client using `stream: true`.
145-
- **Capability-cache seeding** for provider tests: seed `cachedCaps` and `capsExpiry` to skip the discovery path. Snippet in [`ai/skills/providers/SKILL.md`](ai/skills/providers/SKILL.md).
145+
- **Capability-cache seeding** for provider tests: seed `cachedCaps` and `capsExpiry` to skip the discovery path. Snippet in [`docs-ai/skills/providers/SKILL.md`](docs-ai/skills/providers/SKILL.md).
146146
- **Pricebook preflight** in tests: `PROVIDER_FAKE_KIND=local` for synthetic models in e2e.
147147
- **mermaid `loop` is a reserved keyword**: don't use it as a sequence-diagram participant name. Use `Agent` or similar.
148148
- **CodeQL CWE-190**: don't compute `make([]T, 0, len(x)+N)` with arithmetic — use plain `len(x)` and let `append` grow.

CLAUDE.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# CLAUDE.md
22

3-
This is the Hecate repo — an open-source AI gateway and agent-task runtime (Go gateway with embedded React UI plus companion integration entrypoints). Shared agent guidance lives in [`ai/`](ai/README.md). This file is a thin Claude-specific adapter; the substance lives there.
3+
This is the Hecate repo — an open-source AI gateway and agent-task runtime (Go gateway with embedded React UI plus companion integration entrypoints). Shared agent guidance lives in [`docs-ai/`](docs-ai/README.md). This file is a thin Claude-specific adapter; the substance lives there.
44

55
## Start here
66

7-
[`ai/README.md`](ai/README.md) is the entry point and map.
7+
[`docs-ai/README.md`](docs-ai/README.md) is the entry point and map.
88

99
## When working on this repo
1010

1111
Pick the right skill for the change:
1212

13-
- **Backend** (anything outside `ui/` and `tauri/`) — [`hecate-backend`](ai/skills/backend/SKILL.md).
14-
- **UI** (`ui/`) — [`hecate-ui`](ai/skills/ui/SKILL.md).
15-
- **Native desktop app** (`tauri/`) — [`hecate-tauri`](ai/skills/tauri/SKILL.md). Tauri 2.x Rust layer, sidecar lifecycle, platform bundling, gateway↔webview integration.
16-
- **Provider adapters** (`internal/providers/`, anything that crosses the api↔providers boundary) — [`hecate-providers`](ai/skills/providers/SKILL.md). Owns the canonical seven-step "add a wire field" chain.
17-
- **Planning a substantial change**[`hecate-architect`](ai/skills/architect/SKILL.md). Produces a plan, not code.
18-
- **Test strategy / coverage audit / verification report**[`hecate-tester`](ai/skills/tester/SKILL.md).
19-
- **Delivery review** (env vars, schema migrations, CI/CD, observability surfaces) — [`hecate-devops`](ai/skills/devops/SKILL.md).
13+
- **Backend** (anything outside `ui/` and `tauri/`) — [`hecate-backend`](docs-ai/skills/backend/SKILL.md).
14+
- **UI** (`ui/`) — [`hecate-ui`](docs-ai/skills/ui/SKILL.md).
15+
- **Native desktop app** (`tauri/`) — [`hecate-tauri`](docs-ai/skills/tauri/SKILL.md). Tauri 2.x Rust layer, sidecar lifecycle, platform bundling, gateway↔webview integration.
16+
- **Provider adapters** (`internal/providers/`, anything that crosses the api↔providers boundary) — [`hecate-providers`](docs-ai/skills/providers/SKILL.md). Owns the canonical seven-step "add a wire field" chain.
17+
- **Planning a substantial change**[`hecate-architect`](docs-ai/skills/architect/SKILL.md). Produces a plan, not code.
18+
- **Test strategy / coverage audit / verification report**[`hecate-tester`](docs-ai/skills/tester/SKILL.md).
19+
- **Delivery review** (env vars, schema migrations, CI/CD, observability surfaces) — [`hecate-devops`](docs-ai/skills/devops/SKILL.md).
2020

2121
## Useful slash commands
2222

@@ -28,8 +28,8 @@ Pick the right skill for the change:
2828

2929
## Repo policy
3030

31-
Shared agent guidance is repository-owned and committed. There is no `.local` override layer and no personal customization tier. If a rule belongs in agent context, it lives in [`ai/`](ai/README.md), in the open, under version control.
31+
Shared agent guidance is repository-owned and committed. There is no `.local` override layer and no personal customization tier. If a rule belongs in agent context, it lives in [`docs-ai/`](docs-ai/README.md), in the open, under version control.
3232

3333
## Note on `AGENTS.md`
3434

35-
[`AGENTS.md`](AGENTS.md) at the repo root, [`ui/AGENTS.md`](ui/AGENTS.md), and [`internal/providers/AGENTS.md`](internal/providers/AGENTS.md) are the codebase map and the Codex-discoverable entry points. They stay scoped to map-and-recipes; conventions and longer guidance live in [`ai/`](ai/README.md).
35+
[`AGENTS.md`](AGENTS.md) at the repo root, [`ui/AGENTS.md`](ui/AGENTS.md), and [`internal/providers/AGENTS.md`](internal/providers/AGENTS.md) are the codebase map and the Codex-discoverable entry points. They stay scoped to map-and-recipes; conventions and longer guidance live in [`docs-ai/`](docs-ai/README.md).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ First-run environment knobs live in [`.env.example`](.env.example).
219219

220220
## Contributing
221221

222-
See [CONTRIBUTING.md](CONTRIBUTING.md). If you work with an AI assistant, start with [AGENTS.md](AGENTS.md); the vendor-neutral agent instruction layer lives in [ai/](ai/README.md).
222+
See [CONTRIBUTING.md](CONTRIBUTING.md). If you work with an AI assistant, start with [AGENTS.md](AGENTS.md); the vendor-neutral agent instruction layer lives in [docs-ai/](docs-ai/README.md).
223223

224224
## License
225225

ai/README.md renamed to docs-ai/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ point here — the substance lives in this directory.
77
## Layout
88

99
```
10-
ai/
10+
docs-ai/
1111
README.md this file — load order and quick rules
1212
core/
1313
project-context.md what Hecate is, repo layout, rings, storage tiers, toolchain pins, risky areas
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ docs/ long-form references (canonical product/runtime docs)
3333
3434
.claude/ Claude Code adapter (slash commands, settings)
3535
.cursor/ Cursor adapter (.mdc rule files)
36-
ai/ canonical, vendor-neutral agent instruction layer (this directory)
36+
docs-ai/ canonical, vendor-neutral agent instruction layer (this directory)
3737
```
3838

3939
## Architecture rings

0 commit comments

Comments
 (0)