project-iris 0.2.1 → 0.2.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.
package/lib/installer.js CHANGED
@@ -230,6 +230,47 @@ async function installVSCodeExtension(selectedToolKeys) {
230
230
  return installed;
231
231
  }
232
232
 
233
+ /**
234
+ * Install CLAUDE.md to .claude/ folder
235
+ * This provides Claude with project-agnostic quality guidelines
236
+ * @returns {boolean} Whether file was installed
237
+ */
238
+ async function installClaudeMd() {
239
+ const sourcePath = path.join(__dirname, '..', 'templates', 'CLAUDE.md');
240
+ const targetDir = '.claude';
241
+ const targetPath = path.join(targetDir, 'CLAUDE.md');
242
+
243
+ // Check if source exists
244
+ if (!await fs.pathExists(sourcePath)) {
245
+ console.log(theme.dim(' CLAUDE.md template not found, skipping...'));
246
+ return false;
247
+ }
248
+
249
+ // Ensure .claude directory exists
250
+ await fs.ensureDir(targetDir);
251
+
252
+ // Check if CLAUDE.md already exists
253
+ if (await fs.pathExists(targetPath)) {
254
+ // Read existing content to check if it's ours
255
+ const existing = await fs.readFile(targetPath, 'utf8');
256
+ if (existing.includes('installed by iris') || existing.includes('project-iris')) {
257
+ // Our file, safe to overwrite
258
+ await fs.copy(sourcePath, targetPath, { overwrite: true });
259
+ CLIUtils.displayStatus('', 'Updated CLAUDE.md', 'success');
260
+ return true;
261
+ } else {
262
+ // User's own CLAUDE.md, don't overwrite
263
+ console.log(theme.dim(' Existing CLAUDE.md found, skipping (won\'t overwrite user file)'));
264
+ return false;
265
+ }
266
+ }
267
+
268
+ // Install fresh
269
+ await fs.copy(sourcePath, targetPath);
270
+ CLIUtils.displayStatus('', 'Installed CLAUDE.md with quality guidelines', 'success');
271
+ return true;
272
+ }
273
+
233
274
  async function install() {
234
275
  // Initialize analytics (respects opt-out env vars)
235
276
  analytics.init();
@@ -316,6 +357,9 @@ async function install() {
316
357
  try {
317
358
  const filesCreated = await installFlow(selectedFlow, selectedToolKeys);
318
359
 
360
+ // Install CLAUDE.md with quality guidelines
361
+ await installClaudeMd();
362
+
319
363
  // Install VS Code extension if applicable
320
364
  await installVSCodeExtension(selectedToolKeys);
321
365
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-iris",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
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": {
@@ -38,6 +38,7 @@
38
38
  "flows/",
39
39
  "lib/",
40
40
  "scripts/",
41
+ "templates/",
41
42
  "README.md"
42
43
  ],
43
44
  "dependencies": {
@@ -0,0 +1,88 @@
1
+ # Claude Instructions
2
+
3
+ ## Core Principles
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
9
+
10
+ ---
11
+
12
+ ## Before Writing Code
13
+
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"
18
+
19
+ ---
20
+
21
+ ## Code Quality
22
+
23
+ ### Keep It Simple
24
+
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)
29
+
30
+ ### Only Add What's Needed
31
+
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
36
+
37
+ ### Error Handling
38
+
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
43
+
44
+ ---
45
+
46
+ ## What NOT To Do
47
+
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
55
+
56
+ ---
57
+
58
+ ## Security Essentials
59
+
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
65
+
66
+ ---
67
+
68
+ ## Testing
69
+
70
+ - 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
75
+
76
+ ---
77
+
78
+ ## Communication
79
+
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
85
+
86
+ ---
87
+
88
+ <!-- installed by iris (project-iris) - safe to update with: npx project-iris install -->