@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,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-flow",
|
|
3
|
+
"interface": {
|
|
4
|
+
"displayName": "team-flow"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "team-flow",
|
|
9
|
+
"source": {
|
|
10
|
+
"source": "local",
|
|
11
|
+
"path": "./"
|
|
12
|
+
},
|
|
13
|
+
"policy": {
|
|
14
|
+
"installation": "AVAILABLE",
|
|
15
|
+
"authentication": "ON_INSTALL"
|
|
16
|
+
},
|
|
17
|
+
"category": "Developer Tools"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
package/.agents/skills
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
../skills
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-flow",
|
|
3
|
+
"description": "Unified workflow plugin: team-flow + compound-engineering core subset + architecture-design + prototype + workflow-orchestrator + workflow-bootstrap + e2e + session-handoff + workflow-feedback. 23 skills + 8 agents, one install.",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "LT",
|
|
6
|
+
"url": "https://github.com/LT"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "team-flow",
|
|
11
|
+
"description": "8-state spec workflow + compound global compounding + architecture-design (4A/DDD) + local HTML prototype + product-level orchestration + bootstrap + e2e + session handoff + workflow feedback. 23 skills + 8 agents with embedded TDD, SDD, code review, debugging, delta spec sync, and design-system-driven prototyping.",
|
|
12
|
+
"version": "0.22.4",
|
|
13
|
+
"source": "./",
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "LT",
|
|
16
|
+
"url": "https://github.com/LT"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-flow",
|
|
3
|
+
"version": "0.22.4",
|
|
4
|
+
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking). 23 skills + 8 agents, one install.",
|
|
5
|
+
"source": "./",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "LT",
|
|
8
|
+
"url": "https://github.com/LT"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/LT/team-flow",
|
|
11
|
+
"repository": "https://github.com/LT/team-flow",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"workflow",
|
|
15
|
+
"skills",
|
|
16
|
+
"spec-driven-development",
|
|
17
|
+
"tdd",
|
|
18
|
+
"sdd",
|
|
19
|
+
"contract-driven",
|
|
20
|
+
"code-review",
|
|
21
|
+
"debugging",
|
|
22
|
+
"spec-sync",
|
|
23
|
+
"architecture",
|
|
24
|
+
"compound-engineering",
|
|
25
|
+
"prototype",
|
|
26
|
+
"claude-code",
|
|
27
|
+
"cursor",
|
|
28
|
+
"trae"
|
|
29
|
+
],
|
|
30
|
+
"skills": "./skills/"
|
|
31
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-flow",
|
|
3
|
+
"version": "0.22.4",
|
|
4
|
+
"description": "Spec-first workflow that bridges OpenSpec-style planning and Superpowers-style execution discipline.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "MageByte",
|
|
7
|
+
"url": "https://github.com/MageByte-Zero"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/MageByte-Zero/team-flow",
|
|
10
|
+
"repository": "https://github.com/MageByte-Zero/team-flow",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"workflow",
|
|
14
|
+
"skills",
|
|
15
|
+
"spec-driven-development",
|
|
16
|
+
"tdd",
|
|
17
|
+
"sdd",
|
|
18
|
+
"contract-driven",
|
|
19
|
+
"code-review",
|
|
20
|
+
"debugging",
|
|
21
|
+
"spec-sync",
|
|
22
|
+
"codex"
|
|
23
|
+
],
|
|
24
|
+
"skills": "./skills/",
|
|
25
|
+
"hooks": {},
|
|
26
|
+
"interface": {
|
|
27
|
+
"displayName": "team-flow",
|
|
28
|
+
"shortDescription": "Spec-first workflow with guarded execution.",
|
|
29
|
+
"longDescription": "A self-contained Codex workflow plugin with nine skills for intent exploration, planning artifacts, execution contracts, TDD execution, review gates, systematic debugging, closure, and delta spec sync.",
|
|
30
|
+
"developerName": "MageByte",
|
|
31
|
+
"category": "Developer Tools",
|
|
32
|
+
"composerIcon": "./assets/icon.svg",
|
|
33
|
+
"capabilities": [
|
|
34
|
+
"Write",
|
|
35
|
+
"Review"
|
|
36
|
+
],
|
|
37
|
+
"websiteURL": "https://github.com/MageByte-Zero/team-flow",
|
|
38
|
+
"defaultPrompt": [
|
|
39
|
+
"Use workflow-start to start a new change.",
|
|
40
|
+
"Review the current team-flow stage.",
|
|
41
|
+
"Bridge the approved plan into an execution contract."
|
|
42
|
+
],
|
|
43
|
+
"brandColor": "#2563EB"
|
|
44
|
+
}
|
|
45
|
+
}
|
package/.codexignore
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-flow-marketplace",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "LT"
|
|
5
|
+
},
|
|
6
|
+
"metadata": {
|
|
7
|
+
"description": "Unified workflow plugin marketplace for Cursor (team-flow: team-flow + compound + architecture-design + prototype).",
|
|
8
|
+
"version": "0.22.4"
|
|
9
|
+
},
|
|
10
|
+
"plugins": [
|
|
11
|
+
{
|
|
12
|
+
"name": "team-flow",
|
|
13
|
+
"source": ".",
|
|
14
|
+
"description": "Unified workflow plugin: team-flow + compound-engineering core subset + architecture-design + prototype. 17 collaborative skills."
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-flow",
|
|
3
|
+
"displayName": "team-flow",
|
|
4
|
+
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking). 23 skills + 8 agents, one install.",
|
|
5
|
+
"version": "0.22.4",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "LT",
|
|
8
|
+
"url": "https://github.com/LT"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/LT/team-flow",
|
|
11
|
+
"repository": "https://github.com/LT/team-flow",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"logo": "assets/icon.svg",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"workflow",
|
|
16
|
+
"skills",
|
|
17
|
+
"spec-driven-development",
|
|
18
|
+
"tdd",
|
|
19
|
+
"sdd",
|
|
20
|
+
"contract-driven",
|
|
21
|
+
"code-review",
|
|
22
|
+
"debugging",
|
|
23
|
+
"spec-sync",
|
|
24
|
+
"architecture",
|
|
25
|
+
"compound-engineering",
|
|
26
|
+
"prototype",
|
|
27
|
+
"ai-coding"
|
|
28
|
+
],
|
|
29
|
+
"skills": "./skills/",
|
|
30
|
+
"hooks": "./hooks/"
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Phase Guard
|
|
2
|
+
|
|
3
|
+
**当前阶段**: exploring | **工作流**: auto
|
|
4
|
+
|
|
5
|
+
## ✅ 允许操作
|
|
6
|
+
- 澄清需求、比较方案
|
|
7
|
+
- 与用户讨论 scope 和 capabilities
|
|
8
|
+
|
|
9
|
+
## ⛔ 禁止操作
|
|
10
|
+
- 创建规划工件(proposal.md, specs/, design.md, tasks.md)
|
|
11
|
+
- 执行实现代码
|
|
12
|
+
- 修改 execution-contract.md
|
|
13
|
+
|
|
14
|
+
## 🔔 决策点
|
|
15
|
+
- DP-1: 需求确认 — 进入 specifying 前需用户确认 scope
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-flow",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "LT",
|
|
5
|
+
"url": "https://github.com/LT"
|
|
6
|
+
},
|
|
7
|
+
"metadata": {
|
|
8
|
+
"description": "Unified workflow plugins and skills for AI coding agents (team-flow: team-flow + compound + architecture-design + prototype).",
|
|
9
|
+
"version": "0.22.4"
|
|
10
|
+
},
|
|
11
|
+
"plugins": [
|
|
12
|
+
{
|
|
13
|
+
"name": "team-flow",
|
|
14
|
+
"description": "Unified workflow with planning artifacts, execution contracts, TDD, review gates, systematic debugging, delta spec sync, architecture-design, and local HTML prototyping.",
|
|
15
|
+
"version": "0.22.4",
|
|
16
|
+
"source": ".",
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "LT",
|
|
19
|
+
"url": "https://github.com/LT"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/LT/team-flow",
|
|
22
|
+
"repository": "https://github.com/LT/team-flow",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"keywords": [
|
|
25
|
+
"workflow",
|
|
26
|
+
"skills",
|
|
27
|
+
"spec-driven-development",
|
|
28
|
+
"tdd",
|
|
29
|
+
"sdd",
|
|
30
|
+
"contract-driven",
|
|
31
|
+
"code-review",
|
|
32
|
+
"debugging",
|
|
33
|
+
"spec-sync",
|
|
34
|
+
"architecture",
|
|
35
|
+
"compound-engineering",
|
|
36
|
+
"prototype"
|
|
37
|
+
],
|
|
38
|
+
"category": "Productivity",
|
|
39
|
+
"skills": "skills/"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: CI/CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ['v*']
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build-and-test:
|
|
12
|
+
name: Build & Test
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
if: "!startsWith(github.ref, 'refs/tags/')"
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
node-version: [20, 22]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
20
|
+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
21
|
+
with:
|
|
22
|
+
node-version: ${{ matrix.node-version }}
|
|
23
|
+
cache: npm
|
|
24
|
+
- run: npm ci
|
|
25
|
+
- run: npm run build
|
|
26
|
+
- run: npm test
|
|
27
|
+
- name: Check version consistency
|
|
28
|
+
run: node scripts/check-version-consistency.mjs
|
|
29
|
+
- name: CLI smoke
|
|
30
|
+
run: |
|
|
31
|
+
node scripts/team-flow.mjs doctor
|
|
32
|
+
node scripts/team-flow.mjs --version
|
|
33
|
+
node scripts/team-flow.mjs config --get execution.inlineThreshold
|
|
34
|
+
- name: Token efficiency lint (warning only)
|
|
35
|
+
run: node scripts/lint/lint-skills.mjs --include token
|
|
36
|
+
continue-on-error: true
|
|
37
|
+
|
|
38
|
+
platform-install-smoke:
|
|
39
|
+
name: Platform Install Smoke (8 platforms)
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
if: "!startsWith(github.ref, 'refs/tags/')"
|
|
42
|
+
strategy:
|
|
43
|
+
matrix:
|
|
44
|
+
node-version: [20, 22]
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
47
|
+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
48
|
+
with:
|
|
49
|
+
node-version: ${{ matrix.node-version }}
|
|
50
|
+
- name: Smoke test all 8 platform installers (--local)
|
|
51
|
+
shell: bash
|
|
52
|
+
run: |
|
|
53
|
+
set -e
|
|
54
|
+
declare -A SKILLS=( [cline]=.cline/skills [kiro]=.kiro/skills [windsurf]=.windsurf/skills [qwen]=.qwen/skills [amazon-q]=.amazonq/skills [roocode]=.roo/skills [continue]=.continue/skills [pi]=.pi/skills )
|
|
55
|
+
declare -A RULES=( [cline]=.clinerules/phase-guard.md [kiro]=.kiro/steering/phase-guard.md [windsurf]=.windsurf/rules/phase-guard.md [qwen]=.qwen/rules/phase-guard.md [amazon-q]=.amazonq/rules/phase-guard.md [roocode]=.roo/rules/phase-guard.md [continue]=.continue/rules/phase-guard.md )
|
|
56
|
+
for id in cline kiro windsurf qwen amazon-q roocode continue pi; do
|
|
57
|
+
tmp="$(mktemp -d)"
|
|
58
|
+
( cd "$tmp" && node "$GITHUB_WORKSPACE/scripts/install-$id.mjs" --local "$GITHUB_WORKSPACE" > /dev/null )
|
|
59
|
+
[ -d "$tmp/${SKILLS[$id]}" ] || { echo "FAIL $id: skills dir missing"; exit 1; }
|
|
60
|
+
count="$(ls "$tmp/${SKILLS[$id]}" | wc -l | tr -d ' ')"
|
|
61
|
+
[ "$count" -ge 9 ] || { echo "FAIL $id: only $count skills (expected 9)"; exit 1; }
|
|
62
|
+
if [ -n "${RULES[$id]:-}" ]; then
|
|
63
|
+
[ -f "$tmp/${RULES[$id]}" ] || { echo "FAIL $id: phase-guard rule missing"; exit 1; }
|
|
64
|
+
fi
|
|
65
|
+
echo "OK $id — 9 skills, rule=${RULES[$id]:-none}"
|
|
66
|
+
done
|
|
67
|
+
echo "All 8 platform installers passed smoke test."
|
|
68
|
+
|
|
69
|
+
release:
|
|
70
|
+
name: Release
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
73
|
+
permissions:
|
|
74
|
+
contents: write
|
|
75
|
+
id-token: write
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
78
|
+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
79
|
+
with:
|
|
80
|
+
node-version: 22
|
|
81
|
+
registry-url: https://registry.npmjs.org
|
|
82
|
+
cache: npm
|
|
83
|
+
- run: npm ci
|
|
84
|
+
- run: npm run build
|
|
85
|
+
- run: npm test
|
|
86
|
+
- name: Check version consistency
|
|
87
|
+
run: node scripts/check-version-consistency.mjs
|
|
88
|
+
- name: Token efficiency lint (warning only)
|
|
89
|
+
run: node scripts/lint/lint-skills.mjs --include token
|
|
90
|
+
continue-on-error: true
|
|
91
|
+
- name: Create GitHub Release
|
|
92
|
+
env:
|
|
93
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
94
|
+
run: gh release create "$GITHUB_REF_NAME" --generate-notes
|
|
95
|
+
- name: Publish to npm
|
|
96
|
+
run: npm publish --provenance --access public
|
|
97
|
+
env:
|
|
98
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Plugin Scanner
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
scan:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
14
|
+
- uses: hashgraph-online/ai-plugin-scanner-action@c4737ed2f724bb612bd7df8c63f6835dd34181a3 # v1.2.392 / plugin-scanner 2.0.992 — pinned (last version under which main passed; @v1 auto-bumps). TODO: bump forward once shell-injection findings are cleaned up.
|
|
15
|
+
with:
|
|
16
|
+
plugin_dir: "."
|
|
17
|
+
fail_on_severity: high
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Installing team-flow for OpenCode
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
- [OpenCode.ai](https://opencode.ai) installed
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
### Plugin Mode (recommended)
|
|
10
|
+
|
|
11
|
+
Clone the repository and point OpenCode to the plugin entry:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/MageByte-Zero/team-flow.git ~/team-flow
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Then in your OpenCode project, reference this plugin file by absolute path in `.opencode/config.json` (or via the UI):
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
~/team-flow/.opencode/plugins/team-flow.js
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Do not copy only `team-flow.js` into another project; the plugin reads `../../skills` and `../../GEMINI.md` relative to its own location.
|
|
24
|
+
|
|
25
|
+
### Manual Skills Symlink
|
|
26
|
+
|
|
27
|
+
OpenCode discovers agent skills from project skill directories. For a specific project:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git clone https://github.com/MageByte-Zero/team-flow.git
|
|
31
|
+
mkdir -p your-project/.agents
|
|
32
|
+
ln -s /absolute/path/to/team-flow/skills your-project/.agents/skills
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If symlinks are not available, copy instead:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cp -R /absolute/path/to/team-flow/skills your-project/.agents/skills
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
Ask OpenCode to use the workflow entry skill:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
用 workflow-start 开始
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Or explicitly:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
/team-flow:workflow-start
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Troubleshooting
|
|
56
|
+
|
|
57
|
+
### Skills not found
|
|
58
|
+
|
|
59
|
+
1. Verify that `.agents/skills/workflow-start/SKILL.md` exists.
|
|
60
|
+
2. Restart OpenCode after adding or changing the skill directory.
|
|
61
|
+
3. Use a real directory copy instead of a symlink if your environment does not follow symlinks.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* team-flow plugin for OpenCode.ai
|
|
3
|
+
*
|
|
4
|
+
* Registers skills directory and injects workflow-start bootstrap context
|
|
5
|
+
* at session start, following the same pattern as Superpowers' OpenCode plugin.
|
|
6
|
+
*/
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import fs from 'fs';
|
|
9
|
+
import { fileURLToPath } from 'url';
|
|
10
|
+
|
|
11
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const skillsDir = path.resolve(__dirname, '../../skills');
|
|
13
|
+
|
|
14
|
+
// Module-level cache — read the bootstrap once per session
|
|
15
|
+
let _bootstrapCache = undefined;
|
|
16
|
+
|
|
17
|
+
const getBootstrapContent = () => {
|
|
18
|
+
if (_bootstrapCache !== undefined) return _bootstrapCache;
|
|
19
|
+
|
|
20
|
+
// Read GEMINI.md as the bootstrap context (shared across platforms)
|
|
21
|
+
const geminiMd = path.resolve(__dirname, '../../GEMINI.md');
|
|
22
|
+
if (!fs.existsSync(geminiMd)) {
|
|
23
|
+
_bootstrapCache = null;
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const content = fs.readFileSync(geminiMd, 'utf8');
|
|
28
|
+
|
|
29
|
+
_bootstrapCache = `<EXTREMELY_IMPORTANT>
|
|
30
|
+
You have team-flow installed.
|
|
31
|
+
|
|
32
|
+
${content}
|
|
33
|
+
|
|
34
|
+
**Tool Mapping for OpenCode:**
|
|
35
|
+
When skill instructions reference tools, substitute OpenCode equivalents:
|
|
36
|
+
- Read files → \`read\`
|
|
37
|
+
- Create, edit, or delete files → \`apply_patch\`
|
|
38
|
+
- Run shell commands → \`bash\`
|
|
39
|
+
- Search files → \`grep\`, \`glob\`
|
|
40
|
+
- Fetch a URL → \`webfetch\`
|
|
41
|
+
- Create or update todos → \`todowrite\`
|
|
42
|
+
</EXTREMELY_IMPORTANT>`;
|
|
43
|
+
|
|
44
|
+
return _bootstrapCache;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const SpecSuperflowPlugin = async (_opts) => {
|
|
48
|
+
return {
|
|
49
|
+
// Register skills directory so OpenCode discovers team-flow skills
|
|
50
|
+
config: async (config) => {
|
|
51
|
+
config.skills = config.skills || {};
|
|
52
|
+
config.skills.paths = config.skills.paths || [];
|
|
53
|
+
if (!config.skills.paths.includes(skillsDir)) {
|
|
54
|
+
config.skills.paths.push(skillsDir);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
// Inject bootstrap context into the first user message per session
|
|
59
|
+
'experimental.chat.messages.transform': async (_input, output) => {
|
|
60
|
+
const bootstrap = getBootstrapContent();
|
|
61
|
+
if (!bootstrap || !output.messages.length) return;
|
|
62
|
+
const firstUser = output.messages.find(m => m.info.role === 'user');
|
|
63
|
+
if (!firstUser || !firstUser.parts.length) return;
|
|
64
|
+
if (firstUser.parts.some(p => p.type === 'text' && p.text.includes('EXTREMELY_IMPORTANT'))) return;
|
|
65
|
+
|
|
66
|
+
const ref = firstUser.parts[0];
|
|
67
|
+
firstUser.parts.unshift({ ...ref, type: 'text', text: bootstrap });
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
};
|