@cluesmith/codev 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/bin/af.js +2 -2
- package/bin/afx.js +8 -0
- package/bin/consult.js +2 -1
- package/bin/team.js +2 -1
- package/{dashboard/dist/assets/index-nr0cXxtf.css → dashboard-dist/assets/index-BWYZtvwm.css} +1 -1
- package/dashboard-dist/assets/index-Dn9zmcKp.js +195 -0
- package/dashboard-dist/assets/index-Dn9zmcKp.js.map +1 -0
- package/{dashboard/dist → dashboard-dist}/index.html +2 -2
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +27 -19
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/architect.d.ts +4 -4
- package/dist/agent-farm/commands/architect.d.ts.map +1 -1
- package/dist/agent-farm/commands/architect.js +23 -12
- package/dist/agent-farm/commands/architect.js.map +1 -1
- package/dist/agent-farm/commands/attach.d.ts.map +1 -1
- package/dist/agent-farm/commands/attach.js +101 -11
- package/dist/agent-farm/commands/attach.js.map +1 -1
- package/dist/agent-farm/commands/bench.d.ts +1 -1
- package/dist/agent-farm/commands/bench.js +1 -1
- package/dist/agent-farm/commands/cron.js +1 -1
- package/dist/agent-farm/commands/cron.js.map +1 -1
- package/dist/agent-farm/commands/db.d.ts +3 -3
- package/dist/agent-farm/commands/db.js +4 -4
- package/dist/agent-farm/commands/db.js.map +1 -1
- package/dist/agent-farm/commands/open.js +2 -2
- package/dist/agent-farm/commands/open.js.map +1 -1
- package/dist/agent-farm/commands/rename.js +1 -1
- package/dist/agent-farm/commands/rename.js.map +1 -1
- package/dist/agent-farm/commands/send.js +3 -3
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/shell.js +3 -3
- package/dist/agent-farm/commands/shell.js.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.d.ts +9 -5
- package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.js +48 -28
- package/dist/agent-farm/commands/spawn-roles.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts +5 -5
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +80 -13
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts +6 -6
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +90 -53
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/status.d.ts.map +1 -1
- package/dist/agent-farm/commands/status.js +48 -3
- package/dist/agent-farm/commands/status.js.map +1 -1
- package/dist/agent-farm/commands/team-update.d.ts +1 -1
- package/dist/agent-farm/commands/team-update.js +1 -1
- package/dist/agent-farm/commands/team.d.ts +1 -1
- package/dist/agent-farm/commands/team.js +1 -1
- package/dist/agent-farm/commands/tower-cloud.d.ts +2 -2
- package/dist/agent-farm/commands/tower-cloud.js +3 -3
- package/dist/agent-farm/commands/tower-cloud.js.map +1 -1
- package/dist/agent-farm/commands/tower.js +2 -2
- package/dist/agent-farm/commands/tower.js.map +1 -1
- package/dist/agent-farm/db/index.d.ts.map +1 -1
- package/dist/agent-farm/db/index.js +47 -0
- package/dist/agent-farm/db/index.js.map +1 -1
- package/dist/agent-farm/db/schema.d.ts +1 -1
- package/dist/agent-farm/db/schema.d.ts.map +1 -1
- package/dist/agent-farm/db/schema.js +1 -1
- package/dist/agent-farm/db/types.d.ts +1 -1
- package/dist/agent-farm/lib/cloud-config.js +2 -2
- package/dist/agent-farm/lib/cloud-config.js.map +1 -1
- package/dist/agent-farm/lib/tower-client.d.ts +6 -230
- package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tower-client.js +6 -293
- package/dist/agent-farm/lib/tower-client.js.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.js +1 -1
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
- package/dist/agent-farm/servers/message-write.d.ts +24 -0
- package/dist/agent-farm/servers/message-write.d.ts.map +1 -0
- package/dist/agent-farm/servers/message-write.js +63 -0
- package/dist/agent-farm/servers/message-write.js.map +1 -0
- package/dist/agent-farm/servers/overview.d.ts +4 -1
- package/dist/agent-farm/servers/overview.d.ts.map +1 -1
- package/dist/agent-farm/servers/overview.js +38 -5
- package/dist/agent-farm/servers/overview.js.map +1 -1
- package/dist/agent-farm/servers/send-buffer.d.ts +4 -3
- package/dist/agent-farm/servers/send-buffer.d.ts.map +1 -1
- package/dist/agent-farm/servers/send-buffer.js +7 -4
- package/dist/agent-farm/servers/send-buffer.js.map +1 -1
- package/dist/agent-farm/servers/tower-cron-parser.js +1 -1
- package/dist/agent-farm/servers/tower-cron-parser.js.map +1 -1
- package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-cron.js +4 -5
- package/dist/agent-farm/servers/tower-cron.js.map +1 -1
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-instances.js +6 -5
- package/dist/agent-farm/servers/tower-instances.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +19 -16
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +19 -4
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts +2 -2
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +47 -18
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.js +2 -2
- package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
- package/dist/agent-farm/servers/tower-utils.d.ts +9 -6
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.js +12 -6
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/state.js +1 -1
- package/dist/agent-farm/state.js.map +1 -1
- package/dist/agent-farm/types.d.ts +11 -2
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.d.ts +11 -0
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +21 -0
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/harness.d.ts +85 -0
- package/dist/agent-farm/utils/harness.d.ts.map +1 -0
- package/dist/agent-farm/utils/harness.js +212 -0
- package/dist/agent-farm/utils/harness.js.map +1 -0
- package/dist/agent-farm/utils/server-utils.d.ts +13 -0
- package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
- package/dist/agent-farm/utils/server-utils.js +38 -0
- package/dist/agent-farm/utils/server-utils.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +19 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.js +2 -2
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +37 -3
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +220 -150
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +54 -8
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/porch/artifacts.d.ts +69 -0
- package/dist/commands/porch/artifacts.d.ts.map +1 -0
- package/dist/commands/porch/artifacts.js +368 -0
- package/dist/commands/porch/artifacts.js.map +1 -0
- package/dist/commands/porch/checks.d.ts +8 -1
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +98 -1
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/index.d.ts +18 -7
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +299 -61
- package/dist/commands/porch/index.js.map +1 -1
- package/dist/commands/porch/next.d.ts.map +1 -1
- package/dist/commands/porch/next.js +72 -74
- package/dist/commands/porch/next.js.map +1 -1
- package/dist/commands/porch/notify.d.ts +2 -2
- package/dist/commands/porch/notify.js +5 -5
- package/dist/commands/porch/notify.js.map +1 -1
- package/dist/commands/porch/prompts.d.ts +2 -1
- package/dist/commands/porch/prompts.d.ts.map +1 -1
- package/dist/commands/porch/prompts.js +23 -14
- package/dist/commands/porch/prompts.js.map +1 -1
- package/dist/commands/porch/state.d.ts +27 -2
- package/dist/commands/porch/state.d.ts.map +1 -1
- package/dist/commands/porch/state.js +96 -9
- package/dist/commands/porch/state.js.map +1 -1
- package/dist/commands/porch/types.d.ts +8 -0
- package/dist/commands/porch/types.d.ts.map +1 -1
- package/dist/lib/config.d.ts +14 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +7 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/forge-contracts.d.ts +10 -1
- package/dist/lib/forge-contracts.d.ts.map +1 -1
- package/dist/lib/forge-contracts.js.map +1 -1
- package/dist/lib/forge.d.ts.map +1 -1
- package/dist/lib/forge.js +25 -7
- package/dist/lib/forge.js.map +1 -1
- package/dist/lib/team-github.d.ts +49 -0
- package/dist/lib/team-github.d.ts.map +1 -1
- package/dist/lib/team-github.js +115 -6
- package/dist/lib/team-github.js.map +1 -1
- package/dist/terminal/pty-manager.d.ts.map +1 -1
- package/dist/terminal/pty-manager.js +2 -0
- package/dist/terminal/pty-manager.js.map +1 -1
- package/dist/terminal/ws-protocol.d.ts +10 -8
- package/dist/terminal/ws-protocol.d.ts.map +1 -1
- package/dist/terminal/ws-protocol.js +3 -0
- package/dist/terminal/ws-protocol.js.map +1 -1
- package/package.json +28 -25
- package/scripts/forge/gitea/auth-status.sh +0 -0
- package/scripts/forge/gitea/issue-comment.sh +0 -0
- package/scripts/forge/gitea/issue-list.sh +0 -0
- package/scripts/forge/gitea/issue-view.sh +0 -0
- package/scripts/forge/gitea/pr-exists.sh +4 -1
- package/scripts/forge/gitea/pr-list.sh +0 -0
- package/scripts/forge/gitea/pr-merge.sh +0 -0
- package/scripts/forge/gitea/pr-view.sh +0 -0
- package/scripts/forge/gitea/recently-closed.sh +0 -0
- package/scripts/forge/gitea/recently-merged.sh +0 -0
- package/scripts/forge/gitea/repo-archive.sh +0 -0
- package/scripts/forge/gitea/user-identity.sh +0 -0
- package/scripts/forge/github/auth-status.sh +0 -0
- package/scripts/forge/github/issue-comment.sh +0 -0
- package/scripts/forge/github/issue-list.sh +2 -2
- package/scripts/forge/github/issue-view.sh +0 -0
- package/scripts/forge/github/on-it-timestamps.sh +0 -0
- package/scripts/forge/github/pr-diff.sh +0 -0
- package/scripts/forge/github/pr-exists.sh +3 -1
- package/scripts/forge/github/pr-list.sh +2 -2
- package/scripts/forge/github/pr-merge.sh +0 -0
- package/scripts/forge/github/pr-search.sh +0 -0
- package/scripts/forge/github/pr-view.sh +0 -0
- package/scripts/forge/github/recently-closed.sh +0 -0
- package/scripts/forge/github/recently-merged.sh +0 -0
- package/scripts/forge/github/repo-archive.sh +0 -0
- package/scripts/forge/github/team-activity.sh +0 -0
- package/scripts/forge/github/user-identity.sh +0 -0
- package/scripts/forge/gitlab/auth-status.sh +0 -0
- package/scripts/forge/gitlab/issue-comment.sh +0 -0
- package/scripts/forge/gitlab/issue-list.sh +0 -0
- package/scripts/forge/gitlab/issue-view.sh +0 -0
- package/scripts/forge/gitlab/pr-diff.sh +0 -0
- package/scripts/forge/gitlab/pr-exists.sh +3 -1
- package/scripts/forge/gitlab/pr-list.sh +0 -0
- package/scripts/forge/gitlab/pr-merge.sh +0 -0
- package/scripts/forge/gitlab/pr-search.sh +0 -0
- package/scripts/forge/gitlab/pr-view.sh +0 -0
- package/scripts/forge/gitlab/recently-closed.sh +0 -0
- package/scripts/forge/gitlab/recently-merged.sh +0 -0
- package/scripts/forge/gitlab/repo-archive.sh +0 -0
- package/scripts/forge/gitlab/user-identity.sh +0 -0
- package/scripts/forge/linear/auth-status.sh +15 -0
- package/scripts/forge/linear/issue-comment.sh +38 -0
- package/scripts/forge/linear/issue-list.sh +35 -0
- package/scripts/forge/linear/issue-view.sh +37 -0
- package/scripts/forge/linear/recently-closed.sh +45 -0
- package/scripts/forge/linear/user-identity.sh +15 -0
- package/scripts/postinstall.mjs +51 -0
- package/skeleton/.claude/skills/afx/SKILL.md +144 -0
- package/skeleton/.claude/skills/codev/SKILL.md +3 -3
- package/skeleton/.claude/skills/consult/SKILL.md +1 -1
- package/skeleton/.claude/skills/porch/SKILL.md +2 -2
- package/skeleton/.claude/skills/update-arch-docs/SKILL.md +107 -0
- package/skeleton/DEPENDENCIES.md +1 -1
- package/skeleton/builders.md +4 -4
- package/skeleton/protocol-schema.json +2 -2
- package/skeleton/protocols/air/builder-prompt.md +6 -6
- package/skeleton/protocols/air/prompts/pr.md +17 -5
- package/skeleton/protocols/air/protocol.md +1 -2
- package/skeleton/protocols/aspir/builder-prompt.md +28 -6
- package/skeleton/protocols/aspir/prompts/review.md +11 -0
- package/skeleton/protocols/aspir/protocol.json +9 -1
- package/skeleton/protocols/aspir/protocol.md +1 -1
- package/skeleton/protocols/aspir/templates/plan.md +0 -20
- package/skeleton/protocols/aspir/templates/spec.md +0 -28
- package/skeleton/protocols/bugfix/builder-prompt.md +6 -6
- package/skeleton/protocols/bugfix/prompts/pr.md +16 -4
- package/skeleton/protocols/experiment/builder-prompt.md +15 -0
- package/skeleton/protocols/experiment/protocol.md +1 -6
- package/skeleton/protocols/maintain/builder-prompt.md +12 -11
- package/skeleton/protocols/maintain/prompts/maintain.md +88 -0
- package/skeleton/protocols/maintain/prompts/review.md +84 -0
- package/skeleton/protocols/maintain/protocol.json +14 -68
- package/skeleton/protocols/maintain/protocol.md +163 -394
- package/skeleton/protocols/maintain/templates/maintenance-run.md +18 -49
- package/skeleton/protocols/protocol-schema.json +1 -1
- package/skeleton/protocols/research/builder-prompt.md +85 -0
- package/skeleton/protocols/research/protocol.json +118 -0
- package/skeleton/protocols/research/protocol.md +169 -0
- package/skeleton/protocols/spike/builder-prompt.md +1 -1
- package/skeleton/protocols/spike/protocol.md +4 -4
- package/skeleton/protocols/spir/builder-prompt.md +28 -5
- package/skeleton/protocols/spir/prompts/review.md +11 -0
- package/skeleton/protocols/spir/protocol.json +9 -1
- package/skeleton/protocols/spir/protocol.md +6 -5
- package/skeleton/protocols/spir/templates/plan.md +0 -20
- package/skeleton/protocols/spir/templates/spec.md +0 -28
- package/skeleton/resources/commands/agent-farm.md +84 -84
- package/skeleton/resources/commands/codev.md +1 -1
- package/skeleton/resources/commands/consult.md +16 -7
- package/skeleton/resources/commands/overview.md +14 -15
- package/skeleton/resources/risk-triage.md +2 -2
- package/skeleton/resources/workflow-reference.md +14 -14
- package/skeleton/roles/architect.md +39 -39
- package/skeleton/roles/builder.md +22 -14
- package/skeleton/templates/AGENTS.md +5 -3
- package/skeleton/templates/CLAUDE.md +5 -3
- package/skeleton/templates/arch.md +100 -30
- package/skeleton/templates/cheatsheet.md +12 -12
- package/skeleton/templates/lessons-learned.md +45 -7
- package/templates/3d-viewer.html +16 -18
- package/templates/tower.html +1 -1
- package/dashboard/dist/assets/index-CTrlY11L.js +0 -194
- package/dashboard/dist/assets/index-CTrlY11L.js.map +0 -1
- package/skeleton/.claude/skills/af/SKILL.md +0 -146
- package/skeleton/porch/prompts/understand.md +0 -61
- package/skeleton/porch/prompts/verify.md +0 -58
- package/skeleton/protocols/maintain/prompts/audit.md +0 -111
- package/skeleton/protocols/maintain/prompts/clean.md +0 -91
- package/skeleton/protocols/maintain/prompts/sync.md +0 -113
- package/skeleton/protocols/maintain/prompts/verify.md +0 -110
- package/skeleton/protocols/tick/builder-prompt.md +0 -65
- package/skeleton/protocols/tick/consult-types/impl-review.md +0 -72
- package/skeleton/protocols/tick/consult-types/plan-review.md +0 -59
- package/skeleton/protocols/tick/consult-types/pr-review.md +0 -72
- package/skeleton/protocols/tick/consult-types/spec-review.md +0 -55
- package/skeleton/protocols/tick/protocol.json +0 -151
- package/skeleton/protocols/tick/protocol.md +0 -277
- package/skeleton/protocols/tick/templates/plan.md +0 -67
- package/skeleton/protocols/tick/templates/review.md +0 -89
- package/skeleton/protocols/tick/templates/spec.md +0 -61
|
@@ -1,56 +1,126 @@
|
|
|
1
1
|
# Architecture
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The architecture document for this project. Skim it to orient yourself; reach for the meta-specs under `codev/architecture/` (if any) or the relevant subsystem section for depth.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **How to use this template**: Each section below is a stub with a one-line "skip if N/A" hint. Delete sections that don't apply to your project — small projects often only need TL;DR, Repository Layout & Stack, and Updating This Document. Bigger systems will fill in more. The goal is orientation, not completeness.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## TL;DR
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
A 2–4 sentence summary of what this project is, the language/stack, the deployment shape, and the single most important mental model a new contributor needs.
|
|
10
|
+
|
|
11
|
+
*Example*: "A monorepo of TypeScript packages and a CLI. The CLI talks to a long-running orchestrator process (Tower) over WebSockets. The orchestrator manages git worktrees, one per builder. The mental model is: 'CLI = thin client; Tower = state owner.'"
|
|
12
|
+
|
|
13
|
+
## Repository Layout & Stack
|
|
14
|
+
|
|
15
|
+
The shape of the repo and the languages/frameworks in use. Not a per-file enumeration — a `tree -L 2` view plus 2–3 lines on each top-level directory's role is plenty.
|
|
16
|
+
|
|
17
|
+
> *Skip if N/A: a single-package project that's well-served by `package.json` alone.*
|
|
10
18
|
|
|
11
19
|
```
|
|
12
20
|
project-root/
|
|
13
|
-
├──
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
└── [your code] # Project source code
|
|
21
|
+
├── packages/ # Workspace packages
|
|
22
|
+
├── codev/ # Specs, plans, reviews, protocol files
|
|
23
|
+
├── docs/ # User-facing documentation
|
|
24
|
+
└── ...
|
|
18
25
|
```
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
**Stack**: language version(s), framework(s), package manager. Avoid pinning exact patch versions; the lockfile is authoritative for those.
|
|
28
|
+
|
|
29
|
+
## Per-Subsystem Mechanism
|
|
30
|
+
|
|
31
|
+
For each subsystem with **unique mechanism** — something a reader cannot derive from reading the code in 5 minutes — give it a section here. Mechanism means: how the pieces fit together, what invariants hold, what surprised the team.
|
|
32
|
+
|
|
33
|
+
> *Skip if N/A: subsystems whose mechanism is well-conveyed by the code itself or by a meta-spec under `codev/architecture/<domain>.md`. In that case, replace this section with a 1-paragraph summary + pointer.*
|
|
34
|
+
|
|
35
|
+
### [Subsystem name]
|
|
36
|
+
|
|
37
|
+
**Purpose**: One sentence on what this subsystem owns.
|
|
38
|
+
|
|
39
|
+
**Mechanism**: How it works. Invariants. Failure modes worth knowing.
|
|
40
|
+
|
|
41
|
+
**Pointer**: `codev/architecture/<domain>.md` (if a meta-spec exists).
|
|
42
|
+
|
|
43
|
+
## Apps Roster
|
|
44
|
+
|
|
45
|
+
For projects that ship multiple deployable apps — a CLI, a web service, a worker, etc. List them with a one-liner each.
|
|
46
|
+
|
|
47
|
+
> *Skip if N/A: single-app projects.*
|
|
21
48
|
|
|
22
|
-
|
|
49
|
+
| App | Purpose | Entry point |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `cli` | Command-line interface | `packages/cli/src/index.ts` |
|
|
52
|
+
| `worker` | Background job runner | `apps/worker/src/main.ts` |
|
|
23
53
|
|
|
24
|
-
|
|
54
|
+
## Packages Roster
|
|
25
55
|
|
|
26
|
-
|
|
56
|
+
For monorepos. List the workspace packages with a one-liner each. Do not duplicate `pnpm-workspace.yaml` or `package.json` — link to them.
|
|
27
57
|
|
|
28
|
-
|
|
58
|
+
> *Skip if N/A: non-monorepo projects.*
|
|
29
59
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
60
|
+
| Package | Purpose |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `@org/core` | Domain logic, no I/O |
|
|
63
|
+
| `@org/cli` | CLI entry point, depends on core |
|
|
33
64
|
|
|
34
|
-
##
|
|
65
|
+
## Verified-Wrong Assumptions
|
|
35
66
|
|
|
36
|
-
|
|
67
|
+
System-shape surprises that have been verified wrong in production. Each entry is one or two sentences: *"It looks like X but is actually Y. We learned this when ..."*. This section earns its keep by saving future readers from the same mistake.
|
|
37
68
|
|
|
38
|
-
|
|
69
|
+
> *Skip if N/A: nothing has surprised you yet. Add entries as they're discovered.*
|
|
39
70
|
|
|
40
|
-
|
|
71
|
+
- *Example*: "It looks like the CLI talks to Tower over HTTP, but the WebSocket bidirectional channel is the actual transport — the HTTP routes are only used for `/health` and one-off lookups. We learned this when adding a new command broke because we wrote it as a fetch call."
|
|
41
72
|
|
|
42
|
-
|
|
43
|
-
|------------|---------|---------------|
|
|
44
|
-
| Example | ... | [docs](url) |
|
|
73
|
+
## Updating This Document
|
|
45
74
|
|
|
46
|
-
|
|
75
|
+
This is a single-page orientation doc, not a wiki. Keep it sized to its purpose.
|
|
47
76
|
|
|
48
|
-
|
|
77
|
+
### When to update
|
|
49
78
|
|
|
50
|
-
|
|
79
|
+
- After a MAINTAIN run that changed system shape.
|
|
80
|
+
- When a subsystem's mechanism changes meaningfully (not when one file gets renamed).
|
|
81
|
+
- When a verified-wrong assumption is discovered.
|
|
82
|
+
- *Not* every spec; specs already produce reviews and git history. Don't duplicate that here.
|
|
51
83
|
|
|
52
|
-
|
|
84
|
+
### How to update
|
|
53
85
|
|
|
54
|
-
|
|
86
|
+
Use the `update-arch-docs` skill. It runs in two modes:
|
|
87
|
+
|
|
88
|
+
- **diff-mode**: apply a specific change to the smallest section that needs updating.
|
|
89
|
+
- **audit-mode**: read the doc end-to-end against the discipline below and propose cuts with reasons.
|
|
90
|
+
|
|
91
|
+
The skill edits this file directly via normal file-edit tooling. It does not invoke destructive shell commands; everything goes through Edit. The MAINTAIN PR diff is the human-confirmation step.
|
|
92
|
+
|
|
93
|
+
### What NOT to put in
|
|
94
|
+
|
|
95
|
+
The main pressure on this document is unchecked growth. Reject all of the following:
|
|
96
|
+
|
|
97
|
+
- **Per-file enumerations** that go stale. Document directory shape and key files; let `git ls-files` be authoritative for the rest.
|
|
98
|
+
- **Per-spec changelog sections** ("Spec 0042 added X"). The git log + the spec/review docs own this framing. Architecture is current state, not history.
|
|
99
|
+
- **Specs/plans tables** that mirror `codev/specs/` and `codev/plans/`. Link to the directory; do not paginate it here.
|
|
100
|
+
- **Aspirational state** ("we plan to…"). That's a meta-spec or a roadmap doc, not architecture.
|
|
101
|
+
- **Date-stamped narrative** ("As of 2026-Q2…"). Looks fresh; ages worse than a calendar.
|
|
102
|
+
- **Duplication of meta-spec content**. If a subsystem has a meta-spec, this doc carries a 1-paragraph summary plus a pointer.
|
|
103
|
+
- **Retired-component graveyards**. When a component is removed, delete its section. `git log` keeps the history.
|
|
104
|
+
|
|
105
|
+
### Sanity-check checklist
|
|
106
|
+
|
|
107
|
+
Before committing an arch.md change, run through these:
|
|
108
|
+
|
|
109
|
+
1. Does the section describe **current state**, not aspiration?
|
|
110
|
+
2. Does it duplicate a meta-spec? If yes, replace with a summary + pointer.
|
|
111
|
+
3. Is the section orienting (worth a reader's 30 seconds), or is it exhaustive?
|
|
112
|
+
4. Could a future reader skip this section without losing anything load-bearing?
|
|
113
|
+
5. If audit-mode produced cuts, does each cut have a one-line reason in the MAINTAIN run file?
|
|
114
|
+
6. Does the doc still feel like it can be skimmed end-to-end in under 5 minutes?
|
|
115
|
+
|
|
116
|
+
### Note on propagation
|
|
117
|
+
|
|
118
|
+
By design, **`codev init`, `codev adopt`, and `codev update` do not copy framework templates** (including this `arch.md` template) into the consuming project's filesystem. They are framework files that resolve at runtime from the installed `@cluesmith/codev` npm package — see `packages/codev/src/commands/init.ts` and `adopt.ts` (the `// Framework files ... are NOT copied` comments).
|
|
119
|
+
|
|
120
|
+
To opt into this richer template for a project's *living* `codev/resources/arch.md`, copy it manually:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
cp $(node -p 'require.resolve("@cluesmith/codev/skeleton/templates/arch.md")') codev/resources/arch.md
|
|
124
|
+
```
|
|
55
125
|
|
|
56
|
-
|
|
126
|
+
(Or, if developing inside the codev repo itself, simply `cp codev-skeleton/templates/arch.md codev/resources/arch.md` and edit from there.)
|
|
@@ -41,7 +41,7 @@ Just like structuring a human team—clear roles, defined processes, explicit ha
|
|
|
41
41
|
|
|
42
42
|
| Component | Purpose |
|
|
43
43
|
|-----------|---------|
|
|
44
|
-
| Protocols | Define HOW work happens (SPIR,
|
|
44
|
+
| Protocols | Define HOW work happens (SPIR, ASPIR, etc.) |
|
|
45
45
|
| Roles | Define WHO does what (Architect, Builder, Consultant) |
|
|
46
46
|
| Parallelism | Scale by running multiple builders simultaneously |
|
|
47
47
|
|
|
@@ -61,9 +61,9 @@ A **protocol** is a structured workflow that defines how work progresses from id
|
|
|
61
61
|
| Protocol | Use For | Phases |
|
|
62
62
|
|----------|---------|--------|
|
|
63
63
|
| **SPIR** | New features | Specify → Plan → Implement → Review |
|
|
64
|
-
| **TICK** | Amendments to existing specs | Task Identification → Coding → Kickout |
|
|
65
64
|
| **MAINTAIN** | Codebase hygiene | Dead code removal, documentation sync |
|
|
66
65
|
| **EXPERIMENT** | Research & prototyping | Hypothesis → Experiment → Conclude |
|
|
66
|
+
| **RESEARCH** | Multi-agent research | Scope → Investigate (3-way) → Synthesize → Critique (3-way) |
|
|
67
67
|
|
|
68
68
|
### Roles
|
|
69
69
|
|
|
@@ -105,21 +105,21 @@ Project management commands. Typically used by **humans** to set up and maintain
|
|
|
105
105
|
| `codev update` | Update Codev framework |
|
|
106
106
|
| `codev import` | Import specs from another project |
|
|
107
107
|
|
|
108
|
-
### agent-farm (
|
|
108
|
+
### agent-farm (afx)
|
|
109
109
|
|
|
110
110
|
Architect-Builder orchestration. Used by both **humans and agents**—agents use it more frequently.
|
|
111
111
|
|
|
112
112
|
| Command | Description |
|
|
113
113
|
|---------|-------------|
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
114
|
+
| `afx workspace start` | Start workspace (port 4200, 4300, etc.) |
|
|
115
|
+
| `afx workspace stop` | Stop all processes |
|
|
116
|
+
| `afx spawn <id> --protocol spir` | Spawn a builder for project |
|
|
117
|
+
| `afx status` | Check status of all builders |
|
|
118
|
+
| `afx send <target> <msg>` | Send message (builder↔architect) |
|
|
119
|
+
| `afx cleanup -p <id>` | Clean up a builder worktree |
|
|
120
|
+
| `afx shell` | Spawn a utility shell |
|
|
121
|
+
| `afx open <file>` | Open file in workspace viewer |
|
|
122
|
+
| `afx tower start` | Start cross-project tower |
|
|
123
123
|
|
|
124
124
|
### consult
|
|
125
125
|
|
|
@@ -1,28 +1,66 @@
|
|
|
1
1
|
# Lessons Learned
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Engineering wisdom that applies *across multiple specs*, extracted from review documents during MAINTAIN runs.
|
|
4
|
+
|
|
5
|
+
> **How to read this doc**: Skim by topic section. Each entry is 1–3 sentences and states a general principle. If you need the full story behind a lesson, follow the link to the originating review.
|
|
6
|
+
|
|
7
|
+
## What goes here, what does not
|
|
8
|
+
|
|
9
|
+
This file is a sibling to `codev/resources/arch.md`. They have different purposes:
|
|
10
|
+
|
|
11
|
+
- `arch.md` owns **system shape** — services, transports, mental models, verified-wrong assumptions about *this* system.
|
|
12
|
+
- `lessons-learned.md` owns **durable engineering wisdom** — patterns that apply across specs, projects, and time.
|
|
13
|
+
|
|
14
|
+
When you have a fact that's specific to one feature, it belongs in that feature's review, not here.
|
|
15
|
+
|
|
16
|
+
### Add an entry when
|
|
17
|
+
|
|
18
|
+
- A pattern surfaced in two or more specs/reviews.
|
|
19
|
+
- A failure mode is general enough that future contributors will hit it on unrelated work.
|
|
20
|
+
- A practice was confirmed (the team adopted it after trying alternatives).
|
|
21
|
+
|
|
22
|
+
### Do NOT add an entry when
|
|
23
|
+
|
|
24
|
+
- **Spec-narrow recipes** that only matter inside the originating feature. Those belong in the spec's review document.
|
|
25
|
+
- **Multi-paragraph entries**. If a lesson needs more than 1–3 sentences, it is either two lessons or it is documentation that belongs elsewhere.
|
|
26
|
+
- **Duplicate adjacent entries**. Fold variations of the same lesson into one entry.
|
|
27
|
+
- **Spec-numbered narrative** ("Lesson from #0468:…"). Link to the review if useful; state the lesson itself as a general principle.
|
|
28
|
+
|
|
29
|
+
### Sanity-check checklist
|
|
30
|
+
|
|
31
|
+
Before adding or keeping an entry, run through these:
|
|
32
|
+
|
|
33
|
+
1. Is it cross-applicable beyond the spec that produced it?
|
|
34
|
+
2. Is it terse (1–3 sentences)?
|
|
35
|
+
3. Is the topic section the right home? (If "Architecture (continued)" or spec-numbered, move it.)
|
|
36
|
+
4. Is it a duplicate of an adjacent entry? (If yes, fold them.)
|
|
37
|
+
5. Could the lesson be stated as a general principle, independent of the originating feature?
|
|
38
|
+
|
|
39
|
+
If any answer is "no," either reshape the entry or move it to the originating spec's review.
|
|
40
|
+
|
|
41
|
+
---
|
|
4
42
|
|
|
5
43
|
## Testing
|
|
6
44
|
|
|
7
|
-
<!--
|
|
45
|
+
<!-- Patterns about test isolation, mocking, fixtures, regression coverage. -->
|
|
8
46
|
|
|
9
47
|
## Architecture
|
|
10
48
|
|
|
11
|
-
<!--
|
|
49
|
+
<!-- Patterns about system design, state management, file organization. -->
|
|
12
50
|
|
|
13
51
|
## Process
|
|
14
52
|
|
|
15
|
-
<!--
|
|
53
|
+
<!-- Patterns about protocol execution, consultation, PR workflow. -->
|
|
16
54
|
|
|
17
55
|
## Tooling
|
|
18
56
|
|
|
19
|
-
<!--
|
|
57
|
+
<!-- Patterns about CLI tools, dependencies, build systems. -->
|
|
20
58
|
|
|
21
59
|
## Integration
|
|
22
60
|
|
|
23
|
-
<!--
|
|
61
|
+
<!-- Patterns about external APIs, third-party services, auth. -->
|
|
24
62
|
|
|
25
63
|
---
|
|
26
64
|
|
|
27
65
|
*Generated by MAINTAIN protocol from review documents.*
|
|
28
|
-
*To add lessons: document them in review files, then run MAINTAIN.*
|
|
66
|
+
*To add lessons: document them in review files, then run MAINTAIN with the `update-arch-docs` skill.*
|
package/templates/3d-viewer.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
body {
|
|
15
|
-
background: #
|
|
15
|
+
background: #4D4D4D;
|
|
16
16
|
color: #e0e0e0;
|
|
17
17
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
18
18
|
overflow: hidden;
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
function init() {
|
|
277
277
|
// Scene
|
|
278
278
|
scene = new THREE.Scene();
|
|
279
|
-
scene.background = new THREE.Color(
|
|
279
|
+
scene.background = new THREE.Color(0x4D4D4D);
|
|
280
280
|
|
|
281
281
|
// Cameras (Z-up coordinate system)
|
|
282
282
|
const aspect = container.clientWidth / container.clientHeight;
|
|
@@ -378,21 +378,20 @@
|
|
|
378
378
|
geometry.computeBoundingBox();
|
|
379
379
|
const center = new THREE.Vector3();
|
|
380
380
|
geometry.boundingBox.getCenter(center);
|
|
381
|
-
|
|
381
|
+
// Only center in XY; Three.js translate() auto-updates boundingBox
|
|
382
|
+
geometry.translate(-center.x, -center.y, 0);
|
|
382
383
|
|
|
383
384
|
// Move to sit on grid (Z=0 plane)
|
|
384
|
-
|
|
385
|
-
geometry.translate(0, 0, -minZ);
|
|
385
|
+
geometry.translate(0, 0, -geometry.boundingBox.min.z);
|
|
386
386
|
|
|
387
|
-
//
|
|
388
|
-
geometry.
|
|
387
|
+
// Compute vertex normals for smooth Phong shading
|
|
388
|
+
geometry.computeVertexNormals();
|
|
389
389
|
|
|
390
390
|
// Material
|
|
391
391
|
const material = new THREE.MeshPhongMaterial({
|
|
392
392
|
color: 0x3b82f6,
|
|
393
|
-
specular:
|
|
394
|
-
shininess:
|
|
395
|
-
flatShading: false
|
|
393
|
+
specular: 0x222222,
|
|
394
|
+
shininess: 60
|
|
396
395
|
});
|
|
397
396
|
|
|
398
397
|
model = new THREE.Mesh(geometry, material);
|
|
@@ -775,21 +774,20 @@
|
|
|
775
774
|
geometry.computeBoundingBox();
|
|
776
775
|
const center = new THREE.Vector3();
|
|
777
776
|
geometry.boundingBox.getCenter(center);
|
|
778
|
-
|
|
777
|
+
// Only center in XY; Three.js translate() auto-updates boundingBox
|
|
778
|
+
geometry.translate(-center.x, -center.y, 0);
|
|
779
779
|
|
|
780
780
|
// Move to sit on grid (Z=0 plane)
|
|
781
|
-
|
|
782
|
-
geometry.translate(0, 0, -minZ);
|
|
781
|
+
geometry.translate(0, 0, -geometry.boundingBox.min.z);
|
|
783
782
|
|
|
784
|
-
//
|
|
785
|
-
geometry.
|
|
783
|
+
// Compute vertex normals for smooth Phong shading
|
|
784
|
+
geometry.computeVertexNormals();
|
|
786
785
|
|
|
787
786
|
// Create new material
|
|
788
787
|
const material = new THREE.MeshPhongMaterial({
|
|
789
788
|
color: 0x3b82f6,
|
|
790
|
-
specular:
|
|
791
|
-
shininess:
|
|
792
|
-
flatShading: false
|
|
789
|
+
specular: 0x222222,
|
|
790
|
+
shininess: 60
|
|
793
791
|
});
|
|
794
792
|
|
|
795
793
|
model = new THREE.Mesh(geometry, material);
|
package/templates/tower.html
CHANGED
|
@@ -1162,7 +1162,7 @@
|
|
|
1162
1162
|
<div class="empty-state">
|
|
1163
1163
|
<div class="icon">📭</div>
|
|
1164
1164
|
<h2>No running workspaces</h2>
|
|
1165
|
-
<p>Start a new workspace below or run <code>
|
|
1165
|
+
<p>Start a new workspace below or run <code>afx workspace start</code> in a workspace directory.</p>
|
|
1166
1166
|
</div>
|
|
1167
1167
|
`;
|
|
1168
1168
|
} else {
|