context-engineer 1.3.0 → 1.3.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/README.md CHANGED
@@ -62,10 +62,19 @@ npx context-engineer init --dir ./myapp # Install to a specific directory
62
62
  ### Update Templates
63
63
 
64
64
  ```bash
65
- npx context-engineer update # Update to latest templates
65
+ npx context-engineer update # Smart update: framework files always, content files only if untouched
66
66
  npx context-engineer update --check # Check for updates without applying
67
+ npx context-engineer update --force # Overwrite customized content too
68
+ npx context-engineer update --yes # Auto-confirm (non-interactive)
67
69
  ```
68
70
 
71
+ Files are classified as:
72
+
73
+ - **Framework** (`.claude/`, `scripts/`, `CLAUDE.md`) — always updated to latest version
74
+ - **Content** (`.context/architecture/`, `business/`, `AGENTS.md`, etc.) — preserved if customized since install
75
+
76
+ Non-TTY environments (Claude Code Bash tool, CI) auto-confirm prompts.
77
+
69
78
  ## After Installation
70
79
 
71
80
  1. **Claude Code**: Run `/bootstrap-context` to populate templates from your codebase
package/bin/cli.mjs CHANGED
@@ -27,6 +27,8 @@ function parseFlags(args) {
27
27
  flags.dryRun = true;
28
28
  } else if (arg === '--check') {
29
29
  flags.check = true;
30
+ } else if (arg === '--yes' || arg === '-y') {
31
+ flags.yes = true;
30
32
  }
31
33
  }
32
34
  return flags;
@@ -46,10 +48,12 @@ function printHelp() {
46
48
  --dir <path> Target directory (default: current directory)
47
49
  --force Overwrite existing files without asking
48
50
  --dry-run Show what would be installed without writing
51
+ --yes, -y Auto-confirm all prompts
49
52
 
50
53
  Update options:
51
54
  --check Only check for updates, don't apply
52
55
  --force Overwrite all files including customized ones
56
+ --yes, -y Auto-confirm all prompts
53
57
 
54
58
  Examples:
55
59
  npx context-engineer init
package/lib/prompts.mjs CHANGED
@@ -9,8 +9,17 @@ function createRL() {
9
9
 
10
10
  /**
11
11
  * Ask a yes/no question. Returns true for yes.
12
+ * In non-TTY environments (piped input, Claude Code Bash tool, CI),
13
+ * auto-resolves to the default without waiting for input.
12
14
  */
13
15
  export async function confirm(message, defaultYes = true) {
16
+ // Non-interactive environment: auto-confirm with default
17
+ if (!process.stdin.isTTY) {
18
+ const suffix = defaultYes ? '[Y/n]' : '[y/N]';
19
+ console.log(` ${message} ${suffix} ${defaultYes ? 'Y' : 'N'} (auto, non-interactive)`);
20
+ return defaultYes;
21
+ }
22
+
14
23
  const rl = createRL();
15
24
  const suffix = defaultYes ? '[Y/n]' : '[y/N]';
16
25
  return new Promise((resolve) => {
package/lib/update.mjs CHANGED
@@ -33,18 +33,25 @@ function detectInstalledGroups(targetDir) {
33
33
  /**
34
34
  * Framework files are the "engine" of context-engineer — skills, scripts, agent roles.
35
35
  * These should always be updated, even if the user's copy differs (e.g., bootstrap touched them).
36
+ *
36
37
  * Content files (.context/ project docs) contain user knowledge and should be preserved.
38
+ *
39
+ * MIXED files (CLAUDE.md, .cursorrules, AGENTS.md) contain both framework structure
40
+ * AND user placeholders ([BUILD_COMMAND], [TEST_COMMAND], etc.) filled in by /bootstrap-context.
41
+ * These are classified as CONTENT to protect user customizations — if you want the latest
42
+ * framework structure for these, run `--force` and re-fill the placeholders.
37
43
  */
38
44
  function isFrameworkFile(relPath) {
39
45
  const normalized = relPath.replace(/\\/g, '/');
46
+ // Pure framework directories — no user placeholders
40
47
  if (normalized.startsWith('.claude/')) return true;
41
- if (normalized.startsWith('.cursor/')) return true;
48
+ if (normalized.startsWith('.cursor/rules/')) return true;
42
49
  if (normalized.startsWith('scripts/')) return true;
43
50
  if (normalized.startsWith('.github/')) return true;
44
- if (normalized === 'CLAUDE.md') return true;
45
- if (normalized === '.cursorrules') return true;
51
+ // Pure framework files
46
52
  if (normalized === '.context/_meta/schema.md') return true;
47
53
  if (normalized === '.context/_meta/drift-report.md') return true;
54
+ // CLAUDE.md, .cursorrules, AGENTS.md are MIXED — treated as content
48
55
  return false;
49
56
  }
50
57
 
@@ -65,7 +72,7 @@ function saveInstalledChecksums(targetDir, checksums) {
65
72
 
66
73
  export async function runUpdate(flags) {
67
74
  const targetDir = flags.dir || process.cwd();
68
- const { force = false, check = false } = flags;
75
+ const { force = false, check = false, yes = false } = flags;
69
76
 
70
77
  console.log(`\n context-engineer v${PKG.version}`);
71
78
  console.log(' Checking for updates...\n');
@@ -171,7 +178,7 @@ export async function runUpdate(flags) {
171
178
  }
172
179
 
173
180
  // Confirm
174
- const proceed = force || (await confirm(`Apply ${totalUpdates} update(s)?`));
181
+ const proceed = force || yes || (await confirm(`Apply ${totalUpdates} update(s)?`));
175
182
  if (!proceed) {
176
183
  console.log(' Cancelled.\n');
177
184
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-engineer",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Structured context management for AI coding agents. One command to install the .context/ system into any project.",
5
5
  "type": "module",
6
6
  "bin": {