@specforge/cli 0.1.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 +781 -0
- package/bin/specforge +21 -0
- package/dist/channel.d.ts +27 -0
- package/dist/channel.d.ts.map +1 -0
- package/dist/channel.js +22 -0
- package/dist/channel.js.map +1 -0
- package/dist/cli/commands/configure.d.ts +16 -0
- package/dist/cli/commands/configure.d.ts.map +1 -0
- package/dist/cli/commands/configure.js +186 -0
- package/dist/cli/commands/configure.js.map +1 -0
- package/dist/cli/commands/configure.types.d.ts +110 -0
- package/dist/cli/commands/configure.types.d.ts.map +1 -0
- package/dist/cli/commands/configure.types.js +82 -0
- package/dist/cli/commands/configure.types.js.map +1 -0
- package/dist/cli/commands/debug/call.d.ts +14 -0
- package/dist/cli/commands/debug/call.d.ts.map +1 -0
- package/dist/cli/commands/debug/call.js +96 -0
- package/dist/cli/commands/debug/call.js.map +1 -0
- package/dist/cli/commands/debug/index.d.ts +12 -0
- package/dist/cli/commands/debug/index.d.ts.map +1 -0
- package/dist/cli/commands/debug/index.js +14 -0
- package/dist/cli/commands/debug/index.js.map +1 -0
- package/dist/cli/commands/debug/register.d.ts +11 -0
- package/dist/cli/commands/debug/register.d.ts.map +1 -0
- package/dist/cli/commands/debug/register.js +78 -0
- package/dist/cli/commands/debug/register.js.map +1 -0
- package/dist/cli/commands/debug/test.d.ts +13 -0
- package/dist/cli/commands/debug/test.d.ts.map +1 -0
- package/dist/cli/commands/debug/test.js +91 -0
- package/dist/cli/commands/debug/test.js.map +1 -0
- package/dist/cli/commands/debug/tools.d.ts +13 -0
- package/dist/cli/commands/debug/tools.d.ts.map +1 -0
- package/dist/cli/commands/debug/tools.js +86 -0
- package/dist/cli/commands/debug/tools.js.map +1 -0
- package/dist/cli/commands/debug/types.d.ts +119 -0
- package/dist/cli/commands/debug/types.d.ts.map +1 -0
- package/dist/cli/commands/debug/types.js +36 -0
- package/dist/cli/commands/debug/types.js.map +1 -0
- package/dist/cli/commands/debug/whoami.d.ts +13 -0
- package/dist/cli/commands/debug/whoami.d.ts.map +1 -0
- package/dist/cli/commands/debug/whoami.js +131 -0
- package/dist/cli/commands/debug/whoami.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +16 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +413 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/doctor.types.d.ts +180 -0
- package/dist/cli/commands/doctor.types.d.ts.map +1 -0
- package/dist/cli/commands/doctor.types.js +140 -0
- package/dist/cli/commands/doctor.types.js.map +1 -0
- package/dist/cli/commands/feedback.d.ts +27 -0
- package/dist/cli/commands/feedback.d.ts.map +1 -0
- package/dist/cli/commands/feedback.js +262 -0
- package/dist/cli/commands/feedback.js.map +1 -0
- package/dist/cli/commands/feedback.types.d.ts +116 -0
- package/dist/cli/commands/feedback.types.d.ts.map +1 -0
- package/dist/cli/commands/feedback.types.js +65 -0
- package/dist/cli/commands/feedback.types.js.map +1 -0
- package/dist/cli/commands/index.d.ts +15 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +21 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/init.d.ts +17 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +773 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/init.types.d.ts +193 -0
- package/dist/cli/commands/init.types.d.ts.map +1 -0
- package/dist/cli/commands/init.types.js +29 -0
- package/dist/cli/commands/init.types.js.map +1 -0
- package/dist/cli/commands/invitations.d.ts +31 -0
- package/dist/cli/commands/invitations.d.ts.map +1 -0
- package/dist/cli/commands/invitations.js +250 -0
- package/dist/cli/commands/invitations.js.map +1 -0
- package/dist/cli/commands/login.d.ts +40 -0
- package/dist/cli/commands/login.d.ts.map +1 -0
- package/dist/cli/commands/login.js +139 -0
- package/dist/cli/commands/login.js.map +1 -0
- package/dist/cli/commands/members.d.ts +55 -0
- package/dist/cli/commands/members.d.ts.map +1 -0
- package/dist/cli/commands/members.js +296 -0
- package/dist/cli/commands/members.js.map +1 -0
- package/dist/cli/commands/scaffold/agent-types.d.ts +54 -0
- package/dist/cli/commands/scaffold/agent-types.d.ts.map +1 -0
- package/dist/cli/commands/scaffold/agent-types.js +22 -0
- package/dist/cli/commands/scaffold/agent-types.js.map +1 -0
- package/dist/cli/commands/scaffold/display.d.ts +56 -0
- package/dist/cli/commands/scaffold/display.d.ts.map +1 -0
- package/dist/cli/commands/scaffold/display.js +217 -0
- package/dist/cli/commands/scaffold/display.js.map +1 -0
- package/dist/cli/commands/scaffold/files.d.ts +99 -0
- package/dist/cli/commands/scaffold/files.d.ts.map +1 -0
- package/dist/cli/commands/scaffold/files.js +122 -0
- package/dist/cli/commands/scaffold/files.js.map +1 -0
- package/dist/cli/commands/scaffold/index.d.ts +13 -0
- package/dist/cli/commands/scaffold/index.d.ts.map +1 -0
- package/dist/cli/commands/scaffold/index.js +12 -0
- package/dist/cli/commands/scaffold/index.js.map +1 -0
- package/dist/cli/commands/scaffold/register.d.ts +11 -0
- package/dist/cli/commands/scaffold/register.d.ts.map +1 -0
- package/dist/cli/commands/scaffold/register.js +11 -0
- package/dist/cli/commands/scaffold/register.js.map +1 -0
- package/dist/cli/commands/scaffold/scaffold.d.ts +11 -0
- package/dist/cli/commands/scaffold/scaffold.d.ts.map +1 -0
- package/dist/cli/commands/scaffold/scaffold.js +728 -0
- package/dist/cli/commands/scaffold/scaffold.js.map +1 -0
- package/dist/cli/commands/scaffold/targets.d.ts +60 -0
- package/dist/cli/commands/scaffold/targets.d.ts.map +1 -0
- package/dist/cli/commands/scaffold/targets.js +251 -0
- package/dist/cli/commands/scaffold/targets.js.map +1 -0
- package/dist/cli/commands/scaffold/types.d.ts +170 -0
- package/dist/cli/commands/scaffold/types.d.ts.map +1 -0
- package/dist/cli/commands/scaffold/types.js +12 -0
- package/dist/cli/commands/scaffold/types.js.map +1 -0
- package/dist/cli/commands/scaffold/utils.d.ts +89 -0
- package/dist/cli/commands/scaffold/utils.d.ts.map +1 -0
- package/dist/cli/commands/scaffold/utils.js +401 -0
- package/dist/cli/commands/scaffold/utils.js.map +1 -0
- package/dist/cli/commands/status.d.ts +19 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +124 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/status.types.d.ts +37 -0
- package/dist/cli/commands/status.types.d.ts.map +1 -0
- package/dist/cli/commands/status.types.js +7 -0
- package/dist/cli/commands/status.types.js.map +1 -0
- package/dist/cli/commands/switch.d.ts +18 -0
- package/dist/cli/commands/switch.d.ts.map +1 -0
- package/dist/cli/commands/switch.js +134 -0
- package/dist/cli/commands/switch.js.map +1 -0
- package/dist/cli/commands/switch.types.d.ts +123 -0
- package/dist/cli/commands/switch.types.d.ts.map +1 -0
- package/dist/cli/commands/switch.types.js +46 -0
- package/dist/cli/commands/switch.types.js.map +1 -0
- package/dist/cli/config/agent-teams.types.d.ts +120 -0
- package/dist/cli/config/agent-teams.types.d.ts.map +1 -0
- package/dist/cli/config/agent-teams.types.js +23 -0
- package/dist/cli/config/agent-teams.types.js.map +1 -0
- package/dist/cli/config/index.d.ts +13 -0
- package/dist/cli/config/index.d.ts.map +1 -0
- package/dist/cli/config/index.js +7 -0
- package/dist/cli/config/index.js.map +1 -0
- package/dist/cli/config/loader.d.ts +114 -0
- package/dist/cli/config/loader.d.ts.map +1 -0
- package/dist/cli/config/loader.js +198 -0
- package/dist/cli/config/loader.js.map +1 -0
- package/dist/cli/config/paths.d.ts +107 -0
- package/dist/cli/config/paths.d.ts.map +1 -0
- package/dist/cli/config/paths.js +79 -0
- package/dist/cli/config/paths.js.map +1 -0
- package/dist/cli/config/planning-sessions-registry.d.ts +52 -0
- package/dist/cli/config/planning-sessions-registry.d.ts.map +1 -0
- package/dist/cli/config/planning-sessions-registry.js +46 -0
- package/dist/cli/config/planning-sessions-registry.js.map +1 -0
- package/dist/cli/config/types.d.ts +186 -0
- package/dist/cli/config/types.d.ts.map +1 -0
- package/dist/cli/config/types.js +27 -0
- package/dist/cli/config/types.js.map +1 -0
- package/dist/cli/config/validation.d.ts +62 -0
- package/dist/cli/config/validation.d.ts.map +1 -0
- package/dist/cli/config/validation.js +133 -0
- package/dist/cli/config/validation.js.map +1 -0
- package/dist/cli/config/writer.d.ts +153 -0
- package/dist/cli/config/writer.d.ts.map +1 -0
- package/dist/cli/config/writer.js +168 -0
- package/dist/cli/config/writer.js.map +1 -0
- package/dist/cli/index.d.ts +30 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +142 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/middleware/auth-guard.d.ts +107 -0
- package/dist/cli/middleware/auth-guard.d.ts.map +1 -0
- package/dist/cli/middleware/auth-guard.js +97 -0
- package/dist/cli/middleware/auth-guard.js.map +1 -0
- package/dist/cli/middleware/error-handler.d.ts +133 -0
- package/dist/cli/middleware/error-handler.d.ts.map +1 -0
- package/dist/cli/middleware/error-handler.js +139 -0
- package/dist/cli/middleware/error-handler.js.map +1 -0
- package/dist/cli/middleware/index.d.ts +6 -0
- package/dist/cli/middleware/index.d.ts.map +1 -0
- package/dist/cli/middleware/index.js +3 -0
- package/dist/cli/middleware/index.js.map +1 -0
- package/dist/cli/templates/agents/content/core/sfag-orchestrator.d.ts +9 -0
- package/dist/cli/templates/agents/content/core/sfag-orchestrator.d.ts.map +1 -0
- package/dist/cli/templates/agents/content/core/sfag-orchestrator.js +160 -0
- package/dist/cli/templates/agents/content/core/sfag-orchestrator.js.map +1 -0
- package/dist/cli/templates/agents/content/core/sfag-spec-creator.d.ts +9 -0
- package/dist/cli/templates/agents/content/core/sfag-spec-creator.d.ts.map +1 -0
- package/dist/cli/templates/agents/content/core/sfag-spec-creator.js +343 -0
- package/dist/cli/templates/agents/content/core/sfag-spec-creator.js.map +1 -0
- package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.d.ts +9 -0
- package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.d.ts.map +1 -0
- package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.js +254 -0
- package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.js.map +1 -0
- package/dist/cli/templates/agents/content/research/sfag-package-researcher.d.ts +8 -0
- package/dist/cli/templates/agents/content/research/sfag-package-researcher.d.ts.map +1 -0
- package/dist/cli/templates/agents/content/research/sfag-package-researcher.js +128 -0
- package/dist/cli/templates/agents/content/research/sfag-package-researcher.js.map +1 -0
- package/dist/cli/templates/agents/index.d.ts +23 -0
- package/dist/cli/templates/agents/index.d.ts.map +1 -0
- package/dist/cli/templates/agents/index.js +29 -0
- package/dist/cli/templates/agents/index.js.map +1 -0
- package/dist/cli/templates/commands.d.ts +17 -0
- package/dist/cli/templates/commands.d.ts.map +1 -0
- package/dist/cli/templates/commands.js +78 -0
- package/dist/cli/templates/commands.js.map +1 -0
- package/dist/cli/templates/content/sf-blockers.d.ts +7 -0
- package/dist/cli/templates/content/sf-blockers.d.ts.map +1 -0
- package/dist/cli/templates/content/sf-blockers.js +69 -0
- package/dist/cli/templates/content/sf-blockers.js.map +1 -0
- package/dist/cli/templates/content/sf-commit.d.ts +7 -0
- package/dist/cli/templates/content/sf-commit.d.ts.map +1 -0
- package/dist/cli/templates/content/sf-commit.js +79 -0
- package/dist/cli/templates/content/sf-commit.js.map +1 -0
- package/dist/cli/templates/content/sf-context.d.ts +7 -0
- package/dist/cli/templates/content/sf-context.d.ts.map +1 -0
- package/dist/cli/templates/content/sf-context.js +63 -0
- package/dist/cli/templates/content/sf-context.js.map +1 -0
- package/dist/cli/templates/content/sf-help.d.ts +7 -0
- package/dist/cli/templates/content/sf-help.d.ts.map +1 -0
- package/dist/cli/templates/content/sf-help.js +42 -0
- package/dist/cli/templates/content/sf-help.js.map +1 -0
- package/dist/cli/templates/content/sf-init.d.ts +7 -0
- package/dist/cli/templates/content/sf-init.d.ts.map +1 -0
- package/dist/cli/templates/content/sf-init.js +62 -0
- package/dist/cli/templates/content/sf-init.js.map +1 -0
- package/dist/cli/templates/content/sf-reset.d.ts +7 -0
- package/dist/cli/templates/content/sf-reset.d.ts.map +1 -0
- package/dist/cli/templates/content/sf-reset.js +67 -0
- package/dist/cli/templates/content/sf-reset.js.map +1 -0
- package/dist/cli/templates/content/sf-search.d.ts +7 -0
- package/dist/cli/templates/content/sf-search.d.ts.map +1 -0
- package/dist/cli/templates/content/sf-search.js +63 -0
- package/dist/cli/templates/content/sf-search.js.map +1 -0
- package/dist/cli/templates/content/sf-status.d.ts +7 -0
- package/dist/cli/templates/content/sf-status.d.ts.map +1 -0
- package/dist/cli/templates/content/sf-status.js +62 -0
- package/dist/cli/templates/content/sf-status.js.map +1 -0
- package/dist/cli/templates/index.d.ts +8 -0
- package/dist/cli/templates/index.d.ts.map +1 -0
- package/dist/cli/templates/index.js +17 -0
- package/dist/cli/templates/index.js.map +1 -0
- package/dist/cli/ui/banner.d.ts +38 -0
- package/dist/cli/ui/banner.d.ts.map +1 -0
- package/dist/cli/ui/banner.js +89 -0
- package/dist/cli/ui/banner.js.map +1 -0
- package/dist/cli/ui/colors.d.ts +76 -0
- package/dist/cli/ui/colors.d.ts.map +1 -0
- package/dist/cli/ui/colors.js +67 -0
- package/dist/cli/ui/colors.js.map +1 -0
- package/dist/cli/ui/index.d.ts +7 -0
- package/dist/cli/ui/index.d.ts.map +1 -0
- package/dist/cli/ui/index.js +4 -0
- package/dist/cli/ui/index.js.map +1 -0
- package/dist/cli/ui/output.d.ts +117 -0
- package/dist/cli/ui/output.d.ts.map +1 -0
- package/dist/cli/ui/output.js +83 -0
- package/dist/cli/ui/output.js.map +1 -0
- package/dist/cli/ui/spinner.d.ts +120 -0
- package/dist/cli/ui/spinner.d.ts.map +1 -0
- package/dist/cli/ui/spinner.js +158 -0
- package/dist/cli/ui/spinner.js.map +1 -0
- package/dist/cli/ui/time.d.ts +54 -0
- package/dist/cli/ui/time.d.ts.map +1 -0
- package/dist/cli/ui/time.js +119 -0
- package/dist/cli/ui/time.js.map +1 -0
- package/dist/client/api-client.d.ts +123 -0
- package/dist/client/api-client.d.ts.map +1 -0
- package/dist/client/api-client.js +105 -0
- package/dist/client/api-client.js.map +1 -0
- package/dist/client/cli-client.d.ts +26 -0
- package/dist/client/cli-client.d.ts.map +1 -0
- package/dist/client/cli-client.js +20 -0
- package/dist/client/cli-client.js.map +1 -0
- package/dist/config/index.d.ts +78 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +79 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/format.d.ts +126 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/format.js +71 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/index.d.ts +11 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +45 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/monorepo-detector.d.ts +31 -0
- package/dist/lib/monorepo-detector.d.ts.map +1 -0
- package/dist/lib/monorepo-detector.js +188 -0
- package/dist/lib/monorepo-detector.js.map +1 -0
- package/dist/lib/prompt-generator.d.ts +65 -0
- package/dist/lib/prompt-generator.d.ts.map +1 -0
- package/dist/lib/prompt-generator.js +162 -0
- package/dist/lib/prompt-generator.js.map +1 -0
- package/dist/lib/strategy-analyzer.d.ts +59 -0
- package/dist/lib/strategy-analyzer.d.ts.map +1 -0
- package/dist/lib/strategy-analyzer.js +91 -0
- package/dist/lib/strategy-analyzer.js.map +1 -0
- package/dist/lib/workflow-definitions.d.ts +41 -0
- package/dist/lib/workflow-definitions.d.ts.map +1 -0
- package/dist/lib/workflow-definitions.js +497 -0
- package/dist/lib/workflow-definitions.js.map +1 -0
- package/dist/patterns/index.d.ts +9 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +21 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/inheritance.d.ts +193 -0
- package/dist/patterns/inheritance.d.ts.map +1 -0
- package/dist/patterns/inheritance.js +125 -0
- package/dist/patterns/inheritance.js.map +1 -0
- package/dist/server.d.ts +44 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +91 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/core/context-helper.d.ts +50 -0
- package/dist/tools/core/context-helper.d.ts.map +1 -0
- package/dist/tools/core/context-helper.js +49 -0
- package/dist/tools/core/context-helper.js.map +1 -0
- package/dist/tools/core/index.d.ts +2 -0
- package/dist/tools/core/index.d.ts.map +1 -0
- package/dist/tools/core/index.js +2 -0
- package/dist/tools/core/index.js.map +1 -0
- package/dist/tools/index.d.ts +58 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +1499 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/transport/__tests__/resolve-endpoint.test.d.ts +6 -0
- package/dist/transport/__tests__/resolve-endpoint.test.d.ts.map +1 -0
- package/dist/transport/index.d.ts +6 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +5 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/interface.d.ts +25 -0
- package/dist/transport/interface.d.ts.map +1 -0
- package/dist/transport/interface.js +1 -0
- package/dist/transport/interface.js.map +1 -0
- package/dist/transport/remote.d.ts +38 -0
- package/dist/transport/remote.d.ts.map +1 -0
- package/dist/transport/remote.js +107 -0
- package/dist/transport/remote.js.map +1 -0
- package/dist/transport/resolve-endpoint.d.ts +58 -0
- package/dist/transport/resolve-endpoint.d.ts.map +1 -0
- package/dist/transport/resolve-endpoint.js +146 -0
- package/dist/transport/resolve-endpoint.js.map +1 -0
- package/dist/types/index.d.ts +212 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -0
- package/dist/validation/index.d.ts +86 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +392 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/ticket-validation.d.ts +162 -0
- package/dist/validation/ticket-validation.d.ts.map +1 -0
- package/dist/validation/ticket-validation.js +188 -0
- package/dist/validation/ticket-validation.js.map +1 -0
- package/package.json +69 -0
- package/src/cli/templates/agents/content/core/sfag-orchestrator.ts +165 -0
- package/src/cli/templates/agents/content/core/sfag-spec-creator.ts +348 -0
- package/src/cli/templates/agents/content/core/sfag-ticket-implementer.ts +259 -0
- package/src/cli/templates/agents/content/research/sfag-package-researcher.ts +132 -0
- package/src/cli/templates/agents/index.ts +47 -0
- package/src/cli/templates/commands.ts +90 -0
- package/src/cli/templates/content/sf-blockers.ts +71 -0
- package/src/cli/templates/content/sf-commit.ts +81 -0
- package/src/cli/templates/content/sf-context.ts +65 -0
- package/src/cli/templates/content/sf-help.ts +44 -0
- package/src/cli/templates/content/sf-init.ts +64 -0
- package/src/cli/templates/content/sf-reset.ts +69 -0
- package/src/cli/templates/content/sf-search.ts +65 -0
- package/src/cli/templates/content/sf-status.ts +64 -0
- package/src/cli/templates/index.ts +16 -0
- package/src/cli/templates/skills/specforge-conventions.md +114 -0
- package/src/cli/templates/skills/specforge-orchestrator.md +409 -0
- package/src/cli/templates/skills/specforge-validator.md +128 -0
- package/src/cli/templates/skills/specforge-worker.md +412 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SF-Search Command Template
|
|
3
|
+
*
|
|
4
|
+
* Template for searching tickets by text, tags, or filters.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SF_SEARCH_CONTENT = `# Search Tickets (SpecForge)
|
|
8
|
+
|
|
9
|
+
Search tickets by text, tags, status, or other filters.
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
- \`$ARGUMENTS\` - Required: Search query
|
|
13
|
+
|
|
14
|
+
## Task
|
|
15
|
+
|
|
16
|
+
### 1. Parse Search Query
|
|
17
|
+
|
|
18
|
+
**Logic:**
|
|
19
|
+
- Extract search terms
|
|
20
|
+
- Parse filters (status:, epic:, tag:)
|
|
21
|
+
- Identify text search vs filter search
|
|
22
|
+
|
|
23
|
+
### 2. Search Tickets
|
|
24
|
+
|
|
25
|
+
**MCP Calls:**
|
|
26
|
+
\`\`\`typescript
|
|
27
|
+
// Read project config
|
|
28
|
+
const config = readFile('.specforge.json')
|
|
29
|
+
const specificationId = config.activeSpecification?.id
|
|
30
|
+
|
|
31
|
+
search_tickets({
|
|
32
|
+
specificationId,
|
|
33
|
+
query: extractedTerms,
|
|
34
|
+
status: extractedStatus,
|
|
35
|
+
tags: extractedTags
|
|
36
|
+
})
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
### 3. Display Search Results
|
|
40
|
+
|
|
41
|
+
**Output:**
|
|
42
|
+
\`\`\`
|
|
43
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
+
SEARCH RESULTS
|
|
45
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
46
|
+
Query: {query}
|
|
47
|
+
Found: {resultCount} tickets
|
|
48
|
+
|
|
49
|
+
RESULTS
|
|
50
|
+
─────────────────────────────────────────────────────────────────
|
|
51
|
+
E{n}-T{m} │ {title} │ {status}
|
|
52
|
+
{matchedText}...
|
|
53
|
+
|
|
54
|
+
E{n}-T{m} │ {title} │ {status}
|
|
55
|
+
{matchedText}...
|
|
56
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
57
|
+
|
|
58
|
+
Tip: Use filters like status:ready or epic:E1
|
|
59
|
+
\`\`\`
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
- Supports text search and filters
|
|
63
|
+
- Filters: status:, epic:, tag:, priority:
|
|
64
|
+
- Can combine multiple filters
|
|
65
|
+
`;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SF-Status Command Template
|
|
3
|
+
*
|
|
4
|
+
* Template for displaying implementation status with consolidated tools.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SF_STATUS_CONTENT = `# Implementation Status (SpecForge)
|
|
8
|
+
|
|
9
|
+
Display comprehensive implementation status with consolidated progress view.
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
- \`$ARGUMENTS\` - Optional: Specification ID to view status for
|
|
13
|
+
|
|
14
|
+
## Task
|
|
15
|
+
|
|
16
|
+
### 1. Get Specification Context
|
|
17
|
+
|
|
18
|
+
**Logic:**
|
|
19
|
+
\`\`\`typescript
|
|
20
|
+
// Read project config
|
|
21
|
+
const config = readFile('.specforge.json')
|
|
22
|
+
const specificationId = $ARGUMENTS || config.activeSpecification?.id
|
|
23
|
+
\`\`\`
|
|
24
|
+
|
|
25
|
+
### 2. Load Implementation Data
|
|
26
|
+
|
|
27
|
+
**MCP Calls:**
|
|
28
|
+
\`\`\`typescript
|
|
29
|
+
get_specification(specificationId)
|
|
30
|
+
list_epics({ specificationId })
|
|
31
|
+
list_tickets({ specificationId })
|
|
32
|
+
\`\`\`
|
|
33
|
+
|
|
34
|
+
### 3. Display Status Overview
|
|
35
|
+
|
|
36
|
+
**Output:**
|
|
37
|
+
\`\`\`
|
|
38
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
39
|
+
IMPLEMENTATION STATUS
|
|
40
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
41
|
+
Specification: {title}
|
|
42
|
+
Progress: {done}/{total} ({percentage}%)
|
|
43
|
+
|
|
44
|
+
EPICS
|
|
45
|
+
─────────────────────────────────────────────────────────────────
|
|
46
|
+
E{n} │ {title} │ {progress}% │ {status}
|
|
47
|
+
|
|
48
|
+
READY TICKETS
|
|
49
|
+
─────────────────────────────────────────────────────────────────
|
|
50
|
+
E{n}-T{m} │ {title} │ {priority}
|
|
51
|
+
|
|
52
|
+
BLOCKED TICKETS
|
|
53
|
+
─────────────────────────────────────────────────────────────────
|
|
54
|
+
E{n}-T{m} │ {title} │ Blocked by: {dependencies}
|
|
55
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
56
|
+
|
|
57
|
+
Next: Run /sf-next to start implementation
|
|
58
|
+
\`\`\`
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
- Shows overall progress and epic breakdown
|
|
62
|
+
- Lists ready and blocked tickets
|
|
63
|
+
- Use /sf-validate for system health check
|
|
64
|
+
`;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Templates Module
|
|
3
|
+
*
|
|
4
|
+
* Exports all template functions for command and agent scaffolding.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Command templates
|
|
8
|
+
export { getCommandTemplates, getCommandTemplate, getCommandsByCategory } from './commands.js';
|
|
9
|
+
|
|
10
|
+
// Agent templates
|
|
11
|
+
export {
|
|
12
|
+
getAgentTemplates,
|
|
13
|
+
getAgentTemplate,
|
|
14
|
+
getAgentsByCategory,
|
|
15
|
+
getAgentNames,
|
|
16
|
+
} from './agents/index.js';
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specforge-conventions
|
|
3
|
+
description: Project-specific coding standards and conventions for SpecForge Agent Teams workers
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{PROJECT_NAME}} — Coding Conventions
|
|
7
|
+
|
|
8
|
+
Project-specific coding standards for SpecForge Agent Teams workers. Workers follow these conventions when implementing tickets.
|
|
9
|
+
|
|
10
|
+
## Language & Framework
|
|
11
|
+
|
|
12
|
+
- **Language:** {{LANGUAGE}}
|
|
13
|
+
- **Framework:** {{FRAMEWORK}}
|
|
14
|
+
- **Runtime:** {{RUNTIME}}
|
|
15
|
+
|
|
16
|
+
## Naming Conventions
|
|
17
|
+
|
|
18
|
+
### Files
|
|
19
|
+
- Components: `PascalCase.tsx` (e.g., `UserProfile.tsx`)
|
|
20
|
+
- Utilities/helpers: `kebab-case.ts` (e.g., `date-utils.ts`)
|
|
21
|
+
- Tests: `{filename}.test.ts` or `{filename}.spec.ts`
|
|
22
|
+
- Styles: `{ComponentName}.module.css` or co-located
|
|
23
|
+
|
|
24
|
+
### Code
|
|
25
|
+
- Functions: `camelCase` (e.g., `getUserById`)
|
|
26
|
+
- Interfaces/Types: `PascalCase` (e.g., `UserProfile`, `CreateUserInput`)
|
|
27
|
+
- Constants: `UPPER_SNAKE_CASE` (e.g., `MAX_RETRIES`)
|
|
28
|
+
- Enums: `PascalCase` with `PascalCase` members
|
|
29
|
+
- Boolean variables: prefix with `is`, `has`, `should`, `can` (e.g., `isLoading`)
|
|
30
|
+
|
|
31
|
+
## Import Style
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
// 1. External packages
|
|
35
|
+
import React from 'react';
|
|
36
|
+
import { useState } from 'react';
|
|
37
|
+
|
|
38
|
+
// 2. Internal aliases (@/ paths)
|
|
39
|
+
import { Button } from '@/components/ui/Button';
|
|
40
|
+
import { useAuth } from '@/lib/hooks/useAuth';
|
|
41
|
+
|
|
42
|
+
// 3. Relative imports
|
|
43
|
+
import { helper } from './utils';
|
|
44
|
+
import type { Props } from './types';
|
|
45
|
+
|
|
46
|
+
// 4. Type-only imports (separate)
|
|
47
|
+
import type { User } from '@/lib/types';
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Error Handling
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
// Use try/catch for async operations
|
|
54
|
+
try {
|
|
55
|
+
const result = await apiCall();
|
|
56
|
+
return result;
|
|
57
|
+
} catch (error) {
|
|
58
|
+
// Log with context
|
|
59
|
+
console.error('Failed to fetch user:', error);
|
|
60
|
+
// Re-throw or return error state — don't swallow errors silently
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- Use typed error handling where possible
|
|
66
|
+
- Return error states from hooks/functions rather than throwing in UI code
|
|
67
|
+
- Log errors with context (what operation failed, relevant IDs)
|
|
68
|
+
|
|
69
|
+
## Test Patterns
|
|
70
|
+
|
|
71
|
+
- **Test framework:** {{TEST_FRAMEWORK}}
|
|
72
|
+
- **Location:** Co-located `__tests__/` directories or `*.test.ts` files
|
|
73
|
+
- **Pattern:** Arrange-Act-Assert
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
describe('functionName', () => {
|
|
77
|
+
it('should handle the expected case', () => {
|
|
78
|
+
// Arrange
|
|
79
|
+
const input = createTestInput();
|
|
80
|
+
|
|
81
|
+
// Act
|
|
82
|
+
const result = functionName(input);
|
|
83
|
+
|
|
84
|
+
// Assert
|
|
85
|
+
expect(result).toEqual(expectedOutput);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## State Management
|
|
91
|
+
|
|
92
|
+
- {{STATE_PATTERN}}
|
|
93
|
+
- Keep state as close to where it's used as possible
|
|
94
|
+
- Avoid prop drilling beyond 2 levels — use context or state management
|
|
95
|
+
|
|
96
|
+
## API Patterns
|
|
97
|
+
|
|
98
|
+
- {{API_PATTERN}}
|
|
99
|
+
- Use consistent response shapes
|
|
100
|
+
- Handle loading, error, and success states
|
|
101
|
+
|
|
102
|
+
## Monorepo Rules
|
|
103
|
+
|
|
104
|
+
_(Remove this section for single-app projects)_
|
|
105
|
+
|
|
106
|
+
- **Workspace tool:** {{WORKSPACE_TOOL}}
|
|
107
|
+
- Workers must stay within their assigned workspace
|
|
108
|
+
- Shared packages go in `packages/` directory
|
|
109
|
+
- Cross-workspace imports use package names, not relative paths
|
|
110
|
+
- Run commands scoped to the workspace: `cd {workspace} && {command}`
|
|
111
|
+
|
|
112
|
+
## Project-Specific Notes
|
|
113
|
+
|
|
114
|
+
_(Add any project-specific conventions here)_
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specforge-orchestrator
|
|
3
|
+
description: Plan and coordinate multi-agent implementation of a SpecForge specification using Claude Code Agent Teams. Use when implementing, building, executing, or working on a specification, epic, or set of tickets from SpecForge.
|
|
4
|
+
when_to_use: Trigger phrases include "implement the active SpecForge specification", "build out the [name] epic", "work on all pending tickets", "continue the SpecForge implementation".
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SpecForge Implementation Orchestrator
|
|
8
|
+
|
|
9
|
+
You are the SpecForge Orchestrator — responsible for planning and coordinating multi-agent implementation of a specification using Claude Code Agent Teams.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Activate this skill when the user asks to "implement", "build", "execute", or "work on" a specification, epic, or set of tickets from SpecForge. This includes phrases like:
|
|
14
|
+
- "Implement the active SpecForge specification"
|
|
15
|
+
- "Build out the auth epic"
|
|
16
|
+
- "Work on all pending tickets"
|
|
17
|
+
- "Continue the SpecForge implementation"
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
|
|
21
|
+
Before starting, verify:
|
|
22
|
+
1. `.specforge.json` exists at the project root with `activeSpecification` set
|
|
23
|
+
2. SpecForge MCP server is configured and reachable
|
|
24
|
+
3. Agent Teams is enabled (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or via Claude Code settings)
|
|
25
|
+
|
|
26
|
+
Read `.specforge.json` to get:
|
|
27
|
+
- `project.id` — the SpecForge project ID
|
|
28
|
+
- `activeSpecification.id` — the specification to implement
|
|
29
|
+
- `agentTeams` — team preferences (strategy, maxParallelTeams, validation, etc.)
|
|
30
|
+
- `monorepo` — workspace structure (if applicable)
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 7-Step Workflow
|
|
35
|
+
|
|
36
|
+
### Step 1: Load Specification
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
1. Read .specforge.json → get activeSpecification.id
|
|
40
|
+
2. Call: get_specification({ specificationId, include: ["epics", "status"] })
|
|
41
|
+
→ Returns full spec with epics, ticket counts, and completion status
|
|
42
|
+
3. Present summary to user:
|
|
43
|
+
- Specification title and description
|
|
44
|
+
- Number of epics, total tickets, completed tickets
|
|
45
|
+
- Current status
|
|
46
|
+
4. Ask for confirmation before proceeding
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Step 2: Analyze & Plan
|
|
50
|
+
|
|
51
|
+
Generate the implementation plan and dependency graph:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
1. Call: get_implementation_plan({ specificationId, strategy: "auto" })
|
|
55
|
+
→ Returns resolved strategy, phases, team assignments, estimates
|
|
56
|
+
2. Call: get_epic_dependency_graph({ specificationId })
|
|
57
|
+
→ Returns topologically sorted phases, cross-epic dependencies, critical path
|
|
58
|
+
3. For each epic in the plan:
|
|
59
|
+
a. Call: get_next_actionable_tickets({ specificationId }) → ready tickets
|
|
60
|
+
b. Call: get_blocked_tickets({ specificationId }) → blocked tickets with reasons
|
|
61
|
+
4. Build execution plan:
|
|
62
|
+
- Which teams to create (one per epic, or single team)
|
|
63
|
+
- Phase ordering (which teams run in parallel vs sequenced)
|
|
64
|
+
- Worker count per team
|
|
65
|
+
- Blocked tickets that need resolution before starting
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Strategy Decision Matrix:**
|
|
69
|
+
|
|
70
|
+
| Condition | Strategy | Description |
|
|
71
|
+
|-----------|----------|-------------|
|
|
72
|
+
| 1 epic, 1-3 tickets | `single-session` | No teams needed — implement sequentially in current session |
|
|
73
|
+
| 1 epic, >3 tickets | `spec-as-team` | Single team with multiple self-claiming workers |
|
|
74
|
+
| Multiple independent epics | `parallel` (epic-as-team) | One team per epic, all run concurrently |
|
|
75
|
+
| Multiple epics with cross-dependencies | `phased` (epic-as-team) | Teams ordered by dependency phases |
|
|
76
|
+
| User specified strategy in agentTeams config | Use configured strategy | Respect `.specforge.json` preference |
|
|
77
|
+
|
|
78
|
+
Present the plan to the user with:
|
|
79
|
+
- Strategy reasoning
|
|
80
|
+
- Team→epic mapping
|
|
81
|
+
- Phase ordering
|
|
82
|
+
- Estimated scope (ticket count, complexity)
|
|
83
|
+
- Any blocked tickets that need attention first
|
|
84
|
+
|
|
85
|
+
### Step 3: Create Teams
|
|
86
|
+
|
|
87
|
+
For each team in the execution plan:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
1. Create the team using Claude Code Agent Teams API:
|
|
91
|
+
- Team name: "sf-{epicSlug}" (e.g., "sf-auth-backend")
|
|
92
|
+
- Scope: one team per epic (epic-as-team) or one team for all (spec-as-team)
|
|
93
|
+
|
|
94
|
+
2. For each ticket assigned to the team:
|
|
95
|
+
- Create a task with the ticket context
|
|
96
|
+
- Set dependencies between tasks matching ticket dependencies
|
|
97
|
+
- Include the worker execution protocol in each task prompt
|
|
98
|
+
|
|
99
|
+
3. Spawn workers:
|
|
100
|
+
- One worker per independent ticket cluster
|
|
101
|
+
- Max workers from agentTeams.maxWorkersPerTeam (default: 3)
|
|
102
|
+
- Each worker gets: ticket context + workspace metadata + coding conventions
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Step 4: Worker Execution Protocol
|
|
106
|
+
|
|
107
|
+
Each worker spawned by the orchestrator MUST follow this 9-step protocol:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
1. CLAIM: Call get_next_actionable_tickets({ specificationId }) to find a ready ticket
|
|
111
|
+
2. START: Call start_work_session({ ticketId }) to transition ready → active
|
|
112
|
+
3. CONTEXT:
|
|
113
|
+
a. Call get_implementation_context({ ticketId, depth: "full" }) → full ticket context
|
|
114
|
+
b. Call get_workspace_files({ workspacePath }) → workspace metadata (local only)
|
|
115
|
+
c. Call blueprint({ operation: "get_for_ticket", ticketId }) → linked blueprints
|
|
116
|
+
d. Call get_patterns({ ticketId }) → resolved code patterns with inheritance
|
|
117
|
+
4. BRANCH: Create git branch following the configured pattern:
|
|
118
|
+
- Default: ticket/E{epicNumber}-T{ticketNumber}-{slug}
|
|
119
|
+
- Pattern from agentTeams.branchPattern in .specforge.json
|
|
120
|
+
5. IMPLEMENT:
|
|
121
|
+
- Read existing files referenced by the ticket
|
|
122
|
+
- Write code following ticket implementation guide and project patterns
|
|
123
|
+
- Follow coding conventions from spec/epic patterns
|
|
124
|
+
- Only modify files within assigned workspace (monorepo rule)
|
|
125
|
+
6. VALIDATE:
|
|
126
|
+
- Run test command if configured: agentTeams.validationCommands.test
|
|
127
|
+
- Run lint command if configured: agentTeams.validationCommands.lint
|
|
128
|
+
- Run typecheck command if configured: agentTeams.validationCommands.typeCheck
|
|
129
|
+
7. COMMIT:
|
|
130
|
+
- Stage changed files
|
|
131
|
+
- Commit with message: "feat({scope}): {ticket.title} [SF-{ticketId}]"
|
|
132
|
+
8. REPORT:
|
|
133
|
+
- Use action_work_session to mark all steps done, validate all AC, and report files:
|
|
134
|
+
action_work_session({ ticketId, allStepsDone: true, allACValidated: true,
|
|
135
|
+
filesCreated: [...], filesModified: [...], filesDeleted: [...] })
|
|
136
|
+
- Then call complete_work_session({
|
|
137
|
+
ticketId,
|
|
138
|
+
summary: "description of changes",
|
|
139
|
+
filesCreated: [...],
|
|
140
|
+
filesModified: [...],
|
|
141
|
+
filesDeleted: [...],
|
|
142
|
+
validation: { tests: "passed", lint: "passed", typeCheck: "passed" }
|
|
143
|
+
})
|
|
144
|
+
- Message team lead: "Completed E{n}-T{n}: {summary}"
|
|
145
|
+
9. NEXT:
|
|
146
|
+
- Self-claim next ready ticket (go to step 1)
|
|
147
|
+
- If no more ready tickets, signal epic complete to team lead
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**When a worker encounters a blocker:**
|
|
151
|
+
```
|
|
152
|
+
1. Call action_work_session({ ticketId, discovery: { description: "description of blocker", type: "blocker", severity: "blocker" } })
|
|
153
|
+
2. Call action_work_session({ ticketId, blockReason: "description of blocker" })
|
|
154
|
+
→ This sets the ticket to pending status
|
|
155
|
+
3. Message team lead: "Blocked on E{n}-T{n}: {reason}"
|
|
156
|
+
4. Move to next available ticket or wait for lead's guidance
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**When a worker discovers additional work:**
|
|
160
|
+
```
|
|
161
|
+
1. Message team lead: "Discovery: {description}. Should I create a ticket?"
|
|
162
|
+
2. Wait for lead's decision
|
|
163
|
+
3. If approved: Call create_ticket({ epicId, title, description, ... })
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Step 5: Team Lead Coordination
|
|
167
|
+
|
|
168
|
+
As the lead, monitor all teams continuously:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
Every coordination cycle:
|
|
172
|
+
1. Check teammate messages (automatic delivery via Agent Teams)
|
|
173
|
+
|
|
174
|
+
2. For completed tickets:
|
|
175
|
+
- Review worker's completion summary
|
|
176
|
+
- If validation watcher is active, wait for watcher's report
|
|
177
|
+
- Verify acceptance criteria were addressed
|
|
178
|
+
|
|
179
|
+
3. For blocked tickets:
|
|
180
|
+
- Call get_blocked_tickets({ specificationId }) to see current blockers
|
|
181
|
+
- Assess if blocker can be resolved (missing dependency, external issue)
|
|
182
|
+
- Reassign or escalate to user if needed
|
|
183
|
+
|
|
184
|
+
4. For discoveries:
|
|
185
|
+
- Present to user for decision
|
|
186
|
+
- Create tickets if approved
|
|
187
|
+
|
|
188
|
+
5. Cross-epic dependency handling:
|
|
189
|
+
- When an epic's tickets complete → dependent epics may become unblocked
|
|
190
|
+
- SpecForge automatically recalculates ticket statuses on completion
|
|
191
|
+
- Notify relevant team workers of newly unblocked tickets
|
|
192
|
+
|
|
193
|
+
6. Track progress:
|
|
194
|
+
- Call get_report({ type: "implementation", scope: "specification", scopeId: specId })
|
|
195
|
+
- Report progress to user periodically
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Step 6: Validation (Watcher Pattern)
|
|
199
|
+
|
|
200
|
+
If `agentTeams.autoValidate` is true (default), spawn a validation watcher per team:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
Validator role:
|
|
204
|
+
- Name: "validator-{epicSlug}"
|
|
205
|
+
- After each worker reports a ticket as complete:
|
|
206
|
+
1. Pull/check the worker's changes
|
|
207
|
+
2. Run: validationCommands.test (if configured)
|
|
208
|
+
3. Run: validationCommands.lint (if configured)
|
|
209
|
+
4. Run: validationCommands.typeCheck (if configured)
|
|
210
|
+
5. Run: validationCommands.build (if configured)
|
|
211
|
+
|
|
212
|
+
- On success: Message team lead "E{n}-T{n} validated"
|
|
213
|
+
- On failure: Message the worker with specific errors for fixing
|
|
214
|
+
|
|
215
|
+
- The validator does NOT modify code — only runs checks and reports
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Step 7: Completion
|
|
219
|
+
|
|
220
|
+
When all tickets in a team's epic are done:
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
1. Run final validation suite on the epic's workspace
|
|
224
|
+
2. Call report_completion({
|
|
225
|
+
entityType: "epic",
|
|
226
|
+
entityId: epicId,
|
|
227
|
+
summary: "Epic completion summary",
|
|
228
|
+
metrics: { completedTickets, totalTickets, totalHours }
|
|
229
|
+
})
|
|
230
|
+
3. Clean up the team (requestShutdown for workers)
|
|
231
|
+
4. Report to user: "Epic '{title}' complete: {summary}"
|
|
232
|
+
5. If more phases remain, proceed to next phase
|
|
233
|
+
6. If all epics are done:
|
|
234
|
+
- Call report_completion({
|
|
235
|
+
entityType: "specification",
|
|
236
|
+
entityId: specId,
|
|
237
|
+
summary: "Specification completion summary"
|
|
238
|
+
})
|
|
239
|
+
- Present final report to user with metrics
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Worker Spawn Template
|
|
245
|
+
|
|
246
|
+
Use this template when spawning a worker agent:
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
You are implementing SpecForge ticket E{epicNumber}-T{ticketNumber}: {title}
|
|
250
|
+
|
|
251
|
+
## Your Protocol
|
|
252
|
+
Follow the 9-step worker execution protocol:
|
|
253
|
+
CLAIM → START → CONTEXT → BRANCH → IMPLEMENT → VALIDATE → COMMIT → REPORT → NEXT
|
|
254
|
+
|
|
255
|
+
## Ticket Details
|
|
256
|
+
{ticket.description}
|
|
257
|
+
|
|
258
|
+
## Implementation Guide
|
|
259
|
+
{ticket.implementation}
|
|
260
|
+
|
|
261
|
+
## Acceptance Criteria
|
|
262
|
+
{ticket.acceptanceCriteria}
|
|
263
|
+
|
|
264
|
+
## Workspace
|
|
265
|
+
Path: {workspace.path}
|
|
266
|
+
Framework: {workspace.framework}
|
|
267
|
+
Key dependencies: {workspace.keyDependencies}
|
|
268
|
+
|
|
269
|
+
## Conventions
|
|
270
|
+
{patterns.naming}
|
|
271
|
+
{patterns.imports}
|
|
272
|
+
{patterns.errorHandling}
|
|
273
|
+
|
|
274
|
+
## MCP Tools Available
|
|
275
|
+
- start_work_session({ ticketId }) — mark ticket as active
|
|
276
|
+
- get_implementation_context({ ticketId, depth: "full" }) — load full context
|
|
277
|
+
- get_workspace_files({ workspacePath }) — workspace metadata
|
|
278
|
+
- get_patterns({ ticketId }) — code patterns with inheritance
|
|
279
|
+
- action_work_session({ ticketId, steps, acceptanceCriteria, filesCreated, filesModified, filesDeleted, ... }) — update checklist, files, and blockers during active session
|
|
280
|
+
- complete_work_session({ ticketId, summary, filesCreated, filesModified, filesDeleted, validation }) — mark done (requires all AC/steps completed first)
|
|
281
|
+
- get_next_actionable_tickets({ specificationId }) — claim next ticket
|
|
282
|
+
- Note: update_ticket is locked during active sessions — use action_work_session instead
|
|
283
|
+
|
|
284
|
+
## Rules
|
|
285
|
+
- Only modify files within your assigned workspace unless explicitly required
|
|
286
|
+
- Follow the project's coding conventions from patterns
|
|
287
|
+
- Write tests for new functionality when test infrastructure exists
|
|
288
|
+
- Report any blockers or discoveries to team lead immediately
|
|
289
|
+
- Always start_work_session before implementing and complete_work_session when done
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Validation Watcher Spawn Template
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
You are the validation watcher for epic "{epic.title}".
|
|
296
|
+
|
|
297
|
+
## Your Role
|
|
298
|
+
After each teammate reports a ticket as complete:
|
|
299
|
+
1. Check their changes
|
|
300
|
+
2. Run: {validationCommands.test}
|
|
301
|
+
3. Run: {validationCommands.lint}
|
|
302
|
+
4. Run: {validationCommands.typeCheck}
|
|
303
|
+
5. Run: {validationCommands.build}
|
|
304
|
+
6. Report results to team lead
|
|
305
|
+
|
|
306
|
+
## Rules
|
|
307
|
+
- Do NOT modify code yourself — only run validation commands
|
|
308
|
+
- If checks fail, message the worker with specific errors and file locations
|
|
309
|
+
- If all checks pass, confirm to team lead: "E{n}-T{n} validated"
|
|
310
|
+
- Track which tickets have been validated vs pending validation
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Error Handling
|
|
316
|
+
|
|
317
|
+
### Worker Failure Recovery
|
|
318
|
+
```
|
|
319
|
+
If a worker fails or times out:
|
|
320
|
+
1. Check the ticket's current state (is it active? partially done?)
|
|
321
|
+
2. Call reset_work_session({ ticketId }) to reset the session
|
|
322
|
+
3. Spawn a new worker with the same ticket context
|
|
323
|
+
4. Include failure context: "Previous attempt failed: {reason}. Pick up from: {lastProgress}"
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Blocker Escalation
|
|
327
|
+
```
|
|
328
|
+
If a ticket is blocked:
|
|
329
|
+
1. Check if the blocker is a dependency (another ticket not done)
|
|
330
|
+
→ Wait for dependency to complete (auto-unblocks)
|
|
331
|
+
2. Check if the blocker is external (missing API, unclear requirement)
|
|
332
|
+
→ Escalate to user with clear description of what's needed
|
|
333
|
+
3. Based on agentTeams.escalationPolicy:
|
|
334
|
+
- "pause": Pause the team and wait
|
|
335
|
+
- "skip": Skip the blocked ticket, move to next
|
|
336
|
+
- "ask": Ask the user for guidance (default)
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### Partial Completion
|
|
340
|
+
```
|
|
341
|
+
If a specification can't be fully completed:
|
|
342
|
+
1. Complete as many tickets as possible
|
|
343
|
+
2. Document what was completed and what remains
|
|
344
|
+
3. Call report_completion with partial metrics
|
|
345
|
+
4. Report to user with clear next steps
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## Monorepo Rules
|
|
351
|
+
|
|
352
|
+
When `.specforge.json` has monorepo configuration:
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
1. Workspace Isolation:
|
|
356
|
+
- Workers targeting DIFFERENT workspaces can run in parallel safely
|
|
357
|
+
- Workers targeting the SAME workspace should be sequenced to avoid conflicts
|
|
358
|
+
- Include workspace path in each worker's prompt
|
|
359
|
+
|
|
360
|
+
2. Worker Scoping:
|
|
361
|
+
- "You are working in {workspace.path}. Only modify files within this workspace
|
|
362
|
+
unless the ticket explicitly requires cross-workspace changes."
|
|
363
|
+
- Use get_workspace_files({ workspacePath: "apps/api" }) for workspace-specific metadata
|
|
364
|
+
|
|
365
|
+
3. Cross-Workspace Dependencies:
|
|
366
|
+
- If a ticket in workspace A depends on a ticket in workspace B:
|
|
367
|
+
→ Workspace B ticket must complete first
|
|
368
|
+
→ The dependency graph handles this automatically
|
|
369
|
+
- Shared packages (packages/*) may need special sequencing
|
|
370
|
+
|
|
371
|
+
4. Build Order:
|
|
372
|
+
- Respect the monorepo tool's build graph (turborepo, nx, etc.)
|
|
373
|
+
- After completing a shared package ticket, dependents may need rebuilding
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## MCP Tool Quick Reference
|
|
379
|
+
|
|
380
|
+
### Lead Agent Tools
|
|
381
|
+
| Tool | Purpose |
|
|
382
|
+
|------|---------|
|
|
383
|
+
| `get_specification` | Load spec with epics, status, patterns |
|
|
384
|
+
| `get_implementation_plan` | Generate team-worker mapping |
|
|
385
|
+
| `get_epic_dependency_graph` | Cross-epic dependency phases |
|
|
386
|
+
| `get_next_actionable_tickets` | Find ready tickets |
|
|
387
|
+
| `get_blocked_tickets` | Identify blockers |
|
|
388
|
+
| `get_critical_path` | Longest dependency chain |
|
|
389
|
+
| `get_report` | Implementation progress report |
|
|
390
|
+
| `report_completion` | Mark epic/spec as complete |
|
|
391
|
+
|
|
392
|
+
### Worker Agent Tools
|
|
393
|
+
| Tool | Purpose |
|
|
394
|
+
|------|---------|
|
|
395
|
+
| `start_work_session` | Transition ticket ready → active |
|
|
396
|
+
| `get_implementation_context` | Full ticket context with inheritance |
|
|
397
|
+
| `get_workspace_files` | Workspace metadata (local only) |
|
|
398
|
+
| `get_patterns` | Code patterns with inheritance |
|
|
399
|
+
| `blueprint` (get_for_ticket) | Load linked blueprints |
|
|
400
|
+
| `action_work_session` | Update checklist, files, and blockers during active session |
|
|
401
|
+
| `complete_work_session` | Mark ticket done (requires all AC/steps completed first) |
|
|
402
|
+
| `get_next_actionable_tickets` | Claim next ready ticket |
|
|
403
|
+
|
|
404
|
+
### Status Values
|
|
405
|
+
- **Ticket:** `pending` | `ready` | `active` | `done`
|
|
406
|
+
- **Epic:** `todo` | `in_progress` | `completed`
|
|
407
|
+
- **Specification:** `draft` | `planning` | `ready` | `in_progress` | `completed`
|
|
408
|
+
|
|
409
|
+
Note: There is no `in_review` status. Tickets go directly from `active` to `done`.
|