its-magic 0.1.2-24 → 0.1.2-25
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 +6 -0
- package/package.json +1 -1
- package/template/.cursor/commands/refresh-context.md +9 -0
- package/template/.cursor/scratchpad.local.example.md +6 -0
- package/template/.cursor/scratchpad.md +21 -11
- package/template/README.md +6 -0
- package/template/docs/engineering/artifact-ordering-policy.md +10 -1
- package/template/docs/engineering/runbook.md +11 -0
package/README.md
CHANGED
|
@@ -318,6 +318,12 @@ Compaction behavior:
|
|
|
318
318
|
`docs/engineering/state-archive/`.
|
|
319
319
|
- `docs/engineering/decisions.md` stays a compact index with bounded summaries
|
|
320
320
|
and canonical links to `decisions/DEC-xxxx.md`.
|
|
321
|
+
- Enforced rollover thresholds:
|
|
322
|
+
- `STATE_HOT_MAX_LINES` (default `1200`)
|
|
323
|
+
- `STATE_HOT_MAX_CHECKPOINTS` (default `80`)
|
|
324
|
+
`/refresh-context` must archive oldest checkpoints into deterministic
|
|
325
|
+
`state-pack-*` files when thresholds are exceeded, keeping only bounded recent
|
|
326
|
+
checkpoints in hot surface.
|
|
321
327
|
|
|
322
328
|
`/ask` policy (read-only):
|
|
323
329
|
|
package/package.json
CHANGED
|
@@ -27,6 +27,12 @@ description: "its-magic refresh context: compact state and decisions."
|
|
|
27
27
|
1. Compact state and decisions into a short context pack.
|
|
28
28
|
2. Update sprint summary with current status.
|
|
29
29
|
3. Ensure handoffs and state are consistent.
|
|
30
|
+
4. Enforce state hot-surface rollover when configured thresholds are exceeded:
|
|
31
|
+
- evaluate `STATE_HOT_MAX_LINES` and `STATE_HOT_MAX_CHECKPOINTS` from
|
|
32
|
+
`.cursor/scratchpad.md`,
|
|
33
|
+
- archive oldest low-frequency checkpoints into deterministic pack files under
|
|
34
|
+
`docs/engineering/state-archive/`,
|
|
35
|
+
- preserve only bounded recent checkpoints in `docs/engineering/state.md`.
|
|
30
36
|
|
|
31
37
|
## Deterministic artifact ordering contract (US-0058 / DEC-0040)
|
|
32
38
|
|
|
@@ -38,4 +44,7 @@ description: "its-magic refresh context: compact state and decisions."
|
|
|
38
44
|
context section; historical details remain intact.
|
|
39
45
|
- Missing/ambiguous anchors fail with `ARTIFACT_ORDERING_ANCHOR_AMBIGUOUS`
|
|
40
46
|
(no partial write).
|
|
47
|
+
- Archive write or rollover boundary ambiguity fails with
|
|
48
|
+
`STATE_ARCHIVE_WRITE_FAILED` or `STATE_ARCHIVE_BOUNDARY_AMBIGUOUS`
|
|
49
|
+
(no partial write).
|
|
41
50
|
|
|
@@ -103,6 +103,10 @@ AUTO_PUSH_BRANCH_ALLOWLIST=
|
|
|
103
103
|
# - lean: lowest-token default profile; reduce non-critical automation/research intensity
|
|
104
104
|
# - balanced: default profile; preserves current behavior with moderate overhead
|
|
105
105
|
# - full: highest-context profile; maximize context breadth/autonomy
|
|
106
|
+
# - STATE_HOT_MAX_LINES: integer >= 200 (hot-surface soft cap trigger for
|
|
107
|
+
# archival rollover checks)
|
|
108
|
+
# - STATE_HOT_MAX_CHECKPOINTS: integer >= 10 (max recent checkpoints to retain
|
|
109
|
+
# in `state.md` after rollover)
|
|
106
110
|
# - Manual-override precedence: explicit flag values in this file remain authoritative
|
|
107
111
|
# for that flag and override profile defaults.
|
|
108
112
|
EARLY_RESEARCH=1
|
|
@@ -110,6 +114,8 @@ INTAKE_GUIDED_MODE=1
|
|
|
110
114
|
INTAKE_SUBAGENT_FALLBACK=deny
|
|
111
115
|
ID_NAMESPACE_BOOTSTRAP=0
|
|
112
116
|
TOKEN_PROFILE=balanced
|
|
117
|
+
STATE_HOT_MAX_LINES=1200
|
|
118
|
+
STATE_HOT_MAX_CHECKPOINTS=80
|
|
113
119
|
#
|
|
114
120
|
# Publish targets
|
|
115
121
|
# - RELEASE_PUBLISH_MODE: disabled|confirm|auto
|
|
@@ -41,11 +41,11 @@ 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
|
-
AUTO_FLOW_MODE=
|
|
44
|
+
AUTO_FLOW_MODE=auto_until_decision
|
|
45
45
|
PHASE_MODE=interactive
|
|
46
46
|
PERMISSION_MODE=interactive
|
|
47
47
|
AUTO_INSTALL_DEPS=0
|
|
48
|
-
AUTO_RELEASE_NOTES=
|
|
48
|
+
AUTO_RELEASE_NOTES=1
|
|
49
49
|
AUTO_BACKLOG_DRAIN=0
|
|
50
50
|
AUTO_BACKLOG_MAX_STORIES=1
|
|
51
51
|
AUTO_BACKLOG_ON_BLOCK=stop
|
|
@@ -56,6 +56,14 @@ AUTO_EXECUTE_ON_BLOCK=stop
|
|
|
56
56
|
AUTO_EXECUTE_SELECTION=planned_then_priority
|
|
57
57
|
AUTO_TEAM_SCOPE_ENFORCE=1
|
|
58
58
|
#
|
|
59
|
+
# Team mode
|
|
60
|
+
# - TEAM_MODE: 0|1 (enable task/member scoped team workflow)
|
|
61
|
+
# - TEAM_MEMBER: short id for current developer
|
|
62
|
+
# - ACTIVE_TASK_IDS: comma-separated task ids (for example T-12,T-13)
|
|
63
|
+
TEAM_MODE=0
|
|
64
|
+
TEAM_MEMBER=
|
|
65
|
+
ACTIVE_TASK_IDS=
|
|
66
|
+
#
|
|
59
67
|
# Sprint planning
|
|
60
68
|
# - SPRINT_MAX_TASKS: integer >= 1 (max atomic tasks per sprint, default 12)
|
|
61
69
|
# - SPRINT_AUTO_SPLIT: 0|1 (propose splitting when over threshold)
|
|
@@ -86,7 +94,7 @@ SYNC_CUSTOM_PHASES=
|
|
|
86
94
|
ALLOW_AUTO_PUSH=0
|
|
87
95
|
AUTO_PUSH_BRANCH_ALLOWLIST=
|
|
88
96
|
#
|
|
89
|
-
# Knowledge curation
|
|
97
|
+
# Knowledge curation / intake
|
|
90
98
|
# - EARLY_RESEARCH: 0|1 (PO/TL search web during intake/architecture)
|
|
91
99
|
# - INTAKE_GUIDED_MODE: 0|1 (guided intake follow-up/options/research behavior)
|
|
92
100
|
# - INTAKE_SUBAGENT_FALLBACK: deny|allow (deny by default; when deny, missing
|
|
@@ -96,6 +104,10 @@ AUTO_PUSH_BRANCH_ALLOWLIST=
|
|
|
96
104
|
# - lean: lowest-token default profile; reduce non-critical automation/research intensity
|
|
97
105
|
# - balanced: default profile; preserves current behavior with moderate overhead
|
|
98
106
|
# - full: highest-context profile; maximize context breadth/autonomy
|
|
107
|
+
# - STATE_HOT_MAX_LINES: integer >= 200 (hot-surface soft cap trigger for
|
|
108
|
+
# archival rollover checks)
|
|
109
|
+
# - STATE_HOT_MAX_CHECKPOINTS: integer >= 10 (max recent checkpoints to retain
|
|
110
|
+
# in `state.md` after rollover)
|
|
99
111
|
# - Manual-override precedence: explicit flag values in this file remain authoritative
|
|
100
112
|
# for that flag and override profile defaults.
|
|
101
113
|
EARLY_RESEARCH=1
|
|
@@ -103,8 +115,10 @@ INTAKE_GUIDED_MODE=1
|
|
|
103
115
|
INTAKE_SUBAGENT_FALLBACK=deny
|
|
104
116
|
ID_NAMESPACE_BOOTSTRAP=0
|
|
105
117
|
TOKEN_PROFILE=balanced
|
|
118
|
+
STATE_HOT_MAX_LINES=1200
|
|
119
|
+
STATE_HOT_MAX_CHECKPOINTS=80
|
|
106
120
|
|
|
107
|
-
# Publish targets
|
|
121
|
+
# Publish targets
|
|
108
122
|
# - RELEASE_PUBLISH_MODE: disabled|confirm|auto
|
|
109
123
|
# - disabled: skip post-release publish target execution
|
|
110
124
|
# - confirm: require explicit operator confirmation before publish (default)
|
|
@@ -124,7 +138,7 @@ RELEASE_TARGETS_DEFAULT=
|
|
|
124
138
|
SECURITY_REVIEW=0
|
|
125
139
|
COMPLIANCE_PROFILES=GDPR
|
|
126
140
|
|
|
127
|
-
#
|
|
141
|
+
# Compatibility observability
|
|
128
142
|
# - CROSS_REPO_OBSERVABILITY: 0|1 (enable compatibility visibility and checks)
|
|
129
143
|
# - COMPATIBILITY_GATE_ON_CRITICAL: 0|1 (when enabled, critical unresolved
|
|
130
144
|
# compatibility findings trigger decision gate before release)
|
|
@@ -134,19 +148,15 @@ CROSS_REPO_OBSERVABILITY=0
|
|
|
134
148
|
COMPATIBILITY_GATE_ON_CRITICAL=1
|
|
135
149
|
COMPATIBILITY_SOURCES=
|
|
136
150
|
|
|
137
|
-
# Component
|
|
151
|
+
# Component scope
|
|
138
152
|
# - COMPONENT_SCOPE_MODE: 0|1 (enable scoped planning/execution guardrails)
|
|
139
153
|
# - TARGET_COMPONENTS: comma-separated component IDs intended in scope
|
|
140
154
|
COMPONENT_SCOPE_MODE=0
|
|
141
155
|
TARGET_COMPONENTS=
|
|
142
156
|
|
|
143
|
-
# Optional
|
|
157
|
+
# Optional docs packs
|
|
144
158
|
# - SPEC_PACK_MODE: 0|1 (enable Design Concept, CRS, Technical Spec generation/validation; default 0)
|
|
145
159
|
# When 0, intake/architecture/release add no required spec-pack steps.
|
|
146
160
|
SPEC_PACK_MODE=0
|
|
147
|
-
|
|
148
|
-
# Optional user-guide documentation (US-0032)
|
|
149
|
-
# - USER_GUIDE_MODE: 0|1 (enable per-feature user guides at docs/user-guides/US-xxxx.md; default 0)
|
|
150
|
-
# When 0, intake/architecture/sprint-plan/execute/qa/release add no required user-guide steps or blocking checks.
|
|
151
161
|
USER_GUIDE_MODE=0
|
|
152
162
|
|
package/template/README.md
CHANGED
|
@@ -318,6 +318,12 @@ Compaction behavior:
|
|
|
318
318
|
`docs/engineering/state-archive/`.
|
|
319
319
|
- `docs/engineering/decisions.md` stays a compact index with bounded summaries
|
|
320
320
|
and canonical links to `decisions/DEC-xxxx.md`.
|
|
321
|
+
- Enforced rollover thresholds:
|
|
322
|
+
- `STATE_HOT_MAX_LINES` (default `1200`)
|
|
323
|
+
- `STATE_HOT_MAX_CHECKPOINTS` (default `80`)
|
|
324
|
+
`/refresh-context` must archive oldest checkpoints into deterministic
|
|
325
|
+
`state-pack-*` files when thresholds are exceeded, keeping only bounded recent
|
|
326
|
+
checkpoints in hot surface.
|
|
321
327
|
|
|
322
328
|
`/ask` policy (read-only):
|
|
323
329
|
|
|
@@ -8,7 +8,7 @@ anchors are missing or ambiguous.
|
|
|
8
8
|
|
|
9
9
|
| Artifact | Policy | Deterministic rule |
|
|
10
10
|
|---|---|---|
|
|
11
|
-
| `docs/engineering/state.md` | `append-bottom` | Add new checkpoints only at end of file, in chronological order. |
|
|
11
|
+
| `docs/engineering/state.md` | `append-bottom` | Add new checkpoints only at end of file, in chronological order; enforce hot-surface rollover when configured thresholds are exceeded. |
|
|
12
12
|
| `docs/product/backlog.md` | `sorted-canonical` | Keep stories sorted by numeric `US-xxxx` ID; mutate only target story block. |
|
|
13
13
|
| `docs/product/acceptance.md` | `sorted-canonical` | Keep `US-xxxx` rows ordered by numeric ID aligned to backlog order. |
|
|
14
14
|
| `handoffs/release_queue.md` | `append-bottom` | Append only one row per new sprint in release order. |
|
|
@@ -22,6 +22,8 @@ anchors are missing or ambiguous.
|
|
|
22
22
|
- No broad rewrites of unrelated story/sprint entries.
|
|
23
23
|
- For `docs/engineering/state.md`, each newly appended checkpoint timestamp must
|
|
24
24
|
be monotonic (`new_timestamp >= last_checkpoint_timestamp`) in UTC.
|
|
25
|
+
- For rollover reruns, archive partition boundaries and pack naming must be
|
|
26
|
+
deterministic (no duplicate or oscillating pack generation).
|
|
25
27
|
|
|
26
28
|
## Fail-safe behavior
|
|
27
29
|
|
|
@@ -35,3 +37,10 @@ checkpoint timestamp:
|
|
|
35
37
|
- stop with reason code `STATE_TIMESTAMP_NON_MONOTONIC`,
|
|
36
38
|
- emit remediation guidance with the expected minimum timestamp,
|
|
37
39
|
- perform no partial mutation.
|
|
40
|
+
|
|
41
|
+
If configured state hot-surface rollover cannot determine a safe archive
|
|
42
|
+
boundary or cannot persist archive pack writes:
|
|
43
|
+
- stop with reason code `STATE_ARCHIVE_BOUNDARY_AMBIGUOUS` or
|
|
44
|
+
`STATE_ARCHIVE_WRITE_FAILED`,
|
|
45
|
+
- emit remediation guidance with threshold/boundary details and target path,
|
|
46
|
+
- perform no partial mutation.
|
|
@@ -131,6 +131,17 @@ Context compaction policy:
|
|
|
131
131
|
append-only/non-destructive.
|
|
132
132
|
- `docs/engineering/decisions.md` is a compact index with bounded summaries and
|
|
133
133
|
canonical links to full records in `decisions/DEC-xxxx.md`.
|
|
134
|
+
- Enforced rollover thresholds:
|
|
135
|
+
- `STATE_HOT_MAX_LINES` (default `1200`)
|
|
136
|
+
- `STATE_HOT_MAX_CHECKPOINTS` (default `80`)
|
|
137
|
+
When either threshold is exceeded during `/refresh-context`, older checkpoints
|
|
138
|
+
are archived into deterministic `state-pack-*` files and only bounded recent
|
|
139
|
+
checkpoints remain in hot surface.
|
|
140
|
+
|
|
141
|
+
Rollover fail-safe reason codes:
|
|
142
|
+
|
|
143
|
+
- `STATE_ARCHIVE_BOUNDARY_AMBIGUOUS`
|
|
144
|
+
- `STATE_ARCHIVE_WRITE_FAILED`
|
|
134
145
|
|
|
135
146
|
`/ask` retrieval policy:
|
|
136
147
|
|