@specforge/mcp 3.0.7 → 3.1.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/dist/autopilot/agents/agent-runner.d.ts.map +1 -1
- package/dist/autopilot/agents/agent-runner.js +7 -0
- package/dist/autopilot/agents/agent-runner.js.map +1 -1
- package/dist/autopilot/api/autopilot-api-client.d.ts +5 -4
- package/dist/autopilot/api/autopilot-api-client.d.ts.map +1 -1
- package/dist/autopilot/api/autopilot-api-client.js +21 -26
- package/dist/autopilot/api/autopilot-api-client.js.map +1 -1
- package/dist/autopilot/cli/run.d.ts.map +1 -1
- package/dist/autopilot/cli/run.js +28 -0
- package/dist/autopilot/cli/run.js.map +1 -1
- package/dist/autopilot/core/dependency-resolver.d.ts +10 -1
- package/dist/autopilot/core/dependency-resolver.d.ts.map +1 -1
- package/dist/autopilot/core/dependency-resolver.js +27 -1
- package/dist/autopilot/core/dependency-resolver.js.map +1 -1
- package/dist/autopilot/core/dispatcher.d.ts +26 -0
- package/dist/autopilot/core/dispatcher.d.ts.map +1 -1
- package/dist/autopilot/core/dispatcher.js +116 -6
- package/dist/autopilot/core/dispatcher.js.map +1 -1
- package/dist/autopilot/readiness/aggregation.d.ts +56 -0
- package/dist/autopilot/readiness/aggregation.d.ts.map +1 -0
- package/dist/autopilot/readiness/aggregation.js +94 -0
- package/dist/autopilot/readiness/aggregation.js.map +1 -0
- package/dist/autopilot/readiness/config.d.ts +15 -0
- package/dist/autopilot/readiness/config.d.ts.map +1 -0
- package/dist/autopilot/readiness/config.js +76 -0
- package/dist/autopilot/readiness/config.js.map +1 -0
- package/dist/autopilot/readiness/index.d.ts +16 -0
- package/dist/autopilot/readiness/index.d.ts.map +1 -0
- package/dist/autopilot/readiness/index.js +11 -0
- package/dist/autopilot/readiness/index.js.map +1 -0
- package/dist/autopilot/readiness/post-scoring.d.ts +28 -0
- package/dist/autopilot/readiness/post-scoring.d.ts.map +1 -0
- package/dist/autopilot/readiness/post-scoring.js +41 -0
- package/dist/autopilot/readiness/post-scoring.js.map +1 -0
- package/dist/autopilot/readiness/preflight.d.ts +36 -0
- package/dist/autopilot/readiness/preflight.d.ts.map +1 -0
- package/dist/autopilot/readiness/preflight.js +93 -0
- package/dist/autopilot/readiness/preflight.js.map +1 -0
- package/dist/autopilot/readiness/prompt-section.d.ts +19 -0
- package/dist/autopilot/readiness/prompt-section.d.ts.map +1 -0
- package/dist/autopilot/readiness/prompt-section.js +33 -0
- package/dist/autopilot/readiness/prompt-section.js.map +1 -0
- package/dist/autopilot/readiness/types.d.ts +25 -0
- package/dist/autopilot/readiness/types.d.ts.map +1 -0
- package/dist/autopilot/readiness/types.js +8 -0
- package/dist/autopilot/readiness/types.js.map +1 -0
- package/dist/autopilot/sync/sync-manager.d.ts.map +1 -1
- package/dist/autopilot/sync/sync-manager.js +2 -1
- package/dist/autopilot/sync/sync-manager.js.map +1 -1
- package/dist/autopilot/types.d.ts +28 -0
- package/dist/autopilot/types.d.ts.map +1 -1
- package/dist/autopilot/types.js.map +1 -1
- package/dist/cli/commands/index.d.ts +5 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +5 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +184 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/init.types.d.ts +37 -0
- package/dist/cli/commands/init.types.d.ts.map +1 -1
- package/dist/cli/commands/init.types.js +18 -0
- package/dist/cli/commands/init.types.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +18 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +154 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/plan.types.d.ts +60 -0
- package/dist/cli/commands/plan.types.d.ts.map +1 -0
- package/dist/cli/commands/plan.types.js +8 -0
- package/dist/cli/commands/plan.types.js.map +1 -0
- package/dist/cli/commands/review-implementation.d.ts +16 -0
- package/dist/cli/commands/review-implementation.d.ts.map +1 -0
- package/dist/cli/commands/review-implementation.js +226 -0
- package/dist/cli/commands/review-implementation.js.map +1 -0
- package/dist/cli/commands/review-planning.d.ts +15 -0
- package/dist/cli/commands/review-planning.d.ts.map +1 -0
- package/dist/cli/commands/review-planning.js +177 -0
- package/dist/cli/commands/review-planning.js.map +1 -0
- package/dist/cli/commands/score/display.d.ts +20 -0
- package/dist/cli/commands/score/display.d.ts.map +1 -0
- package/dist/cli/commands/score/display.js +111 -0
- package/dist/cli/commands/score/display.js.map +1 -0
- package/dist/cli/commands/score/index.d.ts +9 -0
- package/dist/cli/commands/score/index.d.ts.map +1 -0
- package/dist/cli/commands/score/index.js +12 -0
- package/dist/cli/commands/score/index.js.map +1 -0
- package/dist/cli/commands/score/score.d.ts +17 -0
- package/dist/cli/commands/score/score.d.ts.map +1 -0
- package/dist/cli/commands/score/score.js +144 -0
- package/dist/cli/commands/score/score.js.map +1 -0
- package/dist/cli/commands/score/types.d.ts +79 -0
- package/dist/cli/commands/score/types.d.ts.map +1 -0
- package/dist/cli/commands/score/types.js +51 -0
- package/dist/cli/commands/score/types.js.map +1 -0
- package/dist/cli/commands/spec-activate.d.ts +29 -0
- package/dist/cli/commands/spec-activate.d.ts.map +1 -0
- package/dist/cli/commands/spec-activate.js +155 -0
- package/dist/cli/commands/spec-activate.js.map +1 -0
- package/dist/cli/commands/spec-activate.types.d.ts +24 -0
- package/dist/cli/commands/spec-activate.types.d.ts.map +1 -0
- package/dist/cli/commands/spec-activate.types.js +8 -0
- package/dist/cli/commands/spec-activate.types.js.map +1 -0
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +89 -1
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/status.types.d.ts +2 -0
- package/dist/cli/commands/status.types.d.ts.map +1 -1
- package/dist/cli/commands/status.types.js.map +1 -1
- package/dist/cli/config/agent-teams.types.d.ts +194 -0
- package/dist/cli/config/agent-teams.types.d.ts.map +1 -0
- package/dist/cli/config/agent-teams.types.js +36 -0
- package/dist/cli/config/agent-teams.types.js.map +1 -0
- package/dist/cli/config/index.d.ts +2 -0
- package/dist/cli/config/index.d.ts.map +1 -1
- package/dist/cli/config/index.js +2 -0
- package/dist/cli/config/index.js.map +1 -1
- package/dist/cli/config/loader.d.ts +36 -2
- package/dist/cli/config/loader.d.ts.map +1 -1
- package/dist/cli/config/loader.js +65 -0
- package/dist/cli/config/loader.js.map +1 -1
- package/dist/cli/config/validation.d.ts +69 -0
- package/dist/cli/config/validation.d.ts.map +1 -0
- package/dist/cli/config/validation.js +295 -0
- package/dist/cli/config/validation.js.map +1 -0
- package/dist/cli/config/writer.d.ts +39 -0
- package/dist/cli/config/writer.d.ts.map +1 -1
- package/dist/cli/config/writer.js +58 -0
- package/dist/cli/config/writer.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +10 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +3 -0
- package/dist/lib/index.js.map +1 -1
- 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 +271 -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 +174 -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 +137 -0
- package/dist/lib/strategy-analyzer.js.map +1 -0
- package/dist/tools/core/context-helper.d.ts +22 -0
- package/dist/tools/core/context-helper.d.ts.map +1 -1
- package/dist/tools/core/context-helper.js +37 -1
- package/dist/tools/core/context-helper.js.map +1 -1
- package/dist/tools/core/workspace-files.d.ts +49 -0
- package/dist/tools/core/workspace-files.d.ts.map +1 -0
- package/dist/tools/core/workspace-files.js +259 -0
- package/dist/tools/core/workspace-files.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +147 -0
- package/dist/tools/index.js.map +1 -1
- package/package.json +3 -2
- package/src/cli/templates/agents/content/core/sfag-implementer.ts +113 -0
- package/src/cli/templates/agents/content/core/sfag-orchestrator.ts +107 -0
- package/src/cli/templates/agents/content/core/sfag-spec-creator.ts +126 -0
- package/src/cli/templates/agents/content/core/sfag-ticket-implementer.ts +132 -0
- package/src/cli/templates/agents/content/research/sfag-package-researcher.ts +153 -0
- package/src/cli/templates/agents/content/task-type/sfag-api-implementer.ts +132 -0
- package/src/cli/templates/agents/content/task-type/sfag-docs-writer.ts +183 -0
- package/src/cli/templates/agents/content/task-type/sfag-frontend-builder.ts +141 -0
- package/src/cli/templates/agents/content/task-type/sfag-infra-architect.ts +149 -0
- package/src/cli/templates/agents/content/task-type/sfag-schema-designer.ts +132 -0
- package/src/cli/templates/agents/content/task-type/sfag-test-writer.ts +171 -0
- package/src/cli/templates/agents/index.ts +74 -0
- package/src/cli/templates/commands.ts +179 -0
- package/src/cli/templates/content/sf-autonomous.ts +78 -0
- package/src/cli/templates/content/sf-blockers.ts +68 -0
- package/src/cli/templates/content/sf-commit.ts +78 -0
- package/src/cli/templates/content/sf-context.ts +64 -0
- package/src/cli/templates/content/sf-create-epics.ts +129 -0
- package/src/cli/templates/content/sf-create-spec.ts +136 -0
- package/src/cli/templates/content/sf-create-tickets.ts +148 -0
- package/src/cli/templates/content/sf-epic.ts +69 -0
- package/src/cli/templates/content/sf-help.ts +61 -0
- package/src/cli/templates/content/sf-import.ts +88 -0
- package/src/cli/templates/content/sf-init.ts +61 -0
- package/src/cli/templates/content/sf-next.ts +67 -0
- package/src/cli/templates/content/sf-reset.ts +78 -0
- package/src/cli/templates/content/sf-review.ts +67 -0
- package/src/cli/templates/content/sf-search.ts +64 -0
- package/src/cli/templates/content/sf-status.ts +67 -0
- package/src/cli/templates/content/sf-ticket.ts +76 -0
- package/src/cli/templates/content/sf-validate.ts +78 -0
- package/src/cli/templates/index.ts +16 -0
- package/src/cli/templates/skills/specforge-conventions.md +109 -0
- package/src/cli/templates/skills/specforge-orchestrator.md +401 -0
- package/src/cli/templates/skills/specforge-validator.md +122 -0
- package/src/cli/templates/skills/specforge-worker.md +378 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SF-Init Command Template
|
|
3
|
+
*
|
|
4
|
+
* Template for initializing SpecForge specification for implementation work.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SF_INIT_CONTENT = `# Initialize Ticket System (SpecForge)
|
|
8
|
+
|
|
9
|
+
Initialize a SpecForge specification for implementation work.
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
- \`$ARGUMENTS\` - Optional: Specification ID to initialize
|
|
13
|
+
|
|
14
|
+
## Task
|
|
15
|
+
|
|
16
|
+
### 1. Get or Set Working Context
|
|
17
|
+
|
|
18
|
+
**MCP Calls:**
|
|
19
|
+
\`\`\`typescript
|
|
20
|
+
// Get current context
|
|
21
|
+
get_working_context()
|
|
22
|
+
|
|
23
|
+
// If $ARGUMENTS provided, set specification
|
|
24
|
+
set_working_context({
|
|
25
|
+
specificationId: "$ARGUMENTS"
|
|
26
|
+
})
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
### 2. Load Specification Details
|
|
30
|
+
|
|
31
|
+
**MCP Calls:**
|
|
32
|
+
\`\`\`typescript
|
|
33
|
+
get_specification(specificationId)
|
|
34
|
+
list_epics({ specificationId })
|
|
35
|
+
list_tickets({ specificationId })
|
|
36
|
+
\`\`\`
|
|
37
|
+
|
|
38
|
+
### 3. Display Initialization Summary
|
|
39
|
+
|
|
40
|
+
**Output:**
|
|
41
|
+
\`\`\`
|
|
42
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
SPECFORGE INITIALIZED
|
|
44
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
+
Specification: {title}
|
|
46
|
+
Status: {status}
|
|
47
|
+
Epics: {epicCount}
|
|
48
|
+
Tickets: {ticketCount}
|
|
49
|
+
|
|
50
|
+
Progress: {done}/{total} ({percentage}%)
|
|
51
|
+
Ready: {readyCount} tickets available
|
|
52
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
53
|
+
|
|
54
|
+
Next: Run /sf-next to start the next ready ticket
|
|
55
|
+
\`\`\`
|
|
56
|
+
|
|
57
|
+
## Notes
|
|
58
|
+
- Context persists across commands
|
|
59
|
+
- Use /sf-status for detailed view
|
|
60
|
+
- Use /sf-next to start implementation
|
|
61
|
+
`;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SF-Next Command Template
|
|
3
|
+
*
|
|
4
|
+
* Template for quick starting the next ready ticket.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SF_NEXT_CONTENT = `# Quick Start Next Ticket (SpecForge)
|
|
8
|
+
|
|
9
|
+
Automatically find and start the next ready ticket for implementation.
|
|
10
|
+
|
|
11
|
+
## Task
|
|
12
|
+
|
|
13
|
+
### 1. Find Next Ready Ticket
|
|
14
|
+
|
|
15
|
+
**MCP Calls:**
|
|
16
|
+
\`\`\`typescript
|
|
17
|
+
get_working_context()
|
|
18
|
+
list_tickets({
|
|
19
|
+
specificationId,
|
|
20
|
+
status: 'ready',
|
|
21
|
+
sortBy: 'priority'
|
|
22
|
+
})
|
|
23
|
+
\`\`\`
|
|
24
|
+
|
|
25
|
+
### 2. Set Ticket Context
|
|
26
|
+
|
|
27
|
+
**MCP Calls:**
|
|
28
|
+
\`\`\`typescript
|
|
29
|
+
set_working_context({
|
|
30
|
+
ticketId: nextTicket.id
|
|
31
|
+
})
|
|
32
|
+
update_ticket({
|
|
33
|
+
ticketId: nextTicket.id,
|
|
34
|
+
status: 'in_progress'
|
|
35
|
+
})
|
|
36
|
+
\`\`\`
|
|
37
|
+
|
|
38
|
+
### 3. Display Ticket Details
|
|
39
|
+
|
|
40
|
+
**Output:**
|
|
41
|
+
\`\`\`
|
|
42
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
STARTING: E{n}-T{m}
|
|
44
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
+
Title: {title}
|
|
46
|
+
Priority: {priority}
|
|
47
|
+
Epic: E{n} - {epicTitle}
|
|
48
|
+
Dependencies: {depCount} completed
|
|
49
|
+
|
|
50
|
+
DESCRIPTION
|
|
51
|
+
─────────────────────────────────────────────────────────────────
|
|
52
|
+
{description}
|
|
53
|
+
|
|
54
|
+
ACCEPTANCE CRITERIA
|
|
55
|
+
─────────────────────────────────────────────────────────────────
|
|
56
|
+
□ {criterion1}
|
|
57
|
+
□ {criterion2}
|
|
58
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
59
|
+
|
|
60
|
+
Ready to implement!
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
## Notes
|
|
64
|
+
- Automatically selects highest priority ready ticket
|
|
65
|
+
- Updates ticket status to in_progress
|
|
66
|
+
- Sets working context to selected ticket
|
|
67
|
+
`;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SF-Reset Command Template
|
|
3
|
+
*
|
|
4
|
+
* Template for resetting ticket statuses with dependency awareness.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SF_RESET_CONTENT = `# Reset Ticket Statuses (SpecForge)
|
|
8
|
+
|
|
9
|
+
Reset ticket statuses to ready state with dependency awareness.
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
- \`$ARGUMENTS\` - Optional: Specification ID or ticket ID to reset
|
|
13
|
+
|
|
14
|
+
## Task
|
|
15
|
+
|
|
16
|
+
### 1. Get Reset Scope
|
|
17
|
+
|
|
18
|
+
**MCP Calls:**
|
|
19
|
+
\`\`\`typescript
|
|
20
|
+
get_working_context()
|
|
21
|
+
|
|
22
|
+
if ($ARGUMENTS.match(/E\d+-T\d+/)) {
|
|
23
|
+
// Single ticket reset
|
|
24
|
+
get_ticket($ARGUMENTS)
|
|
25
|
+
} else {
|
|
26
|
+
// Full specification reset
|
|
27
|
+
if ($ARGUMENTS) {
|
|
28
|
+
set_working_context({ specificationId: "$ARGUMENTS" })
|
|
29
|
+
}
|
|
30
|
+
list_tickets({ specificationId })
|
|
31
|
+
}
|
|
32
|
+
\`\`\`
|
|
33
|
+
|
|
34
|
+
### 2. Reset Tickets
|
|
35
|
+
|
|
36
|
+
**MCP Calls:**
|
|
37
|
+
\`\`\`typescript
|
|
38
|
+
// For each ticket to reset
|
|
39
|
+
for (const ticket of tickets) {
|
|
40
|
+
// Check dependencies
|
|
41
|
+
const allDepsCompleted = ticket.dependencies.every(
|
|
42
|
+
dep => getTicketStatus(dep) === 'done'
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// Update status
|
|
46
|
+
update_ticket({
|
|
47
|
+
ticketId: ticket.id,
|
|
48
|
+
status: allDepsCompleted ? 'ready' : 'blocked'
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
\`\`\`
|
|
52
|
+
|
|
53
|
+
### 3. Display Reset Results
|
|
54
|
+
|
|
55
|
+
**Output:**
|
|
56
|
+
\`\`\`
|
|
57
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
58
|
+
TICKET RESET COMPLETE
|
|
59
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
|
+
Scope: {scope}
|
|
61
|
+
|
|
62
|
+
RESET SUMMARY
|
|
63
|
+
─────────────────────────────────────────────────────────────────
|
|
64
|
+
Ready: {readyCount} tickets
|
|
65
|
+
Blocked: {blockedCount} tickets
|
|
66
|
+
Done: {doneCount} tickets (unchanged)
|
|
67
|
+
|
|
68
|
+
RESET TICKETS
|
|
69
|
+
─────────────────────────────────────────────────────────────────
|
|
70
|
+
E{n}-T{m} │ {oldStatus} → {newStatus}
|
|
71
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
72
|
+
\`\`\`
|
|
73
|
+
|
|
74
|
+
## Notes
|
|
75
|
+
- Respects dependency constraints
|
|
76
|
+
- Can reset single ticket or entire specification
|
|
77
|
+
- Completed tickets remain unchanged by default
|
|
78
|
+
`;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SF-Review Command Template
|
|
3
|
+
*
|
|
4
|
+
* Template for reviewing accomplishments and progress analysis.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SF_REVIEW_CONTENT = `# Review Accomplishments (SpecForge)
|
|
8
|
+
|
|
9
|
+
Comprehensive review of implementation progress and accomplishments.
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
- \`$ARGUMENTS\` - Optional: Specification ID to review
|
|
13
|
+
|
|
14
|
+
## Task
|
|
15
|
+
|
|
16
|
+
### 1. Get Specification Context
|
|
17
|
+
|
|
18
|
+
**MCP Calls:**
|
|
19
|
+
\`\`\`typescript
|
|
20
|
+
get_working_context()
|
|
21
|
+
|
|
22
|
+
if ($ARGUMENTS) {
|
|
23
|
+
set_working_context({ specificationId: "$ARGUMENTS" })
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
get_specification(specificationId)
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
### 2. Load Implementation Data
|
|
30
|
+
|
|
31
|
+
**MCP Calls:**
|
|
32
|
+
\`\`\`typescript
|
|
33
|
+
list_epics({ specificationId })
|
|
34
|
+
list_tickets({ specificationId })
|
|
35
|
+
\`\`\`
|
|
36
|
+
|
|
37
|
+
### 3. Display Review Summary
|
|
38
|
+
|
|
39
|
+
**Output:**
|
|
40
|
+
\`\`\`
|
|
41
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
42
|
+
IMPLEMENTATION REVIEW
|
|
43
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
+
Specification: {title}
|
|
45
|
+
Overall: {done}/{total} ({percentage}%)
|
|
46
|
+
|
|
47
|
+
PROGRESS BY EPIC
|
|
48
|
+
─────────────────────────────────────────────────────────────────
|
|
49
|
+
E{n} │ {title} │ {ticketsDone}/{ticketsTotal} ({pct}%)
|
|
50
|
+
|
|
51
|
+
RECENTLY COMPLETED
|
|
52
|
+
─────────────────────────────────────────────────────────────────
|
|
53
|
+
✓ E{n}-T{m} │ {title} │ {completedDate}
|
|
54
|
+
|
|
55
|
+
VELOCITY
|
|
56
|
+
─────────────────────────────────────────────────────────────────
|
|
57
|
+
Last 7 days: {ticketsCompleted} tickets
|
|
58
|
+
Average: {avgPerDay} tickets/day
|
|
59
|
+
Remaining: ~{estimatedDays} days
|
|
60
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
## Notes
|
|
64
|
+
- Shows completed tickets and velocity metrics
|
|
65
|
+
- Provides estimated completion timeline
|
|
66
|
+
- Use /sf-status for current state
|
|
67
|
+
`;
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
get_working_context()
|
|
28
|
+
|
|
29
|
+
list_tickets({
|
|
30
|
+
specificationId,
|
|
31
|
+
search: extractedTerms,
|
|
32
|
+
status: extractedStatus,
|
|
33
|
+
epicId: extractedEpicId,
|
|
34
|
+
tags: extractedTags
|
|
35
|
+
})
|
|
36
|
+
\`\`\`
|
|
37
|
+
|
|
38
|
+
### 3. Display Search Results
|
|
39
|
+
|
|
40
|
+
**Output:**
|
|
41
|
+
\`\`\`
|
|
42
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
SEARCH RESULTS
|
|
44
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
+
Query: {query}
|
|
46
|
+
Found: {resultCount} tickets
|
|
47
|
+
|
|
48
|
+
RESULTS
|
|
49
|
+
─────────────────────────────────────────────────────────────────
|
|
50
|
+
E{n}-T{m} │ {title} │ {status}
|
|
51
|
+
{matchedText}...
|
|
52
|
+
|
|
53
|
+
E{n}-T{m} │ {title} │ {status}
|
|
54
|
+
{matchedText}...
|
|
55
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
56
|
+
|
|
57
|
+
Tip: Use filters like status:ready or epic:E1
|
|
58
|
+
\`\`\`
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
- Supports text search and filters
|
|
62
|
+
- Filters: status:, epic:, tag:, priority:
|
|
63
|
+
- Can combine multiple filters
|
|
64
|
+
`;
|
|
@@ -0,0 +1,67 @@
|
|
|
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 Working Context
|
|
17
|
+
|
|
18
|
+
**MCP Calls:**
|
|
19
|
+
\`\`\`typescript
|
|
20
|
+
get_working_context()
|
|
21
|
+
|
|
22
|
+
// If $ARGUMENTS provided, switch context
|
|
23
|
+
if ($ARGUMENTS) {
|
|
24
|
+
set_working_context({ specificationId: "$ARGUMENTS" })
|
|
25
|
+
}
|
|
26
|
+
\`\`\`
|
|
27
|
+
|
|
28
|
+
### 2. Load Implementation Data
|
|
29
|
+
|
|
30
|
+
**MCP Calls:**
|
|
31
|
+
\`\`\`typescript
|
|
32
|
+
get_specification(specificationId)
|
|
33
|
+
list_epics({ specificationId })
|
|
34
|
+
list_tickets({ specificationId })
|
|
35
|
+
\`\`\`
|
|
36
|
+
|
|
37
|
+
### 3. Display Status Overview
|
|
38
|
+
|
|
39
|
+
**Output:**
|
|
40
|
+
\`\`\`
|
|
41
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
42
|
+
IMPLEMENTATION STATUS
|
|
43
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
+
Specification: {title}
|
|
45
|
+
Progress: {done}/{total} ({percentage}%)
|
|
46
|
+
|
|
47
|
+
EPICS
|
|
48
|
+
─────────────────────────────────────────────────────────────────
|
|
49
|
+
E{n} │ {title} │ {progress}% │ {status}
|
|
50
|
+
|
|
51
|
+
READY TICKETS
|
|
52
|
+
─────────────────────────────────────────────────────────────────
|
|
53
|
+
E{n}-T{m} │ {title} │ {priority}
|
|
54
|
+
|
|
55
|
+
BLOCKED TICKETS
|
|
56
|
+
─────────────────────────────────────────────────────────────────
|
|
57
|
+
E{n}-T{m} │ {title} │ Blocked by: {dependencies}
|
|
58
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
59
|
+
|
|
60
|
+
Next: Run /sf-next to start implementation
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
## Notes
|
|
64
|
+
- Shows overall progress and epic breakdown
|
|
65
|
+
- Lists ready and blocked tickets
|
|
66
|
+
- Use /sf-validate for system health check
|
|
67
|
+
`;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SF-Ticket-Implementation Command Template
|
|
3
|
+
*
|
|
4
|
+
* Template for implementing a specific ticket with streamlined workflow.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SF_TICKET_IMPLEMENTATION_CONTENT = `# Implement Ticket (SpecForge)
|
|
8
|
+
|
|
9
|
+
Implement a specific ticket with full context and streamlined workflow.
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
- \`$ARGUMENTS\` - Optional: Ticket ID to implement (e.g., E1-T3)
|
|
13
|
+
|
|
14
|
+
## Task
|
|
15
|
+
|
|
16
|
+
### 1. Select Ticket
|
|
17
|
+
|
|
18
|
+
**MCP Calls:**
|
|
19
|
+
\`\`\`typescript
|
|
20
|
+
// If no arguments, prompt user
|
|
21
|
+
if (!$ARGUMENTS) {
|
|
22
|
+
list_tickets({
|
|
23
|
+
specificationId,
|
|
24
|
+
status: 'ready'
|
|
25
|
+
})
|
|
26
|
+
// Display selection menu
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Get ticket details
|
|
30
|
+
get_ticket($ARGUMENTS || selectedId)
|
|
31
|
+
\`\`\`
|
|
32
|
+
|
|
33
|
+
### 2. Verify Dependencies
|
|
34
|
+
|
|
35
|
+
**MCP Calls:**
|
|
36
|
+
\`\`\`typescript
|
|
37
|
+
// Check all dependencies are completed
|
|
38
|
+
for (const depId of ticket.dependencies) {
|
|
39
|
+
get_ticket(depId)
|
|
40
|
+
// Verify status is 'done'
|
|
41
|
+
}
|
|
42
|
+
\`\`\`
|
|
43
|
+
|
|
44
|
+
### 3. Set Context and Start
|
|
45
|
+
|
|
46
|
+
**MCP Calls:**
|
|
47
|
+
\`\`\`typescript
|
|
48
|
+
set_working_context({ ticketId: ticket.id })
|
|
49
|
+
update_ticket({
|
|
50
|
+
ticketId: ticket.id,
|
|
51
|
+
status: 'in_progress'
|
|
52
|
+
})
|
|
53
|
+
\`\`\`
|
|
54
|
+
|
|
55
|
+
### 4. Display Implementation View
|
|
56
|
+
|
|
57
|
+
**Output:**
|
|
58
|
+
\`\`\`
|
|
59
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
|
+
IMPLEMENTING: E{n}-T{m}
|
|
61
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
62
|
+
{title}
|
|
63
|
+
|
|
64
|
+
{fullDescription}
|
|
65
|
+
{implementationGuidance}
|
|
66
|
+
{acceptanceCriteria}
|
|
67
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
68
|
+
|
|
69
|
+
Begin implementation
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
## Notes
|
|
73
|
+
- Verifies all dependencies are completed
|
|
74
|
+
- Provides full ticket context for implementation
|
|
75
|
+
- Use /sf-commit when complete
|
|
76
|
+
`;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SF-Validate Command Template
|
|
3
|
+
*
|
|
4
|
+
* Template for validating ticket system health.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SF_VALIDATE_CONTENT = `# Validate Ticket System (SpecForge)
|
|
8
|
+
|
|
9
|
+
Run comprehensive health checks on the ticket system.
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
- \`$ARGUMENTS\` - Optional: Specification ID to validate
|
|
13
|
+
|
|
14
|
+
## Task
|
|
15
|
+
|
|
16
|
+
### 1. Get Specification Context
|
|
17
|
+
|
|
18
|
+
**MCP Calls:**
|
|
19
|
+
\`\`\`typescript
|
|
20
|
+
get_working_context()
|
|
21
|
+
|
|
22
|
+
if ($ARGUMENTS) {
|
|
23
|
+
set_working_context({ specificationId: "$ARGUMENTS" })
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
get_specification(specificationId)
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
### 2. Load and Validate Data
|
|
30
|
+
|
|
31
|
+
**MCP Calls:**
|
|
32
|
+
\`\`\`typescript
|
|
33
|
+
list_epics({ specificationId })
|
|
34
|
+
list_tickets({ specificationId })
|
|
35
|
+
|
|
36
|
+
// Validate each ticket
|
|
37
|
+
for (const ticket of tickets) {
|
|
38
|
+
get_ticket(ticket.id)
|
|
39
|
+
// Check dependencies, status, fields
|
|
40
|
+
}
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
### 3. Display Validation Results
|
|
44
|
+
|
|
45
|
+
**Output:**
|
|
46
|
+
\`\`\`
|
|
47
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
48
|
+
SYSTEM VALIDATION
|
|
49
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
50
|
+
Specification: {title}
|
|
51
|
+
|
|
52
|
+
CHECKS
|
|
53
|
+
─────────────────────────────────────────────────────────────────
|
|
54
|
+
✓ All epics have valid structure
|
|
55
|
+
✓ All tickets have required fields
|
|
56
|
+
✓ Dependency graph is acyclic
|
|
57
|
+
✓ Status transitions are valid
|
|
58
|
+
✓ No orphaned tickets
|
|
59
|
+
|
|
60
|
+
WARNINGS
|
|
61
|
+
─────────────────────────────────────────────────────────────────
|
|
62
|
+
⚠ E{n}-T{m}: Missing acceptance criteria
|
|
63
|
+
⚠ E{n}-T{m}: Long dependency chain (depth {n})
|
|
64
|
+
|
|
65
|
+
ERRORS
|
|
66
|
+
─────────────────────────────────────────────────────────────────
|
|
67
|
+
✗ E{n}-T{m}: Circular dependency detected
|
|
68
|
+
✗ E{n}-T{m}: Invalid dependency reference
|
|
69
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
70
|
+
|
|
71
|
+
Status: {errors ? 'FAILED' : 'PASSED'}
|
|
72
|
+
\`\`\`
|
|
73
|
+
|
|
74
|
+
## Notes
|
|
75
|
+
- Checks dependency graph integrity
|
|
76
|
+
- Validates ticket structure and fields
|
|
77
|
+
- Reports warnings and errors
|
|
78
|
+
`;
|
|
@@ -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,109 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Coding Conventions
|
|
2
|
+
|
|
3
|
+
Project-specific coding standards for SpecForge Agent Teams workers. Workers follow these conventions when implementing tickets.
|
|
4
|
+
|
|
5
|
+
## Language & Framework
|
|
6
|
+
|
|
7
|
+
- **Language:** {{LANGUAGE}}
|
|
8
|
+
- **Framework:** {{FRAMEWORK}}
|
|
9
|
+
- **Runtime:** {{RUNTIME}}
|
|
10
|
+
|
|
11
|
+
## Naming Conventions
|
|
12
|
+
|
|
13
|
+
### Files
|
|
14
|
+
- Components: `PascalCase.tsx` (e.g., `UserProfile.tsx`)
|
|
15
|
+
- Utilities/helpers: `kebab-case.ts` (e.g., `date-utils.ts`)
|
|
16
|
+
- Tests: `{filename}.test.ts` or `{filename}.spec.ts`
|
|
17
|
+
- Styles: `{ComponentName}.module.css` or co-located
|
|
18
|
+
|
|
19
|
+
### Code
|
|
20
|
+
- Functions: `camelCase` (e.g., `getUserById`)
|
|
21
|
+
- Interfaces/Types: `PascalCase` (e.g., `UserProfile`, `CreateUserInput`)
|
|
22
|
+
- Constants: `UPPER_SNAKE_CASE` (e.g., `MAX_RETRIES`)
|
|
23
|
+
- Enums: `PascalCase` with `PascalCase` members
|
|
24
|
+
- Boolean variables: prefix with `is`, `has`, `should`, `can` (e.g., `isLoading`)
|
|
25
|
+
|
|
26
|
+
## Import Style
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
// 1. External packages
|
|
30
|
+
import React from 'react';
|
|
31
|
+
import { useState } from 'react';
|
|
32
|
+
|
|
33
|
+
// 2. Internal aliases (@/ paths)
|
|
34
|
+
import { Button } from '@/components/ui/Button';
|
|
35
|
+
import { useAuth } from '@/lib/hooks/useAuth';
|
|
36
|
+
|
|
37
|
+
// 3. Relative imports
|
|
38
|
+
import { helper } from './utils';
|
|
39
|
+
import type { Props } from './types';
|
|
40
|
+
|
|
41
|
+
// 4. Type-only imports (separate)
|
|
42
|
+
import type { User } from '@/lib/types';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Error Handling
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
// Use try/catch for async operations
|
|
49
|
+
try {
|
|
50
|
+
const result = await apiCall();
|
|
51
|
+
return result;
|
|
52
|
+
} catch (error) {
|
|
53
|
+
// Log with context
|
|
54
|
+
console.error('Failed to fetch user:', error);
|
|
55
|
+
// Re-throw or return error state — don't swallow errors silently
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- Use typed error handling where possible
|
|
61
|
+
- Return error states from hooks/functions rather than throwing in UI code
|
|
62
|
+
- Log errors with context (what operation failed, relevant IDs)
|
|
63
|
+
|
|
64
|
+
## Test Patterns
|
|
65
|
+
|
|
66
|
+
- **Test framework:** {{TEST_FRAMEWORK}}
|
|
67
|
+
- **Location:** Co-located `__tests__/` directories or `*.test.ts` files
|
|
68
|
+
- **Pattern:** Arrange-Act-Assert
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
describe('functionName', () => {
|
|
72
|
+
it('should handle the expected case', () => {
|
|
73
|
+
// Arrange
|
|
74
|
+
const input = createTestInput();
|
|
75
|
+
|
|
76
|
+
// Act
|
|
77
|
+
const result = functionName(input);
|
|
78
|
+
|
|
79
|
+
// Assert
|
|
80
|
+
expect(result).toEqual(expectedOutput);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## State Management
|
|
86
|
+
|
|
87
|
+
- {{STATE_PATTERN}}
|
|
88
|
+
- Keep state as close to where it's used as possible
|
|
89
|
+
- Avoid prop drilling beyond 2 levels — use context or state management
|
|
90
|
+
|
|
91
|
+
## API Patterns
|
|
92
|
+
|
|
93
|
+
- {{API_PATTERN}}
|
|
94
|
+
- Use consistent response shapes
|
|
95
|
+
- Handle loading, error, and success states
|
|
96
|
+
|
|
97
|
+
## Monorepo Rules
|
|
98
|
+
|
|
99
|
+
_(Remove this section for single-app projects)_
|
|
100
|
+
|
|
101
|
+
- **Workspace tool:** {{WORKSPACE_TOOL}}
|
|
102
|
+
- Workers must stay within their assigned workspace
|
|
103
|
+
- Shared packages go in `packages/` directory
|
|
104
|
+
- Cross-workspace imports use package names, not relative paths
|
|
105
|
+
- Run commands scoped to the workspace: `cd {workspace} && {command}`
|
|
106
|
+
|
|
107
|
+
## Project-Specific Notes
|
|
108
|
+
|
|
109
|
+
_(Add any project-specific conventions here)_
|