@justinnadz/skill 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/index.js +77 -18
  2. package/package.json +5 -5
package/index.js CHANGED
@@ -1,26 +1,85 @@
1
- #!/usr/bin/env node
1
+ // index.js
2
+ const fs = require('fs');
3
+ const path = require('path');
2
4
 
3
- console.log(`
4
- đŸ”Ĩ Justin Workflow Orchestration
5
+ const projectRoot = process.cwd();
6
+ const agentsFolder = path.join(projectRoot, 'agents');
7
+ const tasksFolder = path.join(agentsFolder, 'tasks');
8
+ const lessonsFolder = path.join(agentsFolder, 'lessons');
5
9
 
6
- 1. Plan Mode Default
7
- - Plan before building
8
- - Re-plan if needed
10
+ const workflowContent = `# Workflow Orchestration
11
+ ### 1. Plan Mode Default
12
+ - Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
13
+ - If something goes sideways, STOP and re-plan immediately
14
+ - Use plan mode for verification steps, not just building
15
+ - Write detailed specs upfront to reduce ambiguity
9
16
 
10
- 2. Subagent Strategy
11
- - Use parallel thinking
17
+ ### 2. Subagent Strategy
18
+ - Use subagents liberally to keep main context window clean
19
+ - Offload research, exploration, and parallel analysis to subagents
20
+ - For complex problems, throw more compute at it via subagents
21
+ - One task per subagent for focused execution
12
22
 
13
- 3. Self-Improvement Loop
14
- - Learn from mistakes
23
+ ### 3. Self-Improvement Loop
24
+ - After ANY correction from the user: update tasks/lessons.md with the pattern
25
+ - Write rules for yourself that prevent the same mistake
26
+ - Ruthlessly iterate on these lessons until mistake rate drops
27
+ - Review lessons at session start for relevant project
15
28
 
16
- 4. Verification
17
- - Prove it works
29
+ # Workflow
30
+ ### 4. Verification Before Done
31
+ - Never mark a task complete without proving it works
32
+ - Diff behavior between main and your changes when relevant
33
+ - Ask yourself: "Would a staff engineer approve this?"
34
+ - Run tests, check logs, demonstrate correctness
18
35
 
19
- 5. Elegance
20
- - No hacky fixes
36
+ ### 5. Demand Elegance (Balanced)
37
+ - For non-trivial changes: pause and ask "is there a more elegant way?"
38
+ - If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
39
+ - Skip this for simple, obvious fixes -- don't over-engineer
40
+ - Challenge your own work before presenting it
21
41
 
22
- 6. Bug Fixing
23
- - Fix autonomously
42
+ ### 6. Autonomous Bug Fixing
43
+ - When given a bug report: just fix it. Don't ask for hand-holding
44
+ - Point at logs, errors, failing tests -- then resolve them
45
+ - Zero context switching required from the user
46
+ - Go fix failing CI tests without being told how
24
47
 
25
- ✅ Build like a senior engineer.
26
- `);
48
+ ## Task Management
49
+ 1. Plan First: Write plan to tasks/todo.md with checkable items
50
+ 2. Verify Plan: Check in before starting implementation
51
+ 3. Track Progress: Mark items complete as you go
52
+
53
+ # Tasks
54
+ 4. Explain Changes: High-level summary at each step
55
+ 5. Document Results: Add review section to tasks/todo.md
56
+ 6. Capture Lessons: Update tasks/lessons.md after corrections
57
+
58
+ # Core Principles
59
+ - Simplicity First: Make every change as simple as possible. Impact minimal code.
60
+ - No Laziness: Find root causes. No temporary fixes. Senior developer standards.
61
+ - Minimal Impact: Only touch what's necessary. No side effects with new bugs.
62
+ `;
63
+
64
+ const readmeFile = path.join(agentsFolder, 'README.md');
65
+
66
+ // Helper to create folder if not exists
67
+ function ensureFolder(folder) {
68
+ if (!fs.existsSync(folder)) {
69
+ fs.mkdirSync(folder, { recursive: true });
70
+ console.log(`✅ Created folder: ${folder}`);
71
+ }
72
+ }
73
+
74
+ // Create the folder structure
75
+ ensureFolder(agentsFolder);
76
+ ensureFolder(tasksFolder);
77
+ ensureFolder(lessonsFolder);
78
+
79
+ // Create README.md only if it doesn't exist
80
+ if (!fs.existsSync(readmeFile)) {
81
+ fs.writeFileSync(readmeFile, workflowContent, 'utf-8');
82
+ console.log('✅ Created README.md with workflow content');
83
+ } else {
84
+ console.log('â„šī¸ README.md already exists, skipping creation');
85
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@justinnadz/skill",
3
- "version": "1.0.0",
4
- "description": "Justin Workflow CLI",
3
+ "version": "1.0.2",
4
+ "main": "index.js",
5
5
  "bin": {
6
- "justinnadz": "./index.js"
6
+ "skill": "./index.js"
7
7
  },
8
- "type": "module",
9
- "license": "MIT"
8
+ "type": "commonjs",
9
+ "dependencies": {}
10
10
  }