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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. 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.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": {
@@ -1,87 +1,158 @@
1
1
  # Claude Instructions
2
2
 
3
- ## Core Principles
3
+ ## Prime Directives
4
4
 
5
- 1. **Read before writing** - Understand existing code before modifying
6
- 2. **Minimal changes** - Solve the problem, nothing more
7
- 3. **Follow existing patterns** - Match the codebase style exactly
8
- 4. **Ask when unclear** - Don't guess at requirements
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
- - Read the files you'll modify - understand the patterns used
15
- - Search for existing utilities before creating new ones
16
- - Check if similar problems are solved elsewhere in the codebase
17
- - Understand the "why" behind existing code, not just the "what"
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
- ### Keep It Simple
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
- - Solve the current problem, not hypothetical future ones
26
- - No abstractions for single-use cases
27
- - Three similar lines > premature helper function
28
- - Delete unused code completely (no `_unused` prefixes)
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
- ### Only Add What's Needed
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
- - No feature flags for simple changes
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
- ### Error Handling
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
- - Validate at system boundaries only (user input, APIs, file I/O)
40
- - Trust internal code - don't defensively check everything
41
- - No empty catch blocks
42
- - Let errors propagate when callers should handle them
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
- ## What NOT To Do
87
+ ## Debugging
47
88
 
48
- - Don't add comments explaining obvious code
49
- - Don't add types/docstrings to code you didn't change
50
- - Don't refactor surrounding code when fixing a bug
51
- - Don't create utils/helpers for one-time operations
52
- - Don't add tests for trivial code (getters, pass-through)
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
- ## Security Essentials
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
- - Never hardcode secrets, keys, or credentials
61
- - Validate and sanitize all user input
62
- - Use parameterized queries (no string concatenation for SQL)
63
- - Escape output in templates to prevent XSS
64
- - Check file paths to prevent directory traversal
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 assertion per test when possible
72
- - Name tests by what they verify: `test_returns_empty_list_when_no_items`
73
- - Don't mock what you don't own
74
- - Skip tests for trivial code
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
- - Be direct and concise
81
- - State what you're doing before doing it
82
- - If blocked, explain why and ask for guidance
83
- - Confirm destructive operations before executing
84
- - Summarize changes after completing a task
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