specweave 1.0.564 → 1.0.566
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/src/cli/commands/team.d.ts +8 -4
- package/dist/src/cli/commands/team.d.ts.map +1 -1
- package/dist/src/cli/commands/team.js +86 -38
- package/dist/src/cli/commands/team.js.map +1 -1
- package/dist/src/cli/helpers/init/claude-settings-permissions.d.ts +9 -6
- package/dist/src/cli/helpers/init/claude-settings-permissions.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/claude-settings-permissions.js +22 -7
- package/dist/src/cli/helpers/init/claude-settings-permissions.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/commands/cancel-auto.md +1 -1
- package/plugins/specweave/commands/docs.md +1 -1
- package/plugins/specweave/commands/doctor.md +1 -1
- package/plugins/specweave/commands/framework.md +1 -1
- package/plugins/specweave/commands/jobs.md +1 -1
- package/plugins/specweave/commands/lsp.md +1 -1
- package/plugins/specweave/commands/progress.md +1 -1
- package/plugins/specweave/commands/save.md +1 -1
- package/plugins/specweave/skills/architect/SKILL.md +1 -1
- package/plugins/specweave/skills/auto/SKILL.md +1 -1
- package/plugins/specweave/skills/debug/SKILL.md +1 -1
- package/plugins/specweave/skills/do/SKILL.md +1 -1
- package/plugins/specweave/skills/done/SKILL.md +1 -1
- package/plugins/specweave/skills/e2e/SKILL.md +1 -1
- package/plugins/specweave/skills/grill/SKILL.md +1 -1
- package/plugins/specweave/skills/increment/SKILL.md +1 -1
- package/plugins/specweave/skills/pm/SKILL.md +1 -1
- package/plugins/specweave/skills/skill-gen/SKILL.md +1 -1
- package/plugins/specweave/skills/sync-docs/SKILL.md +1 -1
- package/plugins/specweave/skills/tdd-cycle/SKILL.md +1 -1
- package/plugins/specweave/skills/tdd-green/SKILL.md +1 -1
- package/plugins/specweave/skills/tdd-red/SKILL.md +1 -1
- package/plugins/specweave/skills/validate/SKILL.md +1 -1
- package/plugins/specweave/scripts/skill-memories.sh +0 -16
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
* Team CLI Command
|
|
3
3
|
*
|
|
4
4
|
* Launches Claude Code with native agent teams enabled.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Automatically creates a tmux session if not already in one,
|
|
6
|
+
* so agents get their own split panes.
|
|
7
|
+
*
|
|
8
|
+
* Cross-platform:
|
|
9
|
+
* macOS/Linux: auto-launches tmux for split-pane agent views
|
|
10
|
+
* Windows: uses in-process mode (tmux unavailable natively)
|
|
7
11
|
*
|
|
8
12
|
* Usage:
|
|
9
|
-
* specweave team #
|
|
13
|
+
* specweave team # Auto-launches in tmux (macOS/Linux)
|
|
10
14
|
* specweave team "Build auth system" # Launch with initial prompt
|
|
11
|
-
* specweave team --mode in-process #
|
|
15
|
+
* specweave team --mode in-process # Force in-process mode (no tmux)
|
|
12
16
|
*/
|
|
13
17
|
export interface TeamCommandOptions {
|
|
14
18
|
mode?: 'tmux' | 'in-process';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/team.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"team.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/team.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAwCD;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAiEf"}
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
* Team CLI Command
|
|
3
3
|
*
|
|
4
4
|
* Launches Claude Code with native agent teams enabled.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Automatically creates a tmux session if not already in one,
|
|
6
|
+
* so agents get their own split panes.
|
|
7
|
+
*
|
|
8
|
+
* Cross-platform:
|
|
9
|
+
* macOS/Linux: auto-launches tmux for split-pane agent views
|
|
10
|
+
* Windows: uses in-process mode (tmux unavailable natively)
|
|
7
11
|
*
|
|
8
12
|
* Usage:
|
|
9
|
-
* specweave team #
|
|
13
|
+
* specweave team # Auto-launches in tmux (macOS/Linux)
|
|
10
14
|
* specweave team "Build auth system" # Launch with initial prompt
|
|
11
|
-
* specweave team --mode in-process #
|
|
15
|
+
* specweave team --mode in-process # Force in-process mode (no tmux)
|
|
12
16
|
*/
|
|
13
17
|
import { spawn } from 'child_process';
|
|
14
18
|
import * as os from 'os';
|
|
@@ -26,40 +30,28 @@ function isToolAvailable(tool) {
|
|
|
26
30
|
return result.success;
|
|
27
31
|
}
|
|
28
32
|
/**
|
|
29
|
-
*
|
|
33
|
+
* Platform-appropriate install hint for tmux.
|
|
30
34
|
*/
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
// Priority 1: Check if already INSIDE a tmux session
|
|
42
|
-
const inTmux = !!process.env.TMUX;
|
|
43
|
-
if (inTmux) {
|
|
44
|
-
return 'tmux';
|
|
45
|
-
}
|
|
46
|
-
// Priority 2: Check for iTerm2 (it2 CLI) — Claude auto-detects iTerm2
|
|
47
|
-
const hasIt2 = isToolAvailable('it2');
|
|
48
|
-
if (hasIt2) {
|
|
49
|
-
return 'tmux';
|
|
35
|
+
function tmuxInstallHint() {
|
|
36
|
+
switch (process.platform) {
|
|
37
|
+
case 'darwin':
|
|
38
|
+
return 'brew install tmux';
|
|
39
|
+
case 'win32':
|
|
40
|
+
return 'Use WSL: wsl --install, then: sudo apt install tmux';
|
|
41
|
+
default:
|
|
42
|
+
return 'sudo apt install tmux # or your package manager';
|
|
50
43
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return 'in-process';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Reconstruct CLI args for re-launching inside tmux.
|
|
47
|
+
*/
|
|
48
|
+
function buildRelaunchArgs(description, options) {
|
|
49
|
+
const args = ['team', '--mode', 'tmux'];
|
|
50
|
+
if (options.noIncrement)
|
|
51
|
+
args.push('--no-increment');
|
|
52
|
+
if (description)
|
|
53
|
+
args.push(description);
|
|
54
|
+
return args;
|
|
63
55
|
}
|
|
64
56
|
/**
|
|
65
57
|
* Main team command handler
|
|
@@ -80,8 +72,10 @@ export async function handleTeamCommand(description, options) {
|
|
|
80
72
|
// Auto-fix settings.json env var (project-level + global)
|
|
81
73
|
enableAgentTeamsEnvVar(projectPath);
|
|
82
74
|
enableAgentTeamsEnvVar(os.homedir());
|
|
83
|
-
// Determine mode
|
|
84
|
-
const mode =
|
|
75
|
+
// Determine mode — may re-launch inside tmux (returns only if continuing)
|
|
76
|
+
const mode = resolveMode(description, options);
|
|
77
|
+
if (mode === null)
|
|
78
|
+
return; // re-launched inside tmux, parent exits via spawn handler
|
|
85
79
|
// Build args — interactive mode with optional initial prompt as positional arg
|
|
86
80
|
const args = ['--dangerously-skip-permissions', '--teammate-mode', mode];
|
|
87
81
|
// Build env
|
|
@@ -117,4 +111,58 @@ export async function handleTeamCommand(description, options) {
|
|
|
117
111
|
process.exit(code ?? 0);
|
|
118
112
|
});
|
|
119
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Resolve teammate mode, auto-launching tmux if needed.
|
|
116
|
+
*
|
|
117
|
+
* Returns the mode string to use, or null if the process was
|
|
118
|
+
* re-launched inside tmux (caller should exit).
|
|
119
|
+
*/
|
|
120
|
+
function resolveMode(description, options) {
|
|
121
|
+
// Explicit in-process — skip tmux entirely
|
|
122
|
+
if (options.mode === 'in-process') {
|
|
123
|
+
return 'in-process';
|
|
124
|
+
}
|
|
125
|
+
// Explicit tmux or invalid mode — validate
|
|
126
|
+
if (options.mode && options.mode !== 'tmux') {
|
|
127
|
+
console.log(chalk.yellow(`Unknown mode "${options.mode}". Valid modes: ${VALID_MODES.join(', ')}`));
|
|
128
|
+
console.log(chalk.gray('Falling back to auto-detection.'));
|
|
129
|
+
}
|
|
130
|
+
// Already inside tmux — use it directly
|
|
131
|
+
if (process.env.TMUX) {
|
|
132
|
+
return 'tmux';
|
|
133
|
+
}
|
|
134
|
+
// iTerm2 available (macOS) — Claude auto-detects iTerm2 split panes
|
|
135
|
+
if (isToolAvailable('it2')) {
|
|
136
|
+
return 'tmux';
|
|
137
|
+
}
|
|
138
|
+
// tmux available but not in a session — auto-launch inside tmux
|
|
139
|
+
if (isToolAvailable('tmux')) {
|
|
140
|
+
console.log(chalk.cyan('Starting tmux session for agent split panes...'));
|
|
141
|
+
const sessionName = `sw-team-${Date.now()}`;
|
|
142
|
+
const relaunchArgs = buildRelaunchArgs(description, options);
|
|
143
|
+
const tmuxArgs = [
|
|
144
|
+
'new-session', '-s', sessionName, '--',
|
|
145
|
+
'specweave', ...relaunchArgs,
|
|
146
|
+
];
|
|
147
|
+
const child = spawn('tmux', tmuxArgs, {
|
|
148
|
+
stdio: 'inherit',
|
|
149
|
+
env: {
|
|
150
|
+
...process.env,
|
|
151
|
+
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: '1',
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
child.on('error', (err) => {
|
|
155
|
+
console.error(chalk.red(`Failed to start tmux: ${err.message}`));
|
|
156
|
+
process.exit(1);
|
|
157
|
+
});
|
|
158
|
+
child.on('exit', (code) => {
|
|
159
|
+
process.exit(code ?? 0);
|
|
160
|
+
});
|
|
161
|
+
return null; // Signal: re-launched, don't continue
|
|
162
|
+
}
|
|
163
|
+
// No tmux available — in-process fallback with platform-specific hint
|
|
164
|
+
console.log(chalk.yellow('tmux not found. Agents will run in-process (same pane).'));
|
|
165
|
+
console.log(chalk.gray(`Install tmux for split-pane agent views: ${tmuxInstallHint()}`));
|
|
166
|
+
return 'in-process';
|
|
167
|
+
}
|
|
120
168
|
//# sourceMappingURL=team.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team.js","sourceRoot":"","sources":["../../../../src/cli/commands/team.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"team.js","sourceRoot":"","sources":["../../../../src/cli/commands/team.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAOhF,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,YAAY,CAAU,CAAC;AAEpD;;GAEG;AACH,SAAS,eAAe,CAAC,IAAY;IACnC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC/D,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,SAAS,eAAe;IACtB,QAAQ,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzB,KAAK,QAAQ;YACX,OAAO,mBAAmB,CAAC;QAC7B,KAAK,OAAO;YACV,OAAO,qDAAqD,CAAC;QAC/D;YACE,OAAO,kDAAkD,CAAC;IAC9D,CAAC;AACH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AE,QAAQ,EAAE;YACpC,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE;gBACH,GAAG,OAAO,CAAC,GAA6B;gBACxC,oCAAoC,EAAE,GAAG;aAC1C;SACF,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACxB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,yBAAyB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YACxB,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,CAAC,sCAAsC;IACrD,CAAC;IAED,sEAAsE;IACtE,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,MAAM,CAAC,yDAAyD,CAAC,CACxE,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,4CAA4C,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;IACzF,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
* Claude Settings Permission Configuration
|
|
3
3
|
*
|
|
4
4
|
* Adds DCI script patterns to .claude/settings.json permissions.allow
|
|
5
|
-
* so skill-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* so skill-context.sh can execute without interactive approval.
|
|
6
|
+
* Required for non-interactive environments (anymodel, proxies) and
|
|
7
|
+
* users with restrictive permission settings.
|
|
8
|
+
*
|
|
9
|
+
* Note: skill-memories.sh was replaced with instruction-based loading
|
|
10
|
+
* (cross-platform, no shell needed). Only skill-context.sh remains as DCI.
|
|
8
11
|
*/
|
|
9
12
|
/**
|
|
10
13
|
* Add DCI script permissions to project-level .claude/settings.json
|
|
11
14
|
*
|
|
12
|
-
* Adds patterns for skill-
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
+
* Adds patterns for skill-context.sh to the permissions.allow array.
|
|
16
|
+
* Idempotent — skips patterns already present. Also cleans up legacy
|
|
17
|
+
* skill-memories.sh patterns. Skips if user has blanket "Bash" permission.
|
|
15
18
|
*/
|
|
16
19
|
export declare function enableDciPermissions(projectDir: string): void;
|
|
17
20
|
//# sourceMappingURL=claude-settings-permissions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-settings-permissions.d.ts","sourceRoot":"","sources":["../../../../../src/cli/helpers/init/claude-settings-permissions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"claude-settings-permissions.d.ts","sourceRoot":"","sources":["../../../../../src/cli/helpers/init/claude-settings-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAeH;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAkD7D"}
|
|
@@ -2,23 +2,29 @@
|
|
|
2
2
|
* Claude Settings Permission Configuration
|
|
3
3
|
*
|
|
4
4
|
* Adds DCI script patterns to .claude/settings.json permissions.allow
|
|
5
|
-
* so skill-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* so skill-context.sh can execute without interactive approval.
|
|
6
|
+
* Required for non-interactive environments (anymodel, proxies) and
|
|
7
|
+
* users with restrictive permission settings.
|
|
8
|
+
*
|
|
9
|
+
* Note: skill-memories.sh was replaced with instruction-based loading
|
|
10
|
+
* (cross-platform, no shell needed). Only skill-context.sh remains as DCI.
|
|
8
11
|
*/
|
|
9
12
|
import * as fs from '../../../utils/fs-native.js';
|
|
10
13
|
import * as path from 'path';
|
|
11
14
|
/** Bash patterns that DCI hooks need auto-approved */
|
|
12
15
|
const DCI_PATTERNS = [
|
|
13
|
-
'Bash(.specweave/scripts/skill-memories.sh *)',
|
|
14
16
|
'Bash(.specweave/scripts/skill-context.sh *)',
|
|
15
17
|
];
|
|
18
|
+
/** Legacy pattern to clean up from existing settings */
|
|
19
|
+
const LEGACY_PATTERNS = [
|
|
20
|
+
'Bash(.specweave/scripts/skill-memories.sh *)',
|
|
21
|
+
];
|
|
16
22
|
/**
|
|
17
23
|
* Add DCI script permissions to project-level .claude/settings.json
|
|
18
24
|
*
|
|
19
|
-
* Adds patterns for skill-
|
|
20
|
-
*
|
|
21
|
-
*
|
|
25
|
+
* Adds patterns for skill-context.sh to the permissions.allow array.
|
|
26
|
+
* Idempotent — skips patterns already present. Also cleans up legacy
|
|
27
|
+
* skill-memories.sh patterns. Skips if user has blanket "Bash" permission.
|
|
22
28
|
*/
|
|
23
29
|
export function enableDciPermissions(projectDir) {
|
|
24
30
|
const claudeDir = path.join(projectDir, '.claude');
|
|
@@ -40,12 +46,21 @@ export function enableDciPermissions(projectDir) {
|
|
|
40
46
|
return;
|
|
41
47
|
}
|
|
42
48
|
let changed = false;
|
|
49
|
+
// Add current DCI patterns
|
|
43
50
|
for (const pattern of DCI_PATTERNS) {
|
|
44
51
|
if (!allow.includes(pattern)) {
|
|
45
52
|
allow.push(pattern);
|
|
46
53
|
changed = true;
|
|
47
54
|
}
|
|
48
55
|
}
|
|
56
|
+
// Remove legacy patterns (skill-memories.sh no longer used as DCI)
|
|
57
|
+
for (const legacy of LEGACY_PATTERNS) {
|
|
58
|
+
const idx = allow.indexOf(legacy);
|
|
59
|
+
if (idx !== -1) {
|
|
60
|
+
allow.splice(idx, 1);
|
|
61
|
+
changed = true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
49
64
|
if (!changed) {
|
|
50
65
|
return;
|
|
51
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-settings-permissions.js","sourceRoot":"","sources":["../../../../../src/cli/helpers/init/claude-settings-permissions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":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,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACpB,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;IACH,CAAC;IAED,mEAAmE;IACnE,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;YACf,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACrB,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;IACH,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;IACT,CAAC;IAED,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;IAC1B,QAAQ,CAAC,WAAW,GAAG,WAAW,CAAC;IAEnC,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AAC3E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specweave",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.566",
|
|
4
4
|
"description": "100+ domain-expert AI skills — PM, Architect, Frontend, QA, Security and more. Skills learn your team's patterns permanently. Spec-first planning, autonomous execution, multi-agent teams, synced to GitHub/JIRA. Claude Code, Cursor, Copilot & more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -7,7 +7,7 @@ description: EMERGENCY ONLY - Cancel running auto session and generate summary r
|
|
|
7
7
|
|
|
8
8
|
## Project Overrides
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Skill Memories**: If `.specweave/skill-memories/cancel-auto.md` exists, read and apply its learnings.
|
|
11
11
|
|
|
12
12
|
**⚠️ EMERGENCY USE ONLY - Manually cancel the running auto session.**
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ argument-hint: "[topic] [--serve] [--status] [--public] [--internal] [--adr] [--
|
|
|
7
7
|
|
|
8
8
|
## Project Overrides
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Skill Memories**: If `.specweave/skill-memories/docs.md` exists, read and apply its learnings.
|
|
11
11
|
|
|
12
12
|
Browse, search, load, and serve SpecWeave living documentation.
|
|
13
13
|
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
|
|
9
9
|
## Project Overrides
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
**Skill Memories**: If `.specweave/skill-memories/framework.md` exists, read and apply its learnings.
|
|
12
12
|
|
|
13
13
|
I am an expert on the SpecWeave framework - a spec-driven development framework for Claude Code (and other AI coding assistants). I have deep knowledge of its structure, rules, conventions, and best practices.
|
|
14
14
|
|
|
@@ -7,7 +7,7 @@ argument-hint: "[--all] [--id job-id]"
|
|
|
7
7
|
|
|
8
8
|
## Project Overrides
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Skill Memories**: If `.specweave/skill-memories/jobs.md` exists, read and apply its learnings.
|
|
11
11
|
|
|
12
12
|
Shows background job information including:
|
|
13
13
|
- **Clone jobs** — repository cloning progress and status
|
|
@@ -29,7 +29,7 @@ Replace `XXXX-name` with the actual increment ID. **This unblocks the guard for
|
|
|
29
29
|
|
|
30
30
|
## Project Overrides
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
**Skill Memories**: If `.specweave/skill-memories/architect.md` exists, read and apply its learnings.
|
|
33
33
|
|
|
34
34
|
## Design Approach
|
|
35
35
|
|
|
@@ -7,7 +7,7 @@ argument-hint: "<increment-id> [--auto]"
|
|
|
7
7
|
|
|
8
8
|
## Project Overrides
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Skill Memories**: If `.specweave/skill-memories/done.md` exists, read and apply its learnings.
|
|
11
11
|
|
|
12
12
|
**PM-Led Closure**: Validate tasks, tests, and docs before closing.
|
|
13
13
|
|
|
@@ -10,7 +10,7 @@ model: sonnet
|
|
|
10
10
|
|
|
11
11
|
## Project Overrides
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**Skill Memories**: If `.specweave/skill-memories/e2e.md` exists, read and apply its learnings.
|
|
14
14
|
|
|
15
15
|
Generate Playwright E2E tests from spec.md acceptance criteria, run them, and produce a structured report that maps pass/fail results to AC-IDs. Consumed by sw:done Gate 2a for automated closure gating.
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ model: opus
|
|
|
10
10
|
|
|
11
11
|
## Project Overrides
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**Skill Memories**: If `.specweave/skill-memories/grill.md` exists, read and apply its learnings.
|
|
14
14
|
|
|
15
15
|
I'm a demanding senior engineer who stress-tests your implementation before it ships. My job is to find issues NOW, before users do. I'm not here to validate - I'm here to CHALLENGE.
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ Increment planning produces specs, plans, and task breakdowns that require user
|
|
|
18
18
|
|
|
19
19
|
## Project Overrides
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
**Skill Memories**: If `.specweave/skill-memories/increment.md` exists, read and apply its learnings.
|
|
22
22
|
|
|
23
23
|
## Project Context
|
|
24
24
|
|
|
@@ -9,7 +9,7 @@ model: opus
|
|
|
9
9
|
|
|
10
10
|
## Project Overrides
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**Skill Memories**: If `.specweave/skill-memories/skill-gen.md` exists, read and apply its learnings.
|
|
13
13
|
|
|
14
14
|
Generate project-local skills from recurring patterns detected across increment closures.
|
|
15
15
|
|
|
@@ -7,7 +7,7 @@ argument-hint: "<increment-id> [--review]"
|
|
|
7
7
|
|
|
8
8
|
## Project Overrides
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Skill Memories**: If `.specweave/skill-memories/sync-docs.md` exists, read and apply its learnings.
|
|
11
11
|
|
|
12
12
|
Sync living documentation for an increment. This generates or updates feature specs and user story files under `.specweave/docs/internal/specs/`.
|
|
13
13
|
|
|
@@ -6,7 +6,7 @@ description: Execute full TDD red-green-refactor cycle with validation gates. Us
|
|
|
6
6
|
|
|
7
7
|
## Project Overrides
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Skill Memories**: If `.specweave/skill-memories/tdd-cycle.md` exists, read and apply its learnings.
|
|
10
10
|
|
|
11
11
|
Execute a comprehensive Test-Driven Development (TDD) workflow with strict red-green-refactor discipline:
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ description: Write minimal code to make failing tests pass. Use when saying "TDD
|
|
|
6
6
|
|
|
7
7
|
## Project Overrides
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Skill Memories**: If `.specweave/skill-memories/tdd-green.md` exists, read and apply its learnings.
|
|
10
10
|
|
|
11
11
|
Implement minimal code to make failing tests pass in TDD green phase.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ description: Write failing tests that define expected behavior. Use when saying
|
|
|
6
6
|
|
|
7
7
|
## Project Overrides
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Skill Memories**: If `.specweave/skill-memories/tdd-red.md` exists, read and apply its learnings.
|
|
10
10
|
|
|
11
11
|
Write comprehensive failing tests following TDD red phase principles.
|
|
12
12
|
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# skill-memories.sh — Load skill-specific learnings for DCI blocks
|
|
3
|
-
#
|
|
4
|
-
# Usage: .specweave/scripts/skill-memories.sh <skill-name>
|
|
5
|
-
# Output: Learnings bullet points from the skill's memory file
|
|
6
|
-
# Cascade: .specweave/ → .claude/ → ~/.claude/ (first match wins)
|
|
7
|
-
# Exit: Always 0 (graceful degradation)
|
|
8
|
-
#
|
|
9
|
-
# Performance: <10ms. Single awk call on first matching file.
|
|
10
|
-
|
|
11
|
-
s="${1:?Usage: skill-memories.sh <skill-name>}"
|
|
12
|
-
for d in .specweave/skill-memories .claude/skill-memories "$HOME/.claude/skill-memories"; do
|
|
13
|
-
p="$d/$s.md"
|
|
14
|
-
[ -f "$p" ] && awk '/^## Learnings$/{ok=1;next}/^## /{ok=0}ok' "$p" && break
|
|
15
|
-
done 2>/dev/null
|
|
16
|
-
exit 0
|