Skip to content

Commit c7af553

Browse files
committed
docs: update README and planning docs for new workflow
- Add ccc:record, ccc:clean, ccc:reset, check:full to Developer Scripts - Replace clone URL placeholder with actual repo URL - Use pnpm ccc:clean instead of manual rm for redo instructions - Update planning docs: Claude → AI Coworker, ccc:nuke → ccc:clean/reset, remove scripts/ section, add ccc:status command - Reformat markdown tables
1 parent d37defb commit c7af553

5 files changed

Lines changed: 37 additions & 36 deletions

File tree

.planning/codebase/CONVENTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Important Context
66

77
**Tooling:**
8-
- `gh` CLI is NOT available and must NOT be installed. Use `pnpm pr` to open PRs and `pnpm review` to fetch PR comments.
8+
- `gh` CLI is NOT available and must NOT be installed. PR and review workflows are handled inline by the AI Coworker (see AGENTS.md).
99

1010
**Legacy vs. New code:**
1111
- `@ickb/lumos-utils@1.4.2` and `@ickb/v1-core@1.4.2` are **LEGACY and DEPRECATED** npm packages. The apps (`apps/bot`, `apps/tester`, `apps/interface`) still depend on them.

.planning/codebase/STACK.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ The repo supports using a local development build of CCC for testing unpublished
101101
**`ccc-dev/record.sh`:**
102102
- Clones the CCC repo (`https://github.com/ckb-devrel/ccc.git`) into `./ccc-dev/ccc/`
103103
- Accepts refs as args: branch names, PR numbers, or commit SHAs
104-
- Merges specified refs onto a `wip` branch (uses Claude CLI for merge conflict resolution)
104+
- Merges specified refs onto a `wip` branch (uses AI Coworker CLI for merge conflict resolution)
105105
- Builds CCC locally: `pnpm build:prepare && pnpm build`
106106
- Run via: `pnpm ccc:record` (default invocation: `bash ccc-dev/record.sh releases/next releases/udt`)
107107
- The `ccc-dev/ccc/` directory is gitignored
108-
- Skips if `ccc-dev/ccc/` already exists (remove it to redo setup)
108+
- Aborts if `ccc-dev/ccc/` has pending work (uncommitted changes or unpushed commits)
109109

110110
**`.pnpmfile.cjs`:**
111111
- A pnpm `readPackage` hook that auto-discovers all packages in `ccc-dev/ccc/packages/*/package.json`

.planning/codebase/STRUCTURE.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
│ │ ├── REFS # Pinned branch HEADs
7474
│ │ └── resolutions/ # Merge conflict resolutions
7575
│ ├── ccc/ # Gitignored: ephemeral CCC clone (auto-generated)
76-
│ ├── record.sh # Records new pins with Claude conflict resolution
76+
│ ├── record.sh # Records new pins with AI Coworker conflict resolution
7777
│ ├── replay.sh # Deterministically rebuilds ccc/ from pins
7878
│ └── tsc.mjs # TypeScript compilation script override
7979
├── contracts/ # Reference: Rust on-chain contracts (git-ignored, clone via `pnpm reference`)
@@ -345,19 +345,15 @@
345345
- System: Record/replay mechanism for deterministic, conflict-free builds
346346
- `pins/`: Committed directory containing:
347347
- `REFS`: Pinned branch HEADs for merging
348-
- `resolutions/`: Serialized conflict resolutions with Claude aid
348+
- `resolutions/`: Serialized conflict resolutions with AI Coworker aid
349349
- `ccc/`: Generated from pins; auto-deleted and rebuilt on `pnpm install`
350350
- Activation: `.pnpmfile.cjs` hook triggers `replay.sh` and overrides package resolution
351351
- Commands:
352-
- Record: `pnpm ccc:record releases/next releases/udt` (requires Claude CLI)
352+
- Record: `pnpm ccc:record releases/next releases/udt` (requires AI Coworker CLI)
353+
- Status: `pnpm ccc:status` (check for pending work in `ccc/`)
353354
- Rebuild: `pnpm install` (automatic)
354-
- Clean: `pnpm ccc:nuke && pnpm install`
355-
356-
**scripts/:**
357-
- Purpose: Developer convenience scripts
358-
- Files: `pr.sh` (GitHub PR creation), `review.sh` (fetch PR comments)
359-
- Execution: Via `pnpm pr` and `pnpm review` shortcuts
360-
- Committed: Yes
355+
- Clean (re-replay): `pnpm ccc:clean && pnpm install` (guarded)
356+
- Reset (published): `pnpm ccc:reset && pnpm install` (guarded)
361357

362358
**node_modules/:**
363359
- Purpose: Installed npm/pnpm dependencies

AGENTS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ This file is the tool-agnostic agent config:
66
- Never add AI tool attribution or branding to PR descriptions, commit messages, or code comments (e.g. "Generated with ...", "Built by ...", "Powered by ...").
77
- Refer to yourself as "AI Coworker" in docs and comments, not by product or company name.
88
- Do not install or use `gh` CLI.
9-
- **Open a PR**: Push the branch, then construct and present a GitHub compare URL
10-
(`quick_pull=1`) to the user. Base branch is `master`. Prefill "title" (concise, under 70 chars) and "body" (markdown with ## Why and ## Changes sections). Be brief.
9+
- **Open a PR**: Push the branch, then open a GitHub compare URL (`quick_pull=1`)
10+
in the browser via `"$BROWSER" '<url>'`. Base branch is `master`. Prefill
11+
"title" (concise, under 70 chars) and "body" (markdown with ## Why and
12+
## Changes sections). Be brief.
1113
- **Fetch PR review comments**: Use the GitHub REST API via curl.
1214
Fetch all three comment types (issue comments, reviews, and inline comments).
1315

README.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ This monorepo is developing the **new generation** of iCKB libraries, replacing
88

99
**New packages** (under `packages/`, built on CCC):
1010

11-
| Package | Purpose | Status |
12-
|---|---|---|
11+
| Package | Purpose | Status |
12+
| ------------- | -------------------------------------------------------------------------- | ------------------ |
1313
| `@ickb/utils` | Blockchain primitives, transaction helpers, epoch arithmetic, UDT handling | Active development |
14-
| `@ickb/dao` | Nervos DAO abstraction layer | Active development |
15-
| `@ickb/order` | Limit order cell management | Active development |
16-
| `@ickb/core` | iCKB core protocol logic (deposits, receipts, owned owner) | Active development |
17-
| `@ickb/sdk` | High-level SDK composing all packages | Active development |
14+
| `@ickb/dao` | Nervos DAO abstraction layer | Active development |
15+
| `@ickb/order` | Limit order cell management | Active development |
16+
| `@ickb/core` | iCKB core protocol logic (deposits, receipts, owned owner) | Active development |
17+
| `@ickb/sdk` | High-level SDK composing all packages | Active development |
1818

1919
**Apps migration status:**
2020

21-
| App | Purpose | Stack |
22-
|---|---|---|
23-
| `apps/faucet` | Testnet CKB distribution | **Migrated** to new packages + CCC |
24-
| `apps/sampler` | iCKB exchange rate sampling | **Migrated** to new packages + CCC |
25-
| `apps/bot` | Automated order matching | Legacy (`@ickb/v1-core` + Lumos) |
26-
| `apps/tester` | Order creation simulator | Legacy (`@ickb/v1-core` + Lumos) |
27-
| `apps/interface` | React web UI | Legacy (`@ickb/v1-core` + Lumos) |
21+
| App | Purpose | Stack |
22+
| ---------------- | --------------------------- | ---------------------------------- |
23+
| `apps/faucet` | Testnet CKB distribution | **Migrated** to new packages + CCC |
24+
| `apps/sampler` | iCKB exchange rate sampling | **Migrated** to new packages + CCC |
25+
| `apps/bot` | Automated order matching | Legacy (`@ickb/v1-core` + Lumos) |
26+
| `apps/tester` | Order creation simulator | Legacy (`@ickb/v1-core` + Lumos) |
27+
| `apps/interface` | React web UI | Legacy (`@ickb/v1-core` + Lumos) |
2828

2929
**Key upstream contributions:** UDT and Epoch support were contributed to CCC upstream and have been merged. Some local utilities may overlap with features now available natively in CCC.
3030

@@ -58,10 +58,10 @@ graph TD;
5858
When `ccc-dev/pins/REFS` is committed, `pnpm install` automatically sets up the CCC local development environment on first run (by replaying pinned merges via `ccc-dev/replay.sh`). No manual setup step is needed — just clone and install:
5959

6060
```bash
61-
git clone <repo-url> && cd stack && pnpm install
61+
git clone git@github.com:ickb/stack.git && cd stack && pnpm install
6262
```
6363

64-
To redo the setup from scratch: `rm -rf ccc-dev/ccc && pnpm install`.
64+
To redo the setup from scratch: `pnpm ccc:clean && pnpm install`.
6565

6666
See [ccc-dev/README.md](ccc-dev/README.md) for recording new pins, developing CCC PRs, and the full workflow.
6767

@@ -80,12 +80,15 @@ This clones two repos into the project root (both are git-ignored and made read-
8080

8181
## Developer Scripts
8282

83-
| Command | Description |
84-
|---|---|
85-
| `pnpm pr` | Open a GitHub PR creation page for the current branch. Uses Claude to auto-generate title and body when available, falls back to branch name and commit log. |
86-
| `pnpm review` | Fetch and display PR review comments from GitHub for the current branch (or `pnpm review -- --pr <number>` for a specific PR). |
87-
88-
> **Note:** `gh` CLI is not available in this environment. Use `pnpm pr` and `pnpm review` instead.
83+
| Command | Description |
84+
| ------------------- | ------------------------------------------------------------------------------------- |
85+
| `pnpm coworker` | Launch an interactive AI Coworker session (full autonomy, opus model). |
86+
| `pnpm coworker:ask` | One-shot AI query for scripting (sonnet model, stateless). Used by `pnpm ccc:record`. |
87+
| `pnpm ccc:status` | Show pending work (uncommitted changes or unpushed commits) in `ccc-dev/ccc/`. |
88+
| `pnpm ccc:record` | Record CCC pins (clone, merge refs, build). Guarded against pending work. |
89+
| `pnpm ccc:clean` | Remove CCC clone, keep pins (guarded). Re-replay on next `pnpm install`. |
90+
| `pnpm ccc:reset` | Remove CCC clone and pins (guarded). Restores published CCC packages. |
91+
| `pnpm check:full` | Wipe derived state and validate from scratch. Skips wipe if CCC has pending work. |
8992

9093
## Epoch Semantic Versioning
9194

0 commit comments

Comments
 (0)