@colin4k1024/tsp 2.4.5 → 2.4.7
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/README.md +16 -20
- package/bin/lib/install-surface.js +3 -3
- package/bin/lib/source-installer.js +2 -2
- package/commands/team-help.md +2 -2
- package/commands/team-plan.md +1 -1
- package/commands/update-codemaps.md +3 -3
- package/manifests/install-components.json +1 -1
- package/manifests/install-modules.json +17 -3
- package/manifests/install-profiles.json +2 -0
- package/package.json +6 -3
- package/schemas/ecc-install-config.schema.json +6 -1
- package/schemas/install-modules.schema.json +4 -1
- package/scripts/codegraph-preflight.js +179 -0
- package/scripts/gitnexus-preflight.js +8 -0
- package/scripts/install-apply.js +10 -8
- package/scripts/install-codegraph.js +158 -0
- package/scripts/install-plan.js +28 -11
- package/scripts/lib/install/apply.js +256 -5
- package/scripts/lib/install/request.js +3 -2
- package/scripts/lib/install-audit-manifest.js +3 -0
- package/scripts/lib/install-executor.js +14 -5
- package/scripts/lib/install-lifecycle.js +2 -2
- package/scripts/lib/install-manifests.js +23 -4
- package/scripts/lib/install-targets/codex-home.js +187 -1
- package/scripts/lib/install-targets/opencode-home.js +135 -2
- package/scripts/lib/install-targets/registry.js +23 -1
- package/scripts/lib/release-health.js +19 -4
- package/scripts/lib/team-skills-data.json +6 -6
- package/scripts/release-health-summary.js +1 -1
- package/scripts/workflow-help.js +3 -3
- package/skills/codegraph/SKILL.md +57 -0
- package/skills/codegraph/agents/openai.yaml +4 -0
- package/docs/.vitepress/config.mts +0 -199
- package/docs/adr/ADR-001-doc-architecture-integration.md +0 -33
- package/docs/guides/README.md +0 -5
- package/docs/guides/installation.md +0 -33
- package/docs/guides/user-guide.md +0 -36
- package/docs/index.md +0 -65
- package/docs/memory/backlog.md +0 -10
- package/docs/memory/decisions.md +0 -43
- package/docs/memory/lessons-learned.md +0 -87
- package/docs/plans/2026-04-03-python-remnants-audit.md +0 -265
- package/docs/plans/2026-04-03-scripts-python-to-js-migration.md +0 -372
- package/docs/plans/2026-04-03-solo-delivery-execution-checklist.md +0 -413
- package/docs/plans/2026-04-03-solo-delivery-gap-plan.md +0 -377
- package/docs/plans/2026-04-03-team-skills-workflow-gates.md +0 -548
- package/docs/plans/2026-04-21-open-source-readiness-gap-plan.md +0 -217
- package/docs/plans/llm-surface-reduction-audit.md +0 -147
- package/docs/plans/llm-surface-reduction-execution-checklist.md +0 -217
- package/docs/plans/llm-surface-reduction-execution-history.md +0 -124
- package/docs/plans/team-skills-platform-migration.md +0 -54
- package/docs/presentation/README.md +0 -42
- package/docs/presentation/audience-presentation-route-map.md +0 -84
- package/docs/presentation/executive-briefing-talk-track.md +0 -50
- package/docs/presentation/generate_capability_matrix.py +0 -396
- package/docs/presentation/generate_ppt.py +0 -354
- package/docs/presentation/implementation-onboarding-brief.md +0 -38
- package/docs/presentation/presentation-talk-track.md +0 -97
- package/docs/presentation/vertical-scenario-route-map.md +0 -99
- package/docs/presentation/workshop-facilitator-guide.md +0 -47
- package/docs/runbooks/actionlint-workflow-gates.md +0 -80
- package/docs/runbooks/agent-governance.md +0 -131
- package/docs/runbooks/ai-eval-platform-demo-execution-log.md +0 -147
- package/docs/runbooks/ai-eval-platform-demo-script.md +0 -136
- package/docs/runbooks/ai-eval-platform-walkthrough.md +0 -113
- package/docs/runbooks/ai-pr-review-automation.md +0 -56
- package/docs/runbooks/api-breaking-change-gates.md +0 -58
- package/docs/runbooks/api-design-evolution-walkthrough.md +0 -42
- package/docs/runbooks/api-lint-gates.md +0 -57
- package/docs/runbooks/api-mocking-strategy-and-lifecycle-guide.md +0 -47
- package/docs/runbooks/architect-daily-operations.md +0 -63
- package/docs/runbooks/architect-design-conversation-example.md +0 -83
- package/docs/runbooks/artifact-attestation-gates.md +0 -75
- package/docs/runbooks/artifact-persistence.md +0 -257
- package/docs/runbooks/backend-engineer-daily-operations.md +0 -63
- package/docs/runbooks/batch-optimization-completion-checklist.md +0 -104
- package/docs/runbooks/biz-service-designer-end-to-end-conversation-example.md +0 -5
- package/docs/runbooks/biz-service-designer-toolkit.md +0 -5
- package/docs/runbooks/bug-fix-complete-walkthrough.md +0 -60
- package/docs/runbooks/build-failure-recovery-walkthrough.md +0 -40
- package/docs/runbooks/canary-decision-matrix.md +0 -41
- package/docs/runbooks/canary-staging-release-walkthrough.md +0 -46
- package/docs/runbooks/checkov-iac-gates.md +0 -104
- package/docs/runbooks/claude-code-review-workflow.md +0 -72
- package/docs/runbooks/claude-conversation-prompt-recipes.md +0 -132
- package/docs/runbooks/claude-end-to-end-conversation-example.md +0 -198
- package/docs/runbooks/claude-feature-development-guide.md +0 -112
- package/docs/runbooks/claude-quick-start.md +0 -227
- package/docs/runbooks/claude-usage-scenarios.md +0 -176
- package/docs/runbooks/code-review-collaboration-walkthrough.md +0 -65
- package/docs/runbooks/codeql-pr-security-gates.md +0 -64
- package/docs/runbooks/codex-end-to-end-conversation-example.md +0 -166
- package/docs/runbooks/codex-multi-agent-orchestration.md +0 -65
- package/docs/runbooks/codex-parallel-prompt-recipes.md +0 -131
- package/docs/runbooks/codex-quick-start.md +0 -223
- package/docs/runbooks/codex-usage-scenarios.md +0 -168
- package/docs/runbooks/codex-workflow-essentials.md +0 -88
- package/docs/runbooks/command-and-capability-matrix.md +0 -162
- package/docs/runbooks/conftest-policy-gates.md +0 -84
- package/docs/runbooks/consumer-driven-contract-testing-with-mock-alignment.md +0 -45
- package/docs/runbooks/contract-testing-playbook.md +0 -78
- package/docs/runbooks/cosign-signing-gates.md +0 -71
- package/docs/runbooks/cross-role-issue-triage-walkthrough.md +0 -47
- package/docs/runbooks/cursor-quick-start.md +0 -123
- package/docs/runbooks/custom-overlay.md +0 -115
- package/docs/runbooks/data-ml-pipeline-demo-execution-log.md +0 -141
- package/docs/runbooks/data-ml-pipeline-demo-script.md +0 -102
- package/docs/runbooks/data-ml-pipeline-walkthrough.md +0 -119
- package/docs/runbooks/data-observability-quality-demo-execution-log.md +0 -36
- package/docs/runbooks/data-observability-quality-demo-script.md +0 -42
- package/docs/runbooks/data-observability-quality-walkthrough.md +0 -86
- package/docs/runbooks/demo-deliverables-overview.md +0 -278
- package/docs/runbooks/demo-execution-log.md +0 -530
- package/docs/runbooks/demo-scenario.md +0 -129
- package/docs/runbooks/dependency-review-gates.md +0 -63
- package/docs/runbooks/dependency-update-automation.md +0 -83
- package/docs/runbooks/design-md-workflow.md +0 -185
- package/docs/runbooks/devops-engineer-daily-operations.md +0 -60
- package/docs/runbooks/devops-release-conversation-example.md +0 -88
- package/docs/runbooks/doc-architecture-integration.md +0 -59
- package/docs/runbooks/doc-architecture-quick-start.md +0 -122
- package/docs/runbooks/document-execution-audit.md +0 -32
- package/docs/runbooks/documentation-update-walkthrough.md +0 -37
- package/docs/runbooks/ecc-harness-usage.md +0 -93
- package/docs/runbooks/error-experience-usage.md +0 -116
- package/docs/runbooks/evolution-usage.md +0 -162
- package/docs/runbooks/executive-value-one-page.md +0 -55
- package/docs/runbooks/external-capability-approval-and-enablement-workflow.md +0 -39
- package/docs/runbooks/external-capability-intake.md +0 -160
- package/docs/runbooks/first-team-command-60-seconds.md +0 -96
- package/docs/runbooks/first-team-workflow-walkthrough.md +0 -245
- package/docs/runbooks/frontend-backend-integration-acceptance-checklist.md +0 -46
- package/docs/runbooks/frontend-backend-parallel-integration-walkthrough.md +0 -48
- package/docs/runbooks/frontend-bugfix-one-page.md +0 -82
- package/docs/runbooks/frontend-engineer-daily-operations.md +0 -60
- package/docs/runbooks/frontend-enterprise-style-profile.md +0 -5
- package/docs/runbooks/frontend-governance.md +0 -47
- package/docs/runbooks/frontend-refactor-walkthrough.md +0 -42
- package/docs/runbooks/git-pr-workflow.md +0 -63
- package/docs/runbooks/github-actions-supply-chain-demo-execution-log.md +0 -158
- package/docs/runbooks/github-actions-supply-chain-demo-script.md +0 -150
- package/docs/runbooks/github-actions-supply-chain-walkthrough.md +0 -117
- package/docs/runbooks/github-token-permissions-baseline.md +0 -92
- package/docs/runbooks/gitlab-manual-pipeline-release.md +0 -5
- package/docs/runbooks/gitlab-release-integration-playbook.md +0 -5
- package/docs/runbooks/gitnexus-code-intelligence-usage.md +0 -133
- package/docs/runbooks/graphify-knowledge-graph-usage.md +0 -88
- package/docs/runbooks/handoff-filling-guide-with-examples.md +0 -70
- package/docs/runbooks/handoff-governance.md +0 -250
- package/docs/runbooks/helm-unittest-playbook.md +0 -101
- package/docs/runbooks/hotfix-emergency-release-walkthrough.md +0 -60
- package/docs/runbooks/iac-kubernetes-platform-demo-execution-log.md +0 -144
- package/docs/runbooks/iac-kubernetes-platform-demo-script.md +0 -130
- package/docs/runbooks/iac-kubernetes-platform-walkthrough.md +0 -120
- package/docs/runbooks/implementation-onboarding-reading-path.md +0 -67
- package/docs/runbooks/in-toto-attestation-framework.md +0 -94
- package/docs/runbooks/incident-severity-triage-tree.md +0 -43
- package/docs/runbooks/incident-triage-one-page.md +0 -65
- package/docs/runbooks/internal-developer-platform-demo-execution-log.md +0 -36
- package/docs/runbooks/internal-developer-platform-demo-script.md +0 -42
- package/docs/runbooks/internal-developer-platform-walkthrough.md +0 -91
- package/docs/runbooks/karpathy-guidelines-usage.md +0 -27
- package/docs/runbooks/kubeconform-schema-gates.md +0 -100
- package/docs/runbooks/kubectl-server-dry-run-gates.md +0 -103
- package/docs/runbooks/kyverno-policy-gates.md +0 -90
- package/docs/runbooks/langfuse-and-observability-integration-guide.md +0 -43
- package/docs/runbooks/langfuse-coding-trace.md +0 -44
- package/docs/runbooks/mobile-miniapp-delivery-walkthrough.md +0 -112
- package/docs/runbooks/mobile-miniapp-demo-execution-log.md +0 -139
- package/docs/runbooks/mobile-miniapp-demo-script.md +0 -129
- package/docs/runbooks/multi-service-backend-integration-walkthrough.md +0 -61
- package/docs/runbooks/open-design-integration.md +0 -163
- package/docs/runbooks/open-source-release-checklist.md +0 -90
- package/docs/runbooks/opencode-quick-start.md +0 -128
- package/docs/runbooks/parallel-development-coordination-walkthrough.md +0 -47
- package/docs/runbooks/parallel-execution-usage.md +0 -179
- package/docs/runbooks/platform-capability-demo-execution-log.md +0 -184
- package/docs/runbooks/platform-capability-demo-script.md +0 -192
- package/docs/runbooks/plugin-extension-platform-demo-execution-log.md +0 -136
- package/docs/runbooks/plugin-extension-platform-demo-script.md +0 -102
- package/docs/runbooks/plugin-extension-platform-walkthrough.md +0 -111
- package/docs/runbooks/policy-controller-gates.md +0 -75
- package/docs/runbooks/post-rollback-verification-checklist.md +0 -37
- package/docs/runbooks/pre-release-checklist.md +0 -50
- package/docs/runbooks/product-manager-clarification-conversation-example.md +0 -90
- package/docs/runbooks/product-manager-daily-operations.md +0 -60
- package/docs/runbooks/production-incident-response-walkthrough.md +0 -50
- package/docs/runbooks/project-claude-design-rationale.md +0 -188
- package/docs/runbooks/project-manager-daily-operations.md +0 -61
- package/docs/runbooks/project-manager-planning-conversation-example.md +0 -82
- package/docs/runbooks/project-onboarding.md +0 -452
- package/docs/runbooks/qa-engineer-daily-operations.md +0 -63
- package/docs/runbooks/qa-review-conversation-example.md +0 -87
- package/docs/runbooks/release-closure-one-page.md +0 -65
- package/docs/runbooks/release-governance-reading-path.md +0 -56
- package/docs/runbooks/release-notes-automation.md +0 -48
- package/docs/runbooks/release-rollback-recovery-walkthrough.md +0 -47
- package/docs/runbooks/requirement-clarity-and-scope-walkthrough.md +0 -46
- package/docs/runbooks/reviewdog-pr-gates.md +0 -49
- package/docs/runbooks/role-prompt-recipes.md +0 -130
- package/docs/runbooks/rtk-integration-intake.md +0 -45
- package/docs/runbooks/rtk-token-optimization-usage.md +0 -107
- package/docs/runbooks/runner-egress-hardening.md +0 -81
- package/docs/runbooks/runtime-capabilities-overview.md +0 -113
- package/docs/runbooks/sbom-generation-gates.md +0 -71
- package/docs/runbooks/scorecard-supply-chain-gates.md +0 -82
- package/docs/runbooks/secret-scanning-gates.md +0 -85
- package/docs/runbooks/security-compliance-platform-demo-execution-log.md +0 -36
- package/docs/runbooks/security-compliance-platform-demo-script.md +0 -49
- package/docs/runbooks/security-compliance-platform-walkthrough.md +0 -98
- package/docs/runbooks/slsa-generator-patterns.md +0 -73
- package/docs/runbooks/slsa-verification-gates.md +0 -75
- package/docs/runbooks/solo-delivery-mode.md +0 -142
- package/docs/runbooks/solo-delivery-one-page.md +0 -111
- package/docs/runbooks/specialist-commands-playbook.md +0 -85
- package/docs/runbooks/sub-agent-invocation-map.md +0 -144
- package/docs/runbooks/system-architecture-design-walkthrough.md +0 -49
- package/docs/runbooks/team-closeout-example.md +0 -73
- package/docs/runbooks/team-command-output-contracts.md +0 -358
- package/docs/runbooks/team-commands-quick-prompts.md +0 -125
- package/docs/runbooks/team-execute-example.md +0 -63
- package/docs/runbooks/team-handoff-example.md +0 -49
- package/docs/runbooks/team-intake-example.md +0 -70
- package/docs/runbooks/team-plan-example.md +0 -62
- package/docs/runbooks/team-release-example.md +0 -63
- package/docs/runbooks/team-review-example.md +0 -61
- package/docs/runbooks/team-skills-test-run.md +0 -184
- package/docs/runbooks/team-skills-usage.md +0 -336
- package/docs/runbooks/team-training-reading-path.md +0 -64
- package/docs/runbooks/tech-lead-closure-conversation-example.md +0 -78
- package/docs/runbooks/tech-lead-daily-operations.md +0 -67
- package/docs/runbooks/trivy-security-gates.md +0 -79
- package/docs/runbooks/troubleshooting.md +0 -234
- package/docs/runbooks/vertical-scenario-capability-matrix.md +0 -107
- package/docs/runbooks/witness-policy-gates.md +0 -78
- package/docs/runbooks/zizmor-workflow-audits.md +0 -81
|
@@ -1,4 +1,189 @@
|
|
|
1
|
-
const
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
createInstallTargetAdapter,
|
|
6
|
+
createManagedOperation,
|
|
7
|
+
normalizeRelativePath,
|
|
8
|
+
} = require('./helpers');
|
|
9
|
+
|
|
10
|
+
const PLUGIN_NAME = require('../team-skills-data.json').plugin.name;
|
|
11
|
+
|
|
12
|
+
function addOperation(operations, seen, operation) {
|
|
13
|
+
const key = `${operation.sourceRelativePath}=>${operation.destinationPath}`;
|
|
14
|
+
if (seen.has(key)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
seen.add(key);
|
|
18
|
+
operations.push(operation);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function addCopyOperation(operations, seen, moduleId, sourceRelativePath, destinationPath, strategy = 'preserve-relative-path') {
|
|
22
|
+
addOperation(operations, seen, createManagedOperation({
|
|
23
|
+
moduleId,
|
|
24
|
+
sourceRelativePath,
|
|
25
|
+
destinationPath,
|
|
26
|
+
strategy,
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function sourceDir(input, sourceRelativePath) {
|
|
31
|
+
return path.join(input.repoRoot || '', normalizeRelativePath(sourceRelativePath));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function rootAgentFileName(sourcePath, fileName) {
|
|
35
|
+
const normalizedSourcePath = normalizeRelativePath(sourcePath);
|
|
36
|
+
if (normalizedSourcePath === 'agents/specialists' || normalizedSourcePath.startsWith('agents/specialists/')) {
|
|
37
|
+
return `specialist-${fileName}`;
|
|
38
|
+
}
|
|
39
|
+
return fileName;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function addRootSkillOperations(operations, seen, moduleId, sourceRelativePath, input, targetRoot) {
|
|
43
|
+
const normalizedSourcePath = normalizeRelativePath(sourceRelativePath);
|
|
44
|
+
if (!normalizedSourcePath.startsWith('skills/')) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const absoluteSourceDir = sourceDir(input, normalizedSourcePath);
|
|
49
|
+
if (!input.repoRoot || !fs.existsSync(absoluteSourceDir) || !fs.statSync(absoluteSourceDir).isDirectory()) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (fs.existsSync(path.join(absoluteSourceDir, 'SKILL.md'))) {
|
|
54
|
+
addCopyOperation(
|
|
55
|
+
operations,
|
|
56
|
+
seen,
|
|
57
|
+
moduleId,
|
|
58
|
+
normalizedSourcePath,
|
|
59
|
+
path.join(targetRoot, 'skills', path.basename(normalizedSourcePath)),
|
|
60
|
+
'flatten-skill-copy'
|
|
61
|
+
);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
for (const entry of fs.readdirSync(absoluteSourceDir, { withFileTypes: true }).sort((left, right) => (
|
|
66
|
+
left.name.localeCompare(right.name)
|
|
67
|
+
))) {
|
|
68
|
+
const nestedSourcePath = path.join(normalizedSourcePath, entry.name);
|
|
69
|
+
const nestedAbsolutePath = path.join(absoluteSourceDir, entry.name);
|
|
70
|
+
if (entry.isDirectory() && fs.existsSync(path.join(nestedAbsolutePath, 'SKILL.md'))) {
|
|
71
|
+
addCopyOperation(
|
|
72
|
+
operations,
|
|
73
|
+
seen,
|
|
74
|
+
moduleId,
|
|
75
|
+
nestedSourcePath,
|
|
76
|
+
path.join(targetRoot, 'skills', entry.name),
|
|
77
|
+
'flatten-skill-copy'
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function addRootAgentOperations(operations, seen, moduleId, sourceRelativePath, input, targetRoot) {
|
|
84
|
+
const normalizedSourcePath = normalizeRelativePath(sourceRelativePath);
|
|
85
|
+
if (normalizedSourcePath !== 'agents' && !normalizedSourcePath.startsWith('agents/')) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const agentDirs = normalizedSourcePath === 'agents'
|
|
90
|
+
? ['roles', 'specialists']
|
|
91
|
+
: [''];
|
|
92
|
+
|
|
93
|
+
for (const agentDir of agentDirs) {
|
|
94
|
+
const sourcePath = agentDir ? path.join(normalizedSourcePath, agentDir) : normalizedSourcePath;
|
|
95
|
+
const absoluteSourceDir = sourceDir(input, sourcePath);
|
|
96
|
+
if (!input.repoRoot || !fs.existsSync(absoluteSourceDir)) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const stat = fs.statSync(absoluteSourceDir);
|
|
101
|
+
if (stat.isFile() && path.extname(absoluteSourceDir) === '.md') {
|
|
102
|
+
const fileName = rootAgentFileName(path.dirname(sourcePath), path.basename(sourcePath));
|
|
103
|
+
addCopyOperation(
|
|
104
|
+
operations,
|
|
105
|
+
seen,
|
|
106
|
+
moduleId,
|
|
107
|
+
sourcePath,
|
|
108
|
+
path.join(targetRoot, 'agents', fileName),
|
|
109
|
+
'flatten-agent-copy'
|
|
110
|
+
);
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (!stat.isDirectory()) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
for (const entry of fs.readdirSync(absoluteSourceDir, { withFileTypes: true }).sort((left, right) => (
|
|
119
|
+
left.name.localeCompare(right.name)
|
|
120
|
+
))) {
|
|
121
|
+
if (entry.isFile() && entry.name.endsWith('.md')) {
|
|
122
|
+
const fileName = rootAgentFileName(sourcePath, entry.name);
|
|
123
|
+
addCopyOperation(
|
|
124
|
+
operations,
|
|
125
|
+
seen,
|
|
126
|
+
moduleId,
|
|
127
|
+
path.join(sourcePath, entry.name),
|
|
128
|
+
path.join(targetRoot, 'agents', fileName),
|
|
129
|
+
'flatten-agent-copy'
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function planCodexOperations(input, adapter) {
|
|
137
|
+
const targetRoot = adapter.resolveRoot(input);
|
|
138
|
+
const pluginRoot = path.join(targetRoot, 'plugins', PLUGIN_NAME);
|
|
139
|
+
const operations = [];
|
|
140
|
+
const seen = new Set();
|
|
141
|
+
|
|
142
|
+
for (const module of Array.isArray(input.modules) ? input.modules : []) {
|
|
143
|
+
for (const rawSourcePath of Array.isArray(module.paths) ? module.paths : []) {
|
|
144
|
+
const sourceRelativePath = normalizeRelativePath(rawSourcePath);
|
|
145
|
+
|
|
146
|
+
addCopyOperation(
|
|
147
|
+
operations,
|
|
148
|
+
seen,
|
|
149
|
+
module.id,
|
|
150
|
+
sourceRelativePath,
|
|
151
|
+
path.join(pluginRoot, sourceRelativePath),
|
|
152
|
+
'plugin-copy'
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
if (sourceRelativePath === 'commands' || sourceRelativePath.startsWith('commands/')) {
|
|
156
|
+
const commandSuffix = sourceRelativePath === 'commands'
|
|
157
|
+
? ''
|
|
158
|
+
: sourceRelativePath.slice('commands/'.length);
|
|
159
|
+
addCopyOperation(
|
|
160
|
+
operations,
|
|
161
|
+
seen,
|
|
162
|
+
module.id,
|
|
163
|
+
sourceRelativePath,
|
|
164
|
+
path.join(targetRoot, 'commands', commandSuffix),
|
|
165
|
+
'codex-command-copy'
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (sourceRelativePath === 'AGENTS.md') {
|
|
170
|
+
addCopyOperation(
|
|
171
|
+
operations,
|
|
172
|
+
seen,
|
|
173
|
+
module.id,
|
|
174
|
+
sourceRelativePath,
|
|
175
|
+
path.join(targetRoot, 'AGENTS.md'),
|
|
176
|
+
'codex-agent-index-copy'
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
addRootSkillOperations(operations, seen, module.id, sourceRelativePath, input, targetRoot);
|
|
181
|
+
addRootAgentOperations(operations, seen, module.id, sourceRelativePath, input, targetRoot);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return operations;
|
|
186
|
+
}
|
|
2
187
|
|
|
3
188
|
module.exports = createInstallTargetAdapter({
|
|
4
189
|
id: 'codex-home',
|
|
@@ -7,4 +192,5 @@ module.exports = createInstallTargetAdapter({
|
|
|
7
192
|
rootSegments: ['.codex'],
|
|
8
193
|
installStatePathSegments: ['ecc-install-state.json'],
|
|
9
194
|
nativeRootRelativePath: '.codex',
|
|
195
|
+
planOperations: planCodexOperations,
|
|
10
196
|
});
|
|
@@ -1,10 +1,143 @@
|
|
|
1
|
-
const
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
createInstallTargetAdapter,
|
|
6
|
+
createManagedOperation,
|
|
7
|
+
normalizeRelativePath,
|
|
8
|
+
} = require('./helpers');
|
|
9
|
+
|
|
10
|
+
const PLUGIN_NAME = require('../team-skills-data.json').plugin.name;
|
|
11
|
+
|
|
12
|
+
function addOperation(operations, seen, operation) {
|
|
13
|
+
const key = `${operation.sourceRelativePath}=>${operation.destinationPath}`;
|
|
14
|
+
if (seen.has(key)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
seen.add(key);
|
|
18
|
+
operations.push(operation);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function addCopyOperation(operations, seen, moduleId, sourceRelativePath, destinationPath, strategy = 'preserve-relative-path') {
|
|
22
|
+
addOperation(operations, seen, createManagedOperation({
|
|
23
|
+
moduleId,
|
|
24
|
+
sourceRelativePath,
|
|
25
|
+
destinationPath,
|
|
26
|
+
strategy,
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function sourceDir(input, sourceRelativePath) {
|
|
31
|
+
return path.join(input.repoRoot || '', normalizeRelativePath(sourceRelativePath));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function rootAgentFileName(sourcePath, fileName) {
|
|
35
|
+
const normalizedSourcePath = normalizeRelativePath(sourcePath);
|
|
36
|
+
if (normalizedSourcePath === 'agents/specialists' || normalizedSourcePath.startsWith('agents/specialists/')) {
|
|
37
|
+
return `specialist-${fileName}`;
|
|
38
|
+
}
|
|
39
|
+
return fileName;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function addRootAgentOperations(operations, seen, moduleId, sourceRelativePath, input, targetRoot) {
|
|
43
|
+
const normalizedSourcePath = normalizeRelativePath(sourceRelativePath);
|
|
44
|
+
if (normalizedSourcePath !== 'agents' && !normalizedSourcePath.startsWith('agents/')) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const agentDirs = normalizedSourcePath === 'agents'
|
|
49
|
+
? ['roles', 'specialists']
|
|
50
|
+
: [''];
|
|
51
|
+
|
|
52
|
+
for (const agentDir of agentDirs) {
|
|
53
|
+
const sourcePath = agentDir ? path.join(normalizedSourcePath, agentDir) : normalizedSourcePath;
|
|
54
|
+
const absoluteSourceDir = sourceDir(input, sourcePath);
|
|
55
|
+
if (!input.repoRoot || !fs.existsSync(absoluteSourceDir)) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const stat = fs.statSync(absoluteSourceDir);
|
|
60
|
+
if (stat.isFile() && path.extname(absoluteSourceDir) === '.md') {
|
|
61
|
+
const fileName = rootAgentFileName(path.dirname(sourcePath), path.basename(sourcePath));
|
|
62
|
+
addCopyOperation(
|
|
63
|
+
operations,
|
|
64
|
+
seen,
|
|
65
|
+
moduleId,
|
|
66
|
+
sourcePath,
|
|
67
|
+
path.join(targetRoot, 'agents', fileName),
|
|
68
|
+
'flatten-agent-copy'
|
|
69
|
+
);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!stat.isDirectory()) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
for (const entry of fs.readdirSync(absoluteSourceDir, { withFileTypes: true }).sort((left, right) => (
|
|
78
|
+
left.name.localeCompare(right.name)
|
|
79
|
+
))) {
|
|
80
|
+
if (entry.isFile() && entry.name.endsWith('.md')) {
|
|
81
|
+
const fileName = rootAgentFileName(sourcePath, entry.name);
|
|
82
|
+
addCopyOperation(
|
|
83
|
+
operations,
|
|
84
|
+
seen,
|
|
85
|
+
moduleId,
|
|
86
|
+
path.join(sourcePath, entry.name),
|
|
87
|
+
path.join(targetRoot, 'agents', fileName),
|
|
88
|
+
'flatten-agent-copy'
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function planOpenCodeOperations(input, adapter) {
|
|
96
|
+
const targetRoot = adapter.resolveRoot(input);
|
|
97
|
+
const pluginRoot = path.join(targetRoot, 'plugins', PLUGIN_NAME);
|
|
98
|
+
const operations = [];
|
|
99
|
+
const seen = new Set();
|
|
100
|
+
|
|
101
|
+
for (const module of Array.isArray(input.modules) ? input.modules : []) {
|
|
102
|
+
for (const rawSourcePath of Array.isArray(module.paths) ? module.paths : []) {
|
|
103
|
+
const sourceRelativePath = normalizeRelativePath(rawSourcePath);
|
|
104
|
+
|
|
105
|
+
addCopyOperation(
|
|
106
|
+
operations,
|
|
107
|
+
seen,
|
|
108
|
+
module.id,
|
|
109
|
+
sourceRelativePath,
|
|
110
|
+
path.join(pluginRoot, sourceRelativePath),
|
|
111
|
+
'plugin-copy'
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
if (sourceRelativePath === 'commands' || sourceRelativePath.startsWith('commands/')) {
|
|
115
|
+
const commandSuffix = sourceRelativePath === 'commands'
|
|
116
|
+
? ''
|
|
117
|
+
: sourceRelativePath.slice('commands/'.length);
|
|
118
|
+
addCopyOperation(
|
|
119
|
+
operations,
|
|
120
|
+
seen,
|
|
121
|
+
module.id,
|
|
122
|
+
sourceRelativePath,
|
|
123
|
+
path.join(targetRoot, 'command', commandSuffix),
|
|
124
|
+
'opencode-command-copy'
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
addRootAgentOperations(operations, seen, module.id, sourceRelativePath, input, targetRoot);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return operations;
|
|
133
|
+
}
|
|
2
134
|
|
|
3
135
|
module.exports = createInstallTargetAdapter({
|
|
4
136
|
id: 'opencode-home',
|
|
5
137
|
target: 'opencode',
|
|
6
138
|
kind: 'home',
|
|
7
|
-
rootSegments: ['.opencode'],
|
|
139
|
+
rootSegments: ['.config', 'opencode'],
|
|
8
140
|
installStatePathSegments: ['ecc-install-state.json'],
|
|
9
141
|
nativeRootRelativePath: '.opencode',
|
|
142
|
+
planOperations: planOpenCodeOperations,
|
|
10
143
|
});
|
|
@@ -9,6 +9,12 @@ const geminiProject = require('./gemini-project');
|
|
|
9
9
|
const opencodeHome = require('./opencode-home');
|
|
10
10
|
const windsurfProject = require('./windsurf-project');
|
|
11
11
|
|
|
12
|
+
const PUBLIC_INSTALL_TARGETS = Object.freeze(['claude', 'codex', 'opencode']);
|
|
13
|
+
const TARGET_ALIASES = Object.freeze({
|
|
14
|
+
'claude-code': 'claude',
|
|
15
|
+
claudecode: 'claude',
|
|
16
|
+
});
|
|
17
|
+
|
|
12
18
|
const ADAPTERS = Object.freeze([
|
|
13
19
|
claudeHome,
|
|
14
20
|
cursorProject,
|
|
@@ -22,12 +28,25 @@ const ADAPTERS = Object.freeze([
|
|
|
22
28
|
augmentProject,
|
|
23
29
|
]);
|
|
24
30
|
|
|
31
|
+
function normalizeInstallTarget(target) {
|
|
32
|
+
const normalized = String(target || '').trim().toLowerCase();
|
|
33
|
+
return TARGET_ALIASES[normalized] || normalized;
|
|
34
|
+
}
|
|
35
|
+
|
|
25
36
|
function listInstallTargetAdapters() {
|
|
26
37
|
return ADAPTERS.slice();
|
|
27
38
|
}
|
|
28
39
|
|
|
40
|
+
function listPublicInstallTargetAdapters() {
|
|
41
|
+
const publicTargets = new Set(PUBLIC_INSTALL_TARGETS);
|
|
42
|
+
return ADAPTERS.filter(adapter => publicTargets.has(adapter.target));
|
|
43
|
+
}
|
|
44
|
+
|
|
29
45
|
function getInstallTargetAdapter(targetOrAdapterId) {
|
|
30
|
-
const
|
|
46
|
+
const normalizedTarget = normalizeInstallTarget(targetOrAdapterId);
|
|
47
|
+
const adapter = ADAPTERS.find(candidate => (
|
|
48
|
+
candidate.supports(normalizedTarget) || candidate.supports(targetOrAdapterId)
|
|
49
|
+
));
|
|
31
50
|
|
|
32
51
|
if (!adapter) {
|
|
33
52
|
throw new Error(`Unknown install target adapter: ${targetOrAdapterId}`);
|
|
@@ -72,5 +91,8 @@ function planInstallTargetScaffold(options = {}) {
|
|
|
72
91
|
module.exports = {
|
|
73
92
|
getInstallTargetAdapter,
|
|
74
93
|
listInstallTargetAdapters,
|
|
94
|
+
listPublicInstallTargetAdapters,
|
|
95
|
+
normalizeInstallTarget,
|
|
96
|
+
PUBLIC_INSTALL_TARGETS,
|
|
75
97
|
planInstallTargetScaffold,
|
|
76
98
|
};
|
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const { resolveInstallPlan } = require('./install-manifests');
|
|
4
|
-
const {
|
|
4
|
+
const { listPublicInstallTargetAdapters } = require('./install-targets/registry');
|
|
5
5
|
|
|
6
6
|
const SUPPORT_LEVEL_ORDER = Object.freeze(['recommended', 'strong', 'partial', 'baseline']);
|
|
7
|
+
const TARGET_INTENTIONAL_SKIPS = Object.freeze({
|
|
8
|
+
codex: new Set(['hooks-runtime', 'evolution', 'rtk-optimization']),
|
|
9
|
+
opencode: new Set(['rtk-optimization']),
|
|
10
|
+
});
|
|
7
11
|
|
|
8
12
|
function classifyTargetSupportLevel(plan = {}) {
|
|
9
13
|
const selectedModuleIds = Array.isArray(plan.selectedModuleIds) ? plan.selectedModuleIds : [];
|
|
10
14
|
const requestedModuleIds = Array.isArray(plan.requestedModuleIds) ? plan.requestedModuleIds : [];
|
|
15
|
+
const skippedModuleIds = Array.isArray(plan.skippedModuleIds) ? plan.skippedModuleIds : [];
|
|
11
16
|
const selected = new Set(selectedModuleIds);
|
|
12
17
|
const selectedCount = selected.size;
|
|
13
18
|
const requestedCount = requestedModuleIds.length;
|
|
14
19
|
const hasCommandsCore = selected.has('commands-core');
|
|
15
20
|
const hasTeamWorkflow = selected.has('team-workflow');
|
|
16
21
|
const hasSharedSkills = selected.has('shared-skills');
|
|
22
|
+
const intentionalSkips = TARGET_INTENTIONAL_SKIPS[plan.target] || new Set();
|
|
23
|
+
const onlyIntentionalSkips = skippedModuleIds.every(moduleId => intentionalSkips.has(moduleId));
|
|
17
24
|
|
|
18
|
-
if (
|
|
25
|
+
if (
|
|
26
|
+
requestedCount > 0
|
|
27
|
+
&& hasCommandsCore
|
|
28
|
+
&& hasTeamWorkflow
|
|
29
|
+
&& hasSharedSkills
|
|
30
|
+
&& (selectedCount === requestedCount || onlyIntentionalSkips)
|
|
31
|
+
) {
|
|
19
32
|
return {
|
|
20
33
|
level: 'recommended',
|
|
21
|
-
reason:
|
|
34
|
+
reason: onlyIntentionalSkips && selectedCount !== requestedCount
|
|
35
|
+
? 'Full public workflow chain is available; skipped modules are target-intentional compatibility gaps.'
|
|
36
|
+
: 'Full public workflow chain and primary documentation coverage are available.',
|
|
22
37
|
};
|
|
23
38
|
}
|
|
24
39
|
|
|
@@ -46,7 +61,7 @@ function collectTargetSupportMatrix(options = {}) {
|
|
|
46
61
|
const profileId = options.profileId || 'team';
|
|
47
62
|
const repoRoot = options.repoRoot;
|
|
48
63
|
|
|
49
|
-
return
|
|
64
|
+
return listPublicInstallTargetAdapters()
|
|
50
65
|
.map((adapter) => adapter.target)
|
|
51
66
|
.map((target) => {
|
|
52
67
|
const plan = resolveInstallPlan({ profileId, target, repoRoot });
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"默认以 `karpathy-guidelines` 的方式先暴露歧义、范围边界与更简单路径,不在入口阶段静默替用户补全高风险假设。",
|
|
67
67
|
"检查现有证据是否齐备:PRD、delivery-plan、arch-design、handoff、execute-log、test-plan、launch-acceptance、deployment-context、release-plan、closeout-summary,以及 `docs/memory/project-context.md`。",
|
|
68
68
|
"若任务边界清晰、影响面小、风险低,优先推荐 `/quick`;否则继续沿 `/team-*` 主链推进。",
|
|
69
|
-
"若是既有项目(brownfield)且现状上下文不足,优先建议执行 `/update-codemaps` 并启用 `doc-architecture
|
|
69
|
+
"若是既有项目(brownfield)且现状上下文不足,优先建议执行 `/update-codemaps` 并启用 `doc-architecture`;默认用 CodeGraph 做 MCP-backed 符号、调用链和影响面证据,需要轻量结构证据时选择 Graphify,需要跨模块或多仓影响面时选择 GitNexus,再把现有模块、集成点、关键数据流和历史包袱回落到 `delivery-plan.md` / `arch-design.md`。",
|
|
70
70
|
"若需求规模较大或涉及多角色并行,实现前先要求把计划切成可独立验收、可独立 handoff 的 story-sized execution units,并确认 `artifact:persist` 已创建对应任务目录与关键 artifact,再进入 `/team-execute`。",
|
|
71
71
|
"若缺少 PRD 或需求边界,推荐 `/team-intake`;若缺少 challenge、design review 或 implementation-readiness,推荐 `/team-plan`;若 readiness proof 与 handoff 齐备,推荐 `/team-execute`;若已完成实现与自测,推荐 `/team-review`;若已获得放行,推荐 `/team-release`;若发布观察窗口结束,推荐 `/team-closeout`。",
|
|
72
|
-
"若是既有项目且上下文不足,提示先补齐 brownfield / doc-architecture 类上下文;必要时用 Graphify 或 GitNexus 补图谱证据,再进入计划或执行。",
|
|
72
|
+
"若是既有项目且上下文不足,提示先补齐 brownfield / doc-architecture 类上下文;必要时用 CodeGraph、Graphify 或 GitNexus 补图谱证据,再进入计划或执行。",
|
|
73
73
|
"输出结构化建议:推荐命令、原因、阻塞项、降级路径,并说明是否需要先运行 `npm run workflow:readiness`。"
|
|
74
74
|
]
|
|
75
75
|
},
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"默认把 `karpathy-guidelines` 作为计划收口护栏:要求显式写出假设、更简单备选路径、当前不做项,以及为什么本轮范围已经足够。",
|
|
137
137
|
"按任务特征装配动态讨论分组,先讨论再收敛,避免未经质疑直接进入计划冻结。",
|
|
138
138
|
"若启用 `doc-architecture`,补齐 Service Catalog、Communication Matrix、NFR Summary,并明确其 artifact 回落位置。",
|
|
139
|
-
"若是既有项目(brownfield),先梳理现有模块边界、外部依赖、历史约束和缺失文档;必要时运行 `/update-codemaps
|
|
139
|
+
"若是既有项目(brownfield),先梳理现有模块边界、外部依赖、历史约束和缺失文档;必要时运行 `/update-codemaps`,默认用 CodeGraph 补 MCP-backed 符号、调用链和影响面证据,需要轻量结构证据时选择 Graphify,需要跨模块或多仓影响面时选择 GitNexus,再把 brownfield snapshot 回落到 `delivery-plan.md` 与 `arch-design.md`。",
|
|
140
140
|
"若为企业内部应用,锁定应用等级、技术架构等级、关键组件偏离和资产入口要求,并判断是否必须输出 ADR。",
|
|
141
141
|
"为本次任务显式装配 shared 能力、ECC 增强与可选 enterprise overlay 组合,并说明哪些私有 overlay 能力、runbook 或 overlay 仅按场景启用。",
|
|
142
142
|
"若存在多参数、多角色、多配置或多终端组合,提前判断是否需要 `pairwise-test-design` 压缩测试矩阵。",
|
|
@@ -468,7 +468,7 @@
|
|
|
468
468
|
},
|
|
469
469
|
{
|
|
470
470
|
"name": "update-codemaps",
|
|
471
|
-
"summary": "扫描代码结构并生成 token-lean codemaps,适合作为 brownfield 项目的现状快照与 Graphify / GitNexus 图谱分析前置上下文。",
|
|
471
|
+
"summary": "扫描代码结构并生成 token-lean codemaps,适合作为 brownfield 项目的现状快照与 CodeGraph / Graphify / GitNexus 图谱分析前置上下文。",
|
|
472
472
|
"primary_role": "doc-updater",
|
|
473
473
|
"inputs": [
|
|
474
474
|
"代码仓结构",
|
|
@@ -479,13 +479,13 @@
|
|
|
479
479
|
"docs/CODEMAPS/ 下的结构化 codemap",
|
|
480
480
|
".reports/codemap-diff.txt 差异摘要",
|
|
481
481
|
"可供 `/team-help` / `/team-plan` 消费的 brownfield context",
|
|
482
|
-
"可供 Graphify / GitNexus 继续深挖的结构化问题清单"
|
|
482
|
+
"可供 CodeGraph / Graphify / GitNexus 继续深挖的结构化问题清单"
|
|
483
483
|
],
|
|
484
484
|
"steps": [
|
|
485
485
|
"先识别仓库类型、源码目录、入口文件和主要依赖边界。",
|
|
486
486
|
"为 architecture/backend/frontend/data/dependencies 生成 token-lean 文档,不写实现细节噪音。",
|
|
487
487
|
"若已有 codemap,先比较变更比例;超过阈值时要求人工确认再覆盖。",
|
|
488
|
-
"把结果作为 brownfield context snapshot 的辅助输入;若需要图谱证据,再选择 Graphify 或 GitNexus,并把结论回落到 `delivery-plan.md` / `arch-design.md`,不要形成平行事实源。"
|
|
488
|
+
"把结果作为 brownfield context snapshot 的辅助输入;若需要图谱证据,再选择 CodeGraph、Graphify 或 GitNexus,并把结论回落到 `delivery-plan.md` / `arch-design.md`,不要形成平行事实源。"
|
|
489
489
|
]
|
|
490
490
|
},
|
|
491
491
|
{
|
|
@@ -297,7 +297,7 @@ function formatHumanReport(report) {
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
lines.push('');
|
|
300
|
-
lines.push('Note:
|
|
300
|
+
lines.push('Note: public release health tracks Claude Code, Codex, and OpenCode; other adapters are hidden compatibility paths.');
|
|
301
301
|
return `${lines.join('\n')}\n`;
|
|
302
302
|
}
|
|
303
303
|
|
package/scripts/workflow-help.js
CHANGED
|
@@ -399,7 +399,7 @@ function analyzeTask(options) {
|
|
|
399
399
|
result.reason = routeReason(catalog, '/team-intake', '未检测到任务 artifact 目录,主链应从 intake 开始。');
|
|
400
400
|
result.missingPrerequisites.push('缺少 docs/artifacts/{YYYY-MM-DD}-{slug}/ 任务目录');
|
|
401
401
|
if (brownfieldRepo) {
|
|
402
|
-
result.brownfieldSuggestions.push('既有项目建议先执行 /update-codemaps
|
|
402
|
+
result.brownfieldSuggestions.push('既有项目建议先执行 /update-codemaps;默认用 CodeGraph 做 MCP-backed 符号、调用链和影响面证据,需要轻量结构证据时用 Graphify,需要跨模块或多仓影响面时用 GitNexus,再进入 /team-plan 补齐 Brownfield Context Snapshot。');
|
|
403
403
|
}
|
|
404
404
|
if (!projectContext.exists || projectContext.missingSections.length > 0) {
|
|
405
405
|
addProjectContextRemediation(result, null);
|
|
@@ -443,7 +443,7 @@ function analyzeTask(options) {
|
|
|
443
443
|
result.reason = routeReason(catalog, '/team-plan', '已有 PRD,但尚未形成 Delivery Plan。');
|
|
444
444
|
result.missingPrerequisites.push('缺少 delivery-plan.md');
|
|
445
445
|
if (brownfieldRepo) {
|
|
446
|
-
result.brownfieldSuggestions.push('如果是 brownfield 任务,在 delivery-plan.md 中补齐 Brownfield Context Snapshot;必要时引用 Graphify 或 GitNexus 图谱证据。');
|
|
446
|
+
result.brownfieldSuggestions.push('如果是 brownfield 任务,在 delivery-plan.md 中补齐 Brownfield Context Snapshot;必要时引用 CodeGraph、Graphify 或 GitNexus 图谱证据。');
|
|
447
447
|
}
|
|
448
448
|
addProjectContextRemediation(result, taskDir);
|
|
449
449
|
return finalizeResult(result, catalog);
|
|
@@ -462,7 +462,7 @@ function analyzeTask(options) {
|
|
|
462
462
|
|
|
463
463
|
const deliveryPlanText = readText(deliveryPlanPath).toLowerCase();
|
|
464
464
|
if (brownfieldRepo && !deliveryPlanText.includes('brownfield context snapshot')) {
|
|
465
|
-
result.brownfieldSuggestions.push('建议在 delivery-plan.md 中补齐 Brownfield Context Snapshot;必要时引用 Graphify 或 GitNexus 图谱证据。');
|
|
465
|
+
result.brownfieldSuggestions.push('建议在 delivery-plan.md 中补齐 Brownfield Context Snapshot;必要时引用 CodeGraph、Graphify 或 GitNexus 图谱证据。');
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
if (!hasHandoffEvidence && !exists(executeLogPath)) {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codegraph
|
|
3
|
+
description: >
|
|
4
|
+
将 CodeGraph 作为默认内置 MCP-backed 代码图谱能力接入,用于 brownfield 符号搜索、
|
|
5
|
+
调用链、影响面和上下文查询。输出必须回落到 `/team-*` 主链和 artifacts。
|
|
6
|
+
origin: colbymchenry/codegraph (default dependency with upstream installer wrapper)
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# CodeGraph
|
|
10
|
+
|
|
11
|
+
## 用途
|
|
12
|
+
|
|
13
|
+
- 对已初始化的目标项目做本地代码图谱查询:符号搜索、callers/callees、impact、focused context。
|
|
14
|
+
- 在设计、执行和评审前补结构证据,减少依赖纯文本搜索造成的遗漏。
|
|
15
|
+
- 为 `/team-plan`、`/team-execute`、`/team-review` 提供可追溯的 MCP-backed 影响面证据。
|
|
16
|
+
|
|
17
|
+
## 触发信号
|
|
18
|
+
|
|
19
|
+
- brownfield 项目需要快速回答“这个 symbol 在哪里”“谁调用它”“改它会影响谁”。
|
|
20
|
+
- 目标 agent 已通过 TSP 安装流程配置 CodeGraph MCP,且目标项目存在 `.codegraph/`。
|
|
21
|
+
- Graphify 的轻量结构证据不足,或者需要比 GitNexus 更贴近当前 agent MCP 工具面的本地查询。
|
|
22
|
+
|
|
23
|
+
## 默认工作流
|
|
24
|
+
|
|
25
|
+
1. 先跑 `npm run codegraph:doctor`,确认 Node、CodeGraph 包和当前 target wrapper 可用。
|
|
26
|
+
2. 在消费方目标项目根目录手动初始化索引:
|
|
27
|
+
```bash
|
|
28
|
+
codegraph init -i
|
|
29
|
+
```
|
|
30
|
+
3. 通过 MCP 或 CLI 使用 `search/context/callers/callees/impact/node/files/status` 查询。
|
|
31
|
+
4. 把关键发现回落到主链:
|
|
32
|
+
- 规划阶段 -> `/team-plan` 的 Brownfield Context Snapshot 和 readiness 证据
|
|
33
|
+
- 执行阶段 -> `/team-execute` 的 story slice 影响面说明
|
|
34
|
+
- 评审阶段 -> `/team-review` 的风险、回归边界和放行建议
|
|
35
|
+
|
|
36
|
+
## 输出约定
|
|
37
|
+
|
|
38
|
+
- CodeGraph 数据库由上游工具管理,通常写入目标项目 `.codegraph/`。
|
|
39
|
+
- TSP 侧只沉淀结论,不沉淀上游数据库:
|
|
40
|
+
- 分析目标
|
|
41
|
+
- 查询入口(MCP tool 或 CLI 命令)
|
|
42
|
+
- 核心发现
|
|
43
|
+
- 对 `/team-*` 决策的影响
|
|
44
|
+
- 后续验证或回退建议
|
|
45
|
+
|
|
46
|
+
## 边界与禁用项
|
|
47
|
+
|
|
48
|
+
- TSP 安装时只运行 `scripts/install-codegraph.js` wrapper,不使用上游 `--target=auto`。
|
|
49
|
+
- TSP 安装流程不运行 `codegraph init -i`,避免在平台仓库或消费方仓库隐式写入 `.codegraph/`。
|
|
50
|
+
- 不提交 `.codegraph/` 数据库或将其作为 TSP artifact。
|
|
51
|
+
- CodeGraph 结论不能绕过 `/team-plan`、`/team-review` 或验证门禁。
|
|
52
|
+
|
|
53
|
+
## 推荐组合
|
|
54
|
+
|
|
55
|
+
- 默认 brownfield 结构证据:`/team-help -> /update-codemaps -> npm run codegraph:doctor -> codegraph init -i -> /team-plan`
|
|
56
|
+
- 快速影响面确认:`/team-execute -> CodeGraph impact/callers/callees -> /handoff -> /team-review`
|
|
57
|
+
- 深度多仓或许可证受限场景:按需选择 GitNexus 或 Graphify,并把结论统一回落到主链。
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "CodeGraph Code Intelligence"
|
|
3
|
+
short_description: "用 CodeGraph 补齐 MCP-backed 符号、调用链与影响面证据"
|
|
4
|
+
default_prompt: "Use $codegraph when brownfield work needs local MCP-backed symbol search, callers/callees, impact, or focused context. Keep CodeGraph findings tied to /team-plan, /team-execute, or /team-review, and do not treat .codegraph databases as TSP artifacts."
|