specweave 0.26.14 → 0.28.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/CLAUDE.md +73 -1
- package/README.md +245 -446
- package/dist/plugins/specweave-jira/lib/setup-wizard.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/setup-wizard.js +57 -78
- package/dist/plugins/specweave-jira/lib/setup-wizard.js.map +1 -1
- package/dist/src/cli/commands/import-docs.d.ts.map +1 -1
- package/dist/src/cli/commands/import-docs.js +23 -31
- package/dist/src/cli/commands/import-docs.js.map +1 -1
- package/dist/src/cli/commands/import-external.d.ts.map +1 -1
- package/dist/src/cli/commands/import-external.js +6 -10
- package/dist/src/cli/commands/import-external.js.map +1 -1
- package/dist/src/cli/commands/init-multiproject.d.ts.map +1 -1
- package/dist/src/cli/commands/init-multiproject.js +58 -73
- package/dist/src/cli/commands/init-multiproject.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts +17 -11
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +221 -1874
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/install.d.ts.map +1 -1
- package/dist/src/cli/commands/install.js +14 -22
- package/dist/src/cli/commands/install.js.map +1 -1
- package/dist/src/cli/commands/migrate-config.d.ts.map +1 -1
- package/dist/src/cli/commands/migrate-config.js +6 -10
- package/dist/src/cli/commands/migrate-config.js.map +1 -1
- package/dist/src/cli/commands/switch-project.d.ts.map +1 -1
- package/dist/src/cli/commands/switch-project.js.map +1 -1
- package/dist/src/cli/helpers/ado-area-path-mapper.d.ts.map +1 -1
- package/dist/src/cli/helpers/ado-area-path-mapper.js +36 -49
- package/dist/src/cli/helpers/ado-area-path-mapper.js.map +1 -1
- package/dist/src/cli/helpers/github/increment-profile-selector.d.ts.map +1 -1
- package/dist/src/cli/helpers/github/increment-profile-selector.js.map +1 -1
- package/dist/src/cli/helpers/github/profile-manager.d.ts.map +1 -1
- package/dist/src/cli/helpers/github/profile-manager.js +8 -11
- package/dist/src/cli/helpers/github/profile-manager.js.map +1 -1
- package/dist/src/cli/helpers/github-repo-selector.d.ts.map +1 -1
- package/dist/src/cli/helpers/github-repo-selector.js +26 -50
- package/dist/src/cli/helpers/github-repo-selector.js.map +1 -1
- package/dist/src/cli/helpers/import-strategy-prompter.d.ts.map +1 -1
- package/dist/src/cli/helpers/import-strategy-prompter.js +39 -52
- package/dist/src/cli/helpers/import-strategy-prompter.js.map +1 -1
- package/dist/src/cli/helpers/init/config-detection.d.ts +40 -0
- package/dist/src/cli/helpers/init/config-detection.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/config-detection.js +125 -0
- package/dist/src/cli/helpers/init/config-detection.js.map +1 -0
- package/dist/src/cli/helpers/init/directory-structure.d.ts +26 -0
- package/dist/src/cli/helpers/init/directory-structure.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/directory-structure.js +190 -0
- package/dist/src/cli/helpers/init/directory-structure.js.map +1 -0
- package/dist/src/cli/helpers/init/external-import.d.ts +15 -0
- package/dist/src/cli/helpers/init/external-import.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/external-import.js +251 -0
- package/dist/src/cli/helpers/init/external-import.js.map +1 -0
- package/dist/src/cli/helpers/init/index.d.ts +15 -0
- package/dist/src/cli/helpers/init/index.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/index.js +26 -0
- package/dist/src/cli/helpers/init/index.js.map +1 -0
- package/dist/src/cli/helpers/init/next-steps.d.ts +15 -0
- package/dist/src/cli/helpers/init/next-steps.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/next-steps.js +72 -0
- package/dist/src/cli/helpers/init/next-steps.js.map +1 -0
- package/dist/src/cli/helpers/init/path-utils.d.ts +41 -0
- package/dist/src/cli/helpers/init/path-utils.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/path-utils.js +146 -0
- package/dist/src/cli/helpers/init/path-utils.js.map +1 -0
- package/dist/src/cli/helpers/init/plugin-installer.d.ts +28 -0
- package/dist/src/cli/helpers/init/plugin-installer.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/plugin-installer.js +238 -0
- package/dist/src/cli/helpers/init/plugin-installer.js.map +1 -0
- package/dist/src/cli/helpers/init/repository-setup.d.ts +28 -0
- package/dist/src/cli/helpers/init/repository-setup.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/repository-setup.js +78 -0
- package/dist/src/cli/helpers/init/repository-setup.js.map +1 -0
- package/dist/src/cli/helpers/init/smart-reinit.d.ts +30 -0
- package/dist/src/cli/helpers/init/smart-reinit.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/smart-reinit.js +140 -0
- package/dist/src/cli/helpers/init/smart-reinit.js.map +1 -0
- package/dist/src/cli/helpers/init/testing-config.d.ts +27 -0
- package/dist/src/cli/helpers/init/testing-config.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/testing-config.js +131 -0
- package/dist/src/cli/helpers/init/testing-config.js.map +1 -0
- package/dist/src/cli/helpers/init/types.d.ts +86 -0
- package/dist/src/cli/helpers/init/types.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/types.js +5 -0
- package/dist/src/cli/helpers/init/types.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js +10 -12
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/ado.js +43 -60
- package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js +193 -230
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/github.js +43 -54
- package/dist/src/cli/helpers/issue-tracker/github.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.js +27 -40
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/jira.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/jira.js +54 -70
- package/dist/src/cli/helpers/issue-tracker/jira.js.map +1 -1
- package/dist/src/cli/helpers/smart-filter.d.ts.map +1 -1
- package/dist/src/cli/helpers/smart-filter.js +62 -85
- package/dist/src/cli/helpers/smart-filter.js.map +1 -1
- package/dist/src/core/increment/auto-transition-manager.d.ts +12 -0
- package/dist/src/core/increment/auto-transition-manager.d.ts.map +1 -1
- package/dist/src/core/increment/auto-transition-manager.js +45 -0
- package/dist/src/core/increment/auto-transition-manager.js.map +1 -1
- package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
- package/dist/src/core/increment/metadata-manager.js +46 -0
- package/dist/src/core/increment/metadata-manager.js.map +1 -1
- package/dist/src/core/increment/status-change-sync-trigger.d.ts +12 -0
- package/dist/src/core/increment/status-change-sync-trigger.d.ts.map +1 -1
- package/dist/src/core/increment/status-change-sync-trigger.js +48 -2
- package/dist/src/core/increment/status-change-sync-trigger.js.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.d.ts +13 -0
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +40 -0
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/repo-structure/repo-bulk-discovery.d.ts +5 -1
- package/dist/src/core/repo-structure/repo-bulk-discovery.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-bulk-discovery.js +68 -86
- package/dist/src/core/repo-structure/repo-bulk-discovery.js.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +345 -425
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
- package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
- package/dist/src/core/sync/bidirectional-engine.js +21 -29
- package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
- package/dist/src/init/InitFlow.js +15 -19
- package/dist/src/init/InitFlow.js.map +1 -1
- package/dist/src/init/repo/types.d.ts +1 -1
- package/dist/src/integrations/ado/area-path-mapper.d.ts.map +1 -1
- package/dist/src/integrations/ado/area-path-mapper.js +19 -23
- package/dist/src/integrations/ado/area-path-mapper.js.map +1 -1
- package/dist/src/utils/external-resource-validator.d.ts.map +1 -1
- package/dist/src/utils/external-resource-validator.js +41 -65
- package/dist/src/utils/external-resource-validator.js.map +1 -1
- package/dist/src/utils/project-detection.d.ts.map +1 -1
- package/dist/src/utils/project-detection.js +19 -21
- package/dist/src/utils/project-detection.js.map +1 -1
- package/dist/src/utils/project-validator.d.ts.map +1 -1
- package/dist/src/utils/project-validator.js +5 -7
- package/dist/src/utils/project-validator.js.map +1 -1
- package/package.json +2 -3
- package/plugins/specweave/agents/tech-lead/AGENT.md +9 -0
- package/plugins/specweave/hooks/post-edit-write-consolidated.sh +87 -0
- package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.d.ts +12 -0
- package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js +45 -0
- package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js.map +1 -1
- package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +46 -0
- package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
- package/plugins/specweave/skills/increment-planner/SKILL.md +10 -5
- package/plugins/specweave/skills/specweave-framework/SKILL.md +6 -4
- package/plugins/specweave/templates/coding-standards.md.template +36 -0
- package/plugins/specweave-ado/lib/project-selector.js +56 -67
- package/plugins/specweave-ado/lib/project-selector.ts +72 -85
- package/plugins/specweave-github/lib/repo-selector.js +55 -66
- package/plugins/specweave-github/lib/repo-selector.ts +73 -84
- package/plugins/specweave-jira/commands/import-projects.js +3 -5
- package/plugins/specweave-jira/commands/import-projects.ts +3 -5
- package/plugins/specweave-jira/lib/project-selector.js +60 -71
- package/plugins/specweave-jira/lib/project-selector.ts +78 -91
- package/plugins/specweave-jira/lib/setup-wizard.js +51 -72
- package/plugins/specweave-jira/lib/setup-wizard.ts +56 -74
- package/src/templates/CLAUDE.md.template +14 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 3. Never ask twice for same credentials
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import { confirm, select, input, password } from '@inquirer/prompts';
|
|
11
11
|
import { credentialsManager, JiraCredentials } from '../../../src/core/credentials-manager.js';
|
|
12
12
|
|
|
13
13
|
// ============================================================================
|
|
@@ -64,14 +64,10 @@ export async function setupJiraCredentials(): Promise<JiraCredentials> {
|
|
|
64
64
|
|
|
65
65
|
if (detected.found) {
|
|
66
66
|
// Ask user if they want to use existing or re-enter
|
|
67
|
-
const
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
message: `Found credentials in ${detected.source}. Use these credentials?`,
|
|
72
|
-
default: true,
|
|
73
|
-
},
|
|
74
|
-
]);
|
|
67
|
+
const useExisting = await confirm({
|
|
68
|
+
message: `Found credentials in ${detected.source}. Use these credentials?`,
|
|
69
|
+
default: true,
|
|
70
|
+
});
|
|
75
71
|
|
|
76
72
|
if (useExisting) {
|
|
77
73
|
return detected.credentials!;
|
|
@@ -84,59 +80,53 @@ export async function setupJiraCredentials(): Promise<JiraCredentials> {
|
|
|
84
80
|
}
|
|
85
81
|
|
|
86
82
|
// Interactive credential entry
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
name: 'Cloud (*.atlassian.net)',
|
|
95
|
-
value: 'cloud',
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: 'Server/Data Center (self-hosted)',
|
|
99
|
-
value: 'server',
|
|
100
|
-
},
|
|
101
|
-
],
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
type: 'input',
|
|
105
|
-
name: 'domain',
|
|
106
|
-
message: (answers: any) =>
|
|
107
|
-
answers.setupType === 'cloud'
|
|
108
|
-
? 'Jira domain (e.g., mycompany.atlassian.net):'
|
|
109
|
-
: 'Jira server URL (e.g., jira.mycompany.com):',
|
|
110
|
-
validate: (value: string) => {
|
|
111
|
-
if (!value) return 'Domain is required';
|
|
112
|
-
if (answers.setupType === 'cloud' && !value.includes('.atlassian.net')) {
|
|
113
|
-
return 'Cloud domain must end with .atlassian.net';
|
|
114
|
-
}
|
|
115
|
-
return true;
|
|
83
|
+
const setupType = await select({
|
|
84
|
+
message: 'How would you like to connect to Jira?',
|
|
85
|
+
choices: [
|
|
86
|
+
{
|
|
87
|
+
name: 'Cloud (*.atlassian.net)',
|
|
88
|
+
value: 'cloud',
|
|
116
89
|
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
name: 'email',
|
|
121
|
-
message: 'Email address:',
|
|
122
|
-
validate: (value: string) => {
|
|
123
|
-
if (!value) return 'Email is required';
|
|
124
|
-
if (!value.includes('@')) return 'Must be a valid email';
|
|
125
|
-
return true;
|
|
90
|
+
{
|
|
91
|
+
name: 'Server/Data Center (self-hosted)',
|
|
92
|
+
value: 'server',
|
|
126
93
|
},
|
|
94
|
+
],
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const domain = await input({
|
|
98
|
+
message: setupType === 'cloud'
|
|
99
|
+
? 'Jira domain (e.g., mycompany.atlassian.net):'
|
|
100
|
+
: 'Jira server URL (e.g., jira.mycompany.com):',
|
|
101
|
+
validate: (value: string) => {
|
|
102
|
+
if (!value) return 'Domain is required';
|
|
103
|
+
if (setupType === 'cloud' && !value.includes('.atlassian.net')) {
|
|
104
|
+
return 'Cloud domain must end with .atlassian.net';
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
127
107
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return true;
|
|
137
|
-
},
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const email = await input({
|
|
111
|
+
message: 'Email address:',
|
|
112
|
+
validate: (value: string) => {
|
|
113
|
+
if (!value) return 'Email is required';
|
|
114
|
+
if (!value.includes('@')) return 'Must be a valid email';
|
|
115
|
+
return true;
|
|
138
116
|
},
|
|
139
|
-
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const apiToken = await password({
|
|
120
|
+
message: 'API token:',
|
|
121
|
+
mask: '*',
|
|
122
|
+
validate: (value: string) => {
|
|
123
|
+
if (!value) return 'API token is required';
|
|
124
|
+
if (value.length < 10) return 'API token seems too short';
|
|
125
|
+
return true;
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
const answers = { setupType, domain, email, apiToken };
|
|
140
130
|
|
|
141
131
|
const credentials: JiraCredentials = {
|
|
142
132
|
domain: answers.domain,
|
|
@@ -152,14 +142,10 @@ export async function setupJiraCredentials(): Promise<JiraCredentials> {
|
|
|
152
142
|
console.log('❌ Failed to connect to Jira');
|
|
153
143
|
console.log('💡 Please check your credentials and try again\n');
|
|
154
144
|
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
message: 'Would you like to try again?',
|
|
160
|
-
default: true,
|
|
161
|
-
},
|
|
162
|
-
]);
|
|
145
|
+
const retry = await confirm({
|
|
146
|
+
message: 'Would you like to try again?',
|
|
147
|
+
default: true,
|
|
148
|
+
});
|
|
163
149
|
|
|
164
150
|
if (retry) {
|
|
165
151
|
return setupJiraCredentials();
|
|
@@ -219,14 +205,10 @@ async function testJiraConnection(credentials: JiraCredentials): Promise<boolean
|
|
|
219
205
|
async function saveCredentialsToEnv(credentials: JiraCredentials): Promise<void> {
|
|
220
206
|
console.log('💡 Save credentials to .env for future use\n');
|
|
221
207
|
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
message: 'Save credentials to .env file?',
|
|
227
|
-
default: true,
|
|
228
|
-
},
|
|
229
|
-
]);
|
|
208
|
+
const saveToEnv = await confirm({
|
|
209
|
+
message: 'Save credentials to .env file?',
|
|
210
|
+
default: true,
|
|
211
|
+
});
|
|
230
212
|
|
|
231
213
|
if (saveToEnv) {
|
|
232
214
|
credentialsManager.saveToEnvFile({ jira: credentials });
|
|
@@ -30,6 +30,14 @@ Edit("spec.md", "- [ ] **AC-US1-01**", "- [x] **AC-US1-01**");
|
|
|
30
30
|
**Format**: `####-descriptive-name` (e.g., `0001-user-auth`)
|
|
31
31
|
**Check before creating**: `ls -1 .specweave/increments/ | grep -E "^[0-9]{4}-" | sort | tail -5`
|
|
32
32
|
|
|
33
|
+
### 4. Emergency Minimal Mode
|
|
34
|
+
|
|
35
|
+
**Activates ONLY on**: "emergency mode", "minimal mode ON", "crashed N times"
|
|
36
|
+
|
|
37
|
+
**Rules:** `READ: limit:50 | EDIT: 1/response | AGENTS: none | FLOW: "Done. Next?"`
|
|
38
|
+
|
|
39
|
+
**Phrase:** `EMERGENCY MODE. 1 edit. 50 lines max. No agents.`
|
|
40
|
+
|
|
33
41
|
---
|
|
34
42
|
|
|
35
43
|
## Core Workflow
|
|
@@ -159,6 +167,12 @@ After **EVERY task completion**, hooks automatically:
|
|
|
159
167
|
|
|
160
168
|
---
|
|
161
169
|
|
|
170
|
+
## File Size
|
|
171
|
+
|
|
172
|
+
**Max 1500 lines/file**. Over 1000 → extract before adding code.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
162
176
|
## Troubleshooting
|
|
163
177
|
|
|
164
178
|
| Issue | Solution |
|