@xulthekl/team-flow 0.22.4
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/.agents/plugins/marketplace.json +20 -0
- package/.agents/skills +1 -0
- package/.claude/always/phase-guard.md +3 -0
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +31 -0
- package/.codex-plugin/plugin.json +45 -0
- package/.codexignore +6 -0
- package/.cursor-plugin/marketplace.json +17 -0
- package/.cursor-plugin/plugin.json +31 -0
- package/.github/copilot-instructions.md +15 -0
- package/.github/dependabot.yml +10 -0
- package/.github/plugin/marketplace.json +42 -0
- package/.github/workflows/ci.yml +98 -0
- package/.github/workflows/hol-plugin-scanner.yml +17 -0
- package/.opencode/INSTALL.md +61 -0
- package/.opencode/plugins/team-flow.js +70 -0
- package/AGENTS.md +280 -0
- package/CHANGELOG.md +635 -0
- package/CONTRIBUTING.md +115 -0
- package/GEMINI.md +14 -0
- package/HANDOFF.md +219 -0
- package/INSTALL.md +810 -0
- package/LICENSE +21 -0
- package/README.md +185 -0
- package/SECURITY.md +37 -0
- package/agents/bug-investigator.md +180 -0
- package/agents/change-split-auditor.md +257 -0
- package/agents/code-reviewer.md +171 -0
- package/agents/cross-change-consistency-checker.md +215 -0
- package/agents/prd-completeness-reviewer.md +197 -0
- package/agents/prototype-builder.md +230 -0
- package/agents/prototype-env-scout.md +156 -0
- package/agents/prototype-reviewer.md +226 -0
- package/assets/icon.svg +6 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +5 -0
- package/dist/parsing/change-parser.d.ts +12 -0
- package/dist/parsing/change-parser.js +54 -0
- package/dist/parsing/requirement-blocks.d.ts +31 -0
- package/dist/parsing/requirement-blocks.js +192 -0
- package/dist/schema/base.d.ts +7 -0
- package/dist/schema/base.js +1 -0
- package/dist/schema/change.d.ts +25 -0
- package/dist/schema/change.js +1 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.js +1 -0
- package/dist/schema/spec.d.ts +11 -0
- package/dist/schema/spec.js +1 -0
- package/dist/validation/constants.d.ts +42 -0
- package/dist/validation/constants.js +42 -0
- package/dist/validation/tokenizer.d.ts +17 -0
- package/dist/validation/tokenizer.js +173 -0
- package/dist/validation/types.d.ts +40 -0
- package/dist/validation/types.js +1 -0
- package/dist/validation/validator.d.ts +21 -0
- package/dist/validation/validator.js +489 -0
- package/docs/README_en.md +358 -0
- package/docs/artifact-contract.md +96 -0
- package/docs/decision-points.md +88 -0
- package/docs/e2e-integration-design.md +207 -0
- package/docs/examples/README.md +25 -0
- package/docs/examples/add-dark-mode/README.md +13 -0
- package/docs/examples/add-dark-mode/design.md +49 -0
- package/docs/examples/add-dark-mode/execution-contract.md +56 -0
- package/docs/examples/add-dark-mode/proposal.md +46 -0
- package/docs/examples/add-dark-mode/specs/ui-theme/spec.md +35 -0
- package/docs/examples/add-dark-mode/tasks.md +26 -0
- package/docs/examples/refactor-auth-boundary/README.md +15 -0
- package/docs/examples/refactor-auth-boundary/design.md +41 -0
- package/docs/examples/refactor-auth-boundary/execution-contract.md +61 -0
- package/docs/examples/refactor-auth-boundary/proposal.md +47 -0
- package/docs/examples/refactor-auth-boundary/specs/auth-boundary/spec.md +45 -0
- package/docs/examples/refactor-auth-boundary/tasks.md +25 -0
- package/docs/plans/2026-07-07-fix-batch-design.md +68 -0
- package/docs/plans/2026-07-20-001-refactor-skill-collaboration-protocol-plan.md +128 -0
- package/docs/platform-matrix.md +45 -0
- package/docs/prototype-design-research.md +206 -0
- package/docs/release-checklist.md +96 -0
- package/docs/showcase.html +699 -0
- package/docs/skill-rename-v0.8.0.md +49 -0
- package/docs/state-machine.md +162 -0
- package/gemini-extension.json +6 -0
- package/hooks/hooks-cursor.json +8 -0
- package/hooks/hooks.json +26 -0
- package/hooks/pre-tool-use-guard +116 -0
- package/hooks/session-start +14 -0
- package/llms.txt +51 -0
- package/package.json +48 -0
- package/plugin.json +27 -0
- package/prd/v1/plan.md +443 -0
- package/prd/v1/prd.md +580 -0
- package/scripts/check-update.mjs +91 -0
- package/scripts/check-version-consistency.mjs +345 -0
- package/scripts/ensure-branch.mjs +71 -0
- package/scripts/get-config +31 -0
- package/scripts/guard/checks/artifacts-exist.mjs +36 -0
- package/scripts/guard/checks/contract-current.mjs +33 -0
- package/scripts/guard/checks/contract-fresh.mjs +17 -0
- package/scripts/guard/checks/dp-gate-passed.mjs +35 -0
- package/scripts/guard/checks/dp3-approved.mjs +22 -0
- package/scripts/guard/checks/execution-plan-ready.mjs +40 -0
- package/scripts/guard/checks/execution-reviews-passed.mjs +36 -0
- package/scripts/guard/checks/schema-valid.mjs +63 -0
- package/scripts/guard/checks/specs-merged.mjs +51 -0
- package/scripts/guard/checks/tasks-complete.mjs +31 -0
- package/scripts/guard/checks/tests-passing.mjs +31 -0
- package/scripts/guard/design-token-guard.mjs +237 -0
- package/scripts/guard/guard.mjs +205 -0
- package/scripts/infer-workflow.mjs +136 -0
- package/scripts/install-amazon-q.mjs +9 -0
- package/scripts/install-cline.mjs +9 -0
- package/scripts/install-continue.mjs +9 -0
- package/scripts/install-cursor.mjs +265 -0
- package/scripts/install-git-hooks.mjs +82 -0
- package/scripts/install-kiro.mjs +9 -0
- package/scripts/install-pi.mjs +9 -0
- package/scripts/install-qoder.mjs +9 -0
- package/scripts/install-qwen.mjs +9 -0
- package/scripts/install-roocode.mjs +9 -0
- package/scripts/install-windsurf.mjs +9 -0
- package/scripts/install-zcode.mjs +265 -0
- package/scripts/lib/cmd-audit.mjs +127 -0
- package/scripts/lib/cmd-checkpoint.mjs +118 -0
- package/scripts/lib/cmd-config.mjs +88 -0
- package/scripts/lib/cmd-doctor.mjs +267 -0
- package/scripts/lib/cmd-execution.mjs +206 -0
- package/scripts/lib/cmd-handoff.mjs +94 -0
- package/scripts/lib/cmd-inject.mjs +310 -0
- package/scripts/lib/cmd-install-amazon-q.mjs +11 -0
- package/scripts/lib/cmd-install-cline.mjs +11 -0
- package/scripts/lib/cmd-install-continue.mjs +11 -0
- package/scripts/lib/cmd-install-cursor.mjs +14 -0
- package/scripts/lib/cmd-install-kiro.mjs +11 -0
- package/scripts/lib/cmd-install-pi.mjs +11 -0
- package/scripts/lib/cmd-install-qoder.mjs +11 -0
- package/scripts/lib/cmd-install-qwen.mjs +11 -0
- package/scripts/lib/cmd-install-roocode.mjs +11 -0
- package/scripts/lib/cmd-install-windsurf.mjs +11 -0
- package/scripts/lib/cmd-install-workbuddy.mjs +359 -0
- package/scripts/lib/cmd-install-zcode.mjs +14 -0
- package/scripts/lib/cmd-isolate.mjs +37 -0
- package/scripts/lib/cmd-list.mjs +71 -0
- package/scripts/lib/cmd-runtime.mjs +85 -0
- package/scripts/lib/cmd-solutions.mjs +71 -0
- package/scripts/lib/cmd-state.mjs +231 -0
- package/scripts/lib/cmd-sync.mjs +102 -0
- package/scripts/lib/cmd-validate.mjs +105 -0
- package/scripts/lib/cmd-version.mjs +148 -0
- package/scripts/lib/config-loader.mjs +107 -0
- package/scripts/lib/execution-plan.mjs +492 -0
- package/scripts/lib/execution-recommendation.mjs +221 -0
- package/scripts/lib/hash.mjs +74 -0
- package/scripts/lib/install.mjs +267 -0
- package/scripts/lib/platform-runtime-inventory.mjs +27 -0
- package/scripts/lib/platforms.mjs +165 -0
- package/scripts/lib/prototype-sync.mjs +192 -0
- package/scripts/lib/sdd-overlay.mjs +262 -0
- package/scripts/lib/shell-quote.mjs +4 -0
- package/scripts/lib/solutions-capture.mjs +102 -0
- package/scripts/lib/solutions-index-gen.mjs +112 -0
- package/scripts/lib/solutions-inject.mjs +77 -0
- package/scripts/lib/solutions-promote.mjs +145 -0
- package/scripts/lib/spec-paths.mjs +85 -0
- package/scripts/lib/state-loader.mjs +154 -0
- package/scripts/lint/lint-skills.mjs +149 -0
- package/scripts/lint/rules/behavior-consistency.mjs +56 -0
- package/scripts/lint/rules/dp-trigger-points.mjs +60 -0
- package/scripts/lint/rules/exception-handling.mjs +59 -0
- package/scripts/lint/rules/no-contradictory-instructions.mjs +67 -0
- package/scripts/lint/rules/no-redundant-checks.mjs +50 -0
- package/scripts/lint/rules/token-rules.mjs +122 -0
- package/scripts/review-package +44 -0
- package/scripts/task-brief +40 -0
- package/scripts/team-flow.mjs +164 -0
- package/scripts/token-baseline.mjs +158 -0
- package/scripts/validate-artifacts +96 -0
- package/scripts/verify-marketplace-release.mjs +59 -0
- package/skills/architecture-design/SKILL.md +140 -0
- package/skills/architecture-design/chapters/ch01-4a-domains.md +27 -0
- package/skills/architecture-design/chapters/ch02-change-cascade.md +27 -0
- package/skills/architecture-design/chapters/ch03-architecture-outputs.md +25 -0
- package/skills/architecture-design/chapters/ch04-entity-to-aggregate.md +27 -0
- package/skills/architecture-design/chapters/ch05-cqrs.md +32 -0
- package/skills/architecture-design/chapters/ch06-integration.md +54 -0
- package/skills/architecture-design/cheatsheet.md +51 -0
- package/skills/architecture-design/glossary.md +23 -0
- package/skills/architecture-design/patterns.md +32 -0
- package/skills/bug-investigator/SKILL.md +77 -0
- package/skills/build-executor/SKILL.md +163 -0
- package/skills/build-executor/implementer-prompt.md +162 -0
- package/skills/build-executor/references/execution-modes.md +86 -0
- package/skills/build-executor/task-reviewer-prompt.md +195 -0
- package/skills/ce-brainstorm/SKILL.md +415 -0
- package/skills/ce-brainstorm/references/agents/slack-researcher.md +127 -0
- package/skills/ce-brainstorm/references/blindspot-pass.md +70 -0
- package/skills/ce-brainstorm/references/brainstorm-sections.md +285 -0
- package/skills/ce-brainstorm/references/handoff.md +168 -0
- package/skills/ce-brainstorm/references/html-rendering.md +634 -0
- package/skills/ce-brainstorm/references/markdown-rendering.md +241 -0
- package/skills/ce-brainstorm/references/model-tiers.md +9 -0
- package/skills/ce-brainstorm/references/prd-mapping.md +71 -0
- package/skills/ce-brainstorm/references/product-pressure-test.md +42 -0
- package/skills/ce-brainstorm/references/reasoning-elevation.md +63 -0
- package/skills/ce-brainstorm/references/settled-decisions.md +45 -0
- package/skills/ce-brainstorm/references/synthesis-summary.md +282 -0
- package/skills/ce-brainstorm/references/universal-brainstorming.md +73 -0
- package/skills/ce-brainstorm/references/verdict-routing.md +26 -0
- package/skills/ce-brainstorm/references/visual-probes.md +158 -0
- package/skills/ce-brainstorm/scripts/visual-probe-server.js +418 -0
- package/skills/ce-compound/SKILL.md +114 -0
- package/skills/ce-compound/assets/resolution-template.md +94 -0
- package/skills/ce-compound/references/agents/best-practices-researcher.md +115 -0
- package/skills/ce-compound/references/agents/data-integrity-guardian.md +68 -0
- package/skills/ce-compound/references/agents/framework-docs-researcher.md +93 -0
- package/skills/ce-compound/references/agents/pattern-recognition-specialist.md +55 -0
- package/skills/ce-compound/references/agents/performance-oracle.md +108 -0
- package/skills/ce-compound/references/agents/security-sentinel.md +91 -0
- package/skills/ce-compound/references/agents/session-historian.md +83 -0
- package/skills/ce-compound/references/concepts-vocabulary.md +78 -0
- package/skills/ce-compound/references/full-mode-workflow.md +413 -0
- package/skills/ce-compound/references/grounding-validation.md +84 -0
- package/skills/ce-compound/references/lightweight-mode.md +53 -0
- package/skills/ce-compound/references/output-standards.md +182 -0
- package/skills/ce-compound/references/promotion-rules.md +38 -0
- package/skills/ce-compound/references/schema.yaml +231 -0
- package/skills/ce-compound/references/three-tier-index.md +55 -0
- package/skills/ce-compound/references/v0.5-upgrade.md +32 -0
- package/skills/ce-compound/references/write-flow.md +36 -0
- package/skills/ce-compound/references/yaml-schema.md +118 -0
- package/skills/ce-compound/scripts/session-history/discover-sessions.sh +130 -0
- package/skills/ce-compound/scripts/session-history/extract-errors.py +254 -0
- package/skills/ce-compound/scripts/session-history/extract-metadata.py +456 -0
- package/skills/ce-compound/scripts/session-history/extract-skeleton.py +575 -0
- package/skills/ce-compound/scripts/validate-doc-claims.py +346 -0
- package/skills/ce-compound/scripts/validate-frontmatter.py +137 -0
- package/skills/ce-ideate/SKILL.md +402 -0
- package/skills/ce-ideate/references/agents/issue-intelligence-analyst.md +200 -0
- package/skills/ce-ideate/references/agents/learnings-researcher.md +247 -0
- package/skills/ce-ideate/references/agents/slack-researcher.md +127 -0
- package/skills/ce-ideate/references/agents/web-researcher.md +121 -0
- package/skills/ce-ideate/references/divergent-ideation.md +89 -0
- package/skills/ce-ideate/references/html-rendering.md +634 -0
- package/skills/ce-ideate/references/ideation-sections.md +191 -0
- package/skills/ce-ideate/references/markdown-rendering.md +238 -0
- package/skills/ce-ideate/references/post-ideation-workflow.md +167 -0
- package/skills/ce-ideate/references/universal-ideation.md +107 -0
- package/skills/ce-ideate/references/web-research-cache.md +56 -0
- package/skills/ce-plan/SKILL.md +137 -0
- package/skills/ce-plan/references/agents/agent-native-planning-strategist.md +62 -0
- package/skills/ce-plan/references/agents/architecture-strategist.md +46 -0
- package/skills/ce-plan/references/agents/best-practices-researcher.md +114 -0
- package/skills/ce-plan/references/agents/data-integrity-guardian.md +68 -0
- package/skills/ce-plan/references/agents/data-migration-reviewer.md +103 -0
- package/skills/ce-plan/references/agents/deployment-verification-agent.md +157 -0
- package/skills/ce-plan/references/agents/framework-docs-researcher.md +93 -0
- package/skills/ce-plan/references/agents/git-history-analyzer.md +40 -0
- package/skills/ce-plan/references/agents/learnings-researcher.md +247 -0
- package/skills/ce-plan/references/agents/pattern-recognition-specialist.md +55 -0
- package/skills/ce-plan/references/agents/performance-oracle.md +108 -0
- package/skills/ce-plan/references/agents/repo-research-analyst.md +258 -0
- package/skills/ce-plan/references/agents/security-sentinel.md +91 -0
- package/skills/ce-plan/references/agents/slack-researcher.md +127 -0
- package/skills/ce-plan/references/agents/spec-flow-analyzer.md +80 -0
- package/skills/ce-plan/references/agents/web-researcher.md +121 -0
- package/skills/ce-plan/references/approach-altitude.md +55 -0
- package/skills/ce-plan/references/change-splitting.md +65 -0
- package/skills/ce-plan/references/completion-contract.md +33 -0
- package/skills/ce-plan/references/core-principles.md +40 -0
- package/skills/ce-plan/references/deepening-workflow.md +263 -0
- package/skills/ce-plan/references/dependency-graph.md +36 -0
- package/skills/ce-plan/references/html-rendering.md +634 -0
- package/skills/ce-plan/references/intake-routing.md +189 -0
- package/skills/ce-plan/references/markdown-rendering.md +238 -0
- package/skills/ce-plan/references/plan-handoff.md +150 -0
- package/skills/ce-plan/references/plan-sections.md +427 -0
- package/skills/ce-plan/references/plan-structure.md +120 -0
- package/skills/ce-plan/references/planning-modes.md +69 -0
- package/skills/ce-plan/references/reasoning-elevation.md +63 -0
- package/skills/ce-plan/references/research-workflow.md +165 -0
- package/skills/ce-plan/references/review-and-write.md +127 -0
- package/skills/ce-plan/references/settled-decisions.md +45 -0
- package/skills/ce-plan/references/synthesis-summary.md +418 -0
- package/skills/ce-plan/references/universal-planning.md +168 -0
- package/skills/ce-proof/SKILL.md +346 -0
- package/skills/ce-strategy/SKILL.md +97 -0
- package/skills/ce-strategy/references/interview.md +143 -0
- package/skills/ce-strategy/references/strategy-template.md +89 -0
- package/skills/code-reviewer/SKILL.md +84 -0
- package/skills/code-reviewer/code-reviewer-prompt.md +195 -0
- package/skills/contract-builder/SKILL.md +72 -0
- package/skills/design-system/SKILL.md +75 -0
- package/skills/design-system/references/agents/design-system-architect.md +138 -0
- package/skills/design-system/references/creation-flow.md +170 -0
- package/skills/design-system/references/preview-template.html +319 -0
- package/skills/design-system/references/token-derivation.md +115 -0
- package/skills/design-system/references/variant-schema.md +60 -0
- package/skills/e2e/SKILL.md +56 -0
- package/skills/e2e/references/test-verifier.md +40 -0
- package/skills/need-explorer/SKILL.md +79 -0
- package/skills/prototype/SKILL.md +98 -0
- package/skills/prototype/references/agents/design-system-architect.md +122 -0
- package/skills/prototype/references/checklist.md +82 -0
- package/skills/prototype/references/craft/accessibility-baseline.md +71 -0
- package/skills/prototype/references/craft/anti-ai-slop.md +87 -0
- package/skills/prototype/references/craft/laws-of-ux.md +60 -0
- package/skills/prototype/references/craft/state-coverage.md +81 -0
- package/skills/prototype/references/craft/typography-hierarchy.md +50 -0
- package/skills/prototype/references/layouts.md +223 -0
- package/skills/prototype/references/orchestration-flow.md +101 -0
- package/skills/prototype/references/prototype-scaffold/assets/design-tokens.css +19 -0
- package/skills/prototype/references/prototype-scaffold/components/button.html +3 -0
- package/skills/prototype/references/prototype-scaffold/design-system.md +7 -0
- package/skills/prototype/references/prototype-scaffold/flow.md +11 -0
- package/skills/prototype/references/prototype-scaffold/index.html +20 -0
- package/skills/prototype/references/prototype-scaffold/pages/index.html +11 -0
- package/skills/prototype/references/template.html +396 -0
- package/skills/release-archivist/SKILL.md +166 -0
- package/skills/release-archivist/references/closing-procedures.md +81 -0
- package/skills/session-handoff/SKILL.md +110 -0
- package/skills/session-handoff/references/context-extraction.md +70 -0
- package/skills/session-handoff/references/handoff-template.md +90 -0
- package/skills/session-handoff/references/skill-recommendation.md +43 -0
- package/skills/spec-merger/SKILL.md +66 -0
- package/skills/spec-writer/SKILL.md +149 -0
- package/skills/workflow-bootstrap/SKILL.md +148 -0
- package/skills/workflow-bootstrap/references/agents/codebase-recon-analyst.md +121 -0
- package/skills/workflow-bootstrap/references/b1-reconnaissance.md +80 -0
- package/skills/workflow-bootstrap/scripts/recon-probe.sh +328 -0
- package/skills/workflow-feedback/SKILL.md +120 -0
- package/skills/workflow-feedback/references/category-guide.md +121 -0
- package/skills/workflow-feedback/references/feedback-template.md +73 -0
- package/skills/workflow-feedback/references/review-mode.md +92 -0
- package/skills/workflow-orchestrator/SKILL.md +94 -0
- package/skills/workflow-orchestrator/references/feedback-loops.md +56 -0
- package/skills/workflow-orchestrator/references/s1-path-router.md +81 -0
- package/skills/workflow-orchestrator/references/s2-prd-prototype-loop.md +96 -0
- package/skills/workflow-orchestrator/references/s3-plan-pipeline.md +50 -0
- package/skills/workflow-orchestrator/references/s4-split-validate.md +108 -0
- package/skills/workflow-orchestrator/references/s5-monitoring.md +61 -0
- package/skills/workflow-orchestrator/references/state-model.md +185 -0
- package/skills/workflow-start/SKILL.md +147 -0
- package/skills/workflow-start/references/routing-rules.md +155 -0
- package/src/index.ts +16 -0
- package/src/parsing/change-parser.ts +79 -0
- package/src/parsing/requirement-blocks.ts +244 -0
- package/src/schema/base.ts +8 -0
- package/src/schema/change.ts +29 -0
- package/src/schema/index.ts +3 -0
- package/src/schema/spec.ts +12 -0
- package/src/validation/constants.ts +53 -0
- package/src/validation/tokenizer.ts +180 -0
- package/src/validation/types.ts +47 -0
- package/src/validation/validator.ts +552 -0
- package/templates/abandonment-summary.md +29 -0
- package/templates/design.md +37 -0
- package/templates/execution-contract.md +99 -0
- package/templates/plan.md +86 -0
- package/templates/prd.md +468 -0
- package/templates/proposal.md +37 -0
- package/templates/spec.md +31 -0
- package/templates/tasks.md +47 -0
- package/tests/e2e.test.mjs +266 -0
- package/tests/lib/cmd-audit.test.mjs +202 -0
- package/tests/lib/cmd-checkpoint.test.mjs +98 -0
- package/tests/lib/cmd-config.test.mjs +101 -0
- package/tests/lib/cmd-doctor.test.mjs +450 -0
- package/tests/lib/cmd-execution.test.mjs +647 -0
- package/tests/lib/cmd-handoff.test.mjs +137 -0
- package/tests/lib/cmd-inject.test.mjs +218 -0
- package/tests/lib/cmd-install-workbuddy.test.mjs +113 -0
- package/tests/lib/cmd-install-zcode.test.mjs +42 -0
- package/tests/lib/cmd-isolate.test.mjs +68 -0
- package/tests/lib/cmd-list.test.mjs +127 -0
- package/tests/lib/cmd-runtime.test.mjs +83 -0
- package/tests/lib/cmd-state-missing.test.mjs +65 -0
- package/tests/lib/cmd-state.test.mjs +365 -0
- package/tests/lib/cmd-sync-paths.test.mjs +84 -0
- package/tests/lib/cmd-validate-paths.test.mjs +90 -0
- package/tests/lib/config-loader.test.mjs +175 -0
- package/tests/lib/ensure-branch.test.mjs +59 -0
- package/tests/lib/execution-control-plane.test.mjs +168 -0
- package/tests/lib/execution-plan.test.mjs +474 -0
- package/tests/lib/guard-specs-merged.test.mjs +108 -0
- package/tests/lib/guard-tests-passing.test.mjs +112 -0
- package/tests/lib/guard-transitions.test.mjs +262 -0
- package/tests/lib/guard.test.mjs +611 -0
- package/tests/lib/hash.test.mjs +138 -0
- package/tests/lib/infer-workflow.test.mjs +161 -0
- package/tests/lib/install-git-hooks.test.mjs +20 -0
- package/tests/lib/marketplace-release-docs.test.mjs +31 -0
- package/tests/lib/minimality-discipline.test.mjs +37 -0
- package/tests/lib/model-profiles-docs.test.mjs +33 -0
- package/tests/lib/node20-compatibility.test.mjs +73 -0
- package/tests/lib/node20-test-entry.test.mjs +17 -0
- package/tests/lib/platform-runtime-distribution.test.mjs +150 -0
- package/tests/lib/raw-mode-smoke.test.mjs +42 -0
- package/tests/lib/sdd-overlay.test.mjs +118 -0
- package/tests/lib/spec-paths.test.mjs +80 -0
- package/tests/lib/state-loader.test.mjs +251 -0
- package/tests/lib/token-baseline.test.mjs +72 -0
- package/tests/lib/token-rules.test.mjs +94 -0
- package/tests/lib/verify-marketplace-release.test.mjs +128 -0
- package/tests/tsconfig.json +12 -0
- package/token-baseline.json +95 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-bootstrap
|
|
3
|
+
description: 既有项目接入初始化器。在首次使用 team-flow 时执行一次性"侦察 + 基线建立":代码库侦察 → 架构基线文档化 → 领域词汇提取 → 目录初始化 → 路径判断。完成后进入 workflow-orchestrator。不适用于:全新项目(无代码库,直接用 workflow-orchestrator)、已建立基线的项目(baseline.md 已存在)。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workflow Bootstrap(既有项目接入初始化器,v0.6 新增)
|
|
7
|
+
|
|
8
|
+
在首次使用 team-flow 时执行一次性"侦察 + 基线建立",为既有项目建立架构基线、领域词汇和目录结构,然后进入正常产品级流程。
|
|
9
|
+
|
|
10
|
+
## 定位
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
workflow-bootstrap(一次性,手动触发)
|
|
14
|
+
→ B1 代码库侦察 → B2 架构基线 → B3 领域词汇 → B4 目录初始化 → B5 路径判断
|
|
15
|
+
→ 进入 workflow-orchestrator S1(注入 baseline 上下文)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- **一次性**:只在首次接入 team-flow 时执行。
|
|
19
|
+
- **手动触发**(`/workflow-bootstrap`):侦察可能耗时较长,架构基线需要用户确认。
|
|
20
|
+
- **不替代 workflow-orchestrator**:bootstrap 管"从哪里开始",orchestrator 管"做什么"。
|
|
21
|
+
- **对全新项目可跳过**:无代码库时,直接进入 workflow-orchestrator。
|
|
22
|
+
|
|
23
|
+
## Use This Skill When
|
|
24
|
+
|
|
25
|
+
- 用户在一个**既有代码库**中首次使用 team-flow
|
|
26
|
+
- 用户说"帮我初始化 team-flow"、"这个项目怎么接入 team-flow"、"先分析一下这个代码库"
|
|
27
|
+
- 需要建立架构基线、领域词汇、目录结构
|
|
28
|
+
|
|
29
|
+
Do NOT invoke for:
|
|
30
|
+
- 全新项目(无代码库)→ 直接用 `/workflow-orchestrator`
|
|
31
|
+
- 已建立基线的项目(`docs/architecture/baseline.md` 已存在)→ 提示用户"基线已建立"
|
|
32
|
+
- 已在 team-flow change 内 → 用 `/workflow-start`
|
|
33
|
+
- 纯架构设计 → 用 `/architecture-design`
|
|
34
|
+
|
|
35
|
+
## Pre-check
|
|
36
|
+
|
|
37
|
+
执行任何操作前,先检查:
|
|
38
|
+
|
|
39
|
+
1. **baseline.md 是否已存在**:
|
|
40
|
+
```bash
|
|
41
|
+
test -f docs/architecture/baseline.md
|
|
42
|
+
```
|
|
43
|
+
- 存在 → 提示用户:"基线已建立(docs/architecture/baseline.md)。是否要重新侦察?"
|
|
44
|
+
- 用户确认重新侦察 → 继续(备份旧 baseline.md 为 baseline.md.bak)
|
|
45
|
+
- 用户拒绝 → 退出,建议直接进入 `/workflow-orchestrator`
|
|
46
|
+
|
|
47
|
+
2. **代码库是否存在**:
|
|
48
|
+
- 检查是否有源代码文件(`src/`、`lib/`、`app/`、`*.java`、`*.py`、`*.ts` 等)
|
|
49
|
+
- 无代码 → 提示用户:"这是全新项目,建议直接使用 `/workflow-orchestrator`"
|
|
50
|
+
- 用户坚持 → 继续(但 B1 侦察结果会很简单)
|
|
51
|
+
|
|
52
|
+
## Execution Flow
|
|
53
|
+
|
|
54
|
+
### B1: Codebase Reconnaissance(代码侦察,v0.15.0 重构:脚本 + 并行子代理)
|
|
55
|
+
|
|
56
|
+
> **硬原则**:主代理只编排(派发 + 汇总 + 写 baseline.md),侦察执行下沉子代理(§18.1 交接协议)。先跑确定性脚本固定化采集基底,再派子代理做语义增强——**可复现、可横展对比**。
|
|
57
|
+
|
|
58
|
+
- **模式**(询问用户):Quick(默认,技术栈+模块+架构模式+测试文档,~2 分钟)/ Deep(+数据模型+API 表面,~10 分钟)。
|
|
59
|
+
- **B1.1 脚本采集**:`bash scripts/recon-probe.sh --root <根> --out /tmp/recon-<slug>.json`(固定化,两次接入结果一致)。
|
|
60
|
+
- **B1.2 并行子代理**:读 `references/agents/codebase-recon-analyst.md`,把 JSON 路径作 `recon_json` 入参,按维度并行派发(§18.1 返回)。
|
|
61
|
+
- **B1.3 主代理汇总**:只汇总不重新侦察,整合已有文档(合并而非覆盖,标注来源),写 `docs/architecture/baseline.md`。
|
|
62
|
+
|
|
63
|
+
详细流程(脚本采集项、子代理维度表、侦察内容树、已有文档处理)见 `references/b1-reconnaissance.md`。
|
|
64
|
+
|
|
65
|
+
### B2: Architecture Baseline(架构基线文档化)
|
|
66
|
+
|
|
67
|
+
**条件**:如果 B1 侦察发现项目有一定复杂度(≥5 个模块或 ≥10 个源文件),执行此阶段。否则跳过。
|
|
68
|
+
|
|
69
|
+
产出:
|
|
70
|
+
- `docs/architecture/ARCHITECTURE.md` — 分层、模块边界、技术选型(瘦锚点格式)
|
|
71
|
+
- `docs/architecture/DATABASE.md` — 数据模型(如适用)
|
|
72
|
+
- `docs/architecture/<bc>/` — 每个有界上下文的目录(如能识别)
|
|
73
|
+
|
|
74
|
+
**轻量 vs 完整**:
|
|
75
|
+
- bootstrap 产出的是**基线快照**(As-Is 当前态),不是完整的 4A+DDD 设计
|
|
76
|
+
- 完整的架构演进仍走 `/architecture-design` 的标准增量流程
|
|
77
|
+
- 如果用户需要完整架构设计,B2 结束后建议:"基线已建立。如需完整架构设计,请运行 `/architecture-design`"
|
|
78
|
+
|
|
79
|
+
**已有架构文档处理**:
|
|
80
|
+
- 如果 `docs/architecture/ARCHITECTURE.md` 已存在 → 读取并整合,不覆盖
|
|
81
|
+
- 如果项目有其他格式的架构文档 → 提取关键信息,整合进 team-flow 格式
|
|
82
|
+
|
|
83
|
+
### B3: Domain Vocabulary Bootstrap(领域词汇种子)
|
|
84
|
+
|
|
85
|
+
从代码命名中提取领域词汇,创建或更新 `CONCEPTS.md`。
|
|
86
|
+
|
|
87
|
+
**提取策略**:
|
|
88
|
+
1. 扫描实体类名、服务类名、模块名
|
|
89
|
+
2. 提取核心领域名词(Order, User, Cart, Payment 等)
|
|
90
|
+
3. 推断定义(基于类注释、字段名、方法名)
|
|
91
|
+
4. 记录出处(文件路径)
|
|
92
|
+
|
|
93
|
+
**CONCEPTS.md 格式**:
|
|
94
|
+
|
|
95
|
+
```markdown
|
|
96
|
+
# Concepts
|
|
97
|
+
|
|
98
|
+
> 从既有代码库提取的核心领域词汇 — 基于代码命名和模块结构自动推断(workflow-bootstrap B3 产出)
|
|
99
|
+
|
|
100
|
+
| 术语 | 定义 | 出处 |
|
|
101
|
+
|------|------|------|
|
|
102
|
+
| Order | 订单聚合根 | src/domain/order/Order.java |
|
|
103
|
+
| Cart | 购物车,下单前的临时状态 | src/domain/cart/Cart.java |
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**已有 CONCEPTS.md 处理**:
|
|
107
|
+
- 如果 `CONCEPTS.md` 已存在(由之前的 ce-compound 运行创建)→ **合并**而非覆盖
|
|
108
|
+
- 读取已有词汇,补充从代码中新发现的术语
|
|
109
|
+
- 标注来源:"workflow-bootstrap B3 补充"
|
|
110
|
+
|
|
111
|
+
**与 ce-compound 的关系**:ce-compound 是"遇到问题后被动记录",B3 是"主动从代码提取"——B3 建种子词汇表,ce-compound 后续持续补充。
|
|
112
|
+
|
|
113
|
+
### B4: Directory Initialization(目录初始化)
|
|
114
|
+
|
|
115
|
+
创建 team-flow 目录结构:`mkdir -p prd/ prototype/ docs/architecture/ docs/solutions/ changes/`。已有目录不覆盖不删除,只补缺失;目录中有文件保留不改。**Discoverability 检查**:若 `AGENTS.md`/`CLAUDE.md` 未暴露 `docs/architecture/` 和 `prototype/`,advisory 建议用户添加(不自动改)。
|
|
116
|
+
|
|
117
|
+
### B5: Path Decision(路径判断)
|
|
118
|
+
|
|
119
|
+
询问用户:
|
|
120
|
+
|
|
121
|
+
> 您希望从哪个需求开始使用 team-flow?
|
|
122
|
+
> - A) 我有一个具体的功能需求(→ 进入 workflow-orchestrator S1)
|
|
123
|
+
> - B) 我有一个模糊的产品方向(→ ce-brainstorm)
|
|
124
|
+
> - C) 我只是想建立架构基线,暂不开发新需求(→ 结束)
|
|
125
|
+
|
|
126
|
+
**上下文传递**:
|
|
127
|
+
- 将 `docs/architecture/baseline.md` 和 `CONCEPTS.md` 的路径传递给 workflow-orchestrator S1
|
|
128
|
+
- 作为后续流程的架构上下文
|
|
129
|
+
|
|
130
|
+
## Guardrails
|
|
131
|
+
|
|
132
|
+
- **一次性**:bootstrap 只在首次接入时执行。如果 `docs/architecture/baseline.md` 已存在,提示用户"基线已建立,是否要重新侦察?"
|
|
133
|
+
- **不修改代码**:bootstrap 只读取代码、产出文档,不修改任何源代码。
|
|
134
|
+
- **不创建 change**:bootstrap 不创建 `changes/` 下的 change 目录,那是 workflow-orchestrator S4 的职责。
|
|
135
|
+
- **advisory 级**:所有 bootstrap 操作为 advisory 级,不阻断后续流程。
|
|
136
|
+
- **已有文档不覆盖**:如果目标文件已存在,合并而非覆盖。
|
|
137
|
+
- **不替代 architecture-design**:bootstrap 产出基线快照,不是完整的 4A+DDD 设计。
|
|
138
|
+
|
|
139
|
+
## Output Standard
|
|
140
|
+
|
|
141
|
+
每次交互结束时说明:
|
|
142
|
+
1. 已完成的阶段(B1-B5)
|
|
143
|
+
2. 已产出的制品(baseline.md / ARCHITECTURE.md / CONCEPTS.md / 目录结构)
|
|
144
|
+
3. 下一步建议(调用哪个 skill)
|
|
145
|
+
|
|
146
|
+
## Success Output
|
|
147
|
+
|
|
148
|
+
接入结束时输出:侦察模式、产出清单(baseline.md / ARCHITECTURE.md / DATABASE.md / CONCEPTS.md / 目录结构)、关键发现(技术栈/模块数/架构模式/测试覆盖)、下一步建议。完整模板见 `references/b1-reconnaissance.md`「Success Output 模板」。
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
**Note: The current year is 2026.** Use this when assessing framework versions and recency.
|
|
2
|
+
|
|
3
|
+
You are an expert codebase reconnaissance analyst. You are dispatched by the `workflow-bootstrap` skill (B1 阶段) as one of several parallel recon subagents. Your mission is to take the **deterministic JSON baseline** produced by `recon-probe.sh` and enrich it with targeted source reads into a **structured summary for ONE reconnaissance dimension** (technology stack / module structure / architecture pattern / data model / API surface / test & docs). The bootstrap orchestrator aggregates all dimension summaries into `docs/architecture/baseline.md`.
|
|
4
|
+
|
|
5
|
+
You do the **semantic** judgment (what architecture pattern this is, which class is an aggregate-root candidate). The mechanical collection (file counts, dependency lists, LOC) already comes from the script — do not re-run it by hand, consume its output.
|
|
6
|
+
|
|
7
|
+
## Invocation Contract
|
|
8
|
+
|
|
9
|
+
The dispatch prompt provides:
|
|
10
|
+
- `recon_json`: the path to (or inline content of) the `recon-probe.sh` JSON output — your **baseline**.
|
|
11
|
+
- `root`: the project root being reconnoitered.
|
|
12
|
+
- A `Scope:` line selecting which dimension(s) to run (see below).
|
|
13
|
+
- Optional `mode: Quick | Deep`.
|
|
14
|
+
|
|
15
|
+
Convert the mechanical baseline into planning-grade findings: concrete paths, named frameworks, module boundaries, pattern verdicts. Prefer specific evidence (file paths, dependency names, class names) over vague summaries. Even when scoped, surface any finding that materially changes the baseline picture.
|
|
16
|
+
|
|
17
|
+
**Scoped Invocation**
|
|
18
|
+
|
|
19
|
+
When the input begins with `Scope:` followed by a comma-separated list, run only the matching dimensions:
|
|
20
|
+
|
|
21
|
+
| Scope | Dimension | Output section | Quick | Deep |
|
|
22
|
+
|-------|-----------|----------------|:---:|:---:|
|
|
23
|
+
| `technology` | 技术栈识别(语言/框架/构建/DB) | Technology Stack | ✓ | ✓ |
|
|
24
|
+
| `modules` | 模块结构(分层/边界) | Module Structure | ✓ | ✓ |
|
|
25
|
+
| `architecture` | 已有架构模式(DDD/MVC/微服务/单体) | Architecture Pattern | ✓ | ✓ |
|
|
26
|
+
| `data-model` | 数据模型(实体/迁移/聚合根候选) | Data Model | — | ✓ |
|
|
27
|
+
| `api-surface` | API 表面(REST/gRPC/CLI) | API Surface | — | ✓ |
|
|
28
|
+
| `test-docs` | 测试现状 + 已有文档 | Test & Docs | ✓ | ✓ |
|
|
29
|
+
|
|
30
|
+
**Scoping rules:**
|
|
31
|
+
- Multiple scopes combine: `Scope: technology, modules, architecture` runs three dimensions.
|
|
32
|
+
- No `Scope:` prefix → run all six (full recon).
|
|
33
|
+
- `mode` interaction: in **Quick** mode the orchestrator only dispatches `technology / modules / architecture / test-docs`; in **Deep** mode it also dispatches `data-model / api-surface`. If you receive a `data-model` or `api-surface` scope but `mode: Quick`, note the mismatch as an outstanding question and proceed (the orchestrator decides modes).
|
|
34
|
+
|
|
35
|
+
## Methodology
|
|
36
|
+
|
|
37
|
+
### Step 0: Consume the Baseline
|
|
38
|
+
|
|
39
|
+
Read `recon_json` first. It gives you, mechanically: directory tree (depth-limited), dependency manifests (pom.xml / package.json / requirements.txt / go.mod / build.gradle …), LOC + file-type distribution, test-file counts, DB migration file list, README/docs detection. Anchor every dimension on this baseline; only read additional source files to resolve **semantic** questions the JSON cannot answer.
|
|
40
|
+
|
|
41
|
+
### Dimension: technology(技术栈识别)
|
|
42
|
+
|
|
43
|
+
- From the dependency manifest section of the baseline, identify: primary language(s) + version, major frameworks (Spring Boot / Express / Vue / React / Django / Gin …), build tool, database driver/ORM.
|
|
44
|
+
- Read a manifest only if the baseline excerpt is ambiguous (e.g., to confirm a framework version).
|
|
45
|
+
- Output: languages, frameworks (with versions when available), build tooling, data store, async/queue signals.
|
|
46
|
+
|
|
47
|
+
### Dimension: modules(模块结构)
|
|
48
|
+
|
|
49
|
+
- From the baseline directory tree, identify top-level modules / services / packages and the layering inside them (controller/service/repository, domain/application/infrastructure, …).
|
|
50
|
+
- Read a couple of representative files only to confirm boundaries when the tree is inconclusive.
|
|
51
|
+
- Output: module tree with one-line responsibility per module + inferred layering.
|
|
52
|
+
|
|
53
|
+
### Dimension: architecture(已有架构模式)
|
|
54
|
+
|
|
55
|
+
- Judge the prevailing pattern: DDD 分层 / MVC / 微服务 / 单体 / 六边形 / CQRS …, with evidence (directory naming, dependency directions, bounded-context signals).
|
|
56
|
+
- This is a **semantic** verdict — the script cannot decide it. Cite the directory/dependency evidence behind the call.
|
|
57
|
+
- Output: pattern verdict + evidence + confidence (high/medium/low).
|
|
58
|
+
|
|
59
|
+
### Dimension: data-model(Deep only)
|
|
60
|
+
|
|
61
|
+
- From the baseline's DB migration list + ORM/entity directories, read entity classes / migration / schema files.
|
|
62
|
+
- Identify aggregate-root candidates and infer entity relationships.
|
|
63
|
+
- Output: entity list, aggregate-root candidates (with justification), inferred relations, migration file references.
|
|
64
|
+
|
|
65
|
+
### Dimension: api-surface(Deep only)
|
|
66
|
+
|
|
67
|
+
- Scan for REST endpoints / gRPC services / CLI commands (route/controller dirs, `*.proto`, openapi specs, command registrations).
|
|
68
|
+
- Output: API style(s) + a concise list of the main endpoints/services with their paths.
|
|
69
|
+
|
|
70
|
+
### Dimension: test-docs(测试现状 + 已有文档)
|
|
71
|
+
|
|
72
|
+
- From the baseline's test-file counts + README/docs detection, identify: test framework(s), rough coverage signal, presence of README / docs/ / ARCHITECTURE.md.
|
|
73
|
+
- Read README/ARCHITECTURE only to extract facts the bootstrap should merge (do NOT overwrite — bootstrap merges existing docs).
|
|
74
|
+
- Output: test framework + coverage signal + doc inventory (path + one-line content note). Tag each fact's source: `代码分析` vs `原有文档`.
|
|
75
|
+
|
|
76
|
+
## Output Format
|
|
77
|
+
|
|
78
|
+
Produce only the sections for the scopes you ran:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
## Recon Summary — <dimension(s)>
|
|
82
|
+
|
|
83
|
+
### Technology Stack # if technology in scope
|
|
84
|
+
- Languages / frameworks (versions) / build / data store / async
|
|
85
|
+
|
|
86
|
+
### Module Structure # if modules in scope
|
|
87
|
+
- Module tree + layering
|
|
88
|
+
|
|
89
|
+
### Architecture Pattern # if architecture in scope
|
|
90
|
+
- Verdict + evidence + confidence
|
|
91
|
+
|
|
92
|
+
### Data Model # if data-model in scope (Deep)
|
|
93
|
+
- Entities / aggregate-root candidates / relations / migrations
|
|
94
|
+
|
|
95
|
+
### API Surface # if api-surface in scope (Deep)
|
|
96
|
+
- API style + main endpoints/services
|
|
97
|
+
|
|
98
|
+
### Test & Docs # if test-docs in scope
|
|
99
|
+
- Test framework + coverage signal + doc inventory (with source tag)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Cite concrete paths (repo-relative) for every non-trivial claim. Distinguish what came from the mechanical baseline vs. what you inferred by reading source.
|
|
103
|
+
|
|
104
|
+
## Tool Guidance
|
|
105
|
+
|
|
106
|
+
- Use `Read` for the baseline JSON and targeted source files; `Grep`/`Glob` to locate entities/routes/migrations; `Bash` sparingly (you may re-invoke `recon-probe.sh` only if the baseline was not supplied).
|
|
107
|
+
- Prefer a few broad reads over many narrow ones. Cap deep source reads to what changes the verdict.
|
|
108
|
+
- Do NOT modify any file — recon is read-only.
|
|
109
|
+
|
|
110
|
+
## Structured Handoff(强制,主代理据此编排)
|
|
111
|
+
|
|
112
|
+
你的 final response 必须是如下结构化交接(JSON 风格描述即可,主代理据此编排):
|
|
113
|
+
{
|
|
114
|
+
status: "done" | "done_with_questions" | "blocked",
|
|
115
|
+
deliverable: <本维度结构化摘要(上述 Output Format 内容),或写入的 scratch 文件绝对路径>,
|
|
116
|
+
blockers: [ { question, why_blocking, options[] } ], # 阻断项:无法继续、必须主代理裁决
|
|
117
|
+
outstanding_questions: [ { question, default_assumption } ], # 非阻断:已按默认假设继续,回主代理批量确认
|
|
118
|
+
summary: <3-5 行 gist>
|
|
119
|
+
}
|
|
120
|
+
规则:非阻断疑问(如某框架版本无法确定、某模块职责模糊)→ 按 default_assumption 继续跑完,记入 outstanding_questions(status=done_with_questions);
|
|
121
|
+
阻断疑问(如 recon_json 与 root 均缺失、代码库为空无法判断)→ 立即停止,返回 status=blocked + blockers[],绝不强行猜测。你不能调用 AskUserQuestion。
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# B1 代码侦察详细流程(v0.15.0:脚本 + 并行子代理)
|
|
2
|
+
|
|
3
|
+
> 硬原则:主代理只编排(派发 + 汇总 + 写 baseline.md),侦察执行下沉子代理(§18.1 交接协议)。先用确定性脚本固定化采集基底,再由子代理做语义增强——**可复现、可横展对比**。
|
|
4
|
+
|
|
5
|
+
## 两种模式(询问用户选择)
|
|
6
|
+
|
|
7
|
+
- **Quick**(默认):技术栈 + 模块结构 + 架构模式 + 测试/文档,~2 分钟
|
|
8
|
+
- **Deep**:Quick + 数据模型 + API 表面,~10 分钟
|
|
9
|
+
|
|
10
|
+
## B1.1 确定性脚本采集(先跑,固定化探查)
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
bash scripts/recon-probe.sh --root <项目根> --out /tmp/recon-<slug>.json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
固定采集(不依赖 LLM,两次接入结果一致):目录树(限深 4 层)、依赖清单(pom/package.json/requirements/go.mod/build.gradle)、LOC 与文件类型分布、测试文件计数(含 `.test.mjs`/`.spec.mjs`)、DB 迁移文件清单、README/docs 探测。输出结构化 JSON 供子代理消费。脚本只做确定性机械采集(§17.8 第四类载体),语义判断交给子代理 LLM。
|
|
17
|
+
|
|
18
|
+
## B1.2 并行派发侦察子代理(语义增强)
|
|
19
|
+
|
|
20
|
+
读 `references/agents/codebase-recon-analyst.md`,把 B1.1 的 JSON 路径作为 `recon_json` 入参,按维度**并行派发**子代理(每个子代理消费 JSON 基底 + 按需补读源码,按 §18.1 返回结构化摘要):
|
|
21
|
+
|
|
22
|
+
| 子代理任务 | Quick | Deep |
|
|
23
|
+
|-----------|:---:|:---:|
|
|
24
|
+
| 技术栈识别(语言/框架/构建/DB) | ✓ | ✓ |
|
|
25
|
+
| 模块结构(分层/边界) | ✓ | ✓ |
|
|
26
|
+
| 已有架构模式(DDD/MVC/微服务/单体) | ✓ | ✓ |
|
|
27
|
+
| 测试现状 + 已有文档 | ✓ | ✓ |
|
|
28
|
+
| 数据模型(实体/迁移/聚合根候选) | — | ✓ |
|
|
29
|
+
| API 表面(REST/gRPC/CLI) | — | ✓ |
|
|
30
|
+
|
|
31
|
+
子代理非阻断疑问按默认假设继续(记入 `outstanding_questions`);阻断(如代码库不可读)返回 `blocked`,主代理裁决。
|
|
32
|
+
|
|
33
|
+
## B1.3 主代理汇总
|
|
34
|
+
|
|
35
|
+
主代理收集各子代理摘要 + 脚本 JSON,**只汇总不重新侦察**,整合已有文档(见下),写 `docs/architecture/baseline.md`。
|
|
36
|
+
|
|
37
|
+
## 侦察内容维度(子代理产出,供 baseline.md 组织)
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
├── 技术栈识别(语言、框架、构建工具、数据库)
|
|
41
|
+
├── 模块结构(包/目录分层、模块边界、推断分层)
|
|
42
|
+
├── 已有架构模式(DDD 分层?MVC?微服务?单体?)
|
|
43
|
+
├── 数据模型(Deep:实体/迁移/聚合根候选/实体关系)
|
|
44
|
+
├── API 表面(Deep:REST/gRPC/CLI 主要清单)
|
|
45
|
+
├── 测试现状(测试目录/框架/粗略覆盖)
|
|
46
|
+
└── 已有文档(README/docs/注释密度)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 已有文档处理
|
|
50
|
+
|
|
51
|
+
- 如果项目已有 `README.md`、`docs/`、`ARCHITECTURE.md` 等,**读取并整合**
|
|
52
|
+
- **不覆盖**,而是**合并**——已有文档作为输入,team-flow 格式作为输出
|
|
53
|
+
- 标注信息来源(代码分析 vs 原有文档)
|
|
54
|
+
|
|
55
|
+
**产出**:`docs/architecture/baseline.md`(格式见 §19.4 设计文档)
|
|
56
|
+
|
|
57
|
+
## Success Output 模板
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
✓ 既有项目接入完成
|
|
61
|
+
|
|
62
|
+
侦察模式:Quick | Deep
|
|
63
|
+
|
|
64
|
+
产出:
|
|
65
|
+
- docs/architecture/baseline.md(项目基线画像)
|
|
66
|
+
- docs/architecture/ARCHITECTURE.md(架构锚点,如适用)
|
|
67
|
+
- docs/architecture/DATABASE.md(数据模型,如适用)
|
|
68
|
+
- CONCEPTS.md(领域词汇,N 个术语)
|
|
69
|
+
- 目录结构:prd/ prototype/ docs/ changes/
|
|
70
|
+
|
|
71
|
+
关键发现:
|
|
72
|
+
- 技术栈:Java 17 + Spring Boot 3 + MySQL 8
|
|
73
|
+
- 模块数:5(user-service, order-service, ...)
|
|
74
|
+
- 架构模式:微服务 + DDD 分层
|
|
75
|
+
- 测试覆盖:约 60%(JUnit 5 + Mockito)
|
|
76
|
+
|
|
77
|
+
下一步:
|
|
78
|
+
→ 运行 /workflow-orchestrator 开始产品级流程
|
|
79
|
+
→ 或运行 /architecture-design 进行完整架构设计
|
|
80
|
+
```
|