@slope-dev/slope 1.5.1
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/LICENSE +21 -0
- package/README.md +243 -0
- package/dist/cli/commands/auto-card.d.ts +2 -0
- package/dist/cli/commands/auto-card.d.ts.map +1 -0
- package/dist/cli/commands/auto-card.js +267 -0
- package/dist/cli/commands/auto-card.js.map +1 -0
- package/dist/cli/commands/briefing.d.ts +2 -0
- package/dist/cli/commands/briefing.d.ts.map +1 -0
- package/dist/cli/commands/briefing.js +133 -0
- package/dist/cli/commands/briefing.js.map +1 -0
- package/dist/cli/commands/card.d.ts +2 -0
- package/dist/cli/commands/card.d.ts.map +1 -0
- package/dist/cli/commands/card.js +144 -0
- package/dist/cli/commands/card.js.map +1 -0
- package/dist/cli/commands/claim.d.ts +2 -0
- package/dist/cli/commands/claim.d.ts.map +1 -0
- package/dist/cli/commands/claim.js +99 -0
- package/dist/cli/commands/claim.js.map +1 -0
- package/dist/cli/commands/classify.d.ts +2 -0
- package/dist/cli/commands/classify.d.ts.map +1 -0
- package/dist/cli/commands/classify.js +70 -0
- package/dist/cli/commands/classify.js.map +1 -0
- package/dist/cli/commands/dashboard.d.ts +4 -0
- package/dist/cli/commands/dashboard.d.ts.map +1 -0
- package/dist/cli/commands/dashboard.js +156 -0
- package/dist/cli/commands/dashboard.js.map +1 -0
- package/dist/cli/commands/distill.d.ts +2 -0
- package/dist/cli/commands/distill.d.ts.map +1 -0
- package/dist/cli/commands/distill.js +91 -0
- package/dist/cli/commands/distill.js.map +1 -0
- package/dist/cli/commands/escalate.d.ts +2 -0
- package/dist/cli/commands/escalate.d.ts.map +1 -0
- package/dist/cli/commands/escalate.js +136 -0
- package/dist/cli/commands/escalate.js.map +1 -0
- package/dist/cli/commands/extract.d.ts +2 -0
- package/dist/cli/commands/extract.d.ts.map +1 -0
- package/dist/cli/commands/extract.js +147 -0
- package/dist/cli/commands/extract.js.map +1 -0
- package/dist/cli/commands/flows.d.ts +2 -0
- package/dist/cli/commands/flows.d.ts.map +1 -0
- package/dist/cli/commands/flows.js +156 -0
- package/dist/cli/commands/flows.js.map +1 -0
- package/dist/cli/commands/guard.d.ts +15 -0
- package/dist/cli/commands/guard.d.ts.map +1 -0
- package/dist/cli/commands/guard.js +207 -0
- package/dist/cli/commands/guard.js.map +1 -0
- package/dist/cli/commands/hook.d.ts +2 -0
- package/dist/cli/commands/hook.d.ts.map +1 -0
- package/dist/cli/commands/hook.js +299 -0
- package/dist/cli/commands/hook.js.map +1 -0
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +421 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/map.d.ts +10 -0
- package/dist/cli/commands/map.d.ts.map +1 -0
- package/dist/cli/commands/map.js +591 -0
- package/dist/cli/commands/map.js.map +1 -0
- package/dist/cli/commands/next.d.ts +2 -0
- package/dist/cli/commands/next.d.ts.map +1 -0
- package/dist/cli/commands/next.js +28 -0
- package/dist/cli/commands/next.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +2 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +54 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/plugin.d.ts +2 -0
- package/dist/cli/commands/plugin.d.ts.map +1 -0
- package/dist/cli/commands/plugin.js +118 -0
- package/dist/cli/commands/plugin.js.map +1 -0
- package/dist/cli/commands/release.d.ts +2 -0
- package/dist/cli/commands/release.d.ts.map +1 -0
- package/dist/cli/commands/release.js +64 -0
- package/dist/cli/commands/release.js.map +1 -0
- package/dist/cli/commands/report.d.ts +2 -0
- package/dist/cli/commands/report.d.ts.map +1 -0
- package/dist/cli/commands/report.js +68 -0
- package/dist/cli/commands/report.js.map +1 -0
- package/dist/cli/commands/review-state.d.ts +11 -0
- package/dist/cli/commands/review-state.d.ts.map +1 -0
- package/dist/cli/commands/review-state.js +193 -0
- package/dist/cli/commands/review-state.js.map +1 -0
- package/dist/cli/commands/review.d.ts +2 -0
- package/dist/cli/commands/review.d.ts.map +1 -0
- package/dist/cli/commands/review.js +53 -0
- package/dist/cli/commands/review.js.map +1 -0
- package/dist/cli/commands/roadmap.d.ts +2 -0
- package/dist/cli/commands/roadmap.d.ts.map +1 -0
- package/dist/cli/commands/roadmap.js +283 -0
- package/dist/cli/commands/roadmap.js.map +1 -0
- package/dist/cli/commands/session.d.ts +2 -0
- package/dist/cli/commands/session.d.ts.map +1 -0
- package/dist/cli/commands/session.js +232 -0
- package/dist/cli/commands/session.js.map +1 -0
- package/dist/cli/commands/standup.d.ts +2 -0
- package/dist/cli/commands/standup.d.ts.map +1 -0
- package/dist/cli/commands/standup.js +117 -0
- package/dist/cli/commands/standup.js.map +1 -0
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +148 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/tournament.d.ts +2 -0
- package/dist/cli/commands/tournament.d.ts.map +1 -0
- package/dist/cli/commands/tournament.js +60 -0
- package/dist/cli/commands/tournament.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +2 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +74 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/config.d.ts +2 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +2 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/guards/commit-nudge.d.ts +7 -0
- package/dist/cli/guards/commit-nudge.d.ts.map +1 -0
- package/dist/cli/guards/commit-nudge.js +50 -0
- package/dist/cli/guards/commit-nudge.js.map +1 -0
- package/dist/cli/guards/compaction.d.ts +8 -0
- package/dist/cli/guards/compaction.d.ts.map +1 -0
- package/dist/cli/guards/compaction.js +79 -0
- package/dist/cli/guards/compaction.js.map +1 -0
- package/dist/cli/guards/explore.d.ts +8 -0
- package/dist/cli/guards/explore.d.ts.map +1 -0
- package/dist/cli/guards/explore.js +78 -0
- package/dist/cli/guards/explore.js.map +1 -0
- package/dist/cli/guards/hazard.d.ts +7 -0
- package/dist/cli/guards/hazard.d.ts.map +1 -0
- package/dist/cli/guards/hazard.js +43 -0
- package/dist/cli/guards/hazard.js.map +1 -0
- package/dist/cli/guards/next-action.d.ts +28 -0
- package/dist/cli/guards/next-action.d.ts.map +1 -0
- package/dist/cli/guards/next-action.js +196 -0
- package/dist/cli/guards/next-action.js.map +1 -0
- package/dist/cli/guards/push-nudge.d.ts +7 -0
- package/dist/cli/guards/push-nudge.d.ts.map +1 -0
- package/dist/cli/guards/push-nudge.js +53 -0
- package/dist/cli/guards/push-nudge.js.map +1 -0
- package/dist/cli/guards/review-tier.d.ts +7 -0
- package/dist/cli/guards/review-tier.d.ts.map +1 -0
- package/dist/cli/guards/review-tier.js +108 -0
- package/dist/cli/guards/review-tier.js.map +1 -0
- package/dist/cli/guards/scope-drift.d.ts +7 -0
- package/dist/cli/guards/scope-drift.d.ts.map +1 -0
- package/dist/cli/guards/scope-drift.js +47 -0
- package/dist/cli/guards/scope-drift.js.map +1 -0
- package/dist/cli/guards/stop-check.d.ts +7 -0
- package/dist/cli/guards/stop-check.d.ts.map +1 -0
- package/dist/cli/guards/stop-check.js +34 -0
- package/dist/cli/guards/stop-check.js.map +1 -0
- package/dist/cli/guards/subagent-gate.d.ts +7 -0
- package/dist/cli/guards/subagent-gate.d.ts.map +1 -0
- package/dist/cli/guards/subagent-gate.js +39 -0
- package/dist/cli/guards/subagent-gate.js.map +1 -0
- package/dist/cli/guards/version-check.d.ts +8 -0
- package/dist/cli/guards/version-check.d.ts.map +1 -0
- package/dist/cli/guards/version-check.js +49 -0
- package/dist/cli/guards/version-check.js.map +1 -0
- package/dist/cli/guards/workflow-gate.d.ts +7 -0
- package/dist/cli/guards/workflow-gate.d.ts.map +1 -0
- package/dist/cli/guards/workflow-gate.js +31 -0
- package/dist/cli/guards/workflow-gate.js.map +1 -0
- package/dist/cli/hooks-config.d.ts +9 -0
- package/dist/cli/hooks-config.d.ts.map +1 -0
- package/dist/cli/hooks-config.js +21 -0
- package/dist/cli/hooks-config.js.map +1 -0
- package/dist/cli/index.d.ts +19 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +282 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/loader.d.ts +2 -0
- package/dist/cli/loader.d.ts.map +1 -0
- package/dist/cli/loader.js +2 -0
- package/dist/cli/loader.js.map +1 -0
- package/dist/cli/metaphor.d.ts +6 -0
- package/dist/cli/metaphor.d.ts.map +1 -0
- package/dist/cli/metaphor.js +26 -0
- package/dist/cli/metaphor.js.map +1 -0
- package/dist/cli/registries/api-registry.d.ts +11 -0
- package/dist/cli/registries/api-registry.d.ts.map +1 -0
- package/dist/cli/registries/api-registry.js +42 -0
- package/dist/cli/registries/api-registry.js.map +1 -0
- package/dist/cli/registries/file-registry.d.ts +13 -0
- package/dist/cli/registries/file-registry.d.ts.map +1 -0
- package/dist/cli/registries/file-registry.js +55 -0
- package/dist/cli/registries/file-registry.js.map +1 -0
- package/dist/cli/registries/index.d.ts +7 -0
- package/dist/cli/registries/index.d.ts.map +1 -0
- package/dist/cli/registries/index.js +20 -0
- package/dist/cli/registries/index.js.map +1 -0
- package/dist/cli/store.d.ts +3 -0
- package/dist/cli/store.d.ts.map +1 -0
- package/dist/cli/store.js +13 -0
- package/dist/cli/store.js.map +1 -0
- package/dist/cli/template-generator.d.ts +15 -0
- package/dist/cli/template-generator.d.ts.map +1 -0
- package/dist/cli/template-generator.js +562 -0
- package/dist/cli/template-generator.js.map +1 -0
- package/dist/core/advisor.d.ts +63 -0
- package/dist/core/advisor.d.ts.map +1 -0
- package/dist/core/advisor.js +395 -0
- package/dist/core/advisor.js.map +1 -0
- package/dist/core/briefing.d.ts +103 -0
- package/dist/core/briefing.d.ts.map +1 -0
- package/dist/core/briefing.js +380 -0
- package/dist/core/briefing.js.map +1 -0
- package/dist/core/builder.d.ts +70 -0
- package/dist/core/builder.d.ts.map +1 -0
- package/dist/core/builder.js +175 -0
- package/dist/core/builder.js.map +1 -0
- package/dist/core/ci-signals.d.ts +10 -0
- package/dist/core/ci-signals.d.ts.map +1 -0
- package/dist/core/ci-signals.js +145 -0
- package/dist/core/ci-signals.js.map +1 -0
- package/dist/core/config.d.ts +48 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +42 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/constants.d.ts +14 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +44 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/dashboard.d.ts +40 -0
- package/dist/core/dashboard.d.ts.map +1 -0
- package/dist/core/dashboard.js +413 -0
- package/dist/core/dashboard.js.map +1 -0
- package/dist/core/dispersion.d.ts +12 -0
- package/dist/core/dispersion.d.ts.map +1 -0
- package/dist/core/dispersion.js +164 -0
- package/dist/core/dispersion.js.map +1 -0
- package/dist/core/escalation.d.ts +52 -0
- package/dist/core/escalation.d.ts.map +1 -0
- package/dist/core/escalation.js +105 -0
- package/dist/core/escalation.js.map +1 -0
- package/dist/core/flows.d.ts +44 -0
- package/dist/core/flows.d.ts.map +1 -0
- package/dist/core/flows.js +123 -0
- package/dist/core/flows.js.map +1 -0
- package/dist/core/formatter.d.ts +23 -0
- package/dist/core/formatter.d.ts.map +1 -0
- package/dist/core/formatter.js +301 -0
- package/dist/core/formatter.js.map +1 -0
- package/dist/core/guard.d.ts +124 -0
- package/dist/core/guard.d.ts.map +1 -0
- package/dist/core/guard.js +185 -0
- package/dist/core/guard.js.map +1 -0
- package/dist/core/handicap.d.ts +22 -0
- package/dist/core/handicap.d.ts.map +1 -0
- package/dist/core/handicap.js +111 -0
- package/dist/core/handicap.js.map +1 -0
- package/dist/core/index.d.ts +55 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +62 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/leaderboard.d.ts +32 -0
- package/dist/core/leaderboard.d.ts.map +1 -0
- package/dist/core/leaderboard.js +98 -0
- package/dist/core/leaderboard.js.map +1 -0
- package/dist/core/loader.d.ts +17 -0
- package/dist/core/loader.d.ts.map +1 -0
- package/dist/core/loader.js +68 -0
- package/dist/core/loader.js.map +1 -0
- package/dist/core/metaphor.d.ts +73 -0
- package/dist/core/metaphor.d.ts.map +1 -0
- package/dist/core/metaphor.js +73 -0
- package/dist/core/metaphor.js.map +1 -0
- package/dist/core/metaphors/baseball.d.ts +3 -0
- package/dist/core/metaphors/baseball.d.ts.map +1 -0
- package/dist/core/metaphors/baseball.js +89 -0
- package/dist/core/metaphors/baseball.js.map +1 -0
- package/dist/core/metaphors/dnd.d.ts +3 -0
- package/dist/core/metaphors/dnd.d.ts.map +1 -0
- package/dist/core/metaphors/dnd.js +89 -0
- package/dist/core/metaphors/dnd.js.map +1 -0
- package/dist/core/metaphors/gaming.d.ts +3 -0
- package/dist/core/metaphors/gaming.d.ts.map +1 -0
- package/dist/core/metaphors/gaming.js +89 -0
- package/dist/core/metaphors/gaming.js.map +1 -0
- package/dist/core/metaphors/golf.d.ts +3 -0
- package/dist/core/metaphors/golf.d.ts.map +1 -0
- package/dist/core/metaphors/golf.js +89 -0
- package/dist/core/metaphors/golf.js.map +1 -0
- package/dist/core/metaphors/index.d.ts +8 -0
- package/dist/core/metaphors/index.d.ts.map +1 -0
- package/dist/core/metaphors/index.js +17 -0
- package/dist/core/metaphors/index.js.map +1 -0
- package/dist/core/metaphors/matrix.d.ts +3 -0
- package/dist/core/metaphors/matrix.d.ts.map +1 -0
- package/dist/core/metaphors/matrix.js +89 -0
- package/dist/core/metaphors/matrix.js.map +1 -0
- package/dist/core/metaphors/tennis.d.ts +3 -0
- package/dist/core/metaphors/tennis.d.ts.map +1 -0
- package/dist/core/metaphors/tennis.js +89 -0
- package/dist/core/metaphors/tennis.js.map +1 -0
- package/dist/core/pipeline.d.ts +39 -0
- package/dist/core/pipeline.d.ts.map +1 -0
- package/dist/core/pipeline.js +158 -0
- package/dist/core/pipeline.js.map +1 -0
- package/dist/core/player.d.ts +51 -0
- package/dist/core/player.d.ts.map +1 -0
- package/dist/core/player.js +101 -0
- package/dist/core/player.js.map +1 -0
- package/dist/core/plugins.d.ts +33 -0
- package/dist/core/plugins.d.ts.map +1 -0
- package/dist/core/plugins.js +176 -0
- package/dist/core/plugins.js.map +1 -0
- package/dist/core/pr-signals.d.ts +23 -0
- package/dist/core/pr-signals.d.ts.map +1 -0
- package/dist/core/pr-signals.js +178 -0
- package/dist/core/pr-signals.js.map +1 -0
- package/dist/core/registry.d.ts +20 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +62 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/report.d.ts +50 -0
- package/dist/core/report.d.ts.map +1 -0
- package/dist/core/report.js +392 -0
- package/dist/core/report.js.map +1 -0
- package/dist/core/roadmap.d.ts +74 -0
- package/dist/core/roadmap.d.ts.map +1 -0
- package/dist/core/roadmap.js +389 -0
- package/dist/core/roadmap.js.map +1 -0
- package/dist/core/roles.d.ts +23 -0
- package/dist/core/roles.d.ts.map +1 -0
- package/dist/core/roles.js +107 -0
- package/dist/core/roles.js.map +1 -0
- package/dist/core/standup.d.ts +44 -0
- package/dist/core/standup.d.ts.map +1 -0
- package/dist/core/standup.js +164 -0
- package/dist/core/standup.js.map +1 -0
- package/dist/core/store.d.ts +43 -0
- package/dist/core/store.d.ts.map +1 -0
- package/dist/core/store.js +11 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/team-handicap.d.ts +59 -0
- package/dist/core/team-handicap.d.ts.map +1 -0
- package/dist/core/team-handicap.js +227 -0
- package/dist/core/team-handicap.js.map +1 -0
- package/dist/core/tournament.d.ts +12 -0
- package/dist/core/tournament.d.ts.map +1 -0
- package/dist/core/tournament.js +249 -0
- package/dist/core/tournament.js.map +1 -0
- package/dist/core/types.d.ts +339 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +4 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/validation.d.ts +23 -0
- package/dist/core/validation.d.ts.map +1 -0
- package/dist/core/validation.js +140 -0
- package/dist/core/validation.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +17 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +363 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/index.test.d.ts +2 -0
- package/dist/mcp/index.test.d.ts.map +1 -0
- package/dist/mcp/index.test.js +497 -0
- package/dist/mcp/index.test.js.map +1 -0
- package/dist/mcp/registry.d.ts +17 -0
- package/dist/mcp/registry.d.ts.map +1 -0
- package/dist/mcp/registry.js +708 -0
- package/dist/mcp/registry.js.map +1 -0
- package/dist/mcp/sandbox.d.ts +15 -0
- package/dist/mcp/sandbox.d.ts.map +1 -0
- package/dist/mcp/sandbox.js +153 -0
- package/dist/mcp/sandbox.js.map +1 -0
- package/dist/store/index.d.ts +40 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +324 -0
- package/dist/store/index.js.map +1 -0
- package/dist/tokens/colors.d.ts +47 -0
- package/dist/tokens/colors.d.ts.map +1 -0
- package/dist/tokens/colors.js +56 -0
- package/dist/tokens/colors.js.map +1 -0
- package/dist/tokens/css.d.ts +3 -0
- package/dist/tokens/css.d.ts.map +1 -0
- package/dist/tokens/css.js +58 -0
- package/dist/tokens/css.js.map +1 -0
- package/dist/tokens/index.d.ts +5 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +6 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/spacing.d.ts +23 -0
- package/dist/tokens/spacing.d.ts.map +1 -0
- package/dist/tokens/spacing.js +28 -0
- package/dist/tokens/spacing.js.map +1 -0
- package/dist/tokens/typography.d.ts +28 -0
- package/dist/tokens/typography.d.ts.map +1 -0
- package/dist/tokens/typography.js +34 -0
- package/dist/tokens/typography.js.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
// SLOPE Template Generator
|
|
2
|
+
// Generates platform-specific templates with metaphor-aware vocabulary.
|
|
3
|
+
// When metaphor=golf, output matches the existing static templates in templates/.
|
|
4
|
+
const titleCase = (s) => s.replace(/\b\w/g, c => c.toUpperCase());
|
|
5
|
+
// --- Derived routine names from vocabulary ---
|
|
6
|
+
function routineNames(m) {
|
|
7
|
+
const sprint = titleCase(m.vocabulary.sprint); // "Hole", "Level", "Set"
|
|
8
|
+
const ticket = titleCase(m.vocabulary.ticket); // "Shot", "Quest", "Point"
|
|
9
|
+
const briefing = titleCase(m.vocabulary.briefing); // "Pre-Round Briefing", "Quest Log"
|
|
10
|
+
const review = titleCase(m.vocabulary.review); // "19th Hole", "Save Point"
|
|
11
|
+
const scorecard = titleCase(m.vocabulary.scorecard);
|
|
12
|
+
const handicapCard = titleCase(m.vocabulary.handicapCard);
|
|
13
|
+
const onTarget = titleCase(m.vocabulary.onTarget);
|
|
14
|
+
return { sprint, ticket, briefing, review, scorecard, handicapCard, onTarget };
|
|
15
|
+
}
|
|
16
|
+
// --- Project context file (CLAUDE.md / AGENTS.md) ---
|
|
17
|
+
export function generateProjectContext(m) {
|
|
18
|
+
const r = routineNames(m);
|
|
19
|
+
return `# SLOPE Project
|
|
20
|
+
|
|
21
|
+
This project uses the SLOPE framework for sprint tracking.
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
- \`slope card\` — view ${r.handicapCard.toLowerCase()}
|
|
25
|
+
- \`slope validate\` — validate ${r.scorecard.toLowerCase()}s
|
|
26
|
+
- \`slope review\` — generate sprint review
|
|
27
|
+
- \`slope briefing\` — ${r.briefing.toLowerCase()}
|
|
28
|
+
|
|
29
|
+
## MCP Tools
|
|
30
|
+
A SLOPE MCP server is configured in \`.mcp.json\`. Two tools:
|
|
31
|
+
- \`search\` — discover API functions, types, constants
|
|
32
|
+
- \`execute\` — run JS with full SLOPE API in sandbox
|
|
33
|
+
|
|
34
|
+
## Sprint Workflow
|
|
35
|
+
- **Pre-${r.sprint}:** \`slope briefing\` for handicap, hazards, gotchas
|
|
36
|
+
- **Per-${r.ticket}:** classify each ticket with approach + result + hazards
|
|
37
|
+
- **Post-${r.sprint}:** \`slope validate\` ${r.scorecard.toLowerCase()}, \`slope review\`, update common-issues
|
|
38
|
+
|
|
39
|
+
See .claude/rules/ for detailed checklists.
|
|
40
|
+
|
|
41
|
+
## ${r.scorecard}s
|
|
42
|
+
Stored in docs/retros/sprint-N.json. See .slope/config.json for configuration.
|
|
43
|
+
`;
|
|
44
|
+
}
|
|
45
|
+
// --- Sprint checklist rule ---
|
|
46
|
+
export function generateSprintChecklist(m) {
|
|
47
|
+
const r = routineNames(m);
|
|
48
|
+
const clubs = m.clubs;
|
|
49
|
+
const results = m.shotResults;
|
|
50
|
+
return `# Sprint Checklists (SLOPE Routine Hierarchy)
|
|
51
|
+
|
|
52
|
+
The SLOPE framework organizes sprint work into a hierarchy of routines${m.id === 'golf' ? ", mirroring golf's structured approach to each shot, hole, and round" : `, using ${m.name.toLowerCase()} terminology`}.
|
|
53
|
+
|
|
54
|
+
## Pre-Tournament Routine (Course Strategy)
|
|
55
|
+
|
|
56
|
+
Before starting a new phase or project:
|
|
57
|
+
|
|
58
|
+
1. **Define the vision** — What does the end state look like? Document in a vision doc
|
|
59
|
+
2. **Build the roadmap** — Create \`docs/backlog/roadmap.json\` with sprints, dependencies, and phases
|
|
60
|
+
3. **Run \`slope roadmap validate\`** — Check for structural issues, dependency cycles, numbering gaps
|
|
61
|
+
4. **Run \`slope roadmap review\`** — Automated architect review: scope balance, critical path, bottlenecks
|
|
62
|
+
5. **Identify the critical path** — Run \`slope roadmap show\` to see the dependency graph and parallel tracks
|
|
63
|
+
6. **Plan parallel tracks** — If sprints can run concurrently, plan for multi-agent execution
|
|
64
|
+
|
|
65
|
+
## Pre-${r.sprint} Routine (Sprint Start)
|
|
66
|
+
|
|
67
|
+
Before writing any code in a new sprint:
|
|
68
|
+
|
|
69
|
+
1. **Run \`slope briefing\`** — Single command that outputs handicap snapshot, hazard index, nutrition alerts, filtered gotchas, and session continuity
|
|
70
|
+
- Use \`--categories=testing,api\` or \`--keywords=migration\` to filter for the sprint's work area
|
|
71
|
+
2. **Verify previous ${r.scorecard.toLowerCase()} exists** — If the last sprint's ${r.scorecard.toLowerCase()} wasn't created, create it now
|
|
72
|
+
3. **Branch hygiene check** — \`git branch -a\` to confirm no stale branches remain
|
|
73
|
+
4. **Gap analysis** (if touching API or schema) — Read relevant docs and compare against implementation before writing code
|
|
74
|
+
5. **Set ${r.onTarget.toLowerCase()} and slope** — ${r.onTarget} from ticket count (1-2=3, 3-4=4, 5+=5), slope from complexity factors
|
|
75
|
+
|
|
76
|
+
## Pre-${r.ticket} Routine (Per-Ticket, Before Code)
|
|
77
|
+
|
|
78
|
+
Before starting each ticket:
|
|
79
|
+
|
|
80
|
+
1. **Select your approach** — Declare complexity: ${clubs.driver} (risky/new), ${clubs.long_iron} (multi-package), ${clubs.short_iron} (standard), ${clubs.wedge} (small), ${clubs.putter} (trivial)
|
|
81
|
+
2. **Check the codebase** — Review relevant codebase sections for files you'll modify
|
|
82
|
+
3. **Scan for hazards** — Check known hazards from recent ${r.scorecard.toLowerCase()}s and common issues for known gotchas
|
|
83
|
+
4. **Commit the approach selection** — Note it in your sprint tracking before writing code
|
|
84
|
+
|
|
85
|
+
## Post-${r.ticket} Routine (Per-Ticket, After Completion)
|
|
86
|
+
|
|
87
|
+
After completing each ticket:
|
|
88
|
+
|
|
89
|
+
1. **Score the ${r.ticket.toLowerCase()}** — Determine result: ${results.fairway} (clean start), ${results.green} (landed correctly), ${results.in_the_hole} (perfect), or miss direction (over/under/wrong approach/drift)
|
|
90
|
+
2. **Record hazards** — Note any gotchas encountered
|
|
91
|
+
3. **Check for penalties** — Tests break? Reverts needed? Each penalty adds to the score
|
|
92
|
+
4. **Update sprint tracking** — Mark ticket status
|
|
93
|
+
5. **Push** — The last push is the recovery point
|
|
94
|
+
|
|
95
|
+
## Post-${r.sprint} Routine (Sprint Completion)
|
|
96
|
+
|
|
97
|
+
After all tickets are complete:
|
|
98
|
+
|
|
99
|
+
1. **Score the sprint** — Audit commits, compute final score vs ${r.onTarget.toLowerCase()}
|
|
100
|
+
2. **Build the SLOPE ${r.scorecard.toLowerCase()}** — Create ${r.scorecard.toLowerCase()} JSON in your retros directory. Run \`slope validate\` to confirm no errors
|
|
101
|
+
3. **Distill learnings** — Update common-issues with new recurring patterns
|
|
102
|
+
4. **Create PR and merge** — All artifacts travel with the PR
|
|
103
|
+
5. **Review** — Run \`slope review\` to generate the sprint review markdown
|
|
104
|
+
|
|
105
|
+
## Post-Phase Routine (Per-Phase)
|
|
106
|
+
|
|
107
|
+
At the end of each development phase:
|
|
108
|
+
|
|
109
|
+
1. **Compute ${r.handicapCard.toLowerCase()}** — Run \`slope card\` to see trending stats
|
|
110
|
+
2. **Review miss patterns** — Identify systemic issues from the ${r.handicapCard.toLowerCase()}
|
|
111
|
+
3. **Training program** — Based on trends, identify areas for focused practice sprints
|
|
112
|
+
`;
|
|
113
|
+
}
|
|
114
|
+
// --- Commit discipline rule ---
|
|
115
|
+
export function generateCommitDiscipline(m) {
|
|
116
|
+
const r = routineNames(m);
|
|
117
|
+
return `# Commit Discipline
|
|
118
|
+
|
|
119
|
+
**Commit early, commit often.** Lost context from uncommitted work is the #1 risk.
|
|
120
|
+
The last push is the recovery point — everything since the last push is lost on crash or context loss.
|
|
121
|
+
|
|
122
|
+
## Commit triggers:
|
|
123
|
+
|
|
124
|
+
Commit immediately after ANY of these:
|
|
125
|
+
1. **Each new file** — route, migration, config, component, test. Don't batch file creations.
|
|
126
|
+
2. **Each endpoint or feature** — one feature implemented = one commit.
|
|
127
|
+
3. **Each migration** — commit each separately.
|
|
128
|
+
4. **Each doc update** — spec change, README edit.
|
|
129
|
+
5. **Each bug fix** — no matter how small.
|
|
130
|
+
6. **Before switching context** — moving to a different area? Commit first.
|
|
131
|
+
7. **Before risky operations** — large refactor, dependency upgrade.
|
|
132
|
+
8. **Time check** — if ~15 minutes have passed since the last commit, commit what works.
|
|
133
|
+
9. **Session end** — never leave uncommitted changes. Use a \`wip:\` prefix if incomplete.
|
|
134
|
+
|
|
135
|
+
## Push triggers:
|
|
136
|
+
|
|
137
|
+
Push immediately after ANY of these:
|
|
138
|
+
1. **After each completed ticket (Post-${r.ticket} Routine)** — all commits pushed before merging. Score the ${r.ticket.toLowerCase()}.
|
|
139
|
+
2. **Every 30 minutes** — never go longer without a push.
|
|
140
|
+
3. **Before context compaction** — if context is running low, push first.
|
|
141
|
+
4. **Before switching tickets** — push current branch before starting a new one.
|
|
142
|
+
5. **Session end** — never leave unpushed commits.
|
|
143
|
+
|
|
144
|
+
## Commit message format:
|
|
145
|
+
|
|
146
|
+
\`\`\`
|
|
147
|
+
<type>(<ticket>): <short summary in imperative mood>
|
|
148
|
+
|
|
149
|
+
<optional body explaining why, not what>
|
|
150
|
+
\`\`\`
|
|
151
|
+
|
|
152
|
+
Types: \`feat\`, \`fix\`, \`refactor\`, \`docs\`, \`test\`, \`chore\`, \`wip\`
|
|
153
|
+
`;
|
|
154
|
+
}
|
|
155
|
+
// --- Review loop rule ---
|
|
156
|
+
export function generateReviewLoop() {
|
|
157
|
+
return `# Sprint Plan Review Loop
|
|
158
|
+
|
|
159
|
+
After creating a sprint plan, run a structured review to catch issues before implementation.
|
|
160
|
+
|
|
161
|
+
## Review Tier Selection
|
|
162
|
+
|
|
163
|
+
| Tier | Rounds | When to use |
|
|
164
|
+
|------|--------|-------------|
|
|
165
|
+
| **Skip** | 0 | Research, infra, or docs-only sprints |
|
|
166
|
+
| **Light** | 1 | 1-2 tickets, familiar patterns, single-package |
|
|
167
|
+
| **Standard** | 2 | 3-4 tickets, multi-package, or schema/API changes |
|
|
168
|
+
| **Deep** | 3 | 5+ tickets, new infrastructure, architectural changes |
|
|
169
|
+
|
|
170
|
+
## Review Process
|
|
171
|
+
|
|
172
|
+
### Round 1 — Deep Review
|
|
173
|
+
|
|
174
|
+
Check the plan against the codebase:
|
|
175
|
+
- Does the plan duplicate existing infrastructure?
|
|
176
|
+
- Are dependencies correct and ordering optimal?
|
|
177
|
+
- Does the approach match codebase patterns?
|
|
178
|
+
- Are there scope gaps or underscoped complexity?
|
|
179
|
+
- Does it introduce unnecessary complexity?
|
|
180
|
+
|
|
181
|
+
### Round 2 — Delta Review (Standard+)
|
|
182
|
+
|
|
183
|
+
Review **only what changed** since Round 1:
|
|
184
|
+
- Were Round 1 findings addressed correctly?
|
|
185
|
+
- Did revisions introduce new issues?
|
|
186
|
+
|
|
187
|
+
### Round 3 — Final Sign-off (Deep only)
|
|
188
|
+
|
|
189
|
+
Delta review of Round 2 changes. Expected outcome: approval with minor notes.
|
|
190
|
+
|
|
191
|
+
## Tool Priority
|
|
192
|
+
|
|
193
|
+
1. **Search** to check function signatures, type definitions, patterns
|
|
194
|
+
2. **Find** to verify file existence and related files
|
|
195
|
+
3. **Read** only when search can't answer (complex multi-line logic)
|
|
196
|
+
`;
|
|
197
|
+
}
|
|
198
|
+
// --- Codebase context rule ---
|
|
199
|
+
export function generateCodebaseContextRule() {
|
|
200
|
+
return `# Codebase Context — Map vs Explore
|
|
201
|
+
|
|
202
|
+
SLOPE maintains a codebase map at \`CODEBASE.md\` (~5k tokens) with auto-generated sections covering packages, API surface, CLI commands, guards, MCP tools, tests, sprint history, and known gotchas.
|
|
203
|
+
|
|
204
|
+
## When to use the map (default)
|
|
205
|
+
|
|
206
|
+
- Starting a new sprint — read the map first
|
|
207
|
+
- Understanding feature areas and file locations
|
|
208
|
+
- Finding which package owns a feature
|
|
209
|
+
- Looking up CLI commands, guards, or MCP tools
|
|
210
|
+
- Checking recent sprint history and known gotchas
|
|
211
|
+
|
|
212
|
+
**Access methods:**
|
|
213
|
+
- \`Read CODEBASE.md\` — full map in one read
|
|
214
|
+
- \`search({ module: 'map' })\` — full map via MCP
|
|
215
|
+
- \`search({ module: 'map', query: 'guards' })\` — specific section via MCP
|
|
216
|
+
|
|
217
|
+
## When to explore beyond the map
|
|
218
|
+
|
|
219
|
+
- The map doesn't cover a new package or feature you need detail on
|
|
220
|
+
- You need implementation-level detail (function signatures, complex logic)
|
|
221
|
+
- The map metadata shows it's stale (explore guard will warn you)
|
|
222
|
+
- You're debugging a specific issue that requires reading source code
|
|
223
|
+
|
|
224
|
+
## Keeping the map current
|
|
225
|
+
|
|
226
|
+
- Run \`slope map\` after adding new files, commands, or guards
|
|
227
|
+
- Run \`slope map --check\` to verify staleness before a sprint
|
|
228
|
+
- The map auto-updates only auto-generated sections; manual content is preserved
|
|
229
|
+
`;
|
|
230
|
+
}
|
|
231
|
+
export function generateCursorCodebaseContextRule() {
|
|
232
|
+
return `---
|
|
233
|
+
description: When to use the SLOPE codebase map vs exploring the codebase directly
|
|
234
|
+
globs:
|
|
235
|
+
alwaysApply: true
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
# Codebase Context — Map vs Explore
|
|
239
|
+
|
|
240
|
+
SLOPE maintains a codebase map at \`CODEBASE.md\` (~5k tokens) with auto-generated sections covering packages, API surface, CLI commands, guards, MCP tools, tests, sprint history, and known gotchas.
|
|
241
|
+
|
|
242
|
+
## When to use the map (default)
|
|
243
|
+
|
|
244
|
+
- Starting a new sprint — read the map first
|
|
245
|
+
- Understanding feature areas and file locations
|
|
246
|
+
- Finding which package owns a feature
|
|
247
|
+
- Looking up CLI commands, guards, or MCP tools
|
|
248
|
+
|
|
249
|
+
**Access methods:**
|
|
250
|
+
- Read \`CODEBASE.md\` — full map in one read
|
|
251
|
+
- \`search({ module: 'map' })\` — full map via MCP
|
|
252
|
+
- \`search({ module: 'map', query: 'guards' })\` — specific section via MCP
|
|
253
|
+
|
|
254
|
+
## When to explore beyond the map
|
|
255
|
+
|
|
256
|
+
- The map doesn't cover a new package or feature
|
|
257
|
+
- You need implementation-level detail (function signatures, complex logic)
|
|
258
|
+
- The map metadata shows it's stale
|
|
259
|
+
- You're debugging a specific issue
|
|
260
|
+
|
|
261
|
+
## Keeping the map current
|
|
262
|
+
|
|
263
|
+
- Run \`slope map\` after adding new files, commands, or guards
|
|
264
|
+
- Run \`slope map --check\` to verify staleness before a sprint
|
|
265
|
+
`;
|
|
266
|
+
}
|
|
267
|
+
// --- OpenCode AGENTS.md ---
|
|
268
|
+
export function generateAgentsMd(m) {
|
|
269
|
+
const r = routineNames(m);
|
|
270
|
+
const clubs = m.clubs;
|
|
271
|
+
const results = m.shotResults;
|
|
272
|
+
return `# SLOPE Project
|
|
273
|
+
|
|
274
|
+
This project uses the SLOPE framework for sprint tracking.
|
|
275
|
+
|
|
276
|
+
## Commands
|
|
277
|
+
- \`slope card\` — view ${r.handicapCard.toLowerCase()}
|
|
278
|
+
- \`slope validate\` — validate ${r.scorecard.toLowerCase()}s
|
|
279
|
+
- \`slope review\` — generate sprint review
|
|
280
|
+
- \`slope briefing\` — ${r.briefing.toLowerCase()}
|
|
281
|
+
|
|
282
|
+
## MCP Tools
|
|
283
|
+
A SLOPE MCP server is configured in \`opencode.json\`. Two tools:
|
|
284
|
+
- \`search\` — discover API functions, types, constants
|
|
285
|
+
- \`execute\` — run JS with full SLOPE API in sandbox
|
|
286
|
+
|
|
287
|
+
## Sprint Workflow
|
|
288
|
+
- **Pre-${r.sprint}:** \`slope briefing\` for handicap, hazards, gotchas
|
|
289
|
+
- **Per-${r.ticket}:** classify each ticket with approach + result + hazards
|
|
290
|
+
- **Post-${r.sprint}:** \`slope validate\` ${r.scorecard.toLowerCase()}, \`slope review\`, update common-issues
|
|
291
|
+
|
|
292
|
+
## Approach Complexity
|
|
293
|
+
- ${clubs.driver}: risky/new territory
|
|
294
|
+
- ${clubs.long_iron}: multi-package changes
|
|
295
|
+
- ${clubs.short_iron}: standard work
|
|
296
|
+
- ${clubs.wedge}: small tasks
|
|
297
|
+
- ${clubs.putter}: trivial changes
|
|
298
|
+
|
|
299
|
+
## ${r.ticket} Results
|
|
300
|
+
- ${results.in_the_hole}: perfect execution
|
|
301
|
+
- ${results.green}: landed correctly
|
|
302
|
+
- ${results.fairway}: clean start, needs finishing
|
|
303
|
+
- Miss directions: over-scoped, under-scoped, wrong approach, drift
|
|
304
|
+
|
|
305
|
+
## Commit Discipline
|
|
306
|
+
- Commit after each file, feature, migration, or bug fix
|
|
307
|
+
- Push after each ticket and every 30 minutes
|
|
308
|
+
- Format: \`<type>(<ticket>): <summary>\` (feat/fix/refactor/docs/test/chore)
|
|
309
|
+
|
|
310
|
+
## Codebase Map
|
|
311
|
+
|
|
312
|
+
SLOPE maintains a codebase map at \`CODEBASE.md\` (~5k tokens). Read it before exploring.
|
|
313
|
+
- Run \`slope map\` to generate/update
|
|
314
|
+
- Run \`slope map --check\` to verify staleness
|
|
315
|
+
- Use \`search({ module: 'map' })\` via MCP for targeted queries
|
|
316
|
+
|
|
317
|
+
## ${r.scorecard}s
|
|
318
|
+
Stored in docs/retros/sprint-N.json. See .slope/config.json for configuration.
|
|
319
|
+
`;
|
|
320
|
+
}
|
|
321
|
+
// --- OpenCode plugin ---
|
|
322
|
+
export function generateOpenCodePlugin() {
|
|
323
|
+
return `// SLOPE Plugin for OpenCode
|
|
324
|
+
// Auto-generated by \`slope init --opencode\`
|
|
325
|
+
// Logs session lifecycle events to SLOPE's SQLite store.
|
|
326
|
+
|
|
327
|
+
export default async ({ $ }) => {
|
|
328
|
+
return {
|
|
329
|
+
event: async ({ event }) => {
|
|
330
|
+
switch (event.type) {
|
|
331
|
+
case 'session.created':
|
|
332
|
+
await $\`slope session start --ide=opencode --role=primary\`;
|
|
333
|
+
await $\`slope briefing --compact\`;
|
|
334
|
+
break;
|
|
335
|
+
|
|
336
|
+
case 'session.idle':
|
|
337
|
+
case 'session.deleted':
|
|
338
|
+
if (process.env.SLOPE_SESSION_ID) {
|
|
339
|
+
await $\`slope session end --session-id=\${process.env.SLOPE_SESSION_ID}\`;
|
|
340
|
+
}
|
|
341
|
+
break;
|
|
342
|
+
|
|
343
|
+
case 'session.compacted':
|
|
344
|
+
if (process.env.SLOPE_SESSION_ID) {
|
|
345
|
+
await $\`slope session heartbeat --session-id=\${process.env.SLOPE_SESSION_ID}\`;
|
|
346
|
+
}
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
`;
|
|
353
|
+
}
|
|
354
|
+
// --- Cursor .mdc wrappers ---
|
|
355
|
+
export function generateCursorSprintChecklist(m) {
|
|
356
|
+
const r = routineNames(m);
|
|
357
|
+
const clubs = m.clubs;
|
|
358
|
+
const results = m.shotResults;
|
|
359
|
+
return `---
|
|
360
|
+
description: SLOPE sprint lifecycle checklist — routines for pre-sprint, per-ticket, and post-sprint
|
|
361
|
+
globs:
|
|
362
|
+
alwaysApply: true
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
# Sprint Checklists (SLOPE Routine Hierarchy)
|
|
366
|
+
|
|
367
|
+
The SLOPE framework organizes sprint work into a hierarchy of routines${m.id === 'golf' ? ", mirroring golf's structured approach to each shot, hole, and round" : `, using ${m.name.toLowerCase()} terminology`}.
|
|
368
|
+
|
|
369
|
+
## Pre-Tournament Routine (Course Strategy)
|
|
370
|
+
|
|
371
|
+
Before starting a new phase or project:
|
|
372
|
+
|
|
373
|
+
1. **Build the roadmap** — Create \`docs/backlog/roadmap.json\` with sprints, dependencies, and phases
|
|
374
|
+
2. **Run \`slope roadmap validate\`** — Check for dependency cycles, numbering gaps
|
|
375
|
+
3. **Run \`slope roadmap review\`** — Scope balance, critical path, bottlenecks
|
|
376
|
+
4. **Run \`slope roadmap show\`** — Dependency graph and parallel tracks
|
|
377
|
+
|
|
378
|
+
## Pre-${r.sprint} Routine (Sprint Start)
|
|
379
|
+
|
|
380
|
+
Before writing any code in a new sprint:
|
|
381
|
+
|
|
382
|
+
1. **Run \`slope briefing\`** — Outputs handicap snapshot, hazard index, nutrition alerts, filtered gotchas, and session continuity
|
|
383
|
+
- Use \`--categories=testing,api\` or \`--keywords=migration\` to filter for the sprint's work area
|
|
384
|
+
2. **Verify previous ${r.scorecard.toLowerCase()} exists** — If the last sprint's ${r.scorecard.toLowerCase()} wasn't created, create it now
|
|
385
|
+
3. **Branch hygiene check** — \`git branch -a\` to confirm no stale branches remain
|
|
386
|
+
4. **Set ${r.onTarget.toLowerCase()} and slope** — ${r.onTarget} from ticket count (1-2=3, 3-4=4, 5+=5), slope from complexity factors
|
|
387
|
+
|
|
388
|
+
## Pre-${r.ticket} Routine (Per-Ticket, Before Code)
|
|
389
|
+
|
|
390
|
+
1. **Select your approach** — ${clubs.driver} (risky/new), ${clubs.long_iron} (multi-package), ${clubs.short_iron} (standard), ${clubs.wedge} (small), ${clubs.putter} (trivial)
|
|
391
|
+
2. **Check the codebase** — Review relevant codebase sections for files you'll modify
|
|
392
|
+
3. **Scan for hazards** — Check known hazards from recent ${r.scorecard.toLowerCase()}s and common issues
|
|
393
|
+
|
|
394
|
+
## Post-${r.ticket} Routine (Per-Ticket, After Completion)
|
|
395
|
+
|
|
396
|
+
1. **Score the ${r.ticket.toLowerCase()}** — ${results.in_the_hole} (perfect), ${results.green} (landed), ${results.fairway} (clean start), or miss direction
|
|
397
|
+
2. **Record hazards** — Note any gotchas encountered
|
|
398
|
+
3. **Check for penalties** — Tests break? Reverts needed?
|
|
399
|
+
4. **Push** — The last push is the recovery point
|
|
400
|
+
|
|
401
|
+
## Post-${r.sprint} Routine (Sprint Completion)
|
|
402
|
+
|
|
403
|
+
1. **Build the SLOPE ${r.scorecard.toLowerCase()}** — Create ${r.scorecard.toLowerCase()} JSON. Run \`slope validate\`
|
|
404
|
+
2. **Distill learnings** — Update common-issues with new recurring patterns
|
|
405
|
+
3. **Review** — Run \`slope review\` to generate the sprint review markdown
|
|
406
|
+
4. **Compute ${r.handicapCard.toLowerCase()}** — Run \`slope card\` to see trending stats
|
|
407
|
+
`;
|
|
408
|
+
}
|
|
409
|
+
export function generateCursorCommitDiscipline(m) {
|
|
410
|
+
const r = routineNames(m);
|
|
411
|
+
return `---
|
|
412
|
+
description: Commit and push discipline for SLOPE-managed sprints
|
|
413
|
+
globs:
|
|
414
|
+
alwaysApply: true
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
# Commit Discipline
|
|
418
|
+
|
|
419
|
+
**Commit early, commit often.** The last push is the recovery point.
|
|
420
|
+
|
|
421
|
+
## Commit triggers:
|
|
422
|
+
|
|
423
|
+
Commit immediately after ANY of these:
|
|
424
|
+
1. Each new file — route, migration, config, component, test
|
|
425
|
+
2. Each endpoint or feature implemented
|
|
426
|
+
3. Each migration — commit separately
|
|
427
|
+
4. Each bug fix — no matter how small
|
|
428
|
+
5. Before switching context to a different area
|
|
429
|
+
6. Before risky operations — large refactor, dependency upgrade
|
|
430
|
+
7. Time check — if ~15 minutes since last commit, commit what works
|
|
431
|
+
8. Session end — never leave uncommitted changes (use \`wip:\` prefix if incomplete)
|
|
432
|
+
|
|
433
|
+
## Push triggers:
|
|
434
|
+
|
|
435
|
+
Push immediately after ANY of these:
|
|
436
|
+
1. After each completed ticket (Post-${r.ticket} Routine)
|
|
437
|
+
2. Every 30 minutes
|
|
438
|
+
3. Before switching tickets
|
|
439
|
+
4. Session end — never leave unpushed commits
|
|
440
|
+
|
|
441
|
+
## Commit message format:
|
|
442
|
+
|
|
443
|
+
\`\`\`
|
|
444
|
+
<type>(<ticket>): <short summary in imperative mood>
|
|
445
|
+
\`\`\`
|
|
446
|
+
|
|
447
|
+
Types: \`feat\`, \`fix\`, \`refactor\`, \`docs\`, \`test\`, \`chore\`, \`wip\`
|
|
448
|
+
`;
|
|
449
|
+
}
|
|
450
|
+
export function generateCursorReviewLoop() {
|
|
451
|
+
return `---
|
|
452
|
+
description: Sprint plan review tiers for catching issues before implementation
|
|
453
|
+
globs:
|
|
454
|
+
alwaysApply: false
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
# Sprint Plan Review Loop
|
|
458
|
+
|
|
459
|
+
After creating a sprint plan, run a structured review.
|
|
460
|
+
|
|
461
|
+
## Review Tier Selection
|
|
462
|
+
|
|
463
|
+
| Tier | Rounds | When to use |
|
|
464
|
+
|------|--------|-------------|
|
|
465
|
+
| **Skip** | 0 | Research, infra, or docs-only sprints |
|
|
466
|
+
| **Light** | 1 | 1-2 tickets, familiar patterns, single-package |
|
|
467
|
+
| **Standard** | 2 | 3-4 tickets, multi-package, or schema/API changes |
|
|
468
|
+
| **Deep** | 3 | 5+ tickets, new infrastructure, architectural changes |
|
|
469
|
+
|
|
470
|
+
## Round 1 — Deep Review
|
|
471
|
+
|
|
472
|
+
- Does the plan duplicate existing infrastructure?
|
|
473
|
+
- Are dependencies correct and ordering optimal?
|
|
474
|
+
- Does the approach match codebase patterns?
|
|
475
|
+
- Are there scope gaps or underscoped complexity?
|
|
476
|
+
|
|
477
|
+
## Round 2 — Delta Review (Standard+)
|
|
478
|
+
|
|
479
|
+
Review **only what changed** since Round 1.
|
|
480
|
+
|
|
481
|
+
## Round 3 — Final Sign-off (Deep only)
|
|
482
|
+
|
|
483
|
+
Delta review of Round 2 changes. Expected outcome: approval with minor notes.
|
|
484
|
+
`;
|
|
485
|
+
}
|
|
486
|
+
// --- Cursor .cursorrules (project root context file) ---
|
|
487
|
+
export function generateCursorrules(m) {
|
|
488
|
+
const r = routineNames(m);
|
|
489
|
+
const clubs = m.clubs;
|
|
490
|
+
const results = m.shotResults;
|
|
491
|
+
return `# SLOPE Project
|
|
492
|
+
|
|
493
|
+
This project uses the SLOPE framework for sprint tracking.
|
|
494
|
+
|
|
495
|
+
## Commands
|
|
496
|
+
- \`slope card\` — view ${r.handicapCard.toLowerCase()}
|
|
497
|
+
- \`slope validate\` — validate ${r.scorecard.toLowerCase()}s
|
|
498
|
+
- \`slope review\` — generate sprint review
|
|
499
|
+
- \`slope briefing\` — ${r.briefing.toLowerCase()}
|
|
500
|
+
|
|
501
|
+
## MCP Tools
|
|
502
|
+
A SLOPE MCP server is configured in \`.cursor/mcp.json\`. Two tools:
|
|
503
|
+
- \`search\` — discover API functions, types, constants
|
|
504
|
+
- \`execute\` — run JS with full SLOPE API in sandbox
|
|
505
|
+
|
|
506
|
+
## Sprint Workflow
|
|
507
|
+
- **Pre-${r.sprint}:** \`slope briefing\` for handicap, hazards, gotchas
|
|
508
|
+
- **Per-${r.ticket}:** classify each ticket with approach + result + hazards
|
|
509
|
+
- **Post-${r.sprint}:** \`slope validate\` ${r.scorecard.toLowerCase()}, \`slope review\`, update common-issues
|
|
510
|
+
|
|
511
|
+
## Approach Complexity
|
|
512
|
+
- ${clubs.driver}: risky/new territory
|
|
513
|
+
- ${clubs.long_iron}: multi-package changes
|
|
514
|
+
- ${clubs.short_iron}: standard work
|
|
515
|
+
- ${clubs.wedge}: small tasks
|
|
516
|
+
- ${clubs.putter}: trivial changes
|
|
517
|
+
|
|
518
|
+
## ${r.ticket} Results
|
|
519
|
+
- ${results.in_the_hole}: perfect execution
|
|
520
|
+
- ${results.green}: landed correctly
|
|
521
|
+
- ${results.fairway}: clean start, needs finishing
|
|
522
|
+
- Miss directions: over-scoped, under-scoped, wrong approach, drift
|
|
523
|
+
|
|
524
|
+
## ${r.scorecard}s
|
|
525
|
+
Stored in docs/retros/sprint-N.json. See .slope/config.json for configuration.
|
|
526
|
+
See .cursor/rules/ for detailed checklists.
|
|
527
|
+
`;
|
|
528
|
+
}
|
|
529
|
+
// --- Generic checklist ---
|
|
530
|
+
export function generateGenericChecklist(m) {
|
|
531
|
+
const r = routineNames(m);
|
|
532
|
+
const clubs = m.clubs;
|
|
533
|
+
return `# SLOPE Sprint Checklist
|
|
534
|
+
|
|
535
|
+
## Pre-Tournament (Course Strategy)
|
|
536
|
+
1. Build roadmap in \`docs/backlog/roadmap.json\`
|
|
537
|
+
2. Run \`slope roadmap validate\` — check dependencies and structure
|
|
538
|
+
3. Run \`slope roadmap review\` — scope balance, critical path, bottlenecks
|
|
539
|
+
4. Run \`slope roadmap show\` — view dependency graph
|
|
540
|
+
|
|
541
|
+
## Pre-${r.sprint} (Sprint Start)
|
|
542
|
+
1. Run \`slope briefing\` — handicap, hazards, gotchas, session continuity
|
|
543
|
+
2. Verify previous ${r.scorecard.toLowerCase()} exists
|
|
544
|
+
3. Set ${r.onTarget.toLowerCase()} (1-2 tickets=3, 3-4=4, 5+=5) and slope factors
|
|
545
|
+
|
|
546
|
+
## Per-Ticket
|
|
547
|
+
- **Before:** Select approach (${clubs.driver}/${clubs.long_iron}/${clubs.short_iron}/${clubs.wedge}/${clubs.putter}), scan hazards
|
|
548
|
+
- **After:** Score ${r.ticket.toLowerCase()}, record hazards, check penalties, commit + push
|
|
549
|
+
|
|
550
|
+
## Post-${r.sprint} (Sprint End)
|
|
551
|
+
1. Build ${r.scorecard.toLowerCase()} JSON, run \`slope validate\`
|
|
552
|
+
2. Update common-issues with new patterns
|
|
553
|
+
3. Run \`slope review\` for markdown output
|
|
554
|
+
4. Run \`slope card\` for ${r.handicapCard.toLowerCase()} trends
|
|
555
|
+
|
|
556
|
+
## Commit Discipline
|
|
557
|
+
- Commit after each file, feature, migration, or bug fix
|
|
558
|
+
- Push after each ticket and every 30 minutes
|
|
559
|
+
- Format: \`<type>(<ticket>): <summary>\` (feat/fix/refactor/docs/test/chore)
|
|
560
|
+
`;
|
|
561
|
+
}
|
|
562
|
+
//# sourceMappingURL=template-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-generator.js","sourceRoot":"","sources":["../../src/cli/template-generator.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,wEAAwE;AACxE,kFAAkF;AAIlF,MAAM,SAAS,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAE1E,gDAAgD;AAEhD,SAAS,YAAY,CAAC,CAAqB;IACzC,MAAM,MAA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CAAC,CAAC,MAAM;;qBAEI,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE;SACrC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE;;;iCAGA,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM;qBAC9F,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE;;UAEjC,CAAC,CAAC,MAAM;WACP,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE;;;4BAGR,CAAC,CAAC,YAAY,CAAC,WAAW,EAAE;;;;;;CAMvD,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { GolfScorecard, ClubRecommendation, ShotClassification, ExecutionTrace, TrainingRecommendation, HandicapCard, DispersionReport, CISignal, PRSignal, SlopeEvent } from './types.js';
|
|
2
|
+
export interface RecommendClubInput {
|
|
3
|
+
ticketComplexity: 'trivial' | 'small' | 'medium' | 'large';
|
|
4
|
+
scorecards: GolfScorecard[];
|
|
5
|
+
slopeFactors?: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Recommend a club (approach complexity) for an upcoming ticket.
|
|
9
|
+
*
|
|
10
|
+
* Logic:
|
|
11
|
+
* 1. Map ticket complexity to default club (large → long_iron, never driver)
|
|
12
|
+
* 2. Check historical performance — if default club miss_rate > 30%, downgrade one level
|
|
13
|
+
* 3. Check dispersion for dominant miss — add provisional suggestion if ≥3 total misses
|
|
14
|
+
* 4. Confidence: 1.0 with ≥5 scorecards for that club, 0.5 with 1-4, 0.3 with 0
|
|
15
|
+
*/
|
|
16
|
+
export declare function recommendClub(input: RecommendClubInput): ClubRecommendation;
|
|
17
|
+
/**
|
|
18
|
+
* Classify a shot result from an execution trace.
|
|
19
|
+
*
|
|
20
|
+
* Rules:
|
|
21
|
+
* - All files in scope, no failures, no reverts → in_the_hole
|
|
22
|
+
* - Has hazards, all resolved before first green suite → in_the_hole (in-pass fix)
|
|
23
|
+
* - Has hazards, resolved after initial pass → green (required rework)
|
|
24
|
+
* - Files outside scope modified → missed_long (over-engineering)
|
|
25
|
+
* - Planned files not modified → missed_short (under-scoping)
|
|
26
|
+
* - Reverts > 0 or approach changed → missed_left (wrong approach)
|
|
27
|
+
* - Some test suites fail despite others passing → missed_right (wrong execution)
|
|
28
|
+
*/
|
|
29
|
+
export declare function classifyShot(trace: ExecutionTrace): ShotClassification;
|
|
30
|
+
/** Combined signal sources for enhanced shot classification */
|
|
31
|
+
export interface CombinedSignals {
|
|
32
|
+
trace: ExecutionTrace;
|
|
33
|
+
ci?: CISignal;
|
|
34
|
+
pr?: PRSignal;
|
|
35
|
+
events?: SlopeEvent[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Enhanced shot classification using multiple signal sources.
|
|
39
|
+
*
|
|
40
|
+
* Key difference from classifyShot():
|
|
41
|
+
* - Git-only (no CI, no events) defaults to `green` instead of `in_the_hole`
|
|
42
|
+
* - CI signals can upgrade to `in_the_hole` (all tests pass, no retries, no failures)
|
|
43
|
+
* - CI test failures add miss signals (missed_right)
|
|
44
|
+
* - CI retries reduce confidence
|
|
45
|
+
* - Events (failure, dead_end, scope_change) add miss signals
|
|
46
|
+
*/
|
|
47
|
+
export declare function classifyShotFromSignals(input: CombinedSignals): ShotClassification;
|
|
48
|
+
export interface TrainingPlanInput {
|
|
49
|
+
handicap: HandicapCard;
|
|
50
|
+
dispersion: DispersionReport;
|
|
51
|
+
recentScorecards: GolfScorecard[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Generate training recommendations from handicap trends and dispersion data.
|
|
55
|
+
*
|
|
56
|
+
* Checks:
|
|
57
|
+
* 1. Dominant miss direction → targeted practice (high)
|
|
58
|
+
* 2. Worsening trend (last_5 > all_time) → review (high)
|
|
59
|
+
* 3. Club-specific issues (miss_rate > 50%) → adjustment (medium)
|
|
60
|
+
* 4. Recurring hazard types in 3+ consecutive sprints → attention (medium)
|
|
61
|
+
*/
|
|
62
|
+
export declare function generateTrainingPlan(input: TrainingPlanInput): TrainingRecommendation[];
|
|
63
|
+
//# sourceMappingURL=advisor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advisor.d.ts","sourceRoot":"","sources":["../../src/core/advisor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EAClB,kBAAkB,EAGlB,cAAc,EACd,sBAAsB,EAEtB,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,UAAU,EACX,MAAM,YAAY,CAAC;AA6BpB,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3D,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,kBAAkB,CAkD3E;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,kBAAkB,CAgFtE;AAMD,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,cAAc,CAAC;IACtB,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,GAAG,kBAAkB,CAmIlF;AA0CD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,YAAY,CAAC;IACvB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,gBAAgB,EAAE,aAAa,EAAE,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,GAAG,sBAAsB,EAAE,CA6FvF"}
|