2026-04-25 21:13:32 +08:00
<div align="center">
# CodeStable
**English ** · [中文 ](./README.md )
2026-08-01 21:02:04 +08:00
**Keep boundaries, evidence, and memory intact as AI coding projects evolve. **
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
<p><img src="https://img.shields.io/badge/status-beta-F59E0B?style=flat-square" alt="Status"/> <img src="https://img.shields.io/badge/cs--skills-8-6366F1?style=flat-square" alt="CodeStable Skills"/> <img src="https://img.shields.io/badge/license-MIT-10B981?style=flat-square" alt="License"/></p>
2026-04-25 21:13:32 +08:00
</div>
2026-08-01 21:02:04 +08:00
CodeStable offers lightweight skill contracts for serious software. It does not orchestrate agent teams and does not create a second documentation system. Models act within boundaries, prove results, and return knowledge to existing homes.
2026-07-02 09:56:21 +08:00
2026-08-01 21:02:04 +08:00
## 30-Second Model
2026-07-02 09:56:21 +08:00
``` text
2026-08-01 21:02:04 +08:00
User intent
↓
cs: execute directly / discuss in this session / advise
↓
feat · issue · refactor · epic
↓
proportionate verification + necessary review / owner gates
↓ code results + the project's canonical knowledge
2026-07-02 09:56:21 +08:00
```
2026-08-05 13:07:30 +08:00
For team workflows, combine them by responsibility:
2026-07-02 09:56:21 +08:00
2026-08-05 13:07:30 +08:00
- **Stable coding**: use CodeStable to make task boundaries, assurance, evidence, and project memory explicit.
- **Team context sharing**: use [Threadshare ](https://github.com/team-harness/threadshare ) to turn Codex,
Claude Code, and other agent conversations into read-only links for teammates and later agents.
- **Multi-agent coding collaboration**: use [cs-agent ](https://github.com/codestable/cs-agent-mcp ) to create,
invoke, and manage Codex, Claude, and other subagents during implementation, including independent review.
2026-08-03 16:43:07 +08:00
2026-08-05 13:07:30 +08:00
The three complement one another: CodeStable does not publish conversations or orchestrate agents, while
Threadshare and cs-agent do not replace CodeStable's engineering contracts.
2026-07-02 09:56:21 +08:00
2026-08-05 13:07:30 +08:00
You only need to tell `cs` what you want to accomplish:
2026-07-02 09:56:21 +08:00
2026-08-05 13:07:30 +08:00
- **When the request is clear**: it starts directly and delivers the result with enough verification.
- **When it finds a concrete risk**: it adds only the confirmation, tests, or review needed for that risk; it
does not enable the whole workflow.
- **When you want to discuss first**: it aligns goals, terms, and boundaries with you. It will not change code
without execution authorization.
- **When terminology could cause misunderstanding**: it aligns the meaning as the shared language for this task;
otherwise it reuses the project's existing language.
2026-07-02 09:56:21 +08:00
2026-08-05 13:07:30 +08:00
Pure discussion, advice, and overview requests write no project files by default. CodeStable does not persist unfinished discussions or guarantee automatic recovery in a later session.
2026-08-03 16:43:07 +08:00
2026-08-01 21:02:04 +08:00
## Start in 5 Minutes
2026-07-02 09:56:21 +08:00
2026-08-01 21:02:04 +08:00
### Install
2026-07-02 09:56:21 +08:00
Codex plugin marketplace:
``` bash
2026-08-01 21:02:04 +08:00
codex plugin marketplace add codestable/CodeStable
2026-07-02 09:56:21 +08:00
codex plugin add codestable@codestable
```
Claude plugin marketplace:
``` text
2026-08-01 21:02:04 +08:00
/plugin marketplace add codestable/CodeStable
/plugin install codestable@codestable
2026-04-25 21:13:32 +08:00
```
2026-08-01 21:02:04 +08:00
`skills` CLI (v1 users must first follow the [upgrade guide ](./UPGRADE.en.md#upgrade-from-v104-to-v2 ) to remove the 24 retired entries, then install v2):
2026-04-25 21:13:32 +08:00
``` bash
2026-08-01 21:02:04 +08:00
npx skills@latest add codestable/CodeStable/plugins/codestable
2026-04-25 21:13:32 +08:00
```
2026-08-01 21:02:04 +08:00
If the catalog misses the plugin entity, use `npx skills@latest add codestable/CodeStable/plugins/codestable --full-depth` as the deep-scan fallback.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
### Onboard a Project
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
Run `/cs-onboard` from the repository root. It creates only the minimal project-memory skeleton and does not take over documentation, worktree, or branch policy.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
### Start Working
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
When you are unsure which entry fits, call `/cs` ; you can also call the owning skill directly. v2 ships 8 skills:
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
| Skill | Purpose |
|---|---|
| `cs` | Route explicit actions, in-session discussion, advice, and system overview |
| `cs-onboard` | Create the minimal project-memory skeleton |
| `cs-feat` | Implement new capability or change existing behavior |
2026-08-02 21:35:07 +08:00
| `cs-issue` | Diagnose problems; once repair is authorized, fix with red-to-green evidence |
2026-08-01 21:02:04 +08:00
| `cs-refactor` | Change structure or performance under equivalence evidence |
| `cs-epic` | Decompose and advance multiple deliverable items under confirmed policies |
| `cs-review` | Read-only leaf executor; one review, with no child agent |
2026-08-02 00:10:29 +08:00
| `cs-keep` | Manage evidence-backed project facts, lesson lifecycle, and canonical homes |
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
`cs-code-review` is a compatibility alias of `cs-review` . It only forwards and contains no independent rules.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
## Three Principles
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
### 1. thin harness, thick context
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
CodeStable writes responsibilities for strong models, not step-by-step scripts. Skills constrain goals, hard boundaries, and evidence; models choose paths from repository facts and load guidance on demand.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
Thin means no permanent state machine or stage-artifact micromanagement, not no gates.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
### 2. Evidence before conclusions
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
Feature work gets design and verification proportionate to risk; bug fixes go red to green; refactors establish equivalence first. The outer flow creates read-only reviewers.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
Humans enter for product-contract changes, major risk, and overall acceptance, not every mechanical step.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
### 3. One fact, one canonical owner
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
Project docs, ADRs, code, and domain documents keep their facts. CodeStable adds only a few session facts, lessons, and active cursors, never a parallel archive.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
The owning skill returns conclusions to one home; if none exists, it asks the owner to choose.
docs(readme): rewrite around the v2 methodology (zh+en)
Rebuilt the three v2 content sections as the main narrative instead of
v1-era framing with patches:
- 'Design: thin harness, thick context' — write responsibilities not
steps; the hard-gate table per flow (incl. 3-round review cap, design
persistence, test-first); on-demand references for engineering
judgment; the six homes of knowledge with graduate-before-delete
- Skill catalog refreshed (cs-review three modes, epic inline-first
sub-designs, the single cs-code-review alias called out)
- 'Workflow and project memory' — one execution mainline, per-request
risk judgment, zero artifacts for ordinary work, retrieval-with-source
discipline, zero-migration v1 boundary
- Tagline gains the one-line methodology; roadmap logs the dogfood loop
Personal narrative sections (origin, orchestration comparison,
philosophy, build->evaluate loop) preserved as-is. Doc contract tests
stay green (96 passed).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 12:39:57 +08:00
2026-08-01 21:02:04 +08:00
## Project Memory
docs(readme): rewrite around the v2 methodology (zh+en)
Rebuilt the three v2 content sections as the main narrative instead of
v1-era framing with patches:
- 'Design: thin harness, thick context' — write responsibilities not
steps; the hard-gate table per flow (incl. 3-round review cap, design
persistence, test-first); on-demand references for engineering
judgment; the six homes of knowledge with graduate-before-delete
- Skill catalog refreshed (cs-review three modes, epic inline-first
sub-designs, the single cs-code-review alias called out)
- 'Workflow and project memory' — one execution mainline, per-request
risk judgment, zero artifacts for ordinary work, retrieval-with-source
discipline, zero-migration v1 boundary
- Tagline gains the one-line methodology; roadmap logs the dogfood loop
Personal narrative sections (origin, orchestration comparison,
philosophy, build->evaluate loop) preserved as-is. Doc contract tests
stay green (96 passed).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 12:39:57 +08:00
2026-08-01 21:02:04 +08:00
`/cs-onboard` creates:
feat: land owner's v2 release line — 2.0.0, ADR-004, v2 contract tests
Absorbed from the owner's working tree (his versions take precedence):
- VERSION 2.0.0, CHANGELOG, plugin manifests, marketplace metadata
- ADR-004 (project knowledge, not runtime distribution; supersedes 001)
plus ADR-001/002/003 updates
- Three new v2 contract test suites (architecture / documentation /
experiment-archive integrity) and rewritten skill-contracts,
cli-distribution (exact retired-set + E2E fixture), selfref suites
- Rewritten root docs (README/WORKFLOW/SKILL_CATALOG zh+en, CLAUDE/AGENTS)
with v1.0.4 retirement mapping and precise skills-CLI upgrade procedure
- eval-cs-skill v2 adaptation (6 files), build-cs-skill refinements
Full suite: 96 passed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 13:38:57 +08:00
``` text
.codestable/
├── attention.md
├── lessons/
└── work/
```
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
- `attention.md` holds the small set of project facts needed every session, capped at 25 entries.
2026-08-02 00:10:29 +08:00
- `lessons/` keeps one lesson per file, evolves it through observed / validated / retired, and deduplicates before writing.
2026-08-01 21:02:04 +08:00
- `work/` exists only for active cross-session work, multi-agent handoff, or an explicitly requested durable record.
2026-08-02 00:10:29 +08:00
CodeStable recognizes crystallization moments while working: it observes silently and shows at most one evidence-backed candidate at ordinary completion.
Mechanizable failures go to tests or checkers first. New lessons still require explicit authorization; later sessions validate or retire them after checking current facts.
2026-08-01 21:02:04 +08:00
Ordinary work creates no CodeStable stage docs; the diff, tests, and delivery summary are the evidence. Discussion does not enter `work/` ; only stable conclusions graduate through the owning skill to a canonical home.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
### The Two-Layer Epic Model
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
Large initiatives separate durable contracts from temporary execution state. A permanent Epic document owns goals, scope, acceptance, approved items, key decisions, and final delivery.
2026-04-25 21:13:32 +08:00
2026-08-03 16:43:07 +08:00
When the route is still unclear, the permanent Epic document itself is the route map; decision dependencies derive the frontier.
The agent resolves facts, and genuine product judgment and trade-offs enter HITL. Once the route is clear, reviewable,
and executable, existing design review, owner confirmation, and execution begin.
2026-08-01 21:02:04 +08:00
A temporary work cursor keeps only its pointer, approved revision, progress, policies, and evidence.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
An Epic reuses an existing Epic, RFC, or initiative home when available and creates `.codestable/epics/` only on demand. The temporary cursor is deleted at completion; the permanent document remains.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
See [WORKFLOW.en.md ](./WORKFLOW.en.md ) for owner gates, recovery, and terminal rules.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
## Fit
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
CodeStable fits best when:
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
- software will evolve for months or years;
- later sessions, models, or developers must recover historical constraints accurately;
- AI should execute efficiently while humans retain product boundaries and final acceptance;
- the team values verifiable results, independent review, and reusable knowledge.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
It is not:
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
- a multi-agent team orchestrator or automatic relay platform;
- a process engine that forces every task through one pipeline;
- a replacement for existing project docs, ADRs, issues, or pull requests;
- a necessary dependency for a disposable prototype with no maintenance horizon.
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
CodeStable can coexist with agent-orchestration tools. It owns task boundaries, evidence, and memory, not how the host organizes agents.
2026-04-25 21:13:32 +08:00
2026-08-02 19:21:00 +08:00
For multi-agent collaboration or independent review by a heterogeneous agent inside a CodeStable flow, use
[cs-agent ](https://github.com/codestable/cs-agent-mcp ) alongside CodeStable.
2026-08-01 21:02:04 +08:00
## Go Deeper
2026-04-25 21:13:32 +08:00
2026-08-01 21:02:04 +08:00
- [Full workflow and project structure ](./WORKFLOW.en.md )
- [Responsibilities of all 8 skills and retired-entry mappings ](./SKILL_CATALOG.en.md )
- [Installation upgrades and the v1 project boundary ](./UPGRADE.en.md )
- [Why CodeStable exists ](./docs/why-codestable.en.md )
- [Roadmap ](./ROADMAP.en.md )
- [Version changes ](./CHANGELOG.md )
2026-04-25 21:13:32 +08:00
<div align="center">
2026-08-01 21:02:04 +08:00
MIT License · Authors [@liuzhengdong ](https://github.com/liuzhengdong ), [@dafang ](https://github.com/dafang ), Codex, and Claude
2026-04-25 21:13:32 +08:00
</div>