Commit Graph

184 Commits

Author SHA1 Message Date
dafang 7a40410cfe feat(cs): dispatch clear action requests in the same turn
Dogfood feedback (session 001c553b): calling cs with a concrete request
recommended an entry and then waited for the user to re-invoke it — one
confirmation too many. cs now classifies intent: clear action requests
announce the chosen entry in one line and continue executing under that
skill's discipline in the same turn; advice requests still get a
recommendation only; ambiguous requests that would materially change what
happens next get exactly one focused question. Handoff does not widen
authority — the target skill's gates and checkpoints apply unchanged.
Safety anchors and docs (SKILL_CATALOG / WORKFLOW / README zh+en) synced.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 20:44:37 +08:00
dafang a9eaa93ff8 feat(skills): absorb engineering judgment from codestable-lite references
Cherry-picked the high-value rule content (form factor already rejected):
- cs-feat/references/code-design.md: depth framework, ownership-first,
  make-change-easy-first signals, real seams, interface-as-test-surface,
  boundary design, plus the risk-first spike (chuanci) protocol
- cs-feat/references/economy.md: minimal-sufficient != minimal-diff,
  five-rung no-new-code ladder, fix-once-at-the-right-boundary, bounded
  simplification (limit/trigger/direction), honest-savings rule
- cs-issue/references/debug.md: root-cause definition, fast/slow path
  split with escalation conditions, suspect-structure signals
- Inline guards: cs-feat (ownership + three-layer impact + spike pointer),
  cs-issue (root-cause + escalation pointer), cs-refactor (depth ruler),
  cs-code-review (intent-first, three-tier verdict, high-signal-only)

Source: teammate's codestable-lite branch. 96 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 14:01:23 +08:00
dafang aedd3213d9 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
dafang c3db99b47b refactor(skills): drop contracts frontmatter from shipped skills
Owner decision (applied from his working-tree edit): shipped SKILL.md files
carry no self-test metadata. Protection is preserved, not dropped — hard-gate
anchors move into tests/test_skill_contracts.py as direct body assertions
(SHIPPED_HARD_GATE_ANCHORS), plus an explicit no-contracts-frontmatter check.
The not-grep validator regression now samples build-cs-skill. CLAUDE.md rule
updated accordingly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 13:31:10 +08:00
dafang b6a6a2e71b feat(cs-feat): persist high-risk designs to work documents
Owner practice decision: on risk escalation the proposal is written into
.codestable/work/{slug}.md before independent design review and user
confirmation — the design trail is always on disk for high-risk work.
Contract anchor added; wrap-up section reconciled (high-risk work docs
are created at design alignment, others on cross-session/handoff need).
Sync WORKFLOW / README (zh+en).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:31:15 +08:00
dafang 7e5feccdef feat(build-cs-skill): land thin-harness authoring protocol, align to v2
- Bring in the owner's 5-file thin-harness rework (SKILL.md, spec-standard,
  quality-gates with Thin Harness / Context Plan / Evolution Compression
  gates, fixture-patterns, openai.yaml) — contracts test now passes,
  xfail marker removed
- Fix v1 contract residue in step 7: no more .codestable/reference/
  sharing or cs-onboard/tools entry points; v2 skills invoke no runtime
  tools, shared discipline is inlined per skill
- Trim contracts 13 -> 8: drop section-existence anchors already locked
  by tests, keep behavioral anchors; add 'Additive-only evolution is a
  failure mode' as the evolution anchor
- Mark ToolBackedWorkflow / ShimSkill as shapes with no v2 instance

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:22:18 +08:00
dafang 935a1cc118 fix(skills): close build-cs-skill cross-check gaps
- work doc gains a status-and-open-items section so cross-session resume
  has a defined landing spot for pending confirmations (recovery contract)
- cs-code-review: reviewer dispatch requires a self-contained context
  packet (intent, scope, exclusions, expected graded findings); main flow
  owns integration and final verdict (collaboration contract)
- cs-onboard: gitignored .codestable stops with a report instead of
  silently proceeding (failure behavior)
- Sync WORKFLOW / README (zh+en)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:03:20 +08:00
dafang 8c8777f470 feat(skills): restore independent review discipline with bounded loops
- cs-code-review: add design review mode; cap blocking fix-and-rereview at
  2 rounds, then escalate to human arbitration with the disagreement
- cs-feat: risk-escalated designs pass independent design review before user
  confirmation; test-first when a test setup exists; completed changes get
  independent review by default (trivial edits may skip)
- cs-epic: decomposition passes independent design review before user confirmation
- cs-issue / cs-refactor: independent review by default, trivial changes may skip
- Sync WORKFLOW / SKILL_CATALOG / README (zh+en)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 09:34:07 +08:00
dafang 8ca541ca0e refactor(skills): v2 thin-harness — 32 skills -> 8 thin responsibility contracts
- Rewrite 8 kept skills as thin harness (31-49 lines each, ~24k -> 316 lines total):
  cs / cs-onboard / cs-feat / cs-issue / cs-refactor / cs-code-review / cs-epic / cs-keep
- Delete 24 skills: 14 compat stubs, cs-note+cs-feedback (merged into cs-keep),
  cs-audit (mode of cs-code-review), cs-req+roadmap family (merged into cs-epic),
  cs-goal / cs-brainstorm / cs-domain / cs-docs family (folded into entries)
- Delete all stage protocols, 13 onboard references, 19 runtime tools/gates
- Project data reduced to .codestable/{attention.md, lessons/, work/};
  ordinary tasks produce zero artifacts; v1 legacy kept read-only + grep-discoverable
- Tests: drop v1 state-machine/wording suites, update contracts/CLI-distribution
  suites to v2 baseline, add thin-harness regression; xfail pre-existing
  build-cs-skill red (broken on main 7bed4ed)
- Sync SKILL_CATALOG / WORKFLOW / README (zh+en) / CLAUDE.md / AGENTS.md to v2

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 09:11:04 +08:00
Wyatt Fang 7bed4ed514 Merge pull request #51 from codestable/fix/core-skill-contract-gaps
fix(codestable): close core skill contract gaps
2026-07-21 10:22:50 +08:00
Wyatt Fang e499a7cca0 fix(codestable): close core skill contract gaps 2026-07-21 10:18:41 +08:00
Wyatt Fang 274ff88646 Merge pull request #44 from codestable/feat/cs-agent
feat(codestable): formalize host-agnostic skill contracts
v1.0.4
2026-07-16 12:54:05 +08:00
Wyatt Fang 4f8403e4e5 fix(codestable): unify epic goal execution authorization 2026-07-16 12:49:41 +08:00
Wyatt Fang 525f185a79 release: CodeStable 1.0.4 2026-07-15 21:58:14 +08:00
dafang c4fd6eead6 feat(codestable): formalize host-agnostic skill contracts 2026-07-14 21:08:46 +08:00
Wyatt Fang 676247f391 Merge pull request #49 from codestable/fix/issues-45-47-install-runtime
fix: preserve CodeStable skills and standalone runtime versions
2026-07-14 18:05:55 +08:00
dafang 2645e7009e docs: record issue delivery completion 2026-07-14 13:26:59 +08:00
dafang db36f82225 fix: preserve packaged skills and runtime versions 2026-07-14 13:24:08 +08:00
Wyatt Fang c2572f4940 feat: add risk-tiered feature lanes (#48)
* feat: add risk-tiered feature lanes

* fix: align plugin docs with canonical repository
2026-07-14 12:03:09 +08:00
dafang 69d63ebe09 fix: align plugin docs with canonical repository 2026-07-14 11:41:22 +08:00
dafang 2248241634 feat: add risk-tiered feature lanes 2026-07-14 11:37:15 +08:00
liuzhengdong 51312c130d Create CNAME 2026-07-13 23:09:49 +08:00
Wyatt Fang 8538f750b7 docs: fix star history 404 2026-07-13 23:03:46 +08:00
Wyatt Fang e6236917a2 docs: refine repo group space 2026-07-13 23:02:29 +08:00
dafang 00c78b38a6 release: CodeStable 1.0.3 2026-07-11 10:39:45 +08:00
Wyatt Fang 30fecaae5e release(codestable): ship skill workflow v1.0.2 (#41)
收敛 CodeStable 主入口、runtime preflight、goal driver 与 skill 工程化评测闭环。

- 根 cs 对行动请求同轮直转,咨询与介绍保持非执行
- feature/issue/refactor/epic/docs 按仓库事实恢复,旧 stage skill 保留兼容薄壳
- repo-local runtime 支持版本检测、安全自动同步和显式 refresh-runtime
- 完成 Codex/Claude marketplace 1.0.2、升级文档和回归/评测证据

验证:215 tests passed;package/runtime/diff checks passed;独立 review 与 QA 无 unresolved blocking/important findings。
v1.0.2
2026-07-10 15:23:56 +08:00
Wyatt Fang cd7e1d33f0 refactor: package CodeStable plugin distribution (#34)
* refactor: package codestable plugin distribution

* docs: restore README workflow details

* refactor: remove browser bridge from distribution

---------

Co-authored-by: QA Bot <qa@example.invalid>
v0
2026-07-02 09:56:21 +08:00
Wyatt Fang f1862c7fe1 Enhance coding and review prompts (#31) 2026-07-01 10:45:44 +08:00
liuzhengdong 912e4fcd27 Merge pull request #30 from dafang/main
更新 CodeStable 工作流技能约束
2026-07-01 08:41:35 +08:00
dafang d453aa74b9 Merge remote-tracking branch 'upstream/main' 2026-06-30 17:29:12 +08:00
dafang b5952b1b74 fix: require feature impl skill in goal loop 2026-06-30 17:24:05 +08:00
dafang 4aa2b351d0 feat: add architecture deepening scan to refactor 2026-06-30 17:00:27 +08:00
dafang 98d7c7e14e feat: add codebase design checks to design skills 2026-06-30 16:46:45 +08:00
dafang e927109a3e feat: add embedded TDD guidance for feature implementation 2026-06-30 16:30:21 +08:00
dafang 7170e2d79f fix: enforce independent design review gates 2026-06-30 15:24:07 +08:00
liuzhengdong baa2eb2e4d Merge pull request #27 from dafang/main
Improve CodeStable workflow gates and skill guidance
2026-06-30 07:18:08 +08:00
dafang 875f77ae19 docs: refine CodeStable skill instructions 2026-06-29 19:14:20 +08:00
dafang a705c640e5 fix: stop installing protected main push hooks 2026-06-29 17:38:56 +08:00
dafang d3192bf577 docs: clarify task agent review rules 2026-06-29 17:17:34 +08:00
dafang 69d33ce4eb docs: localize task agent workflow rules 2026-06-29 16:46:23 +08:00
dafang d1a5d2269b docs: standardize task agent terminology 2026-06-29 16:23:57 +08:00
dafang 060c8c5326 docs: clarify QA and acceptance agent boundaries 2026-06-29 16:01:15 +08:00
dafang ac31305d99 docs: tighten agent-facing OCR scope rules 2026-06-29 15:28:09 +08:00
dafang 20b35d7e25 docs: bound OCR review scope per roadmap feature 2026-06-29 15:02:17 +08:00
dafang 9bb946e9ba docs: clarify OCR untracked review scope 2026-06-29 14:48:46 +08:00
dafang 7b58fb2f11 fix: dod-runner 顶层优先去重 + cs-code-review OCR 限定范围排除产物
两个从 goal 执行中暴露的问题:

1) DoD 命令重复执行(上个 commit 的回归):collect_commands 把顶层 +
   step-level 都读并合并,checklist 两处都有同组命令时会执行两遍。
   改为「顶层优先」——顶层 dod.commands 存在即唯一源,不再叠加 step;
   仅当无顶层时 fallback step-level。既不重复又向后兼容。
   测试改 test_top_level_takes_precedence_no_duplicate(顶层+step 同 id
   只执行一次)。

2) OCR 横向扫描 .codestable 等非 feature 文件:ocr review 默认 workspace
   模式审 untracked,业务项目 .codestable/(goal 执行包,未 gitignore)被
   横扫污染结果。ocr 第三方无 --exclude,故在 cs-code-review 环节B 加两道
   控制——调用时优先 ref 范围(--from/--to 排除 untracked 产物);结果过滤
   兜底:丢弃 .codestable/、. 开头目录、gitignore 命中路径的 finding。

测试:62 passed。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 14:15:10 +08:00
dafang efe818f95f Merge branch 'worktree-fix+dod-runner-schema' 2026-06-29 14:01:09 +08:00
dafang 4645a4316c fix: dod-runner 识别顶层 dod.commands(权威 schema),兼容 step-level
权威 checklist schema(cs-feat-design/reference.md「DoD Contract」)定义
dod 为顶层字段(与 steps/checks 同级),dod.commands 是机读权威源。但
codestable-dod-runner.py 的 collect_commands 只遍历 steps[*].dod.commands
(step-level),读不到顶层 → 返回 skipped。goal/gate 执行时表现为 DoD 命令
被跳过,迫使使用者把命令挪到 step 下绕过,违背 schema。

修复:collect_commands 先读顶层 dod.commands(权威),再兼容 step-level
(向后兼容已挪到 step 下的 checklist),两者合并。

测试:新增 tests/test_codestable_dod_runner.py 5 例——顶层命令被执行
(回归)、step-level 仍支持、顶层+step 合并、non-core 失败仅 warning、
无命令 skipped。全套通过。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 14:00:24 +08:00
dafang 06c77fc3fb Merge branch 'worktree-fix+branch-guard-worktree' 2026-06-29 13:28:43 +08:00
dafang 1635acd41b fix: branch-guard 跟随真实 worktree + owner-publish 默认取 upstream remote
两个影响 fork+worktree 工作流的缺陷:

Bug1(真 bug):PreToolUse hook 传 --root=CLAUDE_PROJECT_DIR(主仓库),
guard_payload 据此判 branch=main,且 worktree 位于主仓库子目录、被编辑文件
被当主仓库实现文件 → 在 worktree typed 分支改实现文件也被误拦,worktree
执行正道走不通。修复:guard 按"被操作对象的真实 worktree"判定——
新增 worktree_of()/collect_raw_paths()/edit_impl_paths_on_protected();
Edit/Write 逐文件按其 worktree 分支判定(typed 放行);Bash 用 payload.cwd
的 worktree;拿不到时兜底回退原 root,不削弱既有保护。

Bug2(易用性):owner-publish begin 默认对比 origin/main,fork 用户 origin
常是上游镜像,合规发布通道不可用。修复:--remote 默认取当前分支 upstream
的 remote(回退 origin);不匹配/fetch 失败的报错加 fork 引导。

测试:tests +5(worktree root=main 放行回归、main 仍拦、Bash cwd worktree、
detect_default_remote、begin 自定义 remote);全套 57 passed。
文档:branch-guard-hooks.md 说明按文件实际 worktree 判定 + fork 用 --remote。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 13:28:14 +08:00