create-yss-spec 1.1.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -2
- package/package.json +13 -2
- package/src/cli.js +367 -51
- package/template/.agents/skills/ask-matt/SKILL.md +8 -4
- package/template/.agents/skills/ask-matt/agents/openai.yaml +5 -0
- package/template/.agents/skills/code-review/SKILL.md +4 -4
- package/template/.agents/skills/code-review/agents/openai.yaml +3 -0
- package/template/.agents/skills/codebase-design/agents/openai.yaml +3 -0
- package/template/.agents/skills/competitive-intelligence/SKILL.md +5 -5
- package/template/.agents/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/template/.agents/skills/domain-modeling/agents/openai.yaml +3 -0
- package/template/.agents/skills/excalidraw-diagram-generator/SKILL.md +4 -4
- package/template/.agents/skills/grill-me/SKILL.md +7 -0
- package/template/.agents/skills/grill-me/agents/openai.yaml +5 -0
- package/template/.agents/skills/grill-with-docs/agents/openai.yaml +5 -0
- package/template/.agents/skills/grilling/SKILL.md +12 -0
- package/template/.agents/skills/grilling/agents/openai.yaml +3 -0
- package/template/.agents/skills/handoff/SKILL.md +16 -0
- package/template/.agents/skills/handoff/agents/openai.yaml +5 -0
- package/template/.agents/skills/high-fidelity-html-prototype/SKILL.md +6 -6
- package/template/.agents/skills/high-fidelity-html-prototype/agents/openai.yaml +5 -0
- package/template/.agents/skills/implement/SKILL.md +2 -2
- package/template/.agents/skills/implement/agents/openai.yaml +5 -0
- package/template/.agents/skills/improve-codebase-architecture/SKILL.md +6 -1
- package/template/.agents/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/template/.agents/skills/lombok/SKILL.md +345 -0
- package/template/.agents/skills/mapstruct/SKILL.md +328 -0
- package/template/.agents/skills/prototype/LOGIC.md +3 -3
- package/template/.agents/skills/prototype/SKILL.md +2 -6
- package/template/.agents/skills/prototype/UI.md +4 -4
- package/template/.agents/skills/prototype/agents/openai.yaml +3 -0
- package/template/.agents/skills/research/agents/openai.yaml +3 -0
- package/template/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +21 -32
- package/template/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
- package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
- package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
- package/template/.agents/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
- package/template/.agents/skills/tdd/agents/openai.yaml +3 -0
- package/template/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/template/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/template/.agents/skills/teach/MISSION-FORMAT.md +31 -0
- package/template/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/template/.agents/skills/teach/SKILL.md +140 -0
- package/template/.agents/skills/teach/agents/openai.yaml +5 -0
- package/template/.agents/skills/to-spec/SKILL.md +58 -0
- package/template/.agents/skills/to-spec/agents/openai.yaml +5 -0
- package/template/.agents/skills/to-tickets/SKILL.md +62 -0
- package/template/.agents/skills/to-tickets/agents/openai.yaml +5 -0
- package/template/.agents/skills/triage/SKILL.md +4 -4
- package/template/.agents/skills/triage/agents/openai.yaml +5 -0
- package/template/.agents/skills/wayfinder/SKILL.md +128 -0
- package/template/.agents/skills/wayfinder/agents/openai.yaml +5 -0
- package/template/.agents/skills/web-design-engineer/SKILL.md +2 -2
- package/template/.agents/skills/writing-great-skills/GLOSSARY.md +201 -0
- package/template/.agents/skills/writing-great-skills/SKILL.md +83 -0
- package/template/.agents/skills/writing-great-skills/agents/openai.yaml +5 -0
- package/template/.agents/skills/yss-cache/SKILL.md +44 -0
- package/template/.agents/skills/yss-cache/agents/openai.yaml +5 -0
- package/template/.agents/skills/yss-cache/references/annotations.md +39 -0
- package/template/.agents/skills/yss-cache/references/architecture.md +25 -0
- package/template/.agents/skills/yss-cache/references/configuration.md +34 -0
- package/template/.agents/skills/yss-cache/references/redis-fallback.md +23 -0
- package/template/.agents/skills/yss-cache/references/redis-topology.md +62 -0
- package/template/.agents/skills/yss-cache/references/serialization.md +17 -0
- package/template/.agents/skills/yss-cache/references/source-index.md +64 -0
- package/template/.agents/skills/yss-cache/references/troubleshooting.md +33 -0
- package/template/.agents/skills/yss-cache/references/verification.md +34 -0
- package/template/.agents/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
- package/template/.agents/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
- package/template/.agents/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
- package/template/.claude/skills/ask-matt/SKILL.md +8 -4
- package/template/.claude/skills/ask-matt/agents/openai.yaml +5 -0
- package/template/.claude/skills/code-review/SKILL.md +4 -4
- package/template/.claude/skills/code-review/agents/openai.yaml +3 -0
- package/template/.claude/skills/codebase-design/agents/openai.yaml +3 -0
- package/template/.claude/skills/competitive-intelligence/SKILL.md +5 -5
- package/template/.claude/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/template/.claude/skills/domain-modeling/agents/openai.yaml +3 -0
- package/template/.claude/skills/excalidraw-diagram-generator/SKILL.md +37 -16
- package/template/.claude/skills/excalidraw-diagram-generator/scripts/add-arrow.py +18 -18
- package/template/.claude/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +46 -47
- package/template/.claude/skills/grill-me/SKILL.md +7 -0
- package/template/.claude/skills/grill-me/agents/openai.yaml +5 -0
- package/template/.claude/skills/grill-with-docs/agents/openai.yaml +5 -0
- package/template/.claude/skills/grilling/SKILL.md +12 -0
- package/template/.claude/skills/grilling/agents/openai.yaml +3 -0
- package/template/.claude/skills/handoff/SKILL.md +16 -0
- package/template/.claude/skills/handoff/agents/openai.yaml +5 -0
- package/template/.claude/skills/implement/SKILL.md +2 -2
- package/template/.claude/skills/implement/agents/openai.yaml +5 -0
- package/template/.claude/skills/improve-codebase-architecture/SKILL.md +6 -1
- package/template/.claude/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/template/.claude/skills/prototype/LOGIC.md +3 -3
- package/template/.claude/skills/prototype/SKILL.md +2 -6
- package/template/.claude/skills/prototype/UI.md +4 -4
- package/template/.claude/skills/prototype/agents/openai.yaml +3 -0
- package/template/.claude/skills/research/agents/openai.yaml +3 -0
- package/template/.claude/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/template/.claude/skills/setup-matt-pocock-skills/SKILL.md +21 -32
- package/template/.claude/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/template/.claude/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
- package/template/.claude/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
- package/template/.claude/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
- package/template/.claude/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
- package/template/.claude/skills/tdd/agents/openai.yaml +3 -0
- package/template/.claude/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/template/.claude/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/template/.claude/skills/teach/MISSION-FORMAT.md +31 -0
- package/template/.claude/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/template/.claude/skills/teach/SKILL.md +140 -0
- package/template/.claude/skills/teach/agents/openai.yaml +5 -0
- package/template/.claude/skills/to-spec/SKILL.md +58 -0
- package/template/.claude/skills/to-spec/agents/openai.yaml +5 -0
- package/template/.claude/skills/to-tickets/SKILL.md +62 -0
- package/template/.claude/skills/to-tickets/agents/openai.yaml +5 -0
- package/template/.claude/skills/triage/SKILL.md +4 -4
- package/template/.claude/skills/triage/agents/openai.yaml +5 -0
- package/template/.claude/skills/wayfinder/SKILL.md +128 -0
- package/template/.claude/skills/wayfinder/agents/openai.yaml +5 -0
- package/template/.claude/skills/web-design-engineer/SKILL.md +2 -2
- package/template/.claude/skills/writing-great-skills/GLOSSARY.md +201 -0
- package/template/.claude/skills/writing-great-skills/SKILL.md +83 -0
- package/template/.claude/skills/writing-great-skills/agents/openai.yaml +5 -0
- package/template/.claude/skills/yss-cache/SKILL.md +44 -0
- package/template/.claude/skills/yss-cache/agents/openai.yaml +5 -0
- package/template/.claude/skills/yss-cache/references/annotations.md +39 -0
- package/template/.claude/skills/yss-cache/references/architecture.md +25 -0
- package/template/.claude/skills/yss-cache/references/configuration.md +34 -0
- package/template/.claude/skills/yss-cache/references/redis-fallback.md +23 -0
- package/template/.claude/skills/yss-cache/references/redis-topology.md +62 -0
- package/template/.claude/skills/yss-cache/references/serialization.md +17 -0
- package/template/.claude/skills/yss-cache/references/source-index.md +64 -0
- package/template/.claude/skills/yss-cache/references/troubleshooting.md +33 -0
- package/template/.claude/skills/yss-cache/references/verification.md +34 -0
- package/template/.claude/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
- package/template/.claude/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
- package/template/.claude/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
- package/template/.codex/config.toml +3 -0
- package/template/.codex/skills/ask-matt/SKILL.md +8 -4
- package/template/.codex/skills/ask-matt/agents/openai.yaml +5 -0
- package/template/.codex/skills/code-review/SKILL.md +4 -4
- package/template/.codex/skills/code-review/agents/openai.yaml +3 -0
- package/template/.codex/skills/code-review-process/references/automation-and-standards.md +1 -1
- package/template/.codex/skills/codebase-design/agents/openai.yaml +3 -0
- package/template/.codex/skills/competitive-intelligence/SKILL.md +5 -5
- package/template/.codex/skills/cross-repo-implementation-routing/SKILL.md +2 -2
- package/template/.codex/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/template/.codex/skills/domain-modeling/agents/openai.yaml +3 -0
- package/template/.codex/skills/grill-with-docs/agents/openai.yaml +5 -0
- package/template/.codex/skills/handoff/SKILL.md +16 -0
- package/template/.codex/skills/handoff/agents/openai.yaml +5 -0
- package/template/.codex/skills/high-fidelity-html-prototype/SKILL.md +6 -6
- package/template/.codex/skills/implement/SKILL.md +2 -2
- package/template/.codex/skills/implement/agents/openai.yaml +5 -0
- package/template/.codex/skills/improve-codebase-architecture/SKILL.md +6 -1
- package/template/.codex/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/template/.codex/skills/product-design-prototype/SKILL.md +14 -10
- package/template/.codex/skills/product-design-prototype/agents/openai.yaml +1 -1
- package/template/.codex/skills/prototype/LOGIC.md +3 -3
- package/template/.codex/skills/prototype/SKILL.md +2 -6
- package/template/.codex/skills/prototype/UI.md +4 -4
- package/template/.codex/skills/prototype/agents/openai.yaml +3 -0
- package/template/.codex/skills/prototype-review/SKILL.md +6 -6
- package/template/.codex/skills/prototype-review/agents/openai.yaml +2 -2
- package/template/.codex/skills/research/agents/openai.yaml +3 -0
- package/template/.codex/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +21 -32
- package/template/.codex/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/template/.codex/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
- package/template/.codex/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
- package/template/.codex/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
- package/template/.codex/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
- package/template/.codex/skills/tdd/agents/openai.yaml +3 -0
- package/template/.codex/skills/to-spec/SKILL.md +58 -0
- package/template/.codex/skills/to-spec/agents/openai.yaml +5 -0
- package/template/.codex/skills/to-tickets/SKILL.md +62 -0
- package/template/.codex/skills/to-tickets/agents/openai.yaml +5 -0
- package/template/.codex/skills/triage/SKILL.md +4 -4
- package/template/.codex/skills/triage/agents/openai.yaml +5 -0
- package/template/.codex/skills/wayfinder/SKILL.md +128 -0
- package/template/.codex/skills/wayfinder/agents/openai.yaml +5 -0
- package/template/.codex/skills/writing-great-skills/GLOSSARY.md +201 -0
- package/template/.codex/skills/writing-great-skills/SKILL.md +83 -0
- package/template/.codex/skills/writing-great-skills/agents/openai.yaml +5 -0
- package/template/.codex/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.codex/skills/yss-cache/SKILL.md +29 -58
- package/template/.codex/skills/yss-cache/agents/openai.yaml +2 -2
- package/template/.codex/skills/yss-cache/references/annotations.md +39 -0
- package/template/.codex/skills/yss-cache/references/architecture.md +25 -0
- package/template/.codex/skills/yss-cache/references/configuration.md +34 -0
- package/template/.codex/skills/yss-cache/references/redis-fallback.md +23 -0
- package/template/.codex/skills/yss-cache/references/redis-topology.md +62 -0
- package/template/.codex/skills/yss-cache/references/serialization.md +17 -0
- package/template/.codex/skills/yss-cache/references/source-index.md +1 -1
- package/template/.codex/skills/yss-cache/references/troubleshooting.md +33 -0
- package/template/.codex/skills/yss-cache/references/verification.md +34 -0
- package/template/.codex/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
- package/template/.codex/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
- package/template/.codex/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +1 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -2
- package/template/.codex/skills/yss-design-system/SKILL.md +9 -2
- package/template/.codex/skills/yss-design-system/references/design-system.md +12 -0
- package/template/.codex/skills/yss-domain-modeling/SKILL.md +3 -3
- package/template/.codex/skills/yss-domain-modeling/agents/openai.yaml +1 -1
- package/template/.codex/skills/yss-domain-modeling/references/modeling-workflow.md +2 -2
- package/template/.codex/skills/yss-filerunner/SKILL.md +1 -1
- package/template/.codex/skills/yss-openapi/SKILL.md +35 -47
- package/template/.codex/skills/yss-openapi/img.png +0 -0
- package/template/.codex/skills/yss-openapi/img_1.png +0 -0
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +3 -3
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +4 -4
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +57 -34
- package/template/.codex/skills/yss-product-lifecycle/references/artifact-checklist.md +23 -21
- package/template/.codex/skills/yss-product-lifecycle/references/stage-routing.md +15 -15
- package/template/.codex/skills/yss-product-lifecycle/references/yss-skill-routing.md +13 -8
- package/template/.codex/skills/yss-repository/SKILL.md +11 -3
- package/template/.codex/skills/yss-router/SKILL.md +2 -3
- package/template/.codex/skills/yss-router/references/boundaries.md +0 -1
- package/template/.codex/skills/yss-source-index/references/source-map-config.md +0 -1
- package/template/.codex/skills/yss-source-index/scripts/refresh-yss-skill-index.py +0 -3
- package/template/.codex/skills/yss-web-controller/SKILL.md +9 -3
- package/template/.hermes/skills/ask-matt/SKILL.md +8 -4
- package/template/.hermes/skills/ask-matt/agents/openai.yaml +5 -0
- package/template/.hermes/skills/code-review/SKILL.md +4 -4
- package/template/.hermes/skills/code-review/agents/openai.yaml +3 -0
- package/template/.hermes/skills/codebase-design/agents/openai.yaml +3 -0
- package/template/.hermes/skills/competitive-intelligence/SKILL.md +5 -5
- package/template/.hermes/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/template/.hermes/skills/domain-modeling/agents/openai.yaml +3 -0
- package/template/.hermes/skills/excalidraw-diagram-generator/SKILL.md +37 -16
- package/template/.hermes/skills/excalidraw-diagram-generator/scripts/add-arrow.py +18 -18
- package/template/.hermes/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +46 -47
- package/template/.hermes/skills/grill-me/SKILL.md +7 -0
- package/template/.hermes/skills/grill-me/agents/openai.yaml +5 -0
- package/template/.hermes/skills/grill-with-docs/agents/openai.yaml +5 -0
- package/template/.hermes/skills/grilling/SKILL.md +12 -0
- package/template/.hermes/skills/grilling/agents/openai.yaml +3 -0
- package/template/.hermes/skills/handoff/SKILL.md +16 -0
- package/template/.hermes/skills/handoff/agents/openai.yaml +5 -0
- package/template/.hermes/skills/implement/SKILL.md +2 -2
- package/template/.hermes/skills/implement/agents/openai.yaml +5 -0
- package/template/.hermes/skills/improve-codebase-architecture/SKILL.md +6 -1
- package/template/.hermes/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/template/.hermes/skills/prototype/LOGIC.md +3 -3
- package/template/.hermes/skills/prototype/SKILL.md +2 -6
- package/template/.hermes/skills/prototype/UI.md +4 -4
- package/template/.hermes/skills/prototype/agents/openai.yaml +3 -0
- package/template/.hermes/skills/research/agents/openai.yaml +3 -0
- package/template/.hermes/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/template/.hermes/skills/setup-matt-pocock-skills/SKILL.md +21 -32
- package/template/.hermes/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/template/.hermes/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
- package/template/.hermes/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
- package/template/.hermes/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
- package/template/.hermes/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
- package/template/.hermes/skills/tdd/agents/openai.yaml +3 -0
- package/template/.hermes/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/template/.hermes/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/template/.hermes/skills/teach/MISSION-FORMAT.md +31 -0
- package/template/.hermes/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/template/.hermes/skills/teach/SKILL.md +140 -0
- package/template/.hermes/skills/teach/agents/openai.yaml +5 -0
- package/template/.hermes/skills/to-spec/SKILL.md +58 -0
- package/template/.hermes/skills/to-spec/agents/openai.yaml +5 -0
- package/template/.hermes/skills/to-tickets/SKILL.md +62 -0
- package/template/.hermes/skills/to-tickets/agents/openai.yaml +5 -0
- package/template/.hermes/skills/triage/SKILL.md +4 -4
- package/template/.hermes/skills/triage/agents/openai.yaml +5 -0
- package/template/.hermes/skills/wayfinder/SKILL.md +128 -0
- package/template/.hermes/skills/wayfinder/agents/openai.yaml +5 -0
- package/template/.hermes/skills/web-design-engineer/SKILL.md +2 -2
- package/template/.hermes/skills/writing-great-skills/GLOSSARY.md +201 -0
- package/template/.hermes/skills/writing-great-skills/SKILL.md +83 -0
- package/template/.hermes/skills/writing-great-skills/agents/openai.yaml +5 -0
- package/template/.hermes/skills/yss-cache/SKILL.md +44 -0
- package/template/.hermes/skills/yss-cache/agents/openai.yaml +5 -0
- package/template/.hermes/skills/yss-cache/references/annotations.md +39 -0
- package/template/.hermes/skills/yss-cache/references/architecture.md +25 -0
- package/template/.hermes/skills/yss-cache/references/configuration.md +34 -0
- package/template/.hermes/skills/yss-cache/references/redis-fallback.md +23 -0
- package/template/.hermes/skills/yss-cache/references/redis-topology.md +62 -0
- package/template/.hermes/skills/yss-cache/references/serialization.md +17 -0
- package/template/.hermes/skills/yss-cache/references/source-index.md +64 -0
- package/template/.hermes/skills/yss-cache/references/troubleshooting.md +33 -0
- package/template/.hermes/skills/yss-cache/references/verification.md +34 -0
- package/template/.hermes/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
- package/template/.hermes/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
- package/template/.hermes/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
- package/template/.obsidian/app.json +3 -0
- package/template/.obsidian/appearance.json +5 -0
- package/template/.obsidian/community-plugins.json +4 -0
- package/template/.obsidian/core-plugins.json +33 -0
- package/template/.obsidian/graph.json +22 -0
- package/template/.obsidian/plugins/obsidian-excalidraw-plugin/data.json +1085 -0
- package/template/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +30 -0
- package/template/.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json +12 -0
- package/template/.obsidian/plugins/obsidian-excalidraw-plugin/styles.css +1 -0
- package/template/.obsidian/plugins/obsidian-git/main.js +415 -0
- package/template/.obsidian/plugins/obsidian-git/manifest.json +10 -0
- package/template/.obsidian/plugins/obsidian-git/styles.css +705 -0
- package/template/.obsidian/workspace.json +222 -0
- package/template/.pi/skills/ask-matt/SKILL.md +8 -4
- package/template/.pi/skills/ask-matt/agents/openai.yaml +5 -0
- package/template/.pi/skills/code-review/SKILL.md +4 -4
- package/template/.pi/skills/code-review/agents/openai.yaml +3 -0
- package/template/.pi/skills/codebase-design/agents/openai.yaml +3 -0
- package/template/.pi/skills/competitive-intelligence/SKILL.md +5 -5
- package/template/.pi/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/template/.pi/skills/domain-modeling/agents/openai.yaml +3 -0
- package/template/.pi/skills/excalidraw-diagram-generator/SKILL.md +37 -16
- package/template/.pi/skills/excalidraw-diagram-generator/scripts/add-arrow.py +18 -18
- package/template/.pi/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +46 -47
- package/template/.pi/skills/grill-me/SKILL.md +7 -0
- package/template/.pi/skills/grill-me/agents/openai.yaml +5 -0
- package/template/.pi/skills/grill-with-docs/agents/openai.yaml +5 -0
- package/template/.pi/skills/grilling/SKILL.md +12 -0
- package/template/.pi/skills/grilling/agents/openai.yaml +3 -0
- package/template/.pi/skills/handoff/SKILL.md +16 -0
- package/template/.pi/skills/handoff/agents/openai.yaml +5 -0
- package/template/.pi/skills/implement/SKILL.md +2 -2
- package/template/.pi/skills/implement/agents/openai.yaml +5 -0
- package/template/.pi/skills/improve-codebase-architecture/SKILL.md +6 -1
- package/template/.pi/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/template/.pi/skills/prototype/LOGIC.md +3 -3
- package/template/.pi/skills/prototype/SKILL.md +2 -6
- package/template/.pi/skills/prototype/UI.md +4 -4
- package/template/.pi/skills/prototype/agents/openai.yaml +3 -0
- package/template/.pi/skills/research/agents/openai.yaml +3 -0
- package/template/.pi/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +21 -32
- package/template/.pi/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/template/.pi/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
- package/template/.pi/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
- package/template/.pi/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
- package/template/.pi/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
- package/template/.pi/skills/tdd/agents/openai.yaml +3 -0
- package/template/.pi/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/template/.pi/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/template/.pi/skills/teach/MISSION-FORMAT.md +31 -0
- package/template/.pi/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/template/.pi/skills/teach/SKILL.md +140 -0
- package/template/.pi/skills/teach/agents/openai.yaml +5 -0
- package/template/.pi/skills/to-spec/SKILL.md +58 -0
- package/template/.pi/skills/to-spec/agents/openai.yaml +5 -0
- package/template/.pi/skills/to-tickets/SKILL.md +62 -0
- package/template/.pi/skills/to-tickets/agents/openai.yaml +5 -0
- package/template/.pi/skills/triage/SKILL.md +4 -4
- package/template/.pi/skills/triage/agents/openai.yaml +5 -0
- package/template/.pi/skills/wayfinder/SKILL.md +128 -0
- package/template/.pi/skills/wayfinder/agents/openai.yaml +5 -0
- package/template/.pi/skills/web-design-engineer/SKILL.md +2 -2
- package/template/.pi/skills/writing-great-skills/GLOSSARY.md +201 -0
- package/template/.pi/skills/writing-great-skills/SKILL.md +83 -0
- package/template/.pi/skills/writing-great-skills/agents/openai.yaml +5 -0
- package/template/.pi/skills/yss-cache/SKILL.md +44 -0
- package/template/.pi/skills/yss-cache/agents/openai.yaml +5 -0
- package/template/.pi/skills/yss-cache/references/annotations.md +39 -0
- package/template/.pi/skills/yss-cache/references/architecture.md +25 -0
- package/template/.pi/skills/yss-cache/references/configuration.md +34 -0
- package/template/.pi/skills/yss-cache/references/redis-fallback.md +23 -0
- package/template/.pi/skills/yss-cache/references/redis-topology.md +62 -0
- package/template/.pi/skills/yss-cache/references/serialization.md +17 -0
- package/template/.pi/skills/yss-cache/references/source-index.md +64 -0
- package/template/.pi/skills/yss-cache/references/troubleshooting.md +33 -0
- package/template/.pi/skills/yss-cache/references/verification.md +34 -0
- package/template/.pi/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
- package/template/.pi/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
- package/template/.pi/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
- package/template/.trae/skills/ask-matt/SKILL.md +8 -4
- package/template/.trae/skills/ask-matt/agents/openai.yaml +5 -0
- package/template/.trae/skills/code-review/SKILL.md +4 -4
- package/template/.trae/skills/code-review/agents/openai.yaml +3 -0
- package/template/.trae/skills/codebase-design/agents/openai.yaml +3 -0
- package/template/.trae/skills/competitive-intelligence/SKILL.md +5 -5
- package/template/.trae/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/template/.trae/skills/domain-modeling/agents/openai.yaml +3 -0
- package/template/.trae/skills/excalidraw-diagram-generator/SKILL.md +37 -16
- package/template/.trae/skills/excalidraw-diagram-generator/scripts/add-arrow.py +18 -18
- package/template/.trae/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +46 -47
- package/template/.trae/skills/grill-me/SKILL.md +7 -0
- package/template/.trae/skills/grill-me/agents/openai.yaml +5 -0
- package/template/.trae/skills/grill-with-docs/agents/openai.yaml +5 -0
- package/template/.trae/skills/grilling/SKILL.md +12 -0
- package/template/.trae/skills/grilling/agents/openai.yaml +3 -0
- package/template/.trae/skills/handoff/SKILL.md +16 -0
- package/template/.trae/skills/handoff/agents/openai.yaml +5 -0
- package/template/.trae/skills/implement/SKILL.md +2 -2
- package/template/.trae/skills/implement/agents/openai.yaml +5 -0
- package/template/.trae/skills/improve-codebase-architecture/SKILL.md +6 -1
- package/template/.trae/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/template/.trae/skills/prototype/LOGIC.md +3 -3
- package/template/.trae/skills/prototype/SKILL.md +2 -6
- package/template/.trae/skills/prototype/UI.md +4 -4
- package/template/.trae/skills/prototype/agents/openai.yaml +3 -0
- package/template/.trae/skills/research/agents/openai.yaml +3 -0
- package/template/.trae/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
- package/template/.trae/skills/setup-matt-pocock-skills/SKILL.md +21 -32
- package/template/.trae/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
- package/template/.trae/skills/setup-matt-pocock-skills/issue-tracker-github.md +2 -2
- package/template/.trae/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +2 -2
- package/template/.trae/skills/setup-matt-pocock-skills/issue-tracker-local.md +6 -6
- package/template/.trae/skills/setup-matt-pocock-skills/triage-labels.md +2 -2
- package/template/.trae/skills/tdd/agents/openai.yaml +3 -0
- package/template/.trae/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/template/.trae/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/template/.trae/skills/teach/MISSION-FORMAT.md +31 -0
- package/template/.trae/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/template/.trae/skills/teach/SKILL.md +140 -0
- package/template/.trae/skills/teach/agents/openai.yaml +5 -0
- package/template/.trae/skills/to-spec/SKILL.md +58 -0
- package/template/.trae/skills/to-spec/agents/openai.yaml +5 -0
- package/template/.trae/skills/to-tickets/SKILL.md +62 -0
- package/template/.trae/skills/to-tickets/agents/openai.yaml +5 -0
- package/template/.trae/skills/triage/SKILL.md +4 -4
- package/template/.trae/skills/triage/agents/openai.yaml +5 -0
- package/template/.trae/skills/wayfinder/SKILL.md +128 -0
- package/template/.trae/skills/wayfinder/agents/openai.yaml +5 -0
- package/template/.trae/skills/web-design-engineer/SKILL.md +2 -2
- package/template/.trae/skills/writing-great-skills/GLOSSARY.md +201 -0
- package/template/.trae/skills/writing-great-skills/SKILL.md +83 -0
- package/template/.trae/skills/writing-great-skills/agents/openai.yaml +5 -0
- package/template/.trae/skills/yss-cache/SKILL.md +44 -0
- package/template/.trae/skills/yss-cache/agents/openai.yaml +5 -0
- package/template/.trae/skills/yss-cache/references/annotations.md +39 -0
- package/template/.trae/skills/yss-cache/references/architecture.md +25 -0
- package/template/.trae/skills/yss-cache/references/configuration.md +34 -0
- package/template/.trae/skills/yss-cache/references/redis-fallback.md +23 -0
- package/template/.trae/skills/yss-cache/references/redis-topology.md +62 -0
- package/template/.trae/skills/yss-cache/references/serialization.md +17 -0
- package/template/.trae/skills/yss-cache/references/source-index.md +64 -0
- package/template/.trae/skills/yss-cache/references/troubleshooting.md +33 -0
- package/template/.trae/skills/yss-cache/references/verification.md +34 -0
- package/template/.trae/skills/yss-cache/scripts/check-skill-freshness.sh +84 -0
- package/template/.trae/skills/yss-cache/scripts/inspect-cache-usage.sh +96 -0
- package/template/.trae/skills/yss-cache/scripts/verify-cache-component.sh +101 -0
- package/template/AGENTS.md +89 -250
- package/template/CONTEXT.md +24 -11
- package/template/README.md +31 -45
- package/template/docs/adr/{adr-product-design-prototype-entrypoint.md → 0001-product-design-prototype-entrypoint.md} +3 -3
- package/template/docs/adr/0002-yss-project-repository-mode.md +3 -0
- package/template/docs/agents/README.md +4 -5
- package/template/docs/agents/domain.md +13 -15
- package/template/docs/agents/gitlab-workflow-skills.md +5 -5
- package/template/docs/agents/issue-tracker.md +15 -14
- package/template/docs/agents/skills-maintenance.md +44 -109
- package/template/docs/agents/triage-labels.md +10 -12
- package/template/docs/api/templates/openapi-draft-review-checklist.md +4 -4
- package/template/docs/api/templates/openapi-freeze-record-template.md +5 -5
- package/template/docs/architecture/README.md +4 -4
- package/template/docs/architecture/templates/architecture-review-checklist.md +4 -4
- package/template/docs/architecture/templates/business-architecture-template.md +7 -7
- package/template/docs/architecture/templates/data-architecture-template.md +4 -4
- package/template/docs/architecture/templates/engineering-baseline-review-template.md +4 -3
- package/template/docs/architecture/templates/functional-architecture-template.md +7 -7
- package/template/docs/architecture/templates/system-overview-design-template.md +5 -6
- package/template/docs/architecture/templates/tech-design-template.md +2 -2
- package/template/docs/design/README.md +8 -8
- package/template/docs/design/design.md +10 -1
- package/template/docs/design/diagrams/README.md +1 -1
- package/template/docs/design/templates/interaction-spec-template.md +6 -6
- package/template/docs/design/templates/product-overview-design-template.md +8 -8
- package/template/docs/design/templates/prototype-confirmation-template.md +4 -4
- package/template/docs/design/templates/prototype-review-checklist.md +5 -5
- package/template/docs/design/templates/state-matrix-template.md +1 -1
- package/template/docs/discovery/IDEATION.md +2 -2
- package/template/docs/discovery/README.md +4 -4
- package/template/docs/discovery/templates/competitive-analysis-template.md +4 -4
- package/template/docs/discovery/templates/discovery-template.md +8 -8
- package/template/docs/implementation/create-yss-spec-repository-mode-contract.md +59 -0
- package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +49 -30
- package/template/docs/process/harness-automation-candidates.md +10 -13
- package/template/docs/process/harness-executive-blueprint.md +11 -11
- package/template/docs/process/harness-optimization-backlog.md +6 -6
- package/template/docs/process/harness-pilot-retro-metrics.md +8 -8
- package/template/docs/process/harness-pilot-selection.md +8 -8
- package/template/docs/process/harness-process-tailoring.md +35 -16
- package/template/docs/process/harness-work-unit-map.md +9 -9
- package/template/docs/process/implementation-repo-integration.md +25 -11
- package/template/docs/process/lifecycle-artifact-map.md +66 -40
- package/template/docs/process/product-prototype-workflow.md +10 -10
- package/template/docs/process/skill-governance.md +12 -4
- package/template/docs/process/subagent-collaboration-validation.md +53 -0
- package/template/docs/process/subagent-collaboration.md +111 -0
- package/template/docs/process/template-governance-grilling-record.md +38 -0
- package/template/docs/process/template-governance-skill-validation.md +44 -0
- package/template/docs/process/templates/stage-checkpoint-template.md +42 -7
- package/template/docs/releases/next-major-template-governance.md +32 -0
- package/template/docs/requirements/README.md +11 -11
- package/template/docs/{adr/template.md → templates/adr-template.md} +2 -2
- package/template/docs/templates/agent-brief-template.md +5 -5
- package/template/docs/templates/build-architecture-checklist-template.md +41 -11
- package/template/docs/templates/implementation-repo-registry-template.md +8 -3
- package/template/docs/templates/implementation-routing-template.md +85 -19
- package/template/docs/templates/requirement-freeze-template.md +8 -8
- package/template/docs/templates/review-report-template.md +50 -0
- package/template/docs/templates/spec-delta-template.md +5 -5
- package/template/docs/templates/{prd-template.md → spec-template.md} +19 -9
- package/template/docs/templates/subagent-task-package-template.md +93 -0
- package/template/docs/templates/verification-record-template.md +2 -2
- package/template/docs/templates/vertical-slice-ticket-template.md +88 -0
- package/template/docs/user-guide/README.md +2 -2
- package/template/docs/user-guide/create-yss-spec-cli-guide.md +27 -209
- package/template/docs/user-guide/excalidraw-diagram-generator-guide.md +8 -8
- package/template/docs/user-guide/grill-with-docs-best-practices.md +16 -16
- package/template/docs/user-guide/grill-with-docs-guide.md +19 -19
- package/template/docs/user-guide/lifecycle-best-practices.md +40 -40
- package/template/docs/user-guide/product-lifecycle-workflow.md +31 -31
- package/template/docs/user-guide/product-rd-lifecycle-best-practices.md +121 -121
- package/template/docs/user-guide/spec-ticket-migration-guide.md +35 -0
- package/template/scripts/sync-skills +126 -0
- package/template/scripts/update-skill-lock +202 -0
- package/template/scripts/verify-lifecycle-scenarios +136 -0
- package/template/scripts/verify-template +148 -155
- package/template/skills-lock.json +1068 -65
- package/template/yss-project.yaml +2 -0
- package/template.manifest.json +3 -16
- package/template/.agent/skills/ask-matt/SKILL.md +0 -74
- package/template/.agent/skills/code-review/SKILL.md +0 -89
- package/template/.agent/skills/codebase-design/DEEPENING.md +0 -37
- package/template/.agent/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
- package/template/.agent/skills/codebase-design/SKILL.md +0 -114
- package/template/.agent/skills/competitive-intelligence/SKILL.md +0 -94
- package/template/.agent/skills/diagnosing-bugs/SKILL.md +0 -134
- package/template/.agent/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -41
- package/template/.agent/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/template/.agent/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/template/.agent/skills/domain-modeling/SKILL.md +0 -74
- package/template/.agent/skills/grill-with-docs/SKILL.md +0 -7
- package/template/.agent/skills/implement/SKILL.md +0 -15
- package/template/.agent/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
- package/template/.agent/skills/improve-codebase-architecture/SKILL.md +0 -66
- package/template/.agent/skills/prototype/LOGIC.md +0 -79
- package/template/.agent/skills/prototype/SKILL.md +0 -30
- package/template/.agent/skills/prototype/UI.md +0 -112
- package/template/.agent/skills/research/SKILL.md +0 -12
- package/template/.agent/skills/resolving-merge-conflicts/SKILL.md +0 -14
- package/template/.agent/skills/setup-matt-pocock-skills/SKILL.md +0 -127
- package/template/.agent/skills/setup-matt-pocock-skills/domain.md +0 -51
- package/template/.agent/skills/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
- package/template/.agent/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
- package/template/.agent/skills/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
- package/template/.agent/skills/setup-matt-pocock-skills/triage-labels.md +0 -15
- package/template/.agent/skills/tdd/SKILL.md +0 -36
- package/template/.agent/skills/tdd/mocking.md +0 -59
- package/template/.agent/skills/tdd/tests.md +0 -77
- package/template/.agent/skills/to-issues/SKILL.md +0 -84
- package/template/.agent/skills/to-prd/SKILL.md +0 -75
- package/template/.agent/skills/triage/AGENT-BRIEF.md +0 -207
- package/template/.agent/skills/triage/OUT-OF-SCOPE.md +0 -105
- package/template/.agent/skills/triage/SKILL.md +0 -112
- package/template/.agents/skills/to-issues/SKILL.md +0 -84
- package/template/.agents/skills/to-prd/SKILL.md +0 -75
- package/template/.claude/skills/to-issues/SKILL.md +0 -84
- package/template/.claude/skills/to-prd/SKILL.md +0 -75
- package/template/.codex/skills/to-issues/SKILL.md +0 -84
- package/template/.codex/skills/to-prd/SKILL.md +0 -75
- package/template/.codex/skills/yss-anti-scheduler/SKILL.md +0 -53
- package/template/.codex/skills/yss-anti-scheduler/agents/openai.yaml +0 -4
- package/template/.codex/skills/yss-anti-scheduler/references/source-index.md +0 -157
- package/template/.codex/skills/yss-cache/assets/ClearCache.java +0 -34
- package/template/.codex/skills/yss-cache/assets/QueryCache.java +0 -36
- package/template/.codex/skills/yss-cache/assets/UpdateCache.java +0 -34
- package/template/.codex/skills/yss-cache/references/README.md +0 -5
- package/template/.hermes/skills/to-issues/SKILL.md +0 -84
- package/template/.hermes/skills/to-prd/SKILL.md +0 -75
- package/template/.pi/skills/to-issues/SKILL.md +0 -84
- package/template/.pi/skills/to-prd/SKILL.md +0 -75
- package/template/.trae/skills/to-issues/SKILL.md +0 -84
- package/template/.trae/skills/to-prd/SKILL.md +0 -75
- package/template/docs/templates/vertical-slice-issue-template.md +0 -61
- /package/template/docs/requirements/{issues → tickets}/.gitkeep +0 -0
package/README.md
CHANGED
|
@@ -27,6 +27,10 @@ npx create-yss-spec@latest
|
|
|
27
27
|
- `sync` 子命令
|
|
28
28
|
- 基于 `.yss-template.json` 的模板版本基线
|
|
29
29
|
- 已有模板实例仓库的受管模板资产同步
|
|
30
|
+
- 初始化时将 `yss-project.yaml` 从 `template-source` 改写为 `project-instance`
|
|
31
|
+
- 升级时迁移 Spec / Ticket 路径并删除 `to-prd`、`to-issues` 旧 skill
|
|
32
|
+
- 旧、新资产内容冲突或清单 schema / mode 非法时 fail closed
|
|
33
|
+
- 保留模板的共享 skill 投影;生成实例可在尚未 `git init` 时运行模板校验
|
|
30
34
|
|
|
31
35
|
## 同步已有模板实例仓库
|
|
32
36
|
|
|
@@ -48,10 +52,14 @@ npx create-yss-spec@latest sync --dry-run
|
|
|
48
52
|
- 默认只更新未被本地修改的受管模板文件
|
|
49
53
|
- 对本地已修改文件只提示和跳过,不自动覆盖
|
|
50
54
|
- 对模板已删除文件只报告,不自动删除
|
|
55
|
+
- 对已知的 Spec / Ticket 旧路径执行一次性迁移
|
|
56
|
+
- 迁移目标已存在且内容不一致时停止,不静默覆盖
|
|
51
57
|
|
|
52
58
|
## 开发验证
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
CLI 源码和研发记录由本仓库独立维护。首次测试会从
|
|
61
|
+
[`iloveZzz/yss-spec-project-template`](https://github.com/iloveZzz/yss-spec-project-template)
|
|
62
|
+
同步受管模板快照:
|
|
55
63
|
|
|
56
64
|
```bash
|
|
57
65
|
npm test
|
|
@@ -60,6 +68,16 @@ npm test
|
|
|
60
68
|
发布前可检查打包结果:
|
|
61
69
|
|
|
62
70
|
```bash
|
|
63
|
-
cd packages/create-yss-spec
|
|
64
71
|
npm pack --dry-run
|
|
65
72
|
```
|
|
73
|
+
|
|
74
|
+
## 研发记录
|
|
75
|
+
|
|
76
|
+
- [初始化 CLI Discovery](docs/discovery/yss-spec-cli-init-discovery.md)
|
|
77
|
+
- [模板同步 Discovery](docs/discovery/yss-spec-cli-template-sync-discovery.md)
|
|
78
|
+
- [初始化 CLI PRD](docs/requirements/yss-spec-cli-init-prd.md)
|
|
79
|
+
- [模板同步 PRD](docs/requirements/yss-spec-cli-template-sync-prd.md)
|
|
80
|
+
- [垂直切片](docs/requirements/issues/)
|
|
81
|
+
- [`yss-project.yaml` 跨仓库实现记录](docs/implementation/yss-project-repository-mode-contract.md)
|
|
82
|
+
- [实施路由与 Build Architecture Checklist](docs/implementation/)
|
|
83
|
+
- [完整中文使用手册](docs/user-guide/create-yss-spec-cli-guide.md)
|
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-yss-spec",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Initialize a YSS spec project template repository",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/iloveZzz/create-yss-spec.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/iloveZzz/create-yss-spec#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/iloveZzz/create-yss-spec/issues"
|
|
12
|
+
},
|
|
5
13
|
"files": [
|
|
6
14
|
"bin",
|
|
7
15
|
"src",
|
|
@@ -12,6 +20,9 @@
|
|
|
12
20
|
"create-yss-spec": "./bin/create-yss-spec.js"
|
|
13
21
|
},
|
|
14
22
|
"scripts": {
|
|
15
|
-
"
|
|
23
|
+
"sync-template": "node scripts/sync-template.js",
|
|
24
|
+
"pretest": "npm run sync-template",
|
|
25
|
+
"test": "node --test tests/*.test.js",
|
|
26
|
+
"prepack": "npm run sync-template"
|
|
16
27
|
}
|
|
17
28
|
}
|
package/src/cli.js
CHANGED
|
@@ -9,18 +9,9 @@ const PACKAGE_MANIFEST = JSON.parse(
|
|
|
9
9
|
fs.readFileSync(path.join(PACKAGE_ROOT, "package.json"), "utf8"),
|
|
10
10
|
);
|
|
11
11
|
const BUNDLED_TEMPLATE_ROOT = path.join(PACKAGE_ROOT, "template");
|
|
12
|
-
const REPO_TEMPLATE_ROOT = path.resolve(PACKAGE_ROOT, "../..");
|
|
13
|
-
const REPO_MANIFEST_PATH = path.join(REPO_TEMPLATE_ROOT, "template.manifest.json");
|
|
14
12
|
const BUNDLED_MANIFEST_PATH = path.join(PACKAGE_ROOT, "template.manifest.json");
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
fs.existsSync(REPO_MANIFEST_PATH);
|
|
18
|
-
const TEMPLATE_ROOT = IS_REPO_DEVELOPMENT
|
|
19
|
-
? REPO_TEMPLATE_ROOT
|
|
20
|
-
: BUNDLED_TEMPLATE_ROOT;
|
|
21
|
-
const TEMPLATE_MANIFEST_PATH = IS_REPO_DEVELOPMENT
|
|
22
|
-
? REPO_MANIFEST_PATH
|
|
23
|
-
: BUNDLED_MANIFEST_PATH;
|
|
13
|
+
const TEMPLATE_ROOT = BUNDLED_TEMPLATE_ROOT;
|
|
14
|
+
const TEMPLATE_MANIFEST_PATH = BUNDLED_MANIFEST_PATH;
|
|
24
15
|
const TEMPLATE_MANIFEST_TEXT = fs.readFileSync(TEMPLATE_MANIFEST_PATH, "utf8");
|
|
25
16
|
const TEMPLATE_MANIFEST = JSON.parse(TEMPLATE_MANIFEST_TEXT);
|
|
26
17
|
const ROOT_EXCLUDED_ENTRIES = new Set(TEMPLATE_MANIFEST.excludeRootEntries);
|
|
@@ -29,60 +20,96 @@ const EXCLUDED_RELATIVE_PATHS = new Set(TEMPLATE_MANIFEST.excludePaths);
|
|
|
29
20
|
const RENDERED_RELATIVE_PATHS = new Set(TEMPLATE_MANIFEST.renderPaths);
|
|
30
21
|
const EXAMPLE_DOC_PATHS = new Set(TEMPLATE_MANIFEST.exampleDocPaths);
|
|
31
22
|
const TEMPLATE_METADATA_FILENAME = ".yss-template.json";
|
|
23
|
+
const PROJECT_INSTANCE_MANIFEST =
|
|
24
|
+
"schema_version: 1\nrepository_mode: project-instance\n";
|
|
32
25
|
const TEMPLATE_MANIFEST_VERSION = sha256(TEMPLATE_MANIFEST_TEXT);
|
|
33
|
-
const REPO_TRACKED_STATE =
|
|
34
|
-
? loadRepoTrackedState(REPO_TEMPLATE_ROOT)
|
|
35
|
-
: null;
|
|
26
|
+
const REPO_TRACKED_STATE = null;
|
|
36
27
|
|
|
37
28
|
function sha256(value) {
|
|
38
29
|
return crypto.createHash("sha256").update(value).digest("hex");
|
|
39
30
|
}
|
|
40
31
|
|
|
41
|
-
function
|
|
42
|
-
return
|
|
32
|
+
function symlinkHash(linkTarget) {
|
|
33
|
+
return sha256(`symlink:${linkTarget}`);
|
|
43
34
|
}
|
|
44
35
|
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
function managedPathHash(filePath) {
|
|
37
|
+
const stat = fs.lstatSync(filePath);
|
|
38
|
+
if (stat.isSymbolicLink()) {
|
|
39
|
+
return symlinkHash(fs.readlinkSync(filePath));
|
|
40
|
+
}
|
|
41
|
+
return sha256(fs.readFileSync(filePath));
|
|
49
42
|
}
|
|
50
43
|
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
function assertSafeTemplateSymlink(relativePath, linkTarget) {
|
|
45
|
+
const resolvedRelativeTarget = path.posix.normalize(
|
|
46
|
+
path.posix.join(path.posix.dirname(relativePath), linkTarget),
|
|
47
|
+
);
|
|
48
|
+
if (
|
|
49
|
+
path.isAbsolute(linkTarget) ||
|
|
50
|
+
resolvedRelativeTarget === ".." ||
|
|
51
|
+
resolvedRelativeTarget.startsWith("../")
|
|
52
|
+
) {
|
|
53
|
+
throw new Error(`模板包含越界符号链接:${relativePath} -> ${linkTarget}`);
|
|
59
54
|
}
|
|
55
|
+
}
|
|
60
56
|
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
function nowIsoString() {
|
|
58
|
+
return new Date().toISOString();
|
|
59
|
+
}
|
|
63
60
|
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
function parseProjectManifest(content, label) {
|
|
62
|
+
const values = {};
|
|
63
|
+
for (const rawLine of content.split(/\r?\n/)) {
|
|
64
|
+
const line = rawLine.trim();
|
|
65
|
+
if (!line || line.startsWith("#")) {
|
|
66
66
|
continue;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
const match = line.match(/^([a-z_]+):\s*([^\s#]+)\s*$/);
|
|
70
|
+
if (!match) {
|
|
71
|
+
throw new Error(`${label}包含无法识别的内容:${rawLine}`);
|
|
72
|
+
}
|
|
73
|
+
const [, key, value] = match;
|
|
74
|
+
if (key !== "schema_version" && key !== "repository_mode") {
|
|
75
|
+
throw new Error(`${label}包含未知字段:${key}`);
|
|
76
|
+
}
|
|
77
|
+
if (Object.hasOwn(values, key)) {
|
|
78
|
+
throw new Error(`${label}包含重复字段:${key}`);
|
|
79
|
+
}
|
|
80
|
+
values[key] = value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return values;
|
|
84
|
+
}
|
|
71
85
|
|
|
72
|
-
|
|
73
|
-
|
|
86
|
+
function readBundledProjectManifest() {
|
|
87
|
+
const manifestPath = path.join(TEMPLATE_ROOT, "yss-project.yaml");
|
|
88
|
+
if (!fs.existsSync(manifestPath)) {
|
|
89
|
+
throw new Error("模板缺少 yss-project.yaml");
|
|
90
|
+
}
|
|
74
91
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
const values = parseProjectManifest(
|
|
93
|
+
fs.readFileSync(manifestPath, "utf8"),
|
|
94
|
+
"模板 yss-project.yaml ",
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
if (values.schema_version !== "1") {
|
|
98
|
+
throw new Error(
|
|
99
|
+
`不支持的 yss-project.yaml schema_version:${values.schema_version || "缺失"}`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
if (values.repository_mode !== "template-source") {
|
|
103
|
+
throw new Error(
|
|
104
|
+
`模板 yss-project.yaml 的 repository_mode 必须为 template-source,实际为 ${values.repository_mode || "缺失"}`,
|
|
105
|
+
);
|
|
80
106
|
}
|
|
81
107
|
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
108
|
+
return values;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function getTemplateSource() {
|
|
112
|
+
return `npm:${PACKAGE_MANIFEST.name}@${PACKAGE_MANIFEST.version}`;
|
|
86
113
|
}
|
|
87
114
|
|
|
88
115
|
function parseArgs(argv) {
|
|
@@ -256,6 +283,10 @@ function shouldSkipRepoDevelopmentPath(relativePath, isDirectory) {
|
|
|
256
283
|
}
|
|
257
284
|
|
|
258
285
|
function renderTemplateFile(relativePath, content, variables) {
|
|
286
|
+
if (relativePath === "yss-project.yaml") {
|
|
287
|
+
return PROJECT_INSTANCE_MANIFEST;
|
|
288
|
+
}
|
|
289
|
+
|
|
259
290
|
if (relativePath === "AGENTS.md") {
|
|
260
291
|
return content
|
|
261
292
|
.replace(/(\*\*项目名称:\*\*\s*)\[填写\]/, `$1${variables.projectName}`)
|
|
@@ -282,13 +313,17 @@ function collectManagedFileHashes(operations) {
|
|
|
282
313
|
const managedFiles = {};
|
|
283
314
|
|
|
284
315
|
for (const operation of operations) {
|
|
285
|
-
if (
|
|
316
|
+
if (
|
|
317
|
+
operation.type !== "copy" &&
|
|
318
|
+
operation.type !== "render" &&
|
|
319
|
+
operation.type !== "symlink"
|
|
320
|
+
) {
|
|
286
321
|
continue;
|
|
287
322
|
}
|
|
288
323
|
|
|
289
324
|
managedFiles[operation.relativePath] = {
|
|
290
325
|
type: operation.type,
|
|
291
|
-
contentHash:
|
|
326
|
+
contentHash: managedPathHash(operation.targetPath),
|
|
292
327
|
};
|
|
293
328
|
}
|
|
294
329
|
|
|
@@ -361,6 +396,19 @@ function buildCopyPlan(sourceDir, targetDir, variables, relativeDir = "") {
|
|
|
361
396
|
continue;
|
|
362
397
|
}
|
|
363
398
|
|
|
399
|
+
if (entry.isSymbolicLink()) {
|
|
400
|
+
const linkTarget = fs.readlinkSync(sourcePath);
|
|
401
|
+
assertSafeTemplateSymlink(relativePath, linkTarget);
|
|
402
|
+
operations.push({
|
|
403
|
+
type: "symlink",
|
|
404
|
+
relativePath,
|
|
405
|
+
sourcePath,
|
|
406
|
+
targetPath,
|
|
407
|
+
linkTarget,
|
|
408
|
+
});
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
|
|
364
412
|
if (!entry.isFile()) {
|
|
365
413
|
continue;
|
|
366
414
|
}
|
|
@@ -451,6 +499,13 @@ function executePlan(operations, variables) {
|
|
|
451
499
|
continue;
|
|
452
500
|
}
|
|
453
501
|
|
|
502
|
+
if (operation.type === "symlink") {
|
|
503
|
+
fs.mkdirSync(path.dirname(operation.targetPath), { recursive: true });
|
|
504
|
+
fs.rmSync(operation.targetPath, { recursive: true, force: true });
|
|
505
|
+
fs.symlinkSync(operation.linkTarget, operation.targetPath);
|
|
506
|
+
continue;
|
|
507
|
+
}
|
|
508
|
+
|
|
454
509
|
fs.mkdirSync(path.dirname(operation.targetPath), { recursive: true });
|
|
455
510
|
fs.copyFileSync(operation.sourcePath, operation.targetPath);
|
|
456
511
|
}
|
|
@@ -482,6 +537,241 @@ function loadTemplateMetadata(targetDir) {
|
|
|
482
537
|
};
|
|
483
538
|
}
|
|
484
539
|
|
|
540
|
+
function assertSupportedTargetRepositoryMode(targetDir) {
|
|
541
|
+
const manifestPath = path.join(targetDir, "yss-project.yaml");
|
|
542
|
+
if (!fs.existsSync(manifestPath)) {
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
const content = fs.readFileSync(manifestPath, "utf8");
|
|
547
|
+
const values = parseProjectManifest(content, "目标 yss-project.yaml ");
|
|
548
|
+
if (values.schema_version !== "1") {
|
|
549
|
+
throw new Error(
|
|
550
|
+
`不支持的目标 yss-project.yaml schema_version:${values.schema_version || "缺失"}`,
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
const repositoryMode = values.repository_mode;
|
|
555
|
+
if (
|
|
556
|
+
repositoryMode !== "template-source" &&
|
|
557
|
+
repositoryMode !== "project-instance"
|
|
558
|
+
) {
|
|
559
|
+
throw new Error(
|
|
560
|
+
`不支持的目标 yss-project.yaml repository_mode:${repositoryMode || "缺失"}`,
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
function collectFilesRecursively(rootDir, relativeDir = "") {
|
|
566
|
+
if (!fs.existsSync(rootDir)) {
|
|
567
|
+
return [];
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
const files = [];
|
|
571
|
+
for (const entry of fs.readdirSync(rootDir, { withFileTypes: true })) {
|
|
572
|
+
const relativePath = relativeDir
|
|
573
|
+
? path.posix.join(relativeDir, entry.name)
|
|
574
|
+
: entry.name;
|
|
575
|
+
const absolutePath = path.join(rootDir, entry.name);
|
|
576
|
+
if (entry.isDirectory()) {
|
|
577
|
+
files.push(...collectFilesRecursively(absolutePath, relativePath));
|
|
578
|
+
} else if (entry.isFile()) {
|
|
579
|
+
files.push(relativePath);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
return files;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
function buildLegacyMigrationPlan(targetDir) {
|
|
586
|
+
const moves = [];
|
|
587
|
+
const removeFiles = [];
|
|
588
|
+
const removeDirectories = [];
|
|
589
|
+
const conflicts = [];
|
|
590
|
+
const targetManifestPath = path.join(targetDir, "yss-project.yaml");
|
|
591
|
+
const rewriteProjectManifest =
|
|
592
|
+
fs.existsSync(targetManifestPath) &&
|
|
593
|
+
fs.readFileSync(targetManifestPath, "utf8") !== PROJECT_INSTANCE_MANIFEST;
|
|
594
|
+
const addMove = (legacyPath, nextPath) => {
|
|
595
|
+
const sourcePath = path.join(targetDir, legacyPath);
|
|
596
|
+
const targetPath = path.join(targetDir, nextPath);
|
|
597
|
+
if (!fs.existsSync(sourcePath)) {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
if (!fs.existsSync(targetPath)) {
|
|
601
|
+
moves.push({ legacyPath, nextPath, sourcePath, targetPath });
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
const sourceHash = sha256(fs.readFileSync(sourcePath));
|
|
606
|
+
const targetHash = sha256(fs.readFileSync(targetPath));
|
|
607
|
+
if (sourceHash === targetHash) {
|
|
608
|
+
removeFiles.push({ legacyPath, sourcePath });
|
|
609
|
+
} else {
|
|
610
|
+
conflicts.push({ legacyPath, nextPath });
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
addMove(
|
|
615
|
+
"docs/templates/prd-template.md",
|
|
616
|
+
"docs/templates/spec-template.md",
|
|
617
|
+
);
|
|
618
|
+
addMove(
|
|
619
|
+
"docs/templates/vertical-slice-issue-template.md",
|
|
620
|
+
"docs/templates/vertical-slice-ticket-template.md",
|
|
621
|
+
);
|
|
622
|
+
|
|
623
|
+
const legacyIssuesDir = path.join(targetDir, "docs/requirements/issues");
|
|
624
|
+
for (const relativePath of collectFilesRecursively(legacyIssuesDir)) {
|
|
625
|
+
addMove(
|
|
626
|
+
path.posix.join("docs/requirements/issues", relativePath),
|
|
627
|
+
path.posix.join("docs/requirements/tickets", relativePath),
|
|
628
|
+
);
|
|
629
|
+
}
|
|
630
|
+
if (fs.existsSync(legacyIssuesDir)) {
|
|
631
|
+
removeDirectories.push("docs/requirements/issues");
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
const requirementsDir = path.join(targetDir, "docs/requirements");
|
|
635
|
+
if (fs.existsSync(requirementsDir)) {
|
|
636
|
+
for (const entry of fs.readdirSync(requirementsDir, { withFileTypes: true })) {
|
|
637
|
+
if (entry.isFile() && entry.name.endsWith("-prd.md")) {
|
|
638
|
+
addMove(
|
|
639
|
+
path.posix.join("docs/requirements", entry.name),
|
|
640
|
+
path.posix.join(
|
|
641
|
+
"docs/requirements",
|
|
642
|
+
entry.name.replace(/-prd\.md$/, "-spec.md"),
|
|
643
|
+
),
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
for (const agentRoot of [
|
|
650
|
+
".agents",
|
|
651
|
+
".claude",
|
|
652
|
+
".codex",
|
|
653
|
+
".hermes",
|
|
654
|
+
".pi",
|
|
655
|
+
".trae",
|
|
656
|
+
".codebuddy",
|
|
657
|
+
".qoder",
|
|
658
|
+
".qwen",
|
|
659
|
+
]) {
|
|
660
|
+
for (const skillName of ["to-prd", "to-issues"]) {
|
|
661
|
+
const relativePath = `${agentRoot}/skills/${skillName}`;
|
|
662
|
+
if (fs.existsSync(path.join(targetDir, relativePath))) {
|
|
663
|
+
removeDirectories.push(relativePath);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
return {
|
|
669
|
+
moves,
|
|
670
|
+
removeFiles,
|
|
671
|
+
removeDirectories,
|
|
672
|
+
conflicts,
|
|
673
|
+
rewriteProjectManifest,
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
function assertNoLegacyMigrationConflicts(migrationPlan) {
|
|
678
|
+
if (migrationPlan.conflicts.length === 0) {
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
const details = migrationPlan.conflicts
|
|
683
|
+
.map(
|
|
684
|
+
({ legacyPath, nextPath }) =>
|
|
685
|
+
`- ${legacyPath} -> ${nextPath}`,
|
|
686
|
+
)
|
|
687
|
+
.join("\n");
|
|
688
|
+
throw new Error(`检测到旧、新资产内容冲突,未执行任何写入:\n${details}`);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
function updateManagedFilesForMigration(metadata, migrationPlan) {
|
|
692
|
+
const managedFiles = metadata.managedFiles || {};
|
|
693
|
+
for (const operation of migrationPlan.moves) {
|
|
694
|
+
if (managedFiles[operation.legacyPath] && !managedFiles[operation.nextPath]) {
|
|
695
|
+
managedFiles[operation.nextPath] = managedFiles[operation.legacyPath];
|
|
696
|
+
}
|
|
697
|
+
delete managedFiles[operation.legacyPath];
|
|
698
|
+
}
|
|
699
|
+
for (const operation of migrationPlan.removeFiles) {
|
|
700
|
+
delete managedFiles[operation.legacyPath];
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
for (const relativeDir of migrationPlan.removeDirectories) {
|
|
704
|
+
for (const relativePath of Object.keys(managedFiles)) {
|
|
705
|
+
if (
|
|
706
|
+
relativePath === relativeDir ||
|
|
707
|
+
relativePath.startsWith(`${relativeDir}/`)
|
|
708
|
+
) {
|
|
709
|
+
delete managedFiles[relativePath];
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
if (migrationPlan.rewriteProjectManifest) {
|
|
714
|
+
managedFiles["yss-project.yaml"] = {
|
|
715
|
+
type: "render",
|
|
716
|
+
contentHash: sha256(PROJECT_INSTANCE_MANIFEST),
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
metadata.managedFiles = managedFiles;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
function applyLegacyMigration(targetDir, metadata, migrationPlan) {
|
|
723
|
+
for (const operation of migrationPlan.moves) {
|
|
724
|
+
fs.mkdirSync(path.dirname(operation.targetPath), { recursive: true });
|
|
725
|
+
fs.renameSync(operation.sourcePath, operation.targetPath);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
for (const operation of migrationPlan.removeFiles) {
|
|
729
|
+
fs.rmSync(operation.sourcePath, { force: true });
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
for (const relativeDir of migrationPlan.removeDirectories) {
|
|
733
|
+
fs.rmSync(path.join(targetDir, relativeDir), {
|
|
734
|
+
recursive: true,
|
|
735
|
+
force: true,
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
if (migrationPlan.rewriteProjectManifest) {
|
|
740
|
+
fs.writeFileSync(
|
|
741
|
+
path.join(targetDir, "yss-project.yaml"),
|
|
742
|
+
PROJECT_INSTANCE_MANIFEST,
|
|
743
|
+
"utf8",
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
updateManagedFilesForMigration(metadata, migrationPlan);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
function printLegacyMigration(migrationPlan, dryRun) {
|
|
751
|
+
if (
|
|
752
|
+
migrationPlan.moves.length === 0 &&
|
|
753
|
+
migrationPlan.removeFiles.length === 0 &&
|
|
754
|
+
migrationPlan.removeDirectories.length === 0 &&
|
|
755
|
+
!migrationPlan.rewriteProjectManifest
|
|
756
|
+
) {
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
console.log(dryRun ? "旧版迁移 dry-run 预览" : "旧版迁移完成");
|
|
761
|
+
for (const operation of migrationPlan.moves) {
|
|
762
|
+
console.log(`migrate: ${operation.legacyPath} -> ${operation.nextPath}`);
|
|
763
|
+
}
|
|
764
|
+
for (const operation of migrationPlan.removeFiles) {
|
|
765
|
+
console.log(`remove-duplicate: ${operation.legacyPath}`);
|
|
766
|
+
}
|
|
767
|
+
for (const relativeDir of migrationPlan.removeDirectories) {
|
|
768
|
+
console.log(`remove-obsolete: ${relativeDir}`);
|
|
769
|
+
}
|
|
770
|
+
if (migrationPlan.rewriteProjectManifest) {
|
|
771
|
+
console.log("rewrite: yss-project.yaml -> project-instance");
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
|
|
485
775
|
function buildSyncVariables(metadata) {
|
|
486
776
|
const variables = metadata.variables || {};
|
|
487
777
|
|
|
@@ -501,7 +791,10 @@ function buildDesiredManagedOperations(targetDir, metadata) {
|
|
|
501
791
|
const variables = buildSyncVariables(metadata);
|
|
502
792
|
|
|
503
793
|
return buildCopyPlan(TEMPLATE_ROOT, targetDir, variables).filter(
|
|
504
|
-
(operation) =>
|
|
794
|
+
(operation) =>
|
|
795
|
+
operation.type === "copy" ||
|
|
796
|
+
operation.type === "render" ||
|
|
797
|
+
operation.type === "symlink",
|
|
505
798
|
);
|
|
506
799
|
}
|
|
507
800
|
|
|
@@ -522,6 +815,14 @@ function buildDesiredManagedFile(operation, metadata) {
|
|
|
522
815
|
};
|
|
523
816
|
}
|
|
524
817
|
|
|
818
|
+
|
|
819
|
+
if (operation.type === "symlink") {
|
|
820
|
+
return {
|
|
821
|
+
...operation,
|
|
822
|
+
desiredHash: symlinkHash(operation.linkTarget),
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
|
|
525
826
|
return {
|
|
526
827
|
...operation,
|
|
527
828
|
desiredHash: sha256(fs.readFileSync(operation.sourcePath)),
|
|
@@ -552,7 +853,7 @@ function classifySyncPlan(targetDir, metadata) {
|
|
|
552
853
|
continue;
|
|
553
854
|
}
|
|
554
855
|
|
|
555
|
-
const currentHash =
|
|
856
|
+
const currentHash = managedPathHash(operation.targetPath);
|
|
556
857
|
if (currentHash === operation.desiredHash) {
|
|
557
858
|
unchanged.push(operation);
|
|
558
859
|
} else {
|
|
@@ -569,7 +870,7 @@ function classifySyncPlan(targetDir, metadata) {
|
|
|
569
870
|
continue;
|
|
570
871
|
}
|
|
571
872
|
|
|
572
|
-
const currentHash =
|
|
873
|
+
const currentHash = managedPathHash(operation.targetPath);
|
|
573
874
|
if (currentHash !== existingRecord.contentHash) {
|
|
574
875
|
skipped.push({
|
|
575
876
|
...operation,
|
|
@@ -632,6 +933,12 @@ function applyManagedFileOperation(operation) {
|
|
|
632
933
|
return;
|
|
633
934
|
}
|
|
634
935
|
|
|
936
|
+
if (operation.type === "symlink") {
|
|
937
|
+
fs.rmSync(operation.targetPath, { recursive: true, force: true });
|
|
938
|
+
fs.symlinkSync(operation.linkTarget, operation.targetPath);
|
|
939
|
+
return;
|
|
940
|
+
}
|
|
941
|
+
|
|
635
942
|
fs.copyFileSync(operation.sourcePath, operation.targetPath);
|
|
636
943
|
}
|
|
637
944
|
|
|
@@ -653,7 +960,7 @@ function syncTemplateInstance(targetDir, metadata, dryRun) {
|
|
|
653
960
|
continue;
|
|
654
961
|
}
|
|
655
962
|
|
|
656
|
-
const currentHash =
|
|
963
|
+
const currentHash = managedPathHash(operation.targetPath);
|
|
657
964
|
if (currentHash !== operation.desiredHash) {
|
|
658
965
|
continue;
|
|
659
966
|
}
|
|
@@ -706,6 +1013,7 @@ function syncTemplateInstance(targetDir, metadata, dryRun) {
|
|
|
706
1013
|
}
|
|
707
1014
|
|
|
708
1015
|
async function runInit(argv = []) {
|
|
1016
|
+
readBundledProjectManifest();
|
|
709
1017
|
const promptedOptions = await promptForMissingOptions(parseArgs(argv));
|
|
710
1018
|
assertRequiredOptions(promptedOptions);
|
|
711
1019
|
|
|
@@ -743,9 +1051,17 @@ async function runInit(argv = []) {
|
|
|
743
1051
|
}
|
|
744
1052
|
|
|
745
1053
|
function runSync(argv = []) {
|
|
1054
|
+
readBundledProjectManifest();
|
|
746
1055
|
const options = parseArgs(argv);
|
|
747
1056
|
const targetDir = normalizeTargetDir(options.targetDir || ".");
|
|
748
1057
|
const { metadata } = loadTemplateMetadata(targetDir);
|
|
1058
|
+
assertSupportedTargetRepositoryMode(targetDir);
|
|
1059
|
+
const migrationPlan = buildLegacyMigrationPlan(targetDir);
|
|
1060
|
+
assertNoLegacyMigrationConflicts(migrationPlan);
|
|
1061
|
+
if (!options.dryRun) {
|
|
1062
|
+
applyLegacyMigration(targetDir, metadata, migrationPlan);
|
|
1063
|
+
}
|
|
1064
|
+
printLegacyMigration(migrationPlan, Boolean(options.dryRun));
|
|
749
1065
|
syncTemplateInstance(targetDir, metadata, Boolean(options.dryRun));
|
|
750
1066
|
}
|
|
751
1067
|
|
|
@@ -20,16 +20,16 @@ The route most work travels. You have an idea and want it built.
|
|
|
20
20
|
- **`/prototype`** to answer the question with throwaway code,
|
|
21
21
|
- **`/handoff`** back what you learned, and reference it from the original idea thread.
|
|
22
22
|
3. **Branch — is this a multi-session build?**
|
|
23
|
-
- **Yes** → **`/to-
|
|
23
|
+
- **Yes** → **`/to-spec`** (turn the thread into a spec), then **`/to-tickets`** to split it into tracer-bullet tickets, each declaring its **blocking edges**. On a local tracker that's one file per ticket under `.scratch/<feature>/tickets/`, worked blockers-first by hand; on a real tracker the edges become native blocking links, so any ticket whose blockers are done can be grabbed — kick off **`/implement`** per ticket, **clearing context between each one**.
|
|
24
24
|
- **No** → **`/implement`** right here, in the same context window.
|
|
25
25
|
|
|
26
26
|
Either way, **`/implement`** builds each issue by driving **`/tdd`** internally — one red-green slice at a time — then closes out by running **`/code-review`**, a two-axis review (Standards + Spec) of the diff, before committing. Reach for **`/tdd`** on its own when you just want to build a concrete behaviour test-first without a full spec, and **`/code-review`** on its own whenever you want to review a branch or PR against a fixed point.
|
|
27
27
|
|
|
28
28
|
### Context hygiene
|
|
29
29
|
|
|
30
|
-
Keep steps 1–3 in **one unbroken context window** — don't compact or clear until after `/to-
|
|
30
|
+
Keep steps 1–3 in **one unbroken context window** — don't compact or clear until after `/to-tickets` — so the grilling, spec, and tickets all build on the same thinking. Each `/implement` then starts fresh, working from the ticket.
|
|
31
31
|
|
|
32
|
-
The limit on this is the **[smart zone](https://www.aihero.dev/ai-coding-dictionary/smart-zone)**: the window (~120k tokens on state-of-the-art models) within which the model still reasons sharply. If a session approaches it before `/to-
|
|
32
|
+
The limit on this is the **[smart zone](https://www.aihero.dev/ai-coding-dictionary/smart-zone)**: the window (~120k tokens on state-of-the-art models) within which the model still reasons sharply. If a session approaches it before `/to-tickets`, don't push on degraded — `/handoff` and continue in a fresh thread.
|
|
33
33
|
|
|
34
34
|
## On-ramps
|
|
35
35
|
|
|
@@ -37,10 +37,14 @@ A starting situation that generates work, then merges onto the main flow.
|
|
|
37
37
|
|
|
38
38
|
- **Bugs and requests piling up** → **`/triage`**. It moves issues through triage roles and produces agent-ready issues, which **`/implement`** later picks up.
|
|
39
39
|
|
|
40
|
-
Triage is only for issues **you didn't create** — bug reports, incoming feature requests, anything that arrives raw.
|
|
40
|
+
Triage is only for issues **you didn't create** — bug reports, incoming feature requests, anything that arrives raw. Tickets that `/to-tickets` produced are already agent-ready, so **don't triage them**.
|
|
41
41
|
|
|
42
42
|
- **Something's broken** → **`/diagnosing-bugs`**. For the hard ones: the bug that resists a first glance, the intermittent flake, the regression that crept in between two known-good states. It refuses to theorise until it has a **tight feedback loop** — one command that already goes red on *this* bug — then fixes with a regression test. Its post-mortem hands off to **`/improve-codebase-architecture`** when the real finding is that there's no good seam to lock the bug down.
|
|
43
43
|
|
|
44
|
+
- **A huge, foggy effort — a greenfield project or a huge feature build, too big for one session** → **`/wayfinder`**, the most cognitively demanding flow here. When the way from here to the destination isn't visible yet, it charts a **shared map** of **decision tickets** on the issue tracker and resolves them one at a time — producing **decisions, not deliverables** — until the fog is pushed back and the way is clear. Where **`/grill-with-docs`** sharpens an idea you can hold in one session, wayfinder is for the idea you can't — and it's slower and denser, so save it for exactly that, never a well-scoped feature.
|
|
45
|
+
|
|
46
|
+
When the map clears, **it hands off, it doesn't build**: merge onto the main flow at **`/to-spec`**, which collapses the map's linked decisions into a buildable plan, then `/to-tickets` and `/implement` as usual. Looping the map straight into `/implement` skips that collapse and throws the linked detail away — go straight to `/implement` only when the effort turned out genuinely small.
|
|
47
|
+
|
|
44
48
|
## Codebase health
|
|
45
49
|
|
|
46
50
|
Not feature work — upkeep.
|