@hunyed15/codecgc 0.1.7 → 0.1.8

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.
Files changed (65) hide show
  1. package/.claude/hooks/route-edit.ps1 +58 -57
  2. package/INSTALLATION.md +117 -484
  3. package/README.md +118 -150
  4. package/bin/cgc-external-status.js +4 -0
  5. package/bin/cgc-start.js +4 -0
  6. package/bin/codecgc.js +141 -20
  7. package/codecgc/compound/codecgc-capability-matrix.md +37 -0
  8. package/codecgc/reference/README.md +69 -0
  9. package/codecgc/reference/maintainer-guide.md +93 -0
  10. package/codecgc/reference/mcp-tool-surface.md +112 -0
  11. package/codecgc/reference/onboarding.md +69 -0
  12. package/codecgc/reference/operation-guide.md +29 -23
  13. package/codecgc/reference/path-contract.md +53 -0
  14. package/codecgc/reference/policy-routing.md +57 -0
  15. package/codecgc/reference/project-structure.md +80 -0
  16. package/codecgc/reference/quickstart.md +108 -0
  17. package/codecgc/reference/real-workflow-loop.md +123 -0
  18. package/codecgc/reference/recovery-loop.md +109 -0
  19. package/codecgc/reference/release-maintenance-playbook.md +4 -1
  20. package/codecgc/reference/troubleshooting.md +112 -0
  21. package/codecgc/roadmap/codecgc-release-maintenance/delivery-plan.md +49 -0
  22. package/codecgc/roadmap/codecgc-release-maintenance/overview.md +41 -0
  23. package/codecgc/roadmap/codecgc-release-maintenance/phases.md +84 -0
  24. package/codecgcmcp/README.md +57 -11
  25. package/codecgcmcp/src/codecgcmcp/server.py +164 -26
  26. package/model-routing.yaml +31 -6
  27. package/package.json +11 -4
  28. package/scripts/audit_codecgc_external_capabilities.py +83 -4
  29. package/scripts/audit_codecgc_historical_audits.py +42 -2
  30. package/scripts/audit_codecgc_package_runtime.py +73 -4
  31. package/scripts/audit_codecgc_release_readiness.py +55 -3
  32. package/scripts/audit_codecgc_workflow_history.py +8 -5
  33. package/scripts/build_codecgc_task.py +62 -45
  34. package/scripts/codecgc_artifact_roots.py +8 -40
  35. package/scripts/codecgc_console_io.py +3 -45
  36. package/scripts/codecgc_executor_registry.py +4 -54
  37. package/scripts/codecgc_path_contract.py +7 -0
  38. package/scripts/codecgc_policy.py +275 -0
  39. package/scripts/codecgc_routing_paths.py +3 -16
  40. package/scripts/codecgc_routing_template.py +11 -135
  41. package/scripts/codecgc_runtime/__init__.py +1 -0
  42. package/scripts/codecgc_runtime/artifacts.py +42 -0
  43. package/scripts/codecgc_runtime/console.py +45 -0
  44. package/scripts/codecgc_runtime/executor_registry.py +55 -0
  45. package/scripts/codecgc_runtime/mcp_config.py +72 -0
  46. package/scripts/codecgc_runtime/path_contract.py +123 -0
  47. package/scripts/codecgc_runtime/paths.py +22 -0
  48. package/scripts/codecgc_runtime/routing_paths.py +16 -0
  49. package/scripts/codecgc_runtime/routing_template.py +169 -0
  50. package/scripts/codecgc_runtime/workflow_runtime.py +72 -0
  51. package/scripts/codecgc_runtime_paths.py +3 -22
  52. package/scripts/codecgc_step_control.py +3 -2
  53. package/scripts/codecgc_workflow_runtime.py +3 -71
  54. package/scripts/entry_codecgc_workflow.py +4 -0
  55. package/scripts/install_codecgc.py +490 -21
  56. package/scripts/normalize_codecgc_audits.py +5 -3
  57. package/scripts/postinstall_codecgc.js +6 -56
  58. package/scripts/review_codecgc_workflow.py +6 -3
  59. package/scripts/route_codecgc_workflow.py +67 -36
  60. package/scripts/run_codecgc_build.py +28 -0
  61. package/scripts/run_codecgc_fix.py +28 -0
  62. package/scripts/run_codecgc_task.py +5 -2
  63. package/scripts/run_codecgc_test.py +28 -0
  64. package/scripts/sync_codecgc_mcp_config.py +4 -54
  65. package/scripts/write_codecgc_review.py +7 -3
@@ -0,0 +1,108 @@
1
+ # CodeCGC Quickstart
2
+
3
+ This guide shows the shortest path from a clean machine to a working project-local CodeCGC integration.
4
+
5
+ ## 1. Install The CLI
6
+
7
+ Install the package globally:
8
+
9
+ ```bash
10
+ npm install -g @hunyed15/codecgc --registry=https://registry.npmjs.org/
11
+ ```
12
+
13
+ This only installs the global `cgc*` commands. It does not write user-level Claude files by default.
14
+
15
+ ## 2. Install Into A Project
16
+
17
+ Run project-local install from the target project root:
18
+
19
+ ```bash
20
+ cd your-project
21
+ cgc-install
22
+ cgc-start
23
+ cgc-status
24
+ cgc-doctor
25
+ ```
26
+
27
+ Inside Claude, use `/cgc-install` and then `/cgc-start` for the same project-local path.
28
+
29
+ The project install syncs:
30
+
31
+ ```text
32
+ .mcp.json
33
+ model-routing.yaml
34
+ .claude/settings.json
35
+ .claude/hooks/route-edit.ps1
36
+ .claude/commands/cgc*.md
37
+ codecgc/START_HERE.md
38
+ codecgc/
39
+ ```
40
+
41
+ ## 3. Read The Project Entry
42
+
43
+ Run:
44
+
45
+ ```bash
46
+ cgc-start
47
+ ```
48
+
49
+ This is a read-only first-run guide for the current project. If it reports missing onboarding, run `cgc-install` again from the target project root.
50
+
51
+ ## 4. Start Work From The Single Entry
52
+
53
+ Prefer the Claude entry:
54
+
55
+ ```text
56
+ /cgc 新增一个登录页面,放在 src/components/LoginForm.tsx
57
+ ```
58
+
59
+ If you are outside Claude, use the CLI fallback:
60
+
61
+ ```bash
62
+ cgc "新增一个登录页面,放在 src/components/LoginForm.tsx"
63
+ ```
64
+
65
+ CodeCGC should route frontend implementation to Gemini and backend implementation to Codex.
66
+
67
+ ## 5. Continue Or Explain
68
+
69
+ Use the same entry instead of memorizing internal commands:
70
+
71
+ ```text
72
+ /cgc 继续刚刚的工作
73
+ /cgc 现在下一步该做什么
74
+ ```
75
+
76
+ The orchestrator should decide whether the next action is planning, execution, review, or closure.
77
+
78
+ ## 6. Review An Execution
79
+
80
+ When an execution audit is ready, use:
81
+
82
+ ```text
83
+ /cgc-review
84
+ ```
85
+
86
+ or the CLI fallback:
87
+
88
+ ```bash
89
+ cgc-review --audit-file codecgc/execution/example-step-1.json --decision accepted
90
+ ```
91
+
92
+ Review is a control point. It may downgrade an `accepted` request to `changes-requested` if local evidence, ownership, or scope checks fail.
93
+
94
+ For the full state loop, including dry-run downgrade and successful closure, see [Real Workflow Loop](real-workflow-loop.md).
95
+
96
+ ## 7. Use Explicit Commands Only When Needed
97
+
98
+ Use explicit subcommands only when you already know the workflow phase:
99
+
100
+ ```bash
101
+ cgc-plan ...
102
+ cgc-build ...
103
+ cgc-fix ...
104
+ cgc-test ...
105
+ cgc-route ...
106
+ ```
107
+
108
+ For normal use, `/cgc` and the CodeCGC MCP tools should remain the primary path.
@@ -0,0 +1,123 @@
1
+ # CodeCGC Real Workflow Loop
2
+
3
+ This page describes the repeatable CodeCGC loop after a project has already run `cgc-install`.
4
+
5
+ The goal is not to make users memorize every command. The goal is to keep one stable control loop where Claude orchestrates state, Codex or Gemini executes scoped code work, and review closes the loop only when there is enough evidence.
6
+
7
+ ## Ownership Model
8
+
9
+ Claude owns orchestration work:
10
+
11
+ - Requirements and clarification.
12
+ - Feature or issue planning.
13
+ - Workflow state explanation.
14
+ - Documentation and acceptance notes.
15
+ - Review decision writeback.
16
+ - Routing recovery when scope or evidence is wrong.
17
+
18
+ Codex owns backend execution:
19
+
20
+ - Backend implementation under paths classified as backend.
21
+ - Backend tests when the step is explicitly a backend test step.
22
+ - Returning execution evidence through the backend executor.
23
+
24
+ Gemini owns frontend execution:
25
+
26
+ - Frontend implementation under paths classified as frontend.
27
+ - Frontend tests when the step is explicitly a frontend test step.
28
+ - Returning execution evidence through the frontend executor.
29
+
30
+ CodeCGC owns the contract between them:
31
+
32
+ - Project-local paths and generated artifacts.
33
+ - `model-routing.yaml` path classification.
34
+ - Step selection from checklist or fix YAML.
35
+ - Execution audit files under `codecgc/execution/`.
36
+ - Review policy and checklist status writeback.
37
+
38
+ ## Normal Loop
39
+
40
+ The preferred Claude entry is:
41
+
42
+ ```text
43
+ /cgc <your request>
44
+ ```
45
+
46
+ For CLI debugging or CI, the same loop maps to:
47
+
48
+ ```bash
49
+ cgc "add a backend endpoint under src/server/demo.py"
50
+ cgc-route --flow feature --slug 2026-05-10-demo
51
+ cgc-build --slug 2026-05-10-demo
52
+ cgc-review --audit-file codecgc/execution/demo-step-1.json --decision accepted
53
+ cgc-route --flow feature --slug 2026-05-10-demo
54
+ ```
55
+
56
+ The stable states are:
57
+
58
+ - `needs-planning`: Claude must refine or repair the plan before execution.
59
+ - `awaiting-build`: a feature step is ready for Codex or Gemini execution.
60
+ - `awaiting-fix`: an issue step is ready for Codex or Gemini execution.
61
+ - `awaiting-review`: an execution audit is ready for Claude review.
62
+ - `closed`: the current workflow has no remaining executable step.
63
+
64
+ ## Dry-Run Behavior
65
+
66
+ Use dry-run to check routing and payload shape:
67
+
68
+ ```bash
69
+ cgc-build --slug 2026-05-10-demo --dry-run
70
+ ```
71
+
72
+ A dry-run writes an audit, but it is not execution evidence. If review is requested as `accepted`, the review policy must downgrade it to `changes-requested` and keep the step `pending`.
73
+
74
+ Expected recovery:
75
+
76
+ ```text
77
+ dry-run audit -> cgc-review accepted -> final_decision changes-requested -> route recommends cgc-build again
78
+ ```
79
+
80
+ This is intentional. It prevents a workflow from closing when no real executor changed the workspace.
81
+
82
+ ## Successful Execution Behavior
83
+
84
+ After a real executor run, CodeCGC expects an audit with:
85
+
86
+ - `mode: execute`
87
+ - matching `task_id`
88
+ - matching `source.step_number`
89
+ - executor success
90
+ - `result.outcome: done`
91
+ - no `dry_run_only` policy check
92
+ - no `execution_not_performed` risk
93
+
94
+ If those conditions hold, route must recommend `cgc-review` even if the previous review for the same step was `changes-requested`. The newest valid execution evidence should be reviewed instead of being blocked by an older failed review.
95
+
96
+ Expected recovery:
97
+
98
+ ```text
99
+ changes-requested review -> real execute audit -> route recommends cgc-review -> accepted review -> checklist step done -> route closed
100
+ ```
101
+
102
+ ## Review Writeback
103
+
104
+ Review writes back to the workflow artifact:
105
+
106
+ - Feature workflows write to `*-acceptance.md`.
107
+ - Issue workflows write to `*-fix-note.md`.
108
+ - Accepted review sets the matching checklist step to `done`.
109
+ - Changes-requested review keeps the matching checklist step `pending`.
110
+
111
+ Review is a control point, not a text append helper. It can reject or downgrade a requested acceptance when evidence is missing, out of scope, owned by the wrong executor, or only dry-run.
112
+
113
+ For detailed recovery behavior after executor failure, review rejection, mixed paths, test steps, or session continue, see [Recovery Loop](recovery-loop.md).
114
+
115
+ ## Machine-Independent Paths
116
+
117
+ Generated and persisted project paths must stay project-relative:
118
+
119
+ - Good: `codecgc/execution/demo-step-1.json`
120
+ - Good: `src/server/demo.py`
121
+ - Bad: `D:\Users\someone\project\codecgc\execution\demo-step-1.json`
122
+
123
+ Runtime code may resolve absolute paths internally, but package output, audit JSON, and docs should not depend on the install directory of a specific computer.
@@ -0,0 +1,109 @@
1
+ # CodeCGC Recovery Loop
2
+
3
+ This page defines how CodeCGC should recover when a workflow cannot move straight from execution to acceptance.
4
+
5
+ The recovery loop is part of normal product behavior. It is not an exceptional maintainer-only path.
6
+
7
+ ## Recovery States
8
+
9
+ CodeCGC uses structured command results to make recovery machine-readable:
10
+
11
+ - `state`: where the workflow stopped.
12
+ - `failure_type`: why the workflow stopped.
13
+ - `recommended_command`: the next command to run, if there is a safe one.
14
+ - `next`: human-facing recovery instruction.
15
+ - `replan_payload`: structured planning payload when the workflow must return to `cgc-plan`.
16
+ - `reused_session_id`: executor session reused for the same task, when available.
17
+
18
+ ## Executor Failure
19
+
20
+ If an executor returns invalid output, fails, or cannot complete the task, the workflow must not pretend that the step is ready for review.
21
+
22
+ Expected behavior:
23
+
24
+ ```text
25
+ executor failure -> state blocked -> failure_type executor-failure -> inspect executor output before retry
26
+ ```
27
+
28
+ The retry command may be empty when CodeCGC cannot safely prove that a simple rerun is enough. In that case the operator must inspect the audit and executor logs first.
29
+
30
+ ## Review Rejection
31
+
32
+ When review writes `changes-requested`, the matching checklist step remains `pending`.
33
+
34
+ Expected behavior:
35
+
36
+ ```text
37
+ review changes-requested -> route recommends cgc-build/cgc-fix/cgc-test again
38
+ ```
39
+
40
+ If the previous executor audit contains a reusable `session_id`, the next execution command should include `--session-id <id>` for the same task. This keeps the executor conversation continuous without changing the workflow step.
41
+
42
+ ## Mixed Path Recovery
43
+
44
+ A single executable step must not mix frontend, backend, shared, docs, or orchestration ownership.
45
+
46
+ Expected behavior:
47
+
48
+ ```text
49
+ mixed ownership -> route recommends cgc-plan -> split_suggestion/replan_payload describes smaller steps
50
+ ```
51
+
52
+ The structured split payload should include:
53
+
54
+ - `grouped_paths`
55
+ - `path_classification`
56
+ - `suggested_split_steps`
57
+ - `target_paths`
58
+ - `in_scope`
59
+
60
+ Claude uses this payload to rewrite the plan into narrower executable steps.
61
+
62
+ ## Test Step Recovery
63
+
64
+ Test steps are routed through `cgc-test`.
65
+
66
+ The stable marker is:
67
+
68
+ ```yaml
69
+ codecgc:
70
+ step_type: test
71
+ ```
72
+
73
+ `task_id` naming may still contain `-test-step-` for readability, but routing must not depend on that naming convention.
74
+
75
+ Expected behavior:
76
+
77
+ ```text
78
+ step_type test -> route recommends cgc-test
79
+ cgc-test --dry-run -> state executed-dry-run -> retry cgc-test without dry-run
80
+ ```
81
+
82
+ ## Session Continue
83
+
84
+ Session continue is scoped to the current task id and artifact class.
85
+
86
+ CodeCGC resolves reusable session ids from:
87
+
88
+ 1. `audit.result.session_id`
89
+ 2. `audit.requested_session_id`
90
+
91
+ Expected behavior:
92
+
93
+ ```text
94
+ same task_id + existing audit session_id -> next build/fix/test includes --session-id
95
+ ```
96
+
97
+ Session ids must not be copied across unrelated task ids or unrelated artifact classes.
98
+
99
+ ## Verification
100
+
101
+ Maintainers should keep recovery behavior covered by tests that do not call real Codex or Gemini. The recovery contract can be validated with synthetic audits and temporary workspaces.
102
+
103
+ Minimum coverage:
104
+
105
+ - executor failure classification
106
+ - review rejection and retry
107
+ - mixed path split payload
108
+ - explicit `step_type: test`
109
+ - session continue command arguments
@@ -18,6 +18,7 @@
18
18
  - `cgc-status`
19
19
  - `cgc-doctor`
20
20
  - `cgc-package-audit`
21
+ - `cgc-external-status`
21
22
  - `cgc-external-audit`
22
23
  - `cgc-release-readiness`
23
24
 
@@ -26,6 +27,7 @@
26
27
  - `cgc-status` 看项目级集成是否已同步
27
28
  - `cgc-doctor` 看 Python、MCP、执行器和项目级集成是否可运行
28
29
  - `cgc-package-audit` 看发布包是否覆盖运行时依赖与发布元数据
30
+ - `cgc-external-status` 看第三方能力状态面板
29
31
  - `cgc-external-audit` 看第三方能力白名单与本地 MCP 观测状态
30
32
  - `cgc-release-readiness` 做总检查汇总,并补充仓库内 deploy / release 信号感知
31
33
 
@@ -69,7 +71,7 @@
69
71
 
70
72
  1. 先把接入意图写进 `codecgc/reference/external-capability-registry.json`
71
73
  2. 再把项目级或用户级 `.mcp.json` 接入做好;对 `MemOS`,优先直接使用官方 `memos-mcp`
72
- 3. 最后用 `cgc-external-audit` 检查“登记状态”和“本地观测状态”是否一致
74
+ 3. 日常用 `cgc-external-status` 快速看面板,必要时再用 `cgc-external-audit` 检查“登记状态”和“本地观测状态”是否一致
73
75
 
74
76
  如果跳过第 1 步,CodeCGC 不把该接入视为正式产品能力。
75
77
 
@@ -116,6 +118,7 @@
116
118
  - `cgc-status` 无阻塞
117
119
  - `cgc-doctor` 无阻塞
118
120
  - `cgc-package-audit` 无阻塞
121
+ - `cgc-external-status` 无阻塞
119
122
  - `cgc-external-audit` 无阻塞
120
123
  - `cgc-release-readiness` 总结论为通过
121
124
 
@@ -0,0 +1,112 @@
1
+ # CodeCGC Troubleshooting
2
+
3
+ ## Install Mode Confusion
4
+
5
+ `npm install -g @hunyed15/codecgc` installs the CLI globally.
6
+
7
+ It does not install CodeCGC into every project. Run this per project:
8
+
9
+ ```bash
10
+ cgc-install
11
+ cgc-start
12
+ cgc-status
13
+ cgc-doctor
14
+ ```
15
+
16
+ Use `--mode user-dry-run` only to preview user-level Claude integration:
17
+
18
+ ```bash
19
+ cgc-install --mode user-dry-run
20
+ ```
21
+
22
+ Do not use `--mode user` unless you intentionally want to write user-level Claude files.
23
+
24
+ ## MCP JSON Parse Errors
25
+
26
+ If an MCP install tool reports a JSON parse failure, first check whether the files were still written correctly:
27
+
28
+ ```bash
29
+ cgc-status
30
+ cgc-doctor
31
+ ```
32
+
33
+ The MCP tool surface should request JSON internally, even when the user asked for summary output. If the tool returns non-JSON text, treat it as a tool wrapper bug and verify state with `cgc-status`.
34
+
35
+ ## Missing First-Run Guide
36
+
37
+ If `cgc-start`, `cgc-status`, or `cgc-doctor` reports `onboarding_file` or `onboarding_file_ready`, rerun project-local install:
38
+
39
+ ```bash
40
+ cgc-install
41
+ cgc-start
42
+ ```
43
+
44
+ The generated file is `codecgc/START_HERE.md`. It should use project-relative paths and should not contain a machine-specific package install directory.
45
+
46
+ ## Claude Hook Blocks A Write
47
+
48
+ The hook is a guardrail. It blocks Claude direct writes to product source paths that should belong to Codex or Gemini.
49
+
50
+ Expected behavior:
51
+
52
+ - Claude may update docs and orchestration files.
53
+ - Codex should update backend code and backend tests.
54
+ - Gemini should update frontend code and frontend tests.
55
+ - Mixed ownership must be split before execution.
56
+
57
+ If a write was blocked incorrectly, inspect `model-routing.yaml` first. It is the project-local policy source.
58
+
59
+ ## Codex Or Gemini Is Unavailable
60
+
61
+ Run:
62
+
63
+ ```bash
64
+ cgc-doctor
65
+ ```
66
+
67
+ Then verify that the target project's `.mcp.json` contains the expected `codecgc`, `codex`, and `gemini` MCP server entries.
68
+
69
+ If only CodeCGC works but executor calls fail, the issue is usually in the executor MCP installation, CLI availability, or authentication state.
70
+
71
+ ## Python Or PyYAML Missing
72
+
73
+ Install runtime dependencies for the Python used by CodeCGC:
74
+
75
+ ```bash
76
+ pip install pyyaml
77
+ ```
78
+
79
+ For repository development:
80
+
81
+ ```bash
82
+ pip install -r requirements-dev.txt
83
+ ```
84
+
85
+ ## Pytest Temp Directory Errors On Windows
86
+
87
+ If pytest cannot write to the default temporary directory, use an explicit temp root:
88
+
89
+ ```bash
90
+ python -m pytest tests\test_codecgc_policy.py tests\test_install_codecgc.py --basetemp D:\tmp\codecgc-pytest
91
+ ```
92
+
93
+ ## Path Looks Machine-Specific
94
+
95
+ Runtime configuration may contain install-time absolute paths. Persisted project artifacts should use project-relative paths.
96
+
97
+ See [Path Contract](path-contract.md).
98
+
99
+ ## When In Doubt
100
+
101
+ Run the readiness chain:
102
+
103
+ ```bash
104
+ cgc-status
105
+ cgc-doctor
106
+ cgc-package-audit
107
+ cgc-external-status
108
+ cgc-external-audit
109
+ cgc-release-readiness
110
+ ```
111
+
112
+ Use `cgc-lifecycle` when the question is about product phase or workflow coverage rather than installation health.
@@ -0,0 +1,49 @@
1
+ # CodeCGC Release Maintenance Delivery Plan
2
+
3
+ This delivery plan turns the release maintenance roadmap into concrete work items.
4
+
5
+ ## Immediate Work
6
+
7
+ 1. Keep project-local install as the default product path.
8
+ 2. Keep user-level install behind explicit `--mode user` or `--mode user-dry-run`.
9
+ 3. Keep `/cgc` and `codecgc.entry` as the primary user path.
10
+ 4. Keep the hook as a write guardrail, not as the orchestration engine.
11
+ 5. Keep release docs stable and user-facing.
12
+
13
+ ## Near-Term Work
14
+
15
+ 1. Stabilize MCP tool schemas and response payloads.
16
+ 2. Normalize MCP errors so Claude can decide the next action without parsing logs.
17
+ 3. Extract workflow state access behind a runtime API.
18
+ 4. Reduce duplicate logic between CLI wrappers and MCP tools.
19
+ 5. Add focused tests for MCP tool argument mapping.
20
+
21
+ ## Review Trust Work
22
+
23
+ 1. Preserve local diff evidence in audit summaries.
24
+ 2. Record validation commands and outcomes when available.
25
+ 3. Distinguish missing evidence from failed evidence.
26
+ 4. Keep ownership mismatch and out-of-scope changes as blocking review risks.
27
+ 5. Ensure old fixtures do not silently bypass new review policy fields.
28
+
29
+ ## Documentation Work
30
+
31
+ 1. Keep `codecgc/reference/README.md` as the reference index.
32
+ 2. Keep `quickstart.md` focused on first successful use.
33
+ 3. Keep `troubleshooting.md` focused on real install/runtime failures.
34
+ 4. Keep `path-contract.md` focused on absolute runtime paths versus project-relative artifacts.
35
+ 5. Keep `maintainer-guide.md` focused on checks, release, and contribution rules.
36
+
37
+ ## Verification
38
+
39
+ Before release, run:
40
+
41
+ ```bash
42
+ cgc-status
43
+ cgc-doctor
44
+ cgc-package-audit
45
+ cgc-external-audit
46
+ cgc-release-readiness
47
+ ```
48
+
49
+ For repository changes, also run the focused test suite documented in `codecgc/reference/maintainer-guide.md`.
@@ -0,0 +1,41 @@
1
+ # CodeCGC Release Maintenance Overview
2
+
3
+ This roadmap tracks the productization work required to keep CodeCGC releasable and maintainable.
4
+
5
+ ## Goal
6
+
7
+ Make CodeCGC reliable as a Claude-native orchestration layer, not just as a collection of CLI wrappers.
8
+
9
+ The release maintenance track focuses on:
10
+
11
+ - Project-local installation correctness
12
+ - Orchestrator MCP tool surface stability
13
+ - Runtime and review evidence quality
14
+ - Package completeness
15
+ - External capability governance
16
+ - Documentation clarity for users and maintainers
17
+
18
+ ## Current Baseline
19
+
20
+ The current baseline is:
21
+
22
+ - Global npm install provides CLI commands.
23
+ - Project-local install writes `.mcp.json`, `.claude`, `model-routing.yaml`, and `codecgc/`.
24
+ - CodeCGC MCP exposes the primary orchestrator tools.
25
+ - Codex and Gemini remain executor MCPs.
26
+ - Hook enforcement remains a guardrail, not the main orchestration layer.
27
+ - Release readiness is checked through `cgc-release-readiness`.
28
+
29
+ ## Non-Goals
30
+
31
+ - Do not remove the CLI before the MCP path is stable.
32
+ - Do not wrap Codex or Gemini in a redundant executor layer.
33
+ - Do not make ordinary users memorize every internal `cgc-*` command.
34
+ - Do not publish raw design progress logs as user documentation.
35
+
36
+ ## Success Criteria
37
+
38
+ - A new user can install and start from `/cgc-install` and `/cgc`.
39
+ - A maintainer can verify release readiness with one documented command chain.
40
+ - Published docs explain install modes, path rules, troubleshooting, and maintainer checks.
41
+ - Package audits catch missing runtime and reference files before publication.
@@ -0,0 +1,84 @@
1
+ # CodeCGC Release Maintenance Phases
2
+
3
+ ## Phase 0: Stable User Entry
4
+
5
+ Objective:
6
+
7
+ - Keep the user-facing Claude entry small and predictable.
8
+
9
+ Deliverables:
10
+
11
+ - `/cgc` as the primary user entry.
12
+ - `/cgc-install`, `/cgc-status`, and `/cgc-doctor` for setup and health checks.
13
+ - `/cgc-review` and `/cgc-history` for common control points.
14
+ - Documentation that explains when to use CLI fallback.
15
+
16
+ Exit criteria:
17
+
18
+ - Users can start without reading internal command mappings.
19
+
20
+ ## Phase 1: Orchestrator MCP First
21
+
22
+ Objective:
23
+
24
+ - Make CodeCGC MCP the primary capability layer.
25
+
26
+ Deliverables:
27
+
28
+ - Stable tool contracts for install, status, doctor, entry, continue, explain, review, history, and route.
29
+ - JSON responses that can be consumed by Claude without text parsing.
30
+ - Runtime errors normalized into actionable payloads.
31
+
32
+ Exit criteria:
33
+
34
+ - Claude command templates prefer MCP tools and only fall back to CLI when necessary.
35
+
36
+ ## Phase 2: Runtime Contract Hardening
37
+
38
+ Objective:
39
+
40
+ - Keep workflow logic in reusable runtime code rather than scattered wrappers.
41
+
42
+ Deliverables:
43
+
44
+ - Shared runtime APIs for workflow state, routing, audit, and review writeback.
45
+ - CLI wrappers reduced to argument parsing and rendering.
46
+ - MCP tools call the same runtime contract.
47
+
48
+ Exit criteria:
49
+
50
+ - Behavior does not diverge between MCP and CLI paths.
51
+
52
+ ## Phase 3: Review Trust
53
+
54
+ Objective:
55
+
56
+ - Improve confidence in accepted work.
57
+
58
+ Deliverables:
59
+
60
+ - Stronger diff and git evidence summaries.
61
+ - Explicit ownership and path-scope proof.
62
+ - Validation command capture where available.
63
+ - Reproducible audit summaries.
64
+
65
+ Exit criteria:
66
+
67
+ - Review results can explain why a step was accepted or rejected without relying only on executor claims.
68
+
69
+ ## Phase 4: Release And Maintenance Closure
70
+
71
+ Objective:
72
+
73
+ - Keep the package publishable and maintainable.
74
+
75
+ Deliverables:
76
+
77
+ - Package runtime audit.
78
+ - External capability audit.
79
+ - Release readiness audit.
80
+ - Reference docs for quickstart, troubleshooting, path contract, and maintainer workflow.
81
+
82
+ Exit criteria:
83
+
84
+ - `cgc-release-readiness` passes before release.