project-iris 0.2.2 → 0.2.3
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/package.json +1 -1
- package/templates/CLAUDE.md +118 -47
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "project-iris",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Multi-agent orchestration system for AI-native software development. Delivers AI-DLC, Agile, and custom SDLC flows as markdown-based agent systems.",
|
|
5
5
|
"main": "lib/installer.js",
|
|
6
6
|
"bin": {
|
package/templates/CLAUDE.md
CHANGED
|
@@ -1,87 +1,158 @@
|
|
|
1
1
|
# Claude Instructions
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Prime Directives
|
|
4
4
|
|
|
5
|
-
1. **
|
|
6
|
-
2. **
|
|
7
|
-
3. **
|
|
8
|
-
4. **
|
|
5
|
+
1. **Clarify before coding** - Never assume. Ask if requirements are unclear.
|
|
6
|
+
2. **Read before writing** - Never modify code you haven't read. Find existing patterns first.
|
|
7
|
+
3. **Do exactly what's asked** - No more, no less. No "improvements" unless requested.
|
|
8
|
+
4. **Keep it simple** - The simplest solution that works is the best solution.
|
|
9
|
+
5. **Verify your work** - Confirm changes compile and tests pass before marking done.
|
|
9
10
|
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
## Before Writing Code
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
**Required steps:**
|
|
16
|
+
1. Read the files you'll modify
|
|
17
|
+
2. Search for similar code/patterns in the codebase
|
|
18
|
+
3. Check for related tests
|
|
19
|
+
4. Use existing utilities - don't reinvent
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Good: "Let me read the existing service to understand the patterns..."
|
|
23
|
+
Bad: "I'll create a new Service class..." (without reading existing code)
|
|
24
|
+
```
|
|
18
25
|
|
|
19
26
|
---
|
|
20
27
|
|
|
21
28
|
## Code Quality
|
|
22
29
|
|
|
23
|
-
###
|
|
30
|
+
### Structure & Naming
|
|
31
|
+
- One responsibility per file/function
|
|
32
|
+
- Group by feature (`user/`) not type (`controllers/`)
|
|
33
|
+
- Functions: verb + noun (`createUser`, `validateEmail`)
|
|
34
|
+
- Booleans: `is/has/can/should` prefix
|
|
35
|
+
- Match existing codebase conventions exactly
|
|
24
36
|
|
|
25
|
-
|
|
26
|
-
- No
|
|
27
|
-
-
|
|
28
|
-
-
|
|
37
|
+
### Simplicity
|
|
38
|
+
- No abstraction until 3+ use cases exist
|
|
39
|
+
- No "just in case" code
|
|
40
|
+
- 10 clear lines > 3 clever lines
|
|
41
|
+
- Max 20-30 lines per function, 3-4 parameters
|
|
29
42
|
|
|
30
|
-
###
|
|
43
|
+
### Error Handling
|
|
44
|
+
- Validate at boundaries only (user input, API responses, file I/O)
|
|
45
|
+
- Fail fast - throw early
|
|
46
|
+
- Never swallow errors silently
|
|
31
47
|
|
|
32
|
-
|
|
33
|
-
- No backwards-compatibility shims when you can just change code
|
|
34
|
-
- No defensive programming against impossible scenarios
|
|
35
|
-
- No gold-plating or "while I'm here" improvements
|
|
48
|
+
---
|
|
36
49
|
|
|
37
|
-
|
|
50
|
+
## Verification
|
|
51
|
+
|
|
52
|
+
After every change:
|
|
53
|
+
1. **Compile/parse** - No syntax errors
|
|
54
|
+
2. **Run tests** - Existing tests still pass
|
|
55
|
+
3. **Manual check** - If no tests, verify it works
|
|
56
|
+
|
|
57
|
+
If something breaks: Stop, read the error, fix or revert. Never leave broken code.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## What Claude Gets Wrong
|
|
62
|
+
|
|
63
|
+
### Over-Engineering
|
|
64
|
+
- Abstractions/interfaces for single implementations
|
|
65
|
+
- Factory patterns, builders without need
|
|
66
|
+
- Utility classes for one-off operations
|
|
67
|
+
- Config for things that won't change
|
|
68
|
+
|
|
69
|
+
### Unnecessary Changes
|
|
70
|
+
- "Cleaning up" unrelated code
|
|
71
|
+
- Adding types/docs to unchanged code
|
|
72
|
+
- Refactoring "while you're there"
|
|
38
73
|
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
74
|
+
### Context Failures
|
|
75
|
+
- Modifying files without reading them
|
|
76
|
+
- Ignoring existing patterns
|
|
77
|
+
- Creating utilities when similar ones exist
|
|
78
|
+
- Using different conventions than the codebase
|
|
79
|
+
|
|
80
|
+
### Verbose Patterns
|
|
81
|
+
- Try-catch that just logs and rethrows
|
|
82
|
+
- Null checks on non-nullable values
|
|
83
|
+
- Comments explaining obvious code
|
|
43
84
|
|
|
44
85
|
---
|
|
45
86
|
|
|
46
|
-
##
|
|
87
|
+
## Debugging
|
|
47
88
|
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
- Don't "improve" working code that isn't part of the task
|
|
54
|
-
- Don't guess at missing requirements - ask first
|
|
89
|
+
1. **Reproduce** - Make the bug happen consistently
|
|
90
|
+
2. **Isolate** - Find the smallest failing case
|
|
91
|
+
3. **Understand** - Find root cause, not symptom
|
|
92
|
+
4. **Fix** - Minimal change only
|
|
93
|
+
5. **Verify** - Test the fix, remove debug code
|
|
55
94
|
|
|
56
95
|
---
|
|
57
96
|
|
|
58
|
-
##
|
|
97
|
+
## Multi-Step Tasks
|
|
98
|
+
|
|
99
|
+
1. List steps before starting
|
|
100
|
+
2. Complete one step fully before next
|
|
101
|
+
3. Verify each step works
|
|
102
|
+
4. If blocked, ask - don't guess
|
|
59
103
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
104
|
+
Pattern: Small change → Verify → Next change → Verify
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Git & Dependencies
|
|
109
|
+
|
|
110
|
+
**Commits**: Atomic, meaningful messages, always working state
|
|
111
|
+
**Format**: `type: description` (feat, fix, refactor, docs, test, chore)
|
|
112
|
+
**Before commit**: Review diff, build passes, tests pass, no debug code
|
|
113
|
+
|
|
114
|
+
**Dependencies**: Check if existing deps solve it first. Ask before adding new ones.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Security (Non-Negotiable)
|
|
119
|
+
|
|
120
|
+
- Never hardcode secrets - use environment variables
|
|
121
|
+
- Validate/sanitize ALL external input
|
|
122
|
+
- SQL: Parameterized queries only
|
|
123
|
+
- Escape output for context (HTML, SQL, shell)
|
|
124
|
+
- Check permissions on protected operations
|
|
65
125
|
|
|
66
126
|
---
|
|
67
127
|
|
|
68
128
|
## Testing
|
|
69
129
|
|
|
70
130
|
- Test behavior, not implementation
|
|
71
|
-
- One
|
|
72
|
-
- Name
|
|
73
|
-
-
|
|
74
|
-
-
|
|
131
|
+
- One concept per test
|
|
132
|
+
- Name clearly: `rejects_expired_tokens`
|
|
133
|
+
- No logic in tests (no if/for)
|
|
134
|
+
- Test edge cases: empty, null, boundaries
|
|
135
|
+
- Write tests for bug fixes
|
|
75
136
|
|
|
76
137
|
---
|
|
77
138
|
|
|
78
139
|
## Communication
|
|
79
140
|
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
|
|
141
|
+
- **Before**: "I'll [action] by [approach]."
|
|
142
|
+
- **After**: "Done. Changed X, Y. [caveats]."
|
|
143
|
+
- **Blocked**: "I need [info] because [reason]."
|
|
144
|
+
- **Trade-offs**: "A: [pro/con]. B: [pro/con]. Recommend A because..."
|
|
145
|
+
|
|
146
|
+
Never: Apologize unnecessarily, explain basics unless asked, pad responses
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Documentation
|
|
151
|
+
|
|
152
|
+
- Code should be self-documenting
|
|
153
|
+
- Comment only: why (not what), complex algorithms, non-obvious side effects
|
|
154
|
+
- No TODO comments - fix now or create issue
|
|
155
|
+
- No commented-out code - delete it
|
|
85
156
|
|
|
86
157
|
---
|
|
87
158
|
|