its-magic 0.1.2-40 → 0.1.2-42

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
@@ -44,6 +44,10 @@ Pick one method:
44
44
  | Chocolatey | `choco install its-magic` (Admin shell) |
45
45
  | Homebrew | `brew tap USER/tap && brew install its-magic` |
46
46
 
47
+ ### Global Linux install: empty `install_include_paths` (CRLF manifest)
48
+
49
+ If **`its-magic --target <repo> --mode missing`** fails with **`[INSTALL_MANIFEST_ERROR] install_include_paths section is empty`** on Debian/Linux while the packaged manifest still lists paths, the global install likely has **CRLF** line endings in **`installer-owned-paths.manifest`** (visible as **`^M$`** with **`cat -A`**). **Fix in-tree** from **`0.1.2-41`**: **`installer.sh`** strips trailing carriage returns before section matching; **`.gitattributes`** keeps **`*.manifest`** LF; **`prepublishOnly`** runs **`guard_installer_publish`**. **Upgrade**: install a build **≥ `0.1.2-41`** (or reinstall from a fresh **`npm pack`** tarball after pull). Older tarballs such as **`its-magic@0.1.2-40`** may remain broken until republished — see **`docs/engineering/architecture.md`** **`# BUG-0008`**.
50
+
47
51
  ### 2) Apply to a repo
48
52
 
49
53
  New repo:
package/installer.ps1 CHANGED
@@ -28,7 +28,7 @@ function Get-ManifestSection($ManifestPath, $SectionName) {
28
28
  $inSection = $false
29
29
  $items = New-Object System.Collections.Generic.List[string]
30
30
  foreach ($raw in $lines) {
31
- $line = $raw.Trim()
31
+ $line = $raw.TrimEnd("`r").Trim()
32
32
  if ([string]::IsNullOrWhiteSpace($line)) { continue }
33
33
  if ($line.StartsWith("#")) { continue }
34
34
  if ($line.StartsWith("[") -and $line.EndsWith("]")) {
package/installer.sh CHANGED
@@ -92,8 +92,13 @@ list_source_files() {
92
92
 
93
93
  get_manifest_paths() {
94
94
  section="$1"
95
+ # BUG-0008: strip trailing CR so CRLF manifests (Windows-published npm tarballs)
96
+ # still match [section] headers under POSIX awk on Linux.
95
97
  awk -v s="$section" '
96
98
  BEGIN { in_section=0 }
99
+ {
100
+ sub(/\r$/, "")
101
+ }
97
102
  /^[[:space:]]*#/ { next }
98
103
  /^[[:space:]]*$/ { next }
99
104
  /^\[/ {
@@ -205,6 +210,7 @@ write_installed_version() {
205
210
  printf "%s" "$2" > "$vf"
206
211
  legacy="$1/.its-magic-version"
207
212
  [ -f "$legacy" ] && rm -f "$legacy"
213
+ return 0
208
214
  }
209
215
 
210
216
  sync_root_readme_to_its_magic() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "its-magic",
3
- "version": "0.1.2-40",
3
+ "version": "0.1.2-42",
4
4
  "description": "its-magic - AI dev team workflow for Cursor.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env python3
2
- """Prepublish / CI guard: installer.sh LF + POSIX-safe startup tokens (US-0084 / AC-2)."""
2
+ """Prepublish / CI guard: installer.sh LF + POSIX-safe startup tokens (US-0084 / AC-2).
3
+
4
+ BUG-0008: reject CR bytes in installer-owned-paths.manifest (CRLF breaks POSIX awk section match).
5
+ """
3
6
 
4
7
  from __future__ import annotations
5
8
 
@@ -10,6 +13,10 @@ from pathlib import Path
10
13
 
11
14
  ROOT = Path(__file__).resolve().parents[1]
12
15
  INSTALLER_SH = ROOT / "installer.sh"
16
+ INSTALLER_MANIFESTS = (
17
+ ROOT / "docs" / "engineering" / "context" / "installer-owned-paths.manifest",
18
+ ROOT / "template" / "docs" / "engineering" / "context" / "installer-owned-paths.manifest",
19
+ )
13
20
 
14
21
  FORBIDDEN_TOKENS = (
15
22
  "set -euo",
@@ -32,6 +39,17 @@ def main() -> int:
32
39
  file=sys.stderr,
33
40
  )
34
41
  return 1
42
+ for man in INSTALLER_MANIFESTS:
43
+ if not man.is_file():
44
+ continue
45
+ mdata = man.read_bytes()
46
+ if b"\r" in mdata:
47
+ print(
48
+ f"guard_installer_publish: CR/LF (\\r) bytes found in {man.relative_to(ROOT)} — "
49
+ "use LF only (.gitattributes *.manifest; BUG-0008).",
50
+ file=sys.stderr,
51
+ )
52
+ return 1
35
53
  text = data.decode("utf-8", errors="replace")
36
54
  for token in FORBIDDEN_TOKENS:
37
55
  if token in text:
@@ -19,6 +19,11 @@ description: "its-magic auto: deterministic continuation orchestrator."
19
19
  - Phase context transfer happens only through artifacts and handoff files.
20
20
  - Scope is process/workflow orchestration only. Do not claim runtime product
21
21
  orchestration changes.
22
+ - **Bug-queue mode** (**`US-0087`**) uses the same **spawn-only** contract: the
23
+ orchestrator schedules materialization and spawns phase-role subagents per
24
+ bug segment—it **must not** run **`execute`**, **`qa`**, or other lifecycle
25
+ phases in the orchestrator turn. Violations → **`AUTO_ORCHESTRATOR_PHASE_EXECUTION`**
26
+ (**`BUG-0006`**, **`US-0069`**, **`DEC-0051`**).
22
27
 
23
28
  ## Spawn-boundary integrity (BUG-0006)
24
29
 
@@ -33,6 +38,39 @@ description: "its-magic auto: deterministic continuation orchestrator."
33
38
  (wrong writer / isolation break) and **`RUNTIME_PROOF_*`** / **`PHASE_ROLE_*`**
34
39
  families—do not overload those codes for a missing-spawn violation.
35
40
 
41
+ ## Continuous multi-phase execution (US-0088)
42
+
43
+ A single `/auto` orchestrated run advances through **all phases** in the
44
+ **intersected resolved schedule** (reference **Step 5**) until a
45
+ **deterministic stop condition** fires. The orchestrator does **not** stop after
46
+ spawning one phase unless the stop matrix requires it.
47
+
48
+ **Outer-driver equivalence (AC-1, Option B)**: When a single Cursor `/auto`
49
+ invocation cannot schedule multiple fresh subagent turns (product/runtime
50
+ constraint), a **documented outer driver** (operator script or manual
51
+ re-invocation with `start-from` / refreshed `resume_brief`) is
52
+ **deterministically equivalent** provided: same intersected phase order, same
53
+ isolation + strict-proof attestation per phase (**DEC-0038**), same stop
54
+ reasons, and same `resume_brief` + `state.md` refresh at every boundary.
55
+ Operators must follow the runbook recipe
56
+ (**`docs/engineering/runbook.md`** § Continuous `/auto` + backlog drain).
57
+
58
+ **Deterministic stop matrix** (see also architecture `# US-0088`):
59
+
60
+ | Condition | Behavior |
61
+ |-----------|----------|
62
+ | Next phase exists, no hard stop | **Continue** — preflight US-0069, spawn next phase |
63
+ | `decision_gate` | **Stop** (non-suppressible) |
64
+ | `error` / missing critical input | **Stop** (non-suppressible) |
65
+ | `AUTO_PAUSE_REQUEST` / `pause` | **Stop** at safe boundary (non-suppressible) |
66
+ | `AUTO_LOOP_MAX_CYCLES` / `loop_max` | **Stop** (non-suppressible) |
67
+ | `blocked` (sync/scope gate) | **Stop** (non-suppressible) |
68
+ | US lifecycle DONE / sprint segment complete | **Stop** segment; `AUTO_BACKLOG_DRAIN=1` may advance to next OPEN story (recompute phase plan — **reference Step 5**) |
69
+ | `BACKLOG_MAX_STORIES_REACHED` | **Stop** (non-suppressible) |
70
+
71
+ `stop_reason` vocabulary: `completed`, `decision_gate`, `missing_input`,
72
+ `pause_request`, `loop_max`, `error`, `blocked`.
73
+
36
74
  ## Full specification (US-0080 / DEC-0062)
37
75
 
38
76
  Long prose, expanded mode semantics, and **Steps 1–13** detail live in
@@ -101,16 +139,37 @@ Selectors and reinstatement: see reference. Phase-plan reason codes include
101
139
  `PHASE_POLICY_CONFLICT`, `PHASE_PLAN_UNKNOWN_PHASE`, `START_FROM_PHASE_PLAN_EMPTY_INTERSECTION`.
102
140
 
103
141
  Phase boundary visibility (**AC-10**): record `resolved_phase_plan` snapshot,
104
- `skipped_phases`, `phase_boundary`, `next_scheduled_phase` on `state.md`.
142
+ `skipped_phases`, `phase_boundary`, `next_scheduled_phase` on `state.md`. For
143
+ bug-queue segments, also record **`segment_work_item_kind`**, **`active_bug_id`**,
144
+ **`bug_queue_position`**, **`bug_queue_remaining`**, **`backlog_drain_active`**,
145
+ **`bug_queue_active`** per **`docs/engineering/architecture.md`** **`# US-0087`**
146
+ and **`docs/engineering/auto-orchestration-reference.md`**.
105
147
 
106
148
  ## Inputs
107
149
 
108
150
  Merged scratchpad (**US-0073** / **DEC-0055**), automation flags (`AUTO_*`, `SECURITY_REVIEW`,
109
151
  `TEAM_*`), phase-plan keys `AUTO_PHASE_PLAN`, `AUTO_PHASE_EXCLUDE`, `AUTO_PHASE_INCLUDE`,
110
152
  `AUTO_PHASE_PROFILE`, `AUTO_PHASE_HIGH_RISK_ACK`, product/engineering docs,
111
- optional `start-from=<phase>`, optional `--execute-bulk`, `handoffs/resume_brief.md`,
153
+ optional `start-from=<phase>`, optional **`bug-target=BUG-####`** or
154
+ **`bug-target=all-open`**, optional `--execute-bulk`, `handoffs/resume_brief.md`,
112
155
  `docs/engineering/state.md`.
113
156
 
157
+ ## Automation remote routing contract (US-0086)
158
+
159
+ - Automation-only gate: `AUTO_REMOTE_AUTOMATION_PROFILE=deterministic_v1` enables
160
+ target routing; `off` keeps manual/local behavior unchanged.
161
+ - Explicit intent literal is constrained to: `start container <target_id>`.
162
+ - Deterministic precedence when profile is enabled:
163
+ 1. explicit intent target id resolution,
164
+ 2. canonical target validation (`targets[].id` exists and is enabled),
165
+ 3. documented heuristic fallback,
166
+ 4. local default when no remote target is selected.
167
+ - Fail-closed reason codes (do not overload):
168
+ `REMOTE_AUTOMATION_MODE_OFF`, `REMOTE_TARGET_UNKNOWN`,
169
+ `REMOTE_TARGET_DISABLED`, `REMOTE_TARGET_UNROUTABLE`.
170
+ - Mode-off guardrail: never silently reroute `TEST_COMMAND` to remote when
171
+ automation profile is disabled.
172
+
114
173
  ## Canonical status contract (US-0045)
115
174
 
116
175
  Story status authority: `docs/product/backlog.md` only; do not infer readiness from
@@ -124,14 +183,43 @@ QA loop handoffs when applicable, continuation breadcrumbs including `resolution
124
183
 
125
184
  ## Stop conditions
126
185
 
127
- Decision gate, missing critical input, `AUTO_PAUSE_REQUEST` at safe boundary,
128
- `AUTO_LOOP_MAX_CYCLES` with unresolved defects.
186
+ Deterministic stop reasons (see **Stop matrix** in `## Continuous multi-phase
187
+ execution (US-0088)` above): `completed`, `decision_gate`, `missing_input`,
188
+ `pause_request`, `loop_max`, `error`, `blocked`.
129
189
 
130
190
  ## Optional backlog-drain mode (US-0044 / DEC-0022)
131
191
 
132
192
  Canonical controls: `AUTO_BACKLOG_DRAIN`, `AUTO_BACKLOG_MAX_STORIES`, `AUTO_BACKLOG_ON_BLOCK`,
133
- `AUTO_STORY_SELECTION`. Reason codes include `BACKLOG_MAX_STORIES_REACHED`. Full semantics:
134
- reference.
193
+ `AUTO_STORY_SELECTION`. When `AUTO_BACKLOG_DRAIN=1`, each story advances through
194
+ **multiple phases** until its terminal boundary (**reference Step 5**); the
195
+ orchestrator **recomputes** the materialized phase plan at each **story boundary**
196
+ and selects the **next eligible OPEN story** per `AUTO_STORY_SELECTION`.
197
+ Reason codes include `BACKLOG_MAX_STORIES_REACHED`. Full semantics: reference.
198
+
199
+ ## Optional bug-queue mode (US-0087)
200
+
201
+ Canonical **argv** literals (exact strings; **no aliases** in v1):
202
+ - **`bug-target=BUG-####`** (example: **`bug-target=BUG-0007`**) — single defect from
203
+ **`docs/product/backlog.md`** **`## Bug issues (canonical)`** with status **OPEN**.
204
+ - **`bug-target=all-open`** — deterministic **OPEN**-only queue, ascending **numeric**
205
+ **`BUG-####`** sort, optional cap **`AUTO_BUG_MAX_ITEMS`** (see reference).
206
+
207
+ Scratchpad keys (**default-off**): **`AUTO_BUG_QUEUE`**, **`AUTO_BUG_TARGET`**,
208
+ **`AUTO_BUG_MAX_ITEMS`**, **`AUTO_BUG_ON_BLOCK`** — full semantics: reference +
209
+ **`architecture.md`** **`# US-0087`**.
210
+
211
+ **Scheduler mutex**: if merged scratchpad has **`AUTO_BACKLOG_DRAIN=1`** **and**
212
+ **`AUTO_BUG_QUEUE=1`** **and** this invocation has **no** explicit **`bug-target=`**
213
+ argv token → fail closed with **`AUTO_SCHEDULER_CONFLICT`** (use
214
+ **`[AUTO_RESUME_ERROR] AUTO_SCHEDULER_CONFLICT: ...`** form per reference). When
215
+ **`bug-target=`** argv is present, it **selects** the bug scheduler for this run;
216
+ **`AUTO_BACKLOG_DRAIN`** must **not** also drive story selection for that same
217
+ materialized run.
218
+
219
+ Fail-closed codes (orthogonal to existing resume/phase codes; do **not** overload):
220
+ - **`AUTO_BUG_QUEUE_EMPTY`** — **`all-open`** (or equivalent) and zero **OPEN** bugs.
221
+ - **`AUTO_BUG_TARGET_UNKNOWN`** — malformed id, wrong pattern, or id missing from canonical bug section.
222
+ - **`AUTO_BUG_TARGET_NOT_OPEN`** — known id exists but status is not **OPEN** (e.g. **DONE**).
135
223
 
136
224
  ## Optional bulk execute mode (US-0047 / DEC-0024)
137
225
 
@@ -152,12 +240,19 @@ Phase-completion boundary evaluation only. **Guarded auto-push eligibility chain
152
240
 
153
241
  ## Deterministic resume-source precedence
154
242
 
155
- Resolve start phase in strict order:
243
+ Resolve nominal start phase and scheduler inputs in strict order (**`US-0087`**
244
+ extends scratchpad vs **`resume_brief`** ordering — full matrix: reference):
156
245
 
157
246
  1. Explicit `/auto start-from=<phase>`
158
- 2. `handoffs/resume_brief.md`
159
- 3. Conservative `docs/engineering/state.md` fallback
160
- 4. Fail fast on ambiguity/conflict/unrecoverable inputs
247
+ 2. Explicit **`bug-target=`** argv token when present (parsed **before** merged
248
+ scratchpad scheduler keys; selects bug scheduler for this run).
249
+ 3. Merged scratchpad (**`US-0073`** / **`DEC-0055`**) — including **`AUTO_BACKLOG_DRAIN`**,
250
+ **`AUTO_BUG_QUEUE`**, **`AUTO_BUG_TARGET`**, etc.
251
+ 4. `handoffs/resume_brief.md`
252
+ 5. Conservative `docs/engineering/state.md` fallback
253
+ 6. Fail fast on ambiguity/conflict/unrecoverable inputs (including
254
+ **`AUTO_SCHEDULER_CONFLICT`** when both schedulers are enabled in scratchpad
255
+ without **`bug-target=`** argv resolution).
161
256
 
162
257
  If `resume_brief.md` is present but stale or unparseable, fail fast instead
163
258
  of silently falling back.
@@ -177,22 +272,42 @@ Required codes:
177
272
  - `STATE_PHASE_AMBIGUOUS`
178
273
  - `STATE_PHASE_UNRECOVERABLE`
179
274
 
275
+ Bug-queue extensions (**`US-0087`**; same **`[AUTO_RESUME_ERROR]`** envelope when
276
+ used for resume/materialization failures):
277
+
278
+ - `AUTO_SCHEDULER_CONFLICT`
279
+ - `AUTO_BUG_QUEUE_EMPTY`
280
+ - `AUTO_BUG_TARGET_UNKNOWN`
281
+ - `AUTO_BUG_TARGET_NOT_OPEN`
282
+
180
283
  ## Steps (compact; full detail in reference)
181
284
 
182
285
  1. Read automation flags from merged scratchpad and **materialize the resolved
183
286
  phase plan** per **Configurable phase selection policy (US-0070 / DEC-0052)**; append
184
287
  plan breadcrumbs to `docs/engineering/state.md` **before** first spawn.
185
- 2. Parse `start-from` / `--execute-bulk`; resolve nominal start phase; intersect with plan.
288
+ 2. Parse `start-from` / **`bug-target=`** / `--execute-bulk`; resolve scheduler
289
+ mutex (**`AUTO_SCHEDULER_CONFLICT`** when applicable); resolve nominal start phase;
290
+ intersect with plan.
186
291
  3. Record continuation metadata (`invocation_mode=auto`, `requested_start_from`,
187
292
  `resolved_start_phase`, `resolution_source`, `resolution_status`, `timestamp`).
188
293
  4. Spawn fresh subagents per intersected schedule; enforce **US-0069** preflight/post checks.
189
- 5. Implementation loop, pause, stop breadcrumbs (`stop_reason` such as `completed|decision_gate|missing_input|pause_request|loop_max`, `stop_phase`, `timestamp`), `resume_brief` updates — reference.
190
- 6. 11a. Isolation evidence verification at each boundary.
191
- 7. 11b. At each phase boundary, verify strict runtime attestation tuple exists
294
+ 5. **Multi-phase continuation** (normative detail: **reference Step 5** in
295
+ **`docs/engineering/auto-orchestration-reference.md`** `## Steps` item 5):
296
+ advance through **all remaining phases** in the intersected resolved schedule
297
+ order until a **deterministic stop condition** fires (see **Stop matrix** in
298
+ `## Continuous multi-phase execution (US-0088)` above). When
299
+ `AUTO_BACKLOG_DRAIN=1`, repeat the story lifecycle for the next eligible OPEN
300
+ story, **reloading** scratchpad and **recomputing** the materialized phase
301
+ plan at each story boundary. Outer-driver equivalence applies when a single
302
+ invocation cannot schedule multiple subagent turns (**AC-1 Option B**).
303
+ `stop_reason`: `completed|decision_gate|missing_input|pause_request|loop_max|error|blocked`.
304
+ 6. Isolation evidence verification at each boundary (**reference** step 11a).
305
+ 7. At each phase boundary, verify strict runtime attestation tuple exists
192
306
  and is valid for the completed phase (`orchestrator_run_id`, `runtime_proof_id`,
193
- `phase_id`, `role`, `proof_issued_at`, `proof_ttl_seconds`, `proof_hash`).
194
- 8. Sync verdict recording when eligible — reference.
195
- 9. Backlog-drain / bulk per-item summaries when enabled — reference.
307
+ `phase_id`, `role`, `proof_issued_at`, `proof_ttl_seconds`, `proof_hash`)
308
+ (**reference** step 11b).
309
+ 8. Sync verdict recording when eligible — reference step 12.
310
+ 9. Backlog-drain / bulk per-item summaries when enabled — reference step 13.
196
311
 
197
312
  ## Backward compatibility
198
313
 
@@ -26,6 +26,13 @@ globs: ["**/*"]
26
26
  - Remote config security (DEC-0016): never commit secret literals (tokens,
27
27
  passwords, private keys) in `.cursor/remote.json`; use environment-variable
28
28
  references only (for example `tokenEnv`, `passwordEnv`, `privateKeyPathEnv`).
29
+ - `.env` exclusion (DEC-0071 / US-0085): do not open, attach, read, search
30
+ inside, or index `.env` or `.env.*` files. Use environment variable names
31
+ in prose only. Operators source `.env` outside agent context.
32
+ - Automation remote routing (US-0086): when `AUTO_REMOTE_AUTOMATION_PROFILE=off`,
33
+ keep local behavior and never silently reroute `TEST_COMMAND` to remote.
34
+ Explicit NL routing is limited to `start container <target_id>` and unknown or
35
+ disabled targets must fail closed with documented reason codes.
29
36
  - Performance by default: avoid obvious N+1 loops, repeated expensive work, and
30
37
  unnecessary I/O in hot paths.
31
38
  - Documentation by default: update relevant docs when behavior, setup, or usage
@@ -41,6 +41,17 @@ MAGIC_BENCH_SESSION=
41
41
  # - AUTO_EXECUTE_ON_BLOCK: stop|skip (behavior when a planned item blocks)
42
42
  # - AUTO_EXECUTE_SELECTION: planned_then_priority
43
43
  # - AUTO_TEAM_SCOPE_ENFORCE: 0|1 (when TEAM_MODE=1, enforce TEAM_MEMBER + ACTIVE_TASK_IDS)
44
+ # Optional bug-queue mode (US-0087) — default-off when absent/unset after merge
45
+ # - AUTO_BUG_QUEUE: 0|1 (1 = enable bug-targeted /auto; mutex vs AUTO_BACKLOG_DRAIN without bug-target argv)
46
+ # - AUTO_BUG_TARGET: all-open|BUG-#### (required when AUTO_BUG_QUEUE=1 unless bug-target= argv supplies target)
47
+ # - AUTO_BUG_MAX_ITEMS: non-negative integer (0 or unset = no cap for all-open queue per run)
48
+ # - AUTO_BUG_ON_BLOCK: stop|skip (bug segment pause/stop boundary)
49
+ # Quiet mode (US-0088) — suppress routine per-phase success chatter only
50
+ # - AUTO_QUIET: 0|1 (default 0; 1 = quiet routine notifications)
51
+ # Non-suppressible: decision_gate, errors, pause, loop_max, blocked, missing inputs.
52
+ # Orthogonal to TOKEN_PROFILE (DEC-0035 / US-0080) — TOKEN_PROFILE controls
53
+ # context breadth / token cost, not notification policy.
54
+ AUTO_QUIET=0
44
55
  AUTO_FLOW_MODE=auto_until_decision
45
56
  PHASE_MODE=interactive
46
57
  PERMISSION_MODE=interactive
@@ -55,6 +66,10 @@ AUTO_EXECUTE_MAX_ITEMS=1
55
66
  AUTO_EXECUTE_ON_BLOCK=stop
56
67
  AUTO_EXECUTE_SELECTION=planned_then_priority
57
68
  AUTO_TEAM_SCOPE_ENFORCE=1
69
+ AUTO_BUG_QUEUE=0
70
+ AUTO_BUG_TARGET=
71
+ AUTO_BUG_MAX_ITEMS=0
72
+ AUTO_BUG_ON_BLOCK=stop
58
73
  #
59
74
  # `/auto` phase role policy (US-0069 / DEC-0051)
60
75
  # - AUTO_ROLE_RESEARCH: po|tech-lead (empty -> default tech-lead)
@@ -101,11 +116,15 @@ SPRINT_BULK_MAX_STORIES=5
101
116
  SPRINT_BULK_MAX_SPRINTS=3
102
117
  SPRINT_BULK_SELECTION=priority_then_backlog_order
103
118
  #
104
- # Remote execution
119
+ # Remote execution (US-0086 / US-0084 / US-0064)
105
120
  # - REMOTE_EXECUTION: 0|1
106
121
  # - REMOTE_CONFIG: path to remote config
122
+ # - AUTO_REMOTE_AUTOMATION_PROFILE: off|deterministic_v1 (default off/manual-safe)
123
+ # - AUTO_REMOTE_ENVIRONMENT_LABEL: local|docker|ssh (names-only evidence label)
107
124
  REMOTE_EXECUTION=0
108
125
  REMOTE_CONFIG=.cursor/remote.json
126
+ AUTO_REMOTE_AUTOMATION_PROFILE=off
127
+ AUTO_REMOTE_ENVIRONMENT_LABEL=local
109
128
  #
110
129
  # Sync policy
111
130
  # - SYNC_POLICY_MODE: disabled|manual|by_phase|by_milestone|custom_phase_list
@@ -15,7 +15,7 @@
15
15
  # - DONE: 0|1 (stop hook loops)
16
16
  MAGIC_CONTEXT_STRICT=1
17
17
  LOOP_UNTIL_GREEN=1
18
- RUN_TESTS_ON_EDIT=0
18
+ RUN_TESTS_ON_EDIT=1
19
19
  AUTO_IMPLEMENTATION_LOOP=1
20
20
  AUTO_LOOP_MAX_CYCLES=5
21
21
  AUTO_PAUSE_REQUEST=0
@@ -41,13 +41,24 @@ MAGIC_BENCH_SESSION=
41
41
  # - AUTO_EXECUTE_ON_BLOCK: stop|skip (behavior when a planned item blocks)
42
42
  # - AUTO_EXECUTE_SELECTION: planned_then_priority
43
43
  # - AUTO_TEAM_SCOPE_ENFORCE: 0|1 (when TEAM_MODE=1, enforce TEAM_MEMBER + ACTIVE_TASK_IDS)
44
+ # Optional bug-queue mode (US-0087) — default-off when absent/unset after merge
45
+ # - AUTO_BUG_QUEUE: 0|1 (1 = enable bug-targeted /auto; mutex vs AUTO_BACKLOG_DRAIN without bug-target argv)
46
+ # - AUTO_BUG_TARGET: all-open|BUG-#### (required when AUTO_BUG_QUEUE=1 unless bug-target= argv supplies target)
47
+ # - AUTO_BUG_MAX_ITEMS: non-negative integer (0 or unset = no cap for all-open queue per run)
48
+ # - AUTO_BUG_ON_BLOCK: stop|skip (bug segment pause/stop boundary)
49
+ # Quiet mode (US-0088) — suppress routine per-phase success chatter only
50
+ # - AUTO_QUIET: 0|1 (default 0; 1 = quiet routine notifications)
51
+ # Non-suppressible: decision_gate, errors, pause, loop_max, blocked, missing inputs.
52
+ # Orthogonal to TOKEN_PROFILE (DEC-0035 / US-0080) — TOKEN_PROFILE controls
53
+ # context breadth / token cost, not notification policy.
54
+ AUTO_QUIET=0
44
55
  AUTO_FLOW_MODE=auto_until_decision
45
56
  PHASE_MODE=auto
46
57
  PERMISSION_MODE=auto
47
58
  AUTO_INSTALL_DEPS=1
48
59
  AUTO_RELEASE_NOTES=1
49
- AUTO_BACKLOG_DRAIN=0
50
- AUTO_BACKLOG_MAX_STORIES=1
60
+ AUTO_BACKLOG_DRAIN=1
61
+ AUTO_BACKLOG_MAX_STORIES=10
51
62
  AUTO_BACKLOG_ON_BLOCK=stop
52
63
  AUTO_STORY_SELECTION=priority_then_backlog_order
53
64
  AUTO_EXECUTE_BULK=0
@@ -55,6 +66,10 @@ AUTO_EXECUTE_MAX_ITEMS=1
55
66
  AUTO_EXECUTE_ON_BLOCK=stop
56
67
  AUTO_EXECUTE_SELECTION=planned_then_priority
57
68
  AUTO_TEAM_SCOPE_ENFORCE=1
69
+ AUTO_BUG_QUEUE=0
70
+ AUTO_BUG_TARGET=
71
+ AUTO_BUG_MAX_ITEMS=0
72
+ AUTO_BUG_ON_BLOCK=stop
58
73
  #
59
74
  # `/auto` phase role policy (US-0069 / DEC-0051)
60
75
  # - AUTO_ROLE_RESEARCH: po|tech-lead (empty -> default tech-lead)
@@ -101,15 +116,21 @@ SPRINT_BULK_MAX_STORIES=5
101
116
  SPRINT_BULK_MAX_SPRINTS=3
102
117
  SPRINT_BULK_SELECTION=priority_then_backlog_order
103
118
  #
104
- # Remote execution (US-0084 / US-0064)
119
+ # Remote execution (US-0086 / US-0084 / US-0064)
105
120
  # - REMOTE_EXECUTION: 0|1 — 0 skips remote.json validation (zero overhead; DEC-0070).
106
121
  # - REMOTE_CONFIG: path to dev/Cursor remote JSON (default .cursor/remote.json).
122
+ # - AUTO_REMOTE_AUTOMATION_PROFILE: off|deterministic_v1 (default off; manual
123
+ # mode remains unchanged unless explicitly enabled for automation workflows).
124
+ # - AUTO_REMOTE_ENVIRONMENT_LABEL: local|docker|ssh (names-only evidence label
125
+ # for execute/qa/release handoffs when automation routing is used).
107
126
  # Release/QA SSH/Docker connectivity fields live in docs/engineering/release-targets.json
108
127
  # (ssh-server, dockerOverSsh); map WSL vs SSH vs Docker-over-SSH in
109
128
  # docs/engineering/runtime-connectivity.md and docs/engineering/us-0084-remote-e2e.md.
110
129
  # - Summary helper (names-only stdout): python scripts/remote_config_summary.py
111
- REMOTE_EXECUTION=0
130
+ REMOTE_EXECUTION=1
112
131
  REMOTE_CONFIG=.cursor/remote.json
132
+ AUTO_REMOTE_AUTOMATION_PROFILE=off
133
+ AUTO_REMOTE_ENVIRONMENT_LABEL=local
113
134
  #
114
135
  # Sync policy
115
136
  # - SYNC_POLICY_MODE: disabled|manual|by_phase|by_milestone|custom_phase_list
@@ -118,10 +139,10 @@ REMOTE_CONFIG=.cursor/remote.json
118
139
  # - ALLOW_AUTO_PUSH: 0|1 (default off; explicit opt-in required)
119
140
  # - AUTO_PUSH_BRANCH_ALLOWLIST: comma-separated branches/patterns eligible for
120
141
  # auto-push. Protected/default branches are denied unless allowlisted.
121
- SYNC_POLICY_MODE=manual
142
+ SYNC_POLICY_MODE=by_phase
122
143
  SYNC_CUSTOM_PHASES=
123
- ALLOW_AUTO_PUSH=0
124
- AUTO_PUSH_BRANCH_ALLOWLIST=
144
+ ALLOW_AUTO_PUSH=1
145
+ AUTO_PUSH_BRANCH_ALLOWLIST=main
125
146
  #
126
147
  # Knowledge curation
127
148
  # - EARLY_RESEARCH: 0|1 (PO/TL search web during intake/architecture)
@@ -0,0 +1,5 @@
1
+ # Agent exclusion — secrets must not be ingested by AI tools (US-0085 / DEC-0071)
2
+ .env
3
+ .env.local
4
+ .env.*
5
+ !.env.example
@@ -0,0 +1,28 @@
1
+ # .env.example — operator-local secret values (US-0085 / DEC-0071)
2
+ # Copy to .env, fill in values, source before remote/SSH/release ops.
3
+ # .env is gitignored and must NEVER be committed.
4
+ # This file lists names only — no secret values.
5
+
6
+ # ── From template/.cursor/remote.json (Cursor dev/remote targets) ──
7
+ REMOTE_DOCKER_TOKEN=
8
+ REMOTE_SSH_USER=
9
+ REMOTE_SSH_KEY_PATH=
10
+
11
+ # ── From docs/engineering/release-targets.json (release/QA targets) ──
12
+ PUBLIC_DOMAIN=
13
+ CHOCO_API_KEY=
14
+ GITHUB_TOKEN=
15
+ DOCKER_TOKEN=
16
+ DOCKER_RUNTIME_HOST=
17
+ AWS_PROFILE=
18
+ APP_DOMAIN=
19
+ APP_IP=
20
+ CUSTOM_DOMAIN=
21
+ CUSTOM_IP=
22
+ SSH_HOST=
23
+ SSH_USER=
24
+ SSH_PRIVATE_KEY=
25
+ RUNTIME_DOMAIN=
26
+ RUNTIME_IP=
27
+ DOCKER_HOST=
28
+ DOCKER_CONTEXT=
@@ -44,6 +44,10 @@ Pick one method:
44
44
  | Chocolatey | `choco install its-magic` (Admin shell) |
45
45
  | Homebrew | `brew tap USER/tap && brew install its-magic` |
46
46
 
47
+ ### Global Linux install: empty `install_include_paths` (CRLF manifest)
48
+
49
+ If **`its-magic --target <repo> --mode missing`** fails with **`[INSTALL_MANIFEST_ERROR] install_include_paths section is empty`** on Debian/Linux while the packaged manifest still lists paths, the global install likely has **CRLF** line endings in **`installer-owned-paths.manifest`** (visible as **`^M$`** with **`cat -A`**). **Fix in-tree** from **`0.1.2-41`**: **`installer.sh`** strips trailing carriage returns before section matching; **`.gitattributes`** keeps **`*.manifest`** LF; **`prepublishOnly`** runs **`guard_installer_publish`**. **Upgrade**: install a build **≥ `0.1.2-41`** (or reinstall from a fresh **`npm pack`** tarball after pull). Older tarballs such as **`its-magic@0.1.2-40`** may remain broken until republished — see **`docs/engineering/architecture.md`** **`# BUG-0008`**.
50
+
47
51
  ### 2) Apply to a repo
48
52
 
49
53
  New repo: