返回 CodeWhale
PRODUCT.md
根目录 / docs / PRODUCT.md
1 # Product
2
3 <!-- impeccable:product-schema 1 -->
4
5 ## Platform
6
7 web (the public site and docs in `web/`), documenting Codewhale's Engine,
8 terminal and connected tools. The terminal is one product surface, not the
9 definition of the product. Paths below are relative to the repository root.
10
11 ## Users
12
13 People building apps, automating recurring work, researching and working across
14 files and connected services. This includes solo developers, small teams and
15 open-source contributors. They arrive to understand what they can accomplish,
16 install, connect their models and tools, and look up how a command, mode or
17 concept works. Model choice, cost and control matter to that decision.
18
19 ## Product Purpose
20
21 Codewhale is an open-source (MIT), provider-neutral agentic computing system.
22 Given a task, it works through files, commands and connected tools to build
23 something useful, while keeping access, approvals and work history legible.
24 The Rust Engine supplies the shared Runtime; Ratatui is its terminal surface.
25 The site should make the result understandable, get a visitor to a working
26 install, and provide current documentation. Success is a task someone can
27 start, an install that works and a useful docs answer.
28
29 ## Positioning
30
31 Bring your own model. Codewhale is provider-neutral: use your model API
32 accounts, compatible gateways, or local and self-hosted inference, with a
33 different model per role. The user's model inventory is the
34 **Fleet** (`codewhale fleet`, `/fleet`; `pod` remains a compatibility alias).
35 Modes are Plan and Work; Operate is retired. The permission dial is Ask,
36 Accept Edits (the default), Plan, Auto-Review and Full Access. Plugins and MCP servers add tools; scripts can use service APIs.
37 Each external service requires its own setup and authentication. General MCP
38 support does not establish that a particular service has been connected or
39 qualified with Codewhale. Terminal, local browser, native
40 app and hosted product availability must be stated separately from the common
41 Runtime model: source readiness is not deployment or customer acceptance.
42
43 ## Operating Context
44
45 - Install: official GitHub Releases first. New macOS/Linux installs use
46 `curl -fsSL https://codewhale.net/install.sh | sh`; Windows uses the matching
47 GitHub installer/archive. Existing direct installs use `codewhale update`.
48 npm and Cargo are secondary packaging routes; migration and PATH handling
49 follow `docs/INSTALL.md`. `latest` selects a published release, not the source
50 candidate. Facts (version, provider count, tool count, license) are
51 derived from the repository by `npm run prebuild` into
52 `web/lib/facts.generated.ts` and must never be hand-edited.
53 - Docs pages mirror `docs/*.md` in the repository; `npm run check:docs`
54 verifies the mapping. Public vocabulary lives in
55 `web/lib/content/vocabulary.ts` and `docs/public-surface-facts.json`.
56 - Localised through shared dictionaries in `web/lib/i18n/dictionaries/` with
57 locale-key parity enforced; no page-local copy forks.
58 - The terminal puts the conversation above the composer, posture and metrics.
59 Its workbar exposes Tasks, Fleet, Jobs, Files, Notes, Context, Git and Cost;
60 the development candidate also adds a Terminal panel for its real PTY sessions
61 on macOS and Linux. Product previews come from the built native TUI's actual PTY cells;
62 the Ratatui explorer separately demonstrates reusable components with example data.
63
64 ## Capabilities and Constraints
65
66 - Public name is **Codewhale** (lowercase w). `CodeWhale` survives only in
67 compatibility identifiers (GitHub org/repo, package scopes).
68 - Provider and model names are first-class and neutral; never rank providers
69 in copy.
70 - The homepage explains what Codewhale does, the models and tools it connects
71 to, and how to install it. Keep it straightforward. Invented task briefs,
72 sample reports and terminal view galleries do not belong on the homepage.
73 Show one actual native TUI capture below the introduction. The product page
74 and component explorer can show the other views.
75 - Use plain, concrete marketing copy about what people can build and do.
76 Headings name the benefit or action. Avoid robot jokes, choppy slogan
77 fragments, vague promises and internal agent-verification language in the
78 public interface. Keep service claims tied to actual setup and qualification.
79 - `web/lib/media-manifest.ts` records the exact captured native build and
80 shared README image. Native views on the product page and getting-started
81 guide retain their original PTY text and colors. An isolated local demo may
82 prove real file edits, checks and delegated review, but does not prove a paid
83 provider call. Session video remains `pending`. Build captions distinguish
84 development builds from releases.
85 - `/context-window` does not exist on the current base; do not document it.
86 - Subagent role identifiers are those the code accepts (`general`, `explore`,
87 `planner`, `reviewer`, `implement`, `test`, `advisor`, `custom`); the older
88 spellings `worker`, `scout`, `builder`, `verifier`, `consultant`, and `oracle`
89 are accepted as compatibility aliases only. Do not invent public role names.
90
91 ## Brand Commitments
92
93 - Voice: direct, useful and factual. Lead with what someone can build or
94 accomplish. Use product controls where they help the task; avoid marketing
95 superlatives, fabricated transcripts and reasoning traces.
96 - "It doesn't need to look special — it needs to look like Codewhale."
97 - Assets: the canonical vector family lives in the CWC repo at
98 `codewhale-platform/packages/brand/svg/` (mark, mark-gradient, mark-mono,
99 mark-reversed, wordmark, wordmark-inverted); `brand/` and
100 `web/public/brand/` carry byte-identical copies — sync from there, never
101 re-trace. The founder's brand sheet `brand/codewhalemarkfinal.png` remains
102 the source `scripts/brand/braille-mark.py` derives TUI launch art from. The
103 earlier local trace and `scripts/brand/trace-brand.py` were retired
104 2026-09-15 in favor of the canonical family. Web copies live in
105 `web/public/brand/`.
106 - Palette, type, shell direction, and the anti-slop rules are recorded in
107 `docs/design/DESIGN.md`. Shared interface tokens come from
108 `vendor/codewhale-design/tokens.json` and are exported to `web/app/tokens.css`.
109 Website ocean and brand roles live in `web/app/styles/tokens-roles.css`;
110 `crates/palette/src/rgb.rs` owns the terminal presets.
111
112 ## Evidence on Hand
113
114 - Real: GitHub stars (live), release version and changelog (generated),
115 provider/tool counts (generated), and native capture provenance recorded in
116 the media manifest and public surface facts.
117 - Absent, do not fabricate: testimonials, customer logos, benchmarks,
118 pricing or session video. Published downloads and development-source
119 captures are different evidence.
120
121 ## Product Principles
122
123 1. One owner per fact: every number and command on the site is derived from
124 the repository, never typed twice.
125 2. Content first: no permanent side chrome on the landing page; the docs page
126 is a reading surface, not a portal.
127 3. Show only what exists: pending media stays marked pending; commands are
128 documented only once they are on the base branch.
129 4. Provider-neutral, model-neutral, always.
130 5. Accessibility is not negotiable: AA contrast, ≥12px functional text, real
131 heading outline, keyboard-reachable everything.
132
133 ## Accessibility & Inclusion
134
135 WCAG 2.2 AA for text and controls. The audience includes screen-reader and
136 keyboard-only users; the site is also read at 390px on phones.
137
137 lines MARKDOWN