@devran-ai/kit 4.1.0 → 4.2.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.
@@ -1,6 +1,6 @@
1
1
  # Devran AI Kit — CheatSheet
2
2
 
3
- > **Version**: v4.1.0 | **Quick Reference** for all capabilities
3
+ > **Version**: v4.2.0 | **Quick Reference** for all capabilities
4
4
  > **Session**: Start with `/status`, end with session-end checklist
5
5
 
6
6
  ---
@@ -24,7 +24,7 @@ Your complete guide to the Devran AI Kit. Type `/help` for a quick overview, or
24
24
 
25
25
  ## Quick Overview
26
26
 
27
- **Devran AI Kit v4.1.0** — Trust-Grade AI Development Framework
27
+ **Devran AI Kit v4.2.0** — Trust-Grade AI Development Framework
28
28
 
29
29
  | Category | Count | Description |
30
30
  |:---------|:------|:------------|
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "kitVersion": "4.1.0",
3
+ "kitVersion": "4.2.0",
4
4
  "lastAuditedAt": null,
5
5
  "description": "Devran AI Kit — Trust-Grade AI Development Framework",
6
6
  "repository": "https://github.com/devran-ai/kit",
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Devran AI Kit
2
2
 
3
- [![Version](https://img.shields.io/badge/version-4.1.0-blue.svg)](https://github.com/devran-ai/kit)
3
+ [![Version](https://img.shields.io/badge/version-4.2.0-blue.svg)](https://github.com/devran-ai/kit)
4
4
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
5
5
  [![Tests](https://img.shields.io/badge/tests-382%20passing-brightgreen.svg)](tests/)
6
6
  [![Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](package.json)
@@ -47,6 +47,17 @@ Creates a new project with `.agent/` pre-configured. Templates: `minimal`, `node
47
47
  npx @devran-ai/kit init
48
48
  ```
49
49
 
50
+ ## How It Works in Teams
51
+
52
+ Devran AI Kit is **personal developer tooling** — like your IDE settings. `kit init` adds `.agent/` to `.gitignore` by default so it stays local.
53
+
54
+ | Mode | Command | Behavior |
55
+ |------|---------|----------|
56
+ | Personal (default) | `kit init` | `.agent/` gitignored — local only |
57
+ | Team (opt-in) | `kit init --shared` | `.agent/` committed — shared with team |
58
+
59
+ Your project's `CLAUDE.md` remains the single source of truth. The kit enhances your personal workflow without affecting teammates. Anyone who wants it runs `npx @devran-ai/kit init`.
60
+
50
61
  ### Updating
51
62
 
52
63
  ```bash
package/bin/kit.js CHANGED
@@ -93,6 +93,7 @@ ${colors.bright}Options:${colors.reset}
93
93
  --file <path> CI log file for heal command
94
94
  --ide <name> Generate config for single IDE (cursor|opencode|codex)
95
95
  --skip-ide Skip IDE config generation
96
+ --shared Commit .agent/ to repo (team mode — skip .gitignore)
96
97
 
97
98
  ${colors.bright}Examples:${colors.reset}
98
99
  npx @devran-ai/kit init
@@ -247,7 +248,7 @@ function initCommand(options) {
247
248
 
248
249
  // Dynamic step counter — avoids hardcoded step strings
249
250
  const isForceWithBackup = backupPath !== null;
250
- const totalSteps = isForceWithBackup ? 6 : 4;
251
+ const totalSteps = isForceWithBackup ? 7 : 5;
251
252
  let currentStep = isForceWithBackup ? 2 : 1;
252
253
 
253
254
  // C-3: Atomic copy via temp directory
@@ -327,6 +328,26 @@ function initCommand(options) {
327
328
  }
328
329
  currentStep++;
329
330
 
331
+ // Add .agent/ to .gitignore (unless --shared)
332
+ if (!options.shared) {
333
+ logStep(`${currentStep}/${totalSteps}`, 'Configuring .gitignore...');
334
+ try {
335
+ const { addToGitignore } = require('../lib/io');
336
+ const result = addToGitignore(targetDir);
337
+ if (result.added) {
338
+ log(' ✓ .agent/ added to .gitignore (local dev tooling)', 'green');
339
+ } else {
340
+ log(' ✓ .agent/ already in .gitignore', 'green');
341
+ }
342
+ } catch (err) {
343
+ log(` ⚠️ Could not update .gitignore: ${err.message}`, 'yellow');
344
+ }
345
+ } else {
346
+ logStep(`${currentStep}/${totalSteps}`, 'Shared mode — .agent/ will be committed');
347
+ log(' ℹ .gitignore not modified (--shared flag)', 'cyan');
348
+ }
349
+ currentStep++;
350
+
330
351
  // Final message
331
352
  logStep(`${currentStep}/${totalSteps}`, 'Setup complete!');
332
353
 
@@ -683,6 +704,7 @@ const options = {
683
704
  dryRun: args.includes('--dry-run'),
684
705
  apply: args.includes('--apply'),
685
706
  skipIde: args.includes('--skip-ide'),
707
+ shared: args.includes('--shared'),
686
708
  ide: null,
687
709
  path: null,
688
710
  file: null,
package/lib/io.js CHANGED
@@ -139,8 +139,44 @@ function safeCopyDirSync(src, dest) {
139
139
  }
140
140
  }
141
141
 
142
+ /**
143
+ * Adds Devran AI Kit entries to a project's .gitignore.
144
+ * Creates .gitignore if it doesn't exist. Idempotent — skips
145
+ * if entries already present. Uses marker-based detection to
146
+ * avoid duplicate entries across multiple runs.
147
+ *
148
+ * @param {string} projectRoot - Project root directory
149
+ * @returns {{ added: boolean, reason: string }}
150
+ */
151
+ function addToGitignore(projectRoot) {
152
+ const gitignorePath = path.join(projectRoot, '.gitignore');
153
+ const marker = '# Devran AI Kit';
154
+ const block = [
155
+ '',
156
+ '# Devran AI Kit (local dev tooling)',
157
+ '# Install: npx @devran-ai/kit init',
158
+ '.agent/',
159
+ ].join('\n') + '\n';
160
+
161
+ let content = '';
162
+ if (fs.existsSync(gitignorePath)) {
163
+ content = fs.readFileSync(gitignorePath, 'utf-8');
164
+ // Primary check: is .agent/ already ignored?
165
+ if (content.includes('.agent/')) {
166
+ if (content.includes(marker)) {
167
+ return { added: false, reason: 'already-present' };
168
+ }
169
+ return { added: false, reason: 'already-ignored' };
170
+ }
171
+ }
172
+
173
+ fs.appendFileSync(gitignorePath, block, 'utf-8');
174
+ return { added: true, reason: 'added' };
175
+ }
176
+
142
177
  module.exports = {
143
178
  writeJsonAtomic,
144
179
  readJsonSafe,
145
180
  safeCopyDirSync,
181
+ addToGitignore,
146
182
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devran-ai/kit",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "Trust-grade AI development framework — zero-dependency runtime engine for agent orchestration, workflow governance, and skill management.",
5
5
  "main": "bin/kit.js",
6
6
  "bin": {