autoworkflow 2.0.1 → 2.1.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/commands/init.md +142 -0
- package/.claude/settings.json +3 -1
- package/README.md +11 -1
- package/package.json +1 -1
- package/system/triggers.md +43 -7
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# /init - Initialize AutoWorkflow
|
|
2
|
+
|
|
3
|
+
Set up AutoWorkflow files in the current project.
|
|
4
|
+
|
|
5
|
+
## Trigger
|
|
6
|
+
- User invokes `/init`
|
|
7
|
+
- User invokes `/init autoworkflow`
|
|
8
|
+
- User says "set up autoworkflow" or "initialize workflow"
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
Copy AutoWorkflow files from `node_modules/autoworkflow/` to the project root.
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
### Step 1: Check if autoworkflow is installed
|
|
16
|
+
```bash
|
|
17
|
+
[ -d node_modules/autoworkflow ] && echo "Found" || echo "Not found"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
If not found:
|
|
21
|
+
```
|
|
22
|
+
⚠️ autoworkflow not found in node_modules.
|
|
23
|
+
|
|
24
|
+
Run this first:
|
|
25
|
+
npm install autoworkflow
|
|
26
|
+
|
|
27
|
+
Then run /init again.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Step 2: Check what's already set up
|
|
31
|
+
```bash
|
|
32
|
+
[ -f CLAUDE.md ] && echo "CLAUDE.md exists"
|
|
33
|
+
[ -d system ] && echo "system/ exists"
|
|
34
|
+
[ -d instructions ] && echo "instructions/ exists"
|
|
35
|
+
[ -d .claude ] && echo ".claude/ exists"
|
|
36
|
+
[ -d scripts ] && echo "scripts/ exists"
|
|
37
|
+
[ -d hooks ] && echo "hooks/ exists"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Step 3: Present setup options
|
|
41
|
+
```
|
|
42
|
+
## AutoWorkflow Setup
|
|
43
|
+
|
|
44
|
+
**Source:** node_modules/autoworkflow/
|
|
45
|
+
|
|
46
|
+
### Required Files
|
|
47
|
+
| File/Folder | Status | Action |
|
|
48
|
+
|-------------|--------|--------|
|
|
49
|
+
| CLAUDE.md | ❌ Missing | Will copy |
|
|
50
|
+
| system/ | ❌ Missing | Will copy |
|
|
51
|
+
| instructions/ | ❌ Missing | Will copy |
|
|
52
|
+
| .claude/ | ❌ Missing | Will copy |
|
|
53
|
+
|
|
54
|
+
### Recommended Files
|
|
55
|
+
| File/Folder | Status | Action |
|
|
56
|
+
|-------------|--------|--------|
|
|
57
|
+
| scripts/ | ❌ Missing | Will copy |
|
|
58
|
+
| hooks/ | ❌ Missing | Will copy |
|
|
59
|
+
|
|
60
|
+
### Optional Files
|
|
61
|
+
| File/Folder | Status | Action |
|
|
62
|
+
|-------------|--------|--------|
|
|
63
|
+
| .vscode/ | ❌ Missing | Skip (add with --vscode) |
|
|
64
|
+
| .prettierrc | ❌ Missing | Skip (add with --configs) |
|
|
65
|
+
| eslint.config.js | ❌ Missing | Skip (add with --configs) |
|
|
66
|
+
| tsconfig.json | ❌ Missing | Skip (add with --configs) |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
**Should I set up AutoWorkflow?**
|
|
71
|
+
Options:
|
|
72
|
+
- `yes` - Copy required + recommended
|
|
73
|
+
- `all` - Copy everything including optional
|
|
74
|
+
- `minimal` - Copy required only
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Step 4: Copy files after approval
|
|
78
|
+
```bash
|
|
79
|
+
# Required
|
|
80
|
+
cp node_modules/autoworkflow/CLAUDE.md .
|
|
81
|
+
cp -r node_modules/autoworkflow/system ./system
|
|
82
|
+
cp -r node_modules/autoworkflow/instructions ./instructions
|
|
83
|
+
cp -r node_modules/autoworkflow/.claude ./.claude
|
|
84
|
+
|
|
85
|
+
# Recommended
|
|
86
|
+
cp -r node_modules/autoworkflow/scripts ./scripts
|
|
87
|
+
cp -r node_modules/autoworkflow/hooks ./hooks
|
|
88
|
+
|
|
89
|
+
# Optional (if requested)
|
|
90
|
+
cp -r node_modules/autoworkflow/.vscode ./.vscode
|
|
91
|
+
cp node_modules/autoworkflow/.prettierrc .
|
|
92
|
+
cp node_modules/autoworkflow/eslint.config.example.js ./eslint.config.js
|
|
93
|
+
cp node_modules/autoworkflow/tsconfig.example.json ./tsconfig.json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Step 5: Set up git hooks
|
|
97
|
+
```bash
|
|
98
|
+
npm run setup:hooks
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Step 6: Confirm setup
|
|
102
|
+
```
|
|
103
|
+
## ✅ AutoWorkflow Initialized
|
|
104
|
+
|
|
105
|
+
**Files copied:**
|
|
106
|
+
- CLAUDE.md (entry point)
|
|
107
|
+
- system/ (triggers, loops, gates, router)
|
|
108
|
+
- instructions/ (workflow, AI rules, blueprint)
|
|
109
|
+
- .claude/ (settings, commands)
|
|
110
|
+
- scripts/ (automation)
|
|
111
|
+
- hooks/ (git hooks)
|
|
112
|
+
|
|
113
|
+
**Git hooks installed:**
|
|
114
|
+
- pre-commit
|
|
115
|
+
- commit-msg
|
|
116
|
+
|
|
117
|
+
**Next steps:**
|
|
118
|
+
1. Edit `instructions/AI_RULES.md` with your coding standards
|
|
119
|
+
2. Edit `instructions/BLUEPRINT.md` with your project spec
|
|
120
|
+
3. Start using Claude Code - it will follow the workflow!
|
|
121
|
+
|
|
122
|
+
Run `/audit project` to auto-generate BLUEPRINT.md from your codebase.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Arguments
|
|
126
|
+
- `/init` - Standard setup (required + recommended)
|
|
127
|
+
- `/init --all` - Include optional files (.vscode, configs)
|
|
128
|
+
- `/init --minimal` - Required files only
|
|
129
|
+
- `/init --vscode` - Include .vscode settings
|
|
130
|
+
- `/init --configs` - Include config templates
|
|
131
|
+
|
|
132
|
+
## Examples
|
|
133
|
+
```
|
|
134
|
+
User: /init
|
|
135
|
+
→ Sets up required + recommended files
|
|
136
|
+
|
|
137
|
+
User: /init --all
|
|
138
|
+
→ Sets up everything including .vscode and configs
|
|
139
|
+
|
|
140
|
+
User: set up autoworkflow
|
|
141
|
+
→ Same as /init
|
|
142
|
+
```
|
package/.claude/settings.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"description": "System prompt layer that controls Claude's workflow with triggers, loops, and gates",
|
|
6
6
|
|
|
7
7
|
"instructions": [
|
|
8
|
+
"IF autoworkflow in node_modules but CLAUDE.md missing: suggest running /init",
|
|
8
9
|
"ALWAYS read CLAUDE.md (entry point) at the start of EVERY task",
|
|
9
10
|
"ALWAYS check if instructions/BLUEPRINT.md exists at session start",
|
|
10
11
|
"IF BLUEPRINT.md missing: run /audit project to generate it",
|
|
@@ -81,7 +82,8 @@
|
|
|
81
82
|
},
|
|
82
83
|
|
|
83
84
|
"triggers": {
|
|
84
|
-
"on_conversation_start": ["Read CLAUDE.md", "Check BLUEPRINT.md exists", "Route via system/router.md"],
|
|
85
|
+
"on_conversation_start": ["Check if /init needed", "Read CLAUDE.md", "Check BLUEPRINT.md exists", "Route via system/router.md"],
|
|
86
|
+
"on_init_needed": ["Notify autoworkflow detected", "Suggest running /init"],
|
|
85
87
|
"on_blueprint_missing": ["Run project audit", "Generate AI_RULES.md + BLUEPRINT.md", "Present for approval"],
|
|
86
88
|
"on_task_start": ["Read CLAUDE.md", "Route via system/router.md"],
|
|
87
89
|
"on_implementation_complete": ["Enter VERIFY phase", "Run verify_loop"],
|
package/README.md
CHANGED
|
@@ -14,7 +14,15 @@ A system prompt architecture that controls Claude Code's behavior through trigge
|
|
|
14
14
|
npm install autoworkflow
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Then
|
|
17
|
+
Then ask Claude to set it up:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/init
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Claude will copy all necessary files from `node_modules/autoworkflow/` to your project root.
|
|
24
|
+
|
|
25
|
+
**Or copy manually:**
|
|
18
26
|
|
|
19
27
|
```bash
|
|
20
28
|
# Copy all workflow files
|
|
@@ -125,6 +133,7 @@ Claude will STOP and cannot proceed if:
|
|
|
125
133
|
|
|
126
134
|
| Command | Purpose |
|
|
127
135
|
|---------|---------|
|
|
136
|
+
| `/init` | Set up AutoWorkflow files from node_modules |
|
|
128
137
|
| `/analyze [task]` | Analyze codebase for a task |
|
|
129
138
|
| `/plan [task]` | Create implementation plan |
|
|
130
139
|
| `/build [feature]` | Full workflow for features |
|
|
@@ -201,6 +210,7 @@ autoworkflow/
|
|
|
201
210
|
├── .claude/ # Claude Code Integration
|
|
202
211
|
│ ├── settings.json # Settings + hard rules
|
|
203
212
|
│ └── commands/ # Slash command definitions
|
|
213
|
+
│ ├── init.md
|
|
204
214
|
│ ├── analyze.md
|
|
205
215
|
│ ├── plan.md
|
|
206
216
|
│ ├── build.md
|
package/package.json
CHANGED
package/system/triggers.md
CHANGED
|
@@ -11,16 +11,19 @@
|
|
|
11
11
|
|
|
12
12
|
**When:** Claude begins a new conversation or task
|
|
13
13
|
**Action:**
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
17
|
-
4. If
|
|
18
|
-
5.
|
|
19
|
-
6. Load `system/
|
|
20
|
-
7.
|
|
14
|
+
1. Check if autoworkflow needs initialization
|
|
15
|
+
2. Read root `CLAUDE.md` (entry point)
|
|
16
|
+
3. Check if `instructions/BLUEPRINT.md` exists
|
|
17
|
+
4. If NO → Trigger `on:blueprint_missing`
|
|
18
|
+
5. If YES → Load blueprint and proceed
|
|
19
|
+
6. Load `system/router.md` to determine task type
|
|
20
|
+
7. Load `system/gates.md` for blocking rules
|
|
21
|
+
8. Await user request
|
|
21
22
|
|
|
22
23
|
```
|
|
23
24
|
TRIGGER: conversation_start
|
|
25
|
+
├── Check: node_modules/autoworkflow exists AND CLAUDE.md missing?
|
|
26
|
+
│ └── YES → Trigger: on:init_needed
|
|
24
27
|
├── Read: CLAUDE.md
|
|
25
28
|
├── Check: instructions/BLUEPRINT.md exists?
|
|
26
29
|
│ ├── NO → Trigger: on:blueprint_missing
|
|
@@ -32,6 +35,39 @@ TRIGGER: conversation_start
|
|
|
32
35
|
|
|
33
36
|
---
|
|
34
37
|
|
|
38
|
+
### `on:init_needed`
|
|
39
|
+
|
|
40
|
+
**When:** autoworkflow is in node_modules but CLAUDE.md is missing
|
|
41
|
+
**Action:**
|
|
42
|
+
1. Notify user that autoworkflow needs setup
|
|
43
|
+
2. Suggest running /init command
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
TRIGGER: init_needed
|
|
47
|
+
├── Notify: "AutoWorkflow detected but not initialized"
|
|
48
|
+
├── Suggest: "Run /init to set up workflow files"
|
|
49
|
+
└── Await: user response
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Output Format:**
|
|
53
|
+
```
|
|
54
|
+
📦 **AutoWorkflow detected in node_modules**
|
|
55
|
+
|
|
56
|
+
The workflow files haven't been copied to your project yet.
|
|
57
|
+
|
|
58
|
+
Run `/init` to set up:
|
|
59
|
+
- CLAUDE.md (entry point)
|
|
60
|
+
- system/ (triggers, loops, gates)
|
|
61
|
+
- instructions/ (workflow, rules, blueprint)
|
|
62
|
+
- .claude/ (commands)
|
|
63
|
+
- scripts/ (automation)
|
|
64
|
+
- hooks/ (git hooks)
|
|
65
|
+
|
|
66
|
+
Or run `/init --all` to include .vscode and config templates.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
35
71
|
### `on:blueprint_missing`
|
|
36
72
|
|
|
37
73
|
**When:** BLUEPRINT.md does not exist at session start
|