strikethroo 3.0.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/LICENSE +21 -0
- package/README.md +79 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +187 -0
- package/dist/cli.js.map +1 -0
- package/dist/conflict-detector.d.ts +24 -0
- package/dist/conflict-detector.d.ts.map +1 -0
- package/dist/conflict-detector.js +130 -0
- package/dist/conflict-detector.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +344 -0
- package/dist/index.js.map +1 -0
- package/dist/metadata.d.ts +40 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/metadata.js +121 -0
- package/dist/metadata.js.map +1 -0
- package/dist/plan-utils.d.ts +35 -0
- package/dist/plan-utils.d.ts.map +1 -0
- package/dist/plan-utils.js +123 -0
- package/dist/plan-utils.js.map +1 -0
- package/dist/plan.d.ts +27 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/plan.js +279 -0
- package/dist/plan.js.map +1 -0
- package/dist/prompts.d.ts +21 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +132 -0
- package/dist/prompts.js.map +1 -0
- package/dist/status.d.ts +73 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +375 -0
- package/dist/status.js.map +1 -0
- package/dist/types.d.ts +274 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +53 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +158 -0
- package/dist/utils.js.map +1 -0
- package/package.json +94 -0
- package/templates/harness/agents/plan-creator.md +95 -0
- package/templates/harness/skills/st-create-plan/SKILL.md +120 -0
- package/templates/harness/skills/st-create-plan/scripts/find-strikethroo-root.cjs +116 -0
- package/templates/harness/skills/st-create-plan/scripts/get-next-plan-id.cjs +197 -0
- package/templates/harness/skills/st-execute-blueprint/SKILL.md +147 -0
- package/templates/harness/skills/st-execute-blueprint/scripts/create-feature-branch.cjs +359 -0
- package/templates/harness/skills/st-execute-blueprint/scripts/find-strikethroo-root.cjs +116 -0
- package/templates/harness/skills/st-execute-blueprint/scripts/validate-plan-blueprint.cjs +358 -0
- package/templates/harness/skills/st-execute-task/SKILL.md +195 -0
- package/templates/harness/skills/st-execute-task/scripts/check-task-dependencies.cjs +420 -0
- package/templates/harness/skills/st-execute-task/scripts/find-strikethroo-root.cjs +116 -0
- package/templates/harness/skills/st-execute-task/scripts/validate-plan-blueprint.cjs +358 -0
- package/templates/harness/skills/st-full-workflow/SKILL.md +413 -0
- package/templates/harness/skills/st-full-workflow/scripts/create-feature-branch.cjs +359 -0
- package/templates/harness/skills/st-full-workflow/scripts/find-strikethroo-root.cjs +116 -0
- package/templates/harness/skills/st-full-workflow/scripts/get-next-plan-id.cjs +197 -0
- package/templates/harness/skills/st-full-workflow/scripts/get-next-task-id.cjs +295 -0
- package/templates/harness/skills/st-full-workflow/scripts/validate-plan-blueprint.cjs +358 -0
- package/templates/harness/skills/st-generate-tasks/SKILL.md +244 -0
- package/templates/harness/skills/st-generate-tasks/scripts/find-strikethroo-root.cjs +116 -0
- package/templates/harness/skills/st-generate-tasks/scripts/get-next-task-id.cjs +295 -0
- package/templates/harness/skills/st-generate-tasks/scripts/validate-plan-blueprint.cjs +358 -0
- package/templates/harness/skills/st-refine-plan/SKILL.md +205 -0
- package/templates/harness/skills/st-refine-plan/scripts/find-strikethroo-root.cjs +116 -0
- package/templates/harness/skills/st-refine-plan/scripts/validate-plan-blueprint.cjs +358 -0
- package/templates/strikethroo/README.md +7 -0
- package/templates/strikethroo/config/STRIKETHROO.md +76 -0
- package/templates/strikethroo/config/hooks/POST_ERROR_DETECTION.md +46 -0
- package/templates/strikethroo/config/hooks/POST_EXECUTION.md +25 -0
- package/templates/strikethroo/config/hooks/POST_PHASE.md +24 -0
- package/templates/strikethroo/config/hooks/POST_PLAN.md +5 -0
- package/templates/strikethroo/config/hooks/POST_TASK_GENERATION_ALL.md +41 -0
- package/templates/strikethroo/config/hooks/PRE_PHASE.md +21 -0
- package/templates/strikethroo/config/hooks/PRE_PLAN.md +42 -0
- package/templates/strikethroo/config/hooks/PRE_TASK_ASSIGNMENT.md +32 -0
- package/templates/strikethroo/config/hooks/PRE_TASK_EXECUTION.md +1 -0
- package/templates/strikethroo/config/templates/BLUEPRINT_TEMPLATE.md +24 -0
- package/templates/strikethroo/config/templates/EXECUTION_SUMMARY_TEMPLATE.md +13 -0
- package/templates/strikethroo/config/templates/PLAN_TEMPLATE.md +109 -0
- package/templates/strikethroo/config/templates/TASK_TEMPLATE.md +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Mateu Aguil� Bosch
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# 🤖 Strikethroo
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/strikethroo)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
**Strikethroo: extensible AI-powered plan and task management with customizable workflows and structured development processes.**
|
|
9
|
+
|
|
10
|
+
Transform complex AI prompts into organized, executable workflows through customizable hooks, templates, and progressive refinement. Works seamlessly within your existing AI subscriptions for Claude Code, Gemini CLI, and Open Code.
|
|
11
|
+
|
|
12
|
+
## 🚀 Quick Start
|
|
13
|
+
|
|
14
|
+
This project ships in two parts: the **skills** (installed by [vercel-labs/skills](https://github.com/vercel-labs/skills)) and the **workspace** (initialized by this CLI). Run both:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# 1. Install the Strikethroo skills for your assistant
|
|
18
|
+
npx skills add e0ipso/strikethroo
|
|
19
|
+
|
|
20
|
+
# 2. Initialize the .ai/strikethroo/ workspace
|
|
21
|
+
npx strikethroo init --harnesses claude --destination-directory .
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The skills give your assistant the planning, decomposition, and execution workflow; the CLI bootstraps `.ai/strikethroo/` with hooks, templates, and the hash-tracked diff-on-conflict UX. Each step is independently re-runnable. See the [migration guide](https://mateuaguilo.com/strikethroo/migration.html) for upgrade flows from 1.x.
|
|
25
|
+
|
|
26
|
+
The CLI's `init` emits the shared workspace plus harness-specific agents (e.g., `.claude/agents/` for Claude). Other harnesses rely entirely on the installed skills.
|
|
27
|
+
|
|
28
|
+
## ✨ Key Benefits
|
|
29
|
+
|
|
30
|
+
- **🔧 Fully Customizable**: Tailor hooks, templates, and workflows to your project's specific needs
|
|
31
|
+
- **🎯 Extensible Architecture**: Add custom validation gates, quality checks, and workflow patterns
|
|
32
|
+
- **📋 Structured Workflows**: Three-phase progressive refinement with validation gates
|
|
33
|
+
- **🔄 Plan Mode Integration**: Enhance existing AI assistant features with structured task management
|
|
34
|
+
- **📊 Plan Inspection & Management**: View progress, archive completed work, and manage plans via CLI
|
|
35
|
+
- **💰 Works Within Subscriptions**: No additional API keys or costs required
|
|
36
|
+
|
|
37
|
+
## 📖 Documentation
|
|
38
|
+
|
|
39
|
+
### 🌐 **[Complete Documentation →](https://mateuaguilo.com/strikethroo/)**
|
|
40
|
+
|
|
41
|
+
Comprehensive guides covering:
|
|
42
|
+
- Installation and configuration
|
|
43
|
+
- Customization with hooks and templates
|
|
44
|
+
- Workflow patterns and best practices
|
|
45
|
+
- Architecture and design principles
|
|
46
|
+
|
|
47
|
+
## 🔄 Workflow Preview
|
|
48
|
+
|
|
49
|
+
Once the skills are installed, invoke the workflow by intent — the assistant auto-loads the matching skill. There are no slash commands to memorize.
|
|
50
|
+
|
|
51
|
+
**Automated end-to-end run:**
|
|
52
|
+
|
|
53
|
+
> "Run the full workflow to create a user authentication system."
|
|
54
|
+
|
|
55
|
+
The `st-full-workflow` skill handles plan creation, task generation, and blueprint execution in a single pass.
|
|
56
|
+
|
|
57
|
+
**Step-by-step (for manual review between phases):**
|
|
58
|
+
|
|
59
|
+
1. **📝 Create a plan** → "Create a plan for a user authentication system" (`st-create-plan` skill)
|
|
60
|
+
2. **🔍 Refine the plan** → "Refine plan 1" (`st-refine-plan` skill — useful when a second assistant should red-team the plan)
|
|
61
|
+
3. **📋 Generate tasks** → "Generate tasks for plan 1" (`st-generate-tasks` skill)
|
|
62
|
+
4. **🚀 Execute blueprint** → "Execute the blueprint for plan 1" (`st-execute-blueprint` skill)
|
|
63
|
+
5. **📊 Monitor progress** → `npx strikethroo status`
|
|
64
|
+
6. **🗂️ Manage plans** → `npx strikethroo plan show 1`
|
|
65
|
+
|
|
66
|
+
## 🤖 Supported Harnesses
|
|
67
|
+
|
|
68
|
+
| Harness | Interface | Setup Time |
|
|
69
|
+
|-----------|-----------|------------|
|
|
70
|
+
| 🎭 **Claude** | [claude.ai/code](https://claude.ai/code) | < 30 seconds |
|
|
71
|
+
| 🖱️ **Cursor** | Cursor IDE | < 30 seconds |
|
|
72
|
+
| 💎 **Gemini** | Gemini CLI | < 30 seconds |
|
|
73
|
+
| 📝 **Open Code** | Open source | < 30 seconds |
|
|
74
|
+
| 🔮 **Codex** | Codex CLI | < 30 seconds |
|
|
75
|
+
| 🐙 **GitHub Copilot** | VS Code / JetBrains IDEs | < 30 seconds |
|
|
76
|
+
|
|
77
|
+
## 📄 License
|
|
78
|
+
|
|
79
|
+
MIT License - Open source and free to use.
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;GAKG"}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* CLI Entry Point
|
|
5
|
+
*
|
|
6
|
+
* This file contains the main CLI setup using Commander.js
|
|
7
|
+
* Handles command-line argument parsing and routing to appropriate handlers
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const commander_1 = require("commander");
|
|
11
|
+
const index_1 = require("./index");
|
|
12
|
+
const status_1 = require("./status");
|
|
13
|
+
const plan_1 = require("./plan");
|
|
14
|
+
const program = new commander_1.Command();
|
|
15
|
+
program.name('strikethroo').version('0.1.0').description('AI-powered task management CLI tool');
|
|
16
|
+
program
|
|
17
|
+
.command('init')
|
|
18
|
+
.description('Initialize a new Strikethroo project')
|
|
19
|
+
.requiredOption('--harnesses <value>', 'Comma-separated list of harnesses to configure (claude,codex,cursor,gemini,github,opencode)')
|
|
20
|
+
.option('--destination-directory <path>', 'Directory to create project structure in (default: current directory)')
|
|
21
|
+
.option('--force', 'Force overwrite all files without prompting')
|
|
22
|
+
.action(async (options) => {
|
|
23
|
+
try {
|
|
24
|
+
// Execute the init command
|
|
25
|
+
const result = await (0, index_1.init)(options);
|
|
26
|
+
// Exit with appropriate code based on result
|
|
27
|
+
if (result.success) {
|
|
28
|
+
process.exit(0);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
console.error(`Unexpected error: ${error instanceof Error ? error.message : String(error)}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
program
|
|
40
|
+
.command('status')
|
|
41
|
+
.description('Display dashboard with plans and task statistics')
|
|
42
|
+
.action(async () => {
|
|
43
|
+
try {
|
|
44
|
+
const result = await (0, status_1.status)();
|
|
45
|
+
if (result.success) {
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
if (result.message) {
|
|
50
|
+
console.error(result.message);
|
|
51
|
+
}
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
console.error(`Unexpected error: ${error instanceof Error ? error.message : String(error)}`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
// Create parent plan command for help organization
|
|
61
|
+
const planCommand = program
|
|
62
|
+
.command('plan')
|
|
63
|
+
.description('Display and manage plans. Use `plan <id>` as shorthand for `plan show <id>`.');
|
|
64
|
+
// Plan show subcommand
|
|
65
|
+
planCommand
|
|
66
|
+
.command('show <plan-id>')
|
|
67
|
+
.description('Display plan metadata, progress, and executive summary')
|
|
68
|
+
.action(async (planId) => {
|
|
69
|
+
try {
|
|
70
|
+
const planIdNum = parseInt(planId, 10);
|
|
71
|
+
if (isNaN(planIdNum)) {
|
|
72
|
+
console.error(`Invalid plan ID: ${planId}. Must be a number.`);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
const result = await (0, plan_1.showPlan)(planIdNum);
|
|
76
|
+
if (result.success) {
|
|
77
|
+
process.exit(0);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
if (result.message) {
|
|
81
|
+
console.error(result.message);
|
|
82
|
+
}
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
console.error(`Unexpected error: ${error instanceof Error ? error.message : String(error)}`);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
// Plan archive subcommand
|
|
92
|
+
planCommand
|
|
93
|
+
.command('archive <plan-id>')
|
|
94
|
+
.description('Move a plan from active to archive directory')
|
|
95
|
+
.action(async (planId) => {
|
|
96
|
+
try {
|
|
97
|
+
const planIdNum = parseInt(planId, 10);
|
|
98
|
+
if (isNaN(planIdNum)) {
|
|
99
|
+
console.error(`Invalid plan ID: ${planId}. Must be a number.`);
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
const result = await (0, plan_1.archivePlan)(planIdNum);
|
|
103
|
+
if (result.success) {
|
|
104
|
+
process.exit(0);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
if (result.message) {
|
|
108
|
+
console.error(result.message);
|
|
109
|
+
}
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
console.error(`Unexpected error: ${error instanceof Error ? error.message : String(error)}`);
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
// Plan delete subcommand
|
|
119
|
+
planCommand
|
|
120
|
+
.command('delete <plan-id>')
|
|
121
|
+
.description('Permanently delete a plan and all its tasks')
|
|
122
|
+
.action(async (planId) => {
|
|
123
|
+
try {
|
|
124
|
+
const planIdNum = parseInt(planId, 10);
|
|
125
|
+
if (isNaN(planIdNum)) {
|
|
126
|
+
console.error(`Invalid plan ID: ${planId}. Must be a number.`);
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
const result = await (0, plan_1.deletePlan)(planIdNum);
|
|
130
|
+
if (result.success) {
|
|
131
|
+
process.exit(0);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
if (result.message) {
|
|
135
|
+
console.error(result.message);
|
|
136
|
+
}
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
console.error(`Unexpected error: ${error instanceof Error ? error.message : String(error)}`);
|
|
142
|
+
process.exit(1);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
// Backward compatibility: plan <id> as shorthand for plan show <id>
|
|
146
|
+
planCommand
|
|
147
|
+
.argument('[plan-id]', 'Plan ID to display (shorthand for show subcommand)')
|
|
148
|
+
.action(async (planId) => {
|
|
149
|
+
// Only handle if planId is provided and no subcommand was matched
|
|
150
|
+
if (planId) {
|
|
151
|
+
try {
|
|
152
|
+
const planIdNum = parseInt(planId, 10);
|
|
153
|
+
if (isNaN(planIdNum)) {
|
|
154
|
+
console.error(`Invalid plan ID: ${planId}. Must be a number.`);
|
|
155
|
+
process.exit(1);
|
|
156
|
+
}
|
|
157
|
+
const result = await (0, plan_1.showPlan)(planIdNum);
|
|
158
|
+
if (result.success) {
|
|
159
|
+
process.exit(0);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
if (result.message) {
|
|
163
|
+
console.error(result.message);
|
|
164
|
+
}
|
|
165
|
+
process.exit(1);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
console.error(`Unexpected error: ${error instanceof Error ? error.message : String(error)}`);
|
|
170
|
+
process.exit(1);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
// Error handling for unknown commands
|
|
175
|
+
program.on('command:*', async (operands) => {
|
|
176
|
+
console.error(`Unknown command: ${operands[0]}`);
|
|
177
|
+
console.log('Use --help to see available commands');
|
|
178
|
+
process.exit(1);
|
|
179
|
+
});
|
|
180
|
+
// Parse command line arguments
|
|
181
|
+
program.parse();
|
|
182
|
+
// If no arguments provided, show help
|
|
183
|
+
if (!process.argv.slice(2).length) {
|
|
184
|
+
program.outputHelp();
|
|
185
|
+
process.exit(0);
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AACA;;;;;GAKG;;AAEH,yCAAoC;AACpC,mCAA+B;AAC/B,qCAAkC;AAClC,iCAA2D;AAG3D,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,qCAAqC,CAAC,CAAC;AAEhG,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,sCAAsC,CAAC;KACnD,cAAc,CACb,qBAAqB,EACrB,6FAA6F,CAC9F;KACA,MAAM,CACL,gCAAgC,EAChC,uEAAuE,CACxE;KACA,MAAM,CAAC,SAAS,EAAE,6CAA6C,CAAC;KAChE,MAAM,CAAC,KAAK,EAAE,OAAoB,EAAE,EAAE;IACrC,IAAI,CAAC;QACH,2BAA2B;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAA,YAAI,EAAC,OAAO,CAAC,CAAC;QAEnC,6CAA6C;QAC7C,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACl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AM,CAAC,OAAO,CAAC,CAAC;gBAChC,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CACX,qBAAqB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC9E,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,sCAAsC;AACtC,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,KAAK,EAAC,QAAQ,EAAC,EAAE;IACvC,OAAO,CAAC,KAAK,CAAC,oBAAoB,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,+BAA+B;AAC/B,OAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,sCAAsC;AACtC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Conflict Detection
|
|
3
|
+
*
|
|
4
|
+
* This file handles detection of user-modified files during init command
|
|
5
|
+
* by comparing current file hashes against stored baseline hashes
|
|
6
|
+
*/
|
|
7
|
+
import { FileConflict, InitMetadata } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Detect conflicts between user's current files and incoming package files
|
|
10
|
+
* @param destDir - Destination directory (.ai/strikethroo)
|
|
11
|
+
* @param templateDir - Source template directory from package
|
|
12
|
+
* @param metadata - Previously stored metadata with original hashes
|
|
13
|
+
* @returns Array of FileConflict objects for files that have been modified
|
|
14
|
+
*/
|
|
15
|
+
export declare function detectConflicts(destDir: string, templateDir: string, metadata: InitMetadata): Promise<FileConflict[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Check if a file has been deleted by the user
|
|
18
|
+
* @param destDir - Destination directory (.ai/strikethroo)
|
|
19
|
+
* @param relativePath - Relative path from destDir
|
|
20
|
+
* @param metadata - Previously stored metadata
|
|
21
|
+
* @returns true if file existed in metadata but is now deleted
|
|
22
|
+
*/
|
|
23
|
+
export declare function isFileDeleted(destDir: string, relativePath: string, metadata: InitMetadata): boolean;
|
|
24
|
+
//# sourceMappingURL=conflict-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conflict-detector.d.ts","sourceRoot":"","sources":["../src/conflict-detector.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAkCrD;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,YAAY,EAAE,CAAC,CA2CzB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,YAAY,GACrB,OAAO,CAMT"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* File Conflict Detection
|
|
4
|
+
*
|
|
5
|
+
* This file handles detection of user-modified files during init command
|
|
6
|
+
* by comparing current file hashes against stored baseline hashes
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.detectConflicts = detectConflicts;
|
|
43
|
+
exports.isFileDeleted = isFileDeleted;
|
|
44
|
+
const fs = __importStar(require("fs-extra"));
|
|
45
|
+
const path = __importStar(require("path"));
|
|
46
|
+
const metadata_1 = require("./metadata");
|
|
47
|
+
/**
|
|
48
|
+
* Get all config files that should be checked for conflicts
|
|
49
|
+
* @param destDir - Destination directory (.ai/strikethroo)
|
|
50
|
+
* @returns Array of relative paths from destDir
|
|
51
|
+
*/
|
|
52
|
+
async function getConfigFiles(destDir) {
|
|
53
|
+
const configDir = path.join(destDir, 'config');
|
|
54
|
+
const files = [];
|
|
55
|
+
async function walkDir(dir, relativeTo) {
|
|
56
|
+
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
57
|
+
for (const entry of entries) {
|
|
58
|
+
const fullPath = path.join(dir, entry.name);
|
|
59
|
+
const relativePath = path.relative(relativeTo, fullPath);
|
|
60
|
+
if (entry.isDirectory()) {
|
|
61
|
+
await walkDir(fullPath, relativeTo);
|
|
62
|
+
}
|
|
63
|
+
else if (entry.isFile()) {
|
|
64
|
+
files.push(relativePath);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (await fs.pathExists(configDir)) {
|
|
69
|
+
await walkDir(configDir, destDir);
|
|
70
|
+
}
|
|
71
|
+
return files;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Detect conflicts between user's current files and incoming package files
|
|
75
|
+
* @param destDir - Destination directory (.ai/strikethroo)
|
|
76
|
+
* @param templateDir - Source template directory from package
|
|
77
|
+
* @param metadata - Previously stored metadata with original hashes
|
|
78
|
+
* @returns Array of FileConflict objects for files that have been modified
|
|
79
|
+
*/
|
|
80
|
+
async function detectConflicts(destDir, templateDir, metadata) {
|
|
81
|
+
const conflicts = [];
|
|
82
|
+
const configFiles = await getConfigFiles(templateDir);
|
|
83
|
+
for (const relativePath of configFiles) {
|
|
84
|
+
const userFilePath = path.join(destDir, relativePath);
|
|
85
|
+
const newFilePath = path.join(templateDir, relativePath);
|
|
86
|
+
// Check if file exists in user's directory
|
|
87
|
+
const userFileExists = await fs.pathExists(userFilePath);
|
|
88
|
+
if (!userFileExists) {
|
|
89
|
+
// File doesn't exist in user's directory, no conflict (new file)
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
// Get original hash from metadata
|
|
93
|
+
const originalHash = metadata.files[relativePath];
|
|
94
|
+
if (!originalHash) {
|
|
95
|
+
// File wasn't tracked in metadata (new file in this version), no conflict
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
// Calculate current hash of user's file
|
|
99
|
+
const currentHash = await (0, metadata_1.calculateFileHash)(userFilePath);
|
|
100
|
+
// Compare current hash with original hash (NOT with new file hash)
|
|
101
|
+
// This is the CRITICAL distinction: we detect if USER has modified the file
|
|
102
|
+
if (currentHash !== originalHash) {
|
|
103
|
+
// User has modified the file since last init
|
|
104
|
+
const userFileContent = await fs.readFile(userFilePath, 'utf-8');
|
|
105
|
+
const newFileContent = await fs.readFile(newFilePath, 'utf-8');
|
|
106
|
+
conflicts.push({
|
|
107
|
+
relativePath,
|
|
108
|
+
userFileContent,
|
|
109
|
+
newFileContent,
|
|
110
|
+
originalHash,
|
|
111
|
+
currentHash,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return conflicts;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Check if a file has been deleted by the user
|
|
119
|
+
* @param destDir - Destination directory (.ai/strikethroo)
|
|
120
|
+
* @param relativePath - Relative path from destDir
|
|
121
|
+
* @param metadata - Previously stored metadata
|
|
122
|
+
* @returns true if file existed in metadata but is now deleted
|
|
123
|
+
*/
|
|
124
|
+
function isFileDeleted(destDir, relativePath, metadata) {
|
|
125
|
+
const filePath = path.join(destDir, relativePath);
|
|
126
|
+
const existsInMetadata = relativePath in metadata.files;
|
|
127
|
+
const existsOnDisk = fs.pathExistsSync(filePath);
|
|
128
|
+
return existsInMetadata && !existsOnDisk;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=conflict-detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conflict-detector.js","sourceRoot":"","sources":["../src/conflict-detector.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;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YAAY,IAAI,QAAQ,CAAC,KAAK,CAAC;IACxD,MAAM,YAAY,GAAG,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAEjD,OAAO,gBAAgB,IAAI,CAAC,YAAY,CAAC;AAC3C,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main Init Command Implementation
|
|
3
|
+
*
|
|
4
|
+
* This file contains the implementation of the init command
|
|
5
|
+
* Handles initialization of new Strikethroo projects
|
|
6
|
+
*/
|
|
7
|
+
import { InitOptions, CommandResult } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Initialize a new Strikethroo project
|
|
10
|
+
*
|
|
11
|
+
* Creates directory structures and copies template files based on the selected harnesses.
|
|
12
|
+
* Validates input, creates necessary directories, and copies appropriate templates.
|
|
13
|
+
*
|
|
14
|
+
* @param options - Initialization options containing harness selection
|
|
15
|
+
* @returns CommandResult indicating success or failure with details
|
|
16
|
+
*/
|
|
17
|
+
export declare function init(options: InitOptions): Promise<CommandResult>;
|
|
18
|
+
/**
|
|
19
|
+
* Check if a directory already has Strikethroo initialized
|
|
20
|
+
*/
|
|
21
|
+
export declare function isInitialized(baseDir?: string): Promise<boolean>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,WAAW,EAAW,aAAa,EAAoC,MAAM,SAAS,CAAC;AA4EhG;;;;;;;;GAQG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CA0FvE;AAuKD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGtE"}
|