@hunyed15/codecgc 0.1.0
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.
- package/.claude/hooks/route-edit.ps1 +86 -0
- package/INSTALLATION.md +550 -0
- package/LICENSE +21 -0
- package/README.md +171 -0
- package/bin/cgc-build.js +4 -0
- package/bin/cgc-doctor.js +4 -0
- package/bin/cgc-entry.js +4 -0
- package/bin/cgc-external-audit.js +4 -0
- package/bin/cgc-fix.js +4 -0
- package/bin/cgc-history.js +4 -0
- package/bin/cgc-install.js +4 -0
- package/bin/cgc-lifecycle.js +4 -0
- package/bin/cgc-package-audit.js +4 -0
- package/bin/cgc-plan.js +4 -0
- package/bin/cgc-release-readiness.js +4 -0
- package/bin/cgc-review.js +4 -0
- package/bin/cgc-route.js +4 -0
- package/bin/cgc-status.js +4 -0
- package/bin/cgc-test.js +4 -0
- package/bin/cgc.js +4 -0
- package/bin/codecgc.js +1284 -0
- package/codecgc/cgc/SKILL.md +46 -0
- package/codecgc/cgc-arch/SKILL.md +61 -0
- package/codecgc/cgc-build/SKILL.md +53 -0
- package/codecgc/cgc-decide/SKILL.md +55 -0
- package/codecgc/cgc-fix/SKILL.md +47 -0
- package/codecgc/cgc-learn/SKILL.md +46 -0
- package/codecgc/cgc-onboard/SKILL.md +52 -0
- package/codecgc/cgc-plan/SKILL.md +48 -0
- package/codecgc/cgc-refactor/SKILL.md +46 -0
- package/codecgc/cgc-req/SKILL.md +61 -0
- package/codecgc/cgc-review/SKILL.md +57 -0
- package/codecgc/cgc-roadmap/SKILL.md +55 -0
- package/codecgc/cgc-test/SKILL.md +21 -0
- package/codecgc/reference/api-cgc-review-libdoc.md +13 -0
- package/codecgc/reference/artifact-class-policy.md +81 -0
- package/codecgc/reference/build-flow.md +95 -0
- package/codecgc/reference/checklist-contract.md +103 -0
- package/codecgc/reference/execution-audit.md +121 -0
- package/codecgc/reference/execution-model.md +118 -0
- package/codecgc/reference/execution-routing.md +130 -0
- package/codecgc/reference/executor-contract.md +87 -0
- package/codecgc/reference/external-capability-registry.json +104 -0
- package/codecgc/reference/fix-flow.md +94 -0
- package/codecgc/reference/fixture-governance.md +60 -0
- package/codecgc/reference/flow-execution.md +65 -0
- package/codecgc/reference/lifecycle-map.md +172 -0
- package/codecgc/reference/lifecycle-playbook.md +104 -0
- package/codecgc/reference/long-lived-artifacts.md +98 -0
- package/codecgc/reference/operation-guide.md +242 -0
- package/codecgc/reference/release-maintenance-playbook.md +150 -0
- package/codecgc/reference/review-writeback.md +141 -0
- package/codecgc/reference/role-model.md +128 -0
- package/codecgc/reference/runtime-boundary.md +72 -0
- package/codecgc/reference/shared-conventions.md +93 -0
- package/codecgc/reference/workflow-scaffold.md +57 -0
- package/codexmcp/LICENSE +21 -0
- package/codexmcp/README.md +294 -0
- package/codexmcp/pyproject.toml +37 -0
- package/codexmcp/src/codexmcp/__init__.py +4 -0
- package/codexmcp/src/codexmcp/cli.py +12 -0
- package/codexmcp/src/codexmcp/server.py +529 -0
- package/geminimcp/README.md +258 -0
- package/geminimcp/pyproject.toml +15 -0
- package/geminimcp/src/geminimcp/__init__.py +4 -0
- package/geminimcp/src/geminimcp/cli.py +12 -0
- package/geminimcp/src/geminimcp/server.py +465 -0
- package/model-routing.yaml +30 -0
- package/package.json +90 -0
- package/requirements.txt +1 -0
- package/scripts/README-codecgc-cli.md +89 -0
- package/scripts/audit_codecgc_external_capabilities.py +276 -0
- package/scripts/audit_codecgc_historical_audits.py +242 -0
- package/scripts/audit_codecgc_lifecycle.py +241 -0
- package/scripts/audit_codecgc_package_runtime.py +445 -0
- package/scripts/audit_codecgc_release_readiness.py +202 -0
- package/scripts/audit_codecgc_review_policy.py +82 -0
- package/scripts/audit_codecgc_workflow_history.py +317 -0
- package/scripts/build_codecgc_task.py +487 -0
- package/scripts/codecgc_artifact_roots.py +40 -0
- package/scripts/codecgc_cli.py +843 -0
- package/scripts/codecgc_command_surface.py +28 -0
- package/scripts/codecgc_console_io.py +45 -0
- package/scripts/codecgc_executor_registry.py +54 -0
- package/scripts/codecgc_file_evidence.py +349 -0
- package/scripts/codecgc_flow_control.py +233 -0
- package/scripts/codecgc_governance_dedupe.py +161 -0
- package/scripts/codecgc_plan_decision.py +103 -0
- package/scripts/codecgc_review_control.py +588 -0
- package/scripts/codecgc_roadmap_templates.py +149 -0
- package/scripts/codecgc_routing_paths.py +16 -0
- package/scripts/codecgc_routing_template.py +135 -0
- package/scripts/codecgc_runtime_paths.py +22 -0
- package/scripts/codecgc_session_recovery.py +44 -0
- package/scripts/codecgc_step_control.py +154 -0
- package/scripts/codecgc_workflow_runtime.py +63 -0
- package/scripts/codecgc_workflow_templates.py +437 -0
- package/scripts/entry_codecgc_workflow.py +3419 -0
- package/scripts/exercise_mcp_tools.py +109 -0
- package/scripts/expand_codecgc_roadmap.py +664 -0
- package/scripts/init_codecgc_roadmap.py +134 -0
- package/scripts/init_codecgc_workflow.py +207 -0
- package/scripts/install_codecgc.py +938 -0
- package/scripts/migrate_demo_workflows_to_fixtures.py +128 -0
- package/scripts/normalize_codecgc_audits.py +114 -0
- package/scripts/normalize_codecgc_governance_docs.py +79 -0
- package/scripts/normalize_codecgc_workflow_docs.py +269 -0
- package/scripts/plan_codecgc_workflow.py +970 -0
- package/scripts/refresh_codecgc_review_policy.py +223 -0
- package/scripts/review_codecgc_workflow.py +88 -0
- package/scripts/route_codecgc_workflow.py +671 -0
- package/scripts/run_codecgc_build.py +104 -0
- package/scripts/run_codecgc_fix.py +104 -0
- package/scripts/run_codecgc_flow_step.py +165 -0
- package/scripts/run_codecgc_task.py +410 -0
- package/scripts/run_codecgc_test.py +105 -0
- package/scripts/sync_codecgc_mcp_config.py +41 -0
- package/scripts/write_codecgc_architecture.py +78 -0
- package/scripts/write_codecgc_decision.py +83 -0
- package/scripts/write_codecgc_explore.py +118 -0
- package/scripts/write_codecgc_guide.py +141 -0
- package/scripts/write_codecgc_learning.py +87 -0
- package/scripts/write_codecgc_libdoc.py +140 -0
- package/scripts/write_codecgc_refactor.py +78 -0
- package/scripts/write_codecgc_requirement.py +78 -0
- package/scripts/write_codecgc_review.py +291 -0
- package/scripts/write_codecgc_roadmap.py +122 -0
- package/scripts/write_codecgc_trick.py +123 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import asyncio
|
|
3
|
+
import datetime
|
|
4
|
+
import json
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from codecgc_executor_registry import build_executor_env
|
|
8
|
+
from codecgc_executor_registry import get_executor_config
|
|
9
|
+
from mcp import ClientSession
|
|
10
|
+
from mcp.client.stdio import StdioServerParameters, stdio_client
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
WORKSPACE = Path(__file__).resolve().parents[1]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def build_server_params(target: str) -> StdioServerParameters:
|
|
17
|
+
config = get_executor_config(target)
|
|
18
|
+
return StdioServerParameters(
|
|
19
|
+
command=str(config["python_command"]),
|
|
20
|
+
args=["-m", str(config["python_module"])],
|
|
21
|
+
env=build_executor_env(target),
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def build_tool_call(target: str) -> tuple[str, dict]:
|
|
26
|
+
if target == "backend":
|
|
27
|
+
return (
|
|
28
|
+
"implement_backend_task",
|
|
29
|
+
{
|
|
30
|
+
"task_id": "exercise-backend-001",
|
|
31
|
+
"task_summary": "Inspect the backend executor contract and return a constrained implementation summary only.",
|
|
32
|
+
"target_paths": ["src/codexmcp/server.py"],
|
|
33
|
+
"constraints": [
|
|
34
|
+
"Do not edit files outside target_paths.",
|
|
35
|
+
"Treat this as a dry-run style exercise response.",
|
|
36
|
+
],
|
|
37
|
+
"acceptance_criteria": [
|
|
38
|
+
"Return a structured summary payload.",
|
|
39
|
+
"Do not touch frontend paths.",
|
|
40
|
+
],
|
|
41
|
+
"cd": str(WORKSPACE / "codexmcp"),
|
|
42
|
+
"sandbox": "read-only",
|
|
43
|
+
},
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
if target == "frontend":
|
|
47
|
+
return (
|
|
48
|
+
"implement_frontend_task",
|
|
49
|
+
{
|
|
50
|
+
"task_id": "exercise-frontend-001",
|
|
51
|
+
"task_summary": "Inspect the frontend executor contract and return a constrained implementation summary only.",
|
|
52
|
+
"target_paths": ["images/title.png"],
|
|
53
|
+
"constraints": [
|
|
54
|
+
"Do not edit files outside target_paths.",
|
|
55
|
+
"Treat this as a dry-run style exercise response.",
|
|
56
|
+
],
|
|
57
|
+
"acceptance_criteria": [
|
|
58
|
+
"Return a structured summary payload.",
|
|
59
|
+
"Do not touch backend paths.",
|
|
60
|
+
],
|
|
61
|
+
"cd": str(WORKSPACE / "geminimcp"),
|
|
62
|
+
"sandbox": False,
|
|
63
|
+
},
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
raise ValueError(f"Unsupported target: {target}")
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
async def main() -> None:
|
|
70
|
+
parser = argparse.ArgumentParser(description="Exercise CodeCGC MCP tools over stdio.")
|
|
71
|
+
parser.add_argument("target", choices=["backend", "frontend"])
|
|
72
|
+
parser.add_argument("--list-tools", action="store_true")
|
|
73
|
+
parser.add_argument("--timeout-seconds", type=int, default=120)
|
|
74
|
+
args = parser.parse_args()
|
|
75
|
+
|
|
76
|
+
params = build_server_params(args.target)
|
|
77
|
+
|
|
78
|
+
async with stdio_client(params) as (read_stream, write_stream):
|
|
79
|
+
async with ClientSession(read_stream, write_stream) as session:
|
|
80
|
+
await session.initialize()
|
|
81
|
+
if args.list_tools:
|
|
82
|
+
result = await session.list_tools()
|
|
83
|
+
print(
|
|
84
|
+
json.dumps(
|
|
85
|
+
result.model_dump(mode="json"),
|
|
86
|
+
ensure_ascii=False,
|
|
87
|
+
indent=2,
|
|
88
|
+
)
|
|
89
|
+
)
|
|
90
|
+
return
|
|
91
|
+
|
|
92
|
+
tool_name, tool_args = build_tool_call(args.target)
|
|
93
|
+
result = await session.call_tool(
|
|
94
|
+
tool_name,
|
|
95
|
+
tool_args,
|
|
96
|
+
read_timeout_seconds=datetime.timedelta(seconds=args.timeout_seconds),
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
print(
|
|
100
|
+
json.dumps(
|
|
101
|
+
result.model_dump(mode="json"),
|
|
102
|
+
ensure_ascii=False,
|
|
103
|
+
indent=2,
|
|
104
|
+
)
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
if __name__ == "__main__":
|
|
109
|
+
asyncio.run(main())
|