taskforce-loop-engineering 0.7.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.
@@ -0,0 +1,232 @@
1
+ ---
2
+ name: "taskforce-loop-engineering"
3
+ description: "Durable explicit task/project loops with verification, revisions, live progress, and governed completion."
4
+ ---
5
+
6
+ # Taskforce Loop Engineering
7
+
8
+ Use this skill only when the user explicitly invokes Loop Engineering, says `走 loop`, `loop engineering`, `丢进 Ironman loop`, `loop Ironman`, `task-runner`, names a loop queue, or asks to operate an existing loop.
9
+
10
+ Do not route ordinary chat, research, explanations, or simple direct tasks into a loop unless the user explicitly invokes it.
11
+
12
+ ## Conversation Contract
13
+
14
+ Interpret explicit loop language as follows:
15
+
16
+ - `走 loop:<task>`: enqueue and immediately execute one runner tick with notification.
17
+ - `走 loop 并立刻执行`: synonym for the default above.
18
+ - `走 loop,只入队`, `只排队`, `暂不执行`, or `不立即执行`: enqueue without starting a tick.
19
+ - `继续当前 loop,补充要求:…`: amend the active task in place. Preserve the task id and worker session, write a versioned amendment, update the task contract/dev plan/acceptance plan, and require the worker to reread the latest amendment before checkpoints and completion.
20
+ - A new explicit `走 loop` request while another task is active is a correction/replacement, not ordinary backlog. Supersede the active task at a safe boundary, retain its evidence and lineage, then start the replacement after the lock is released.
21
+ - Status, progress, evidence, or failure questions are read-only and must not start another tick unless the user explicitly asks to continue/run.
22
+
23
+ In this workspace, the default queue is `ironman-task-runner` when no queue is named. Use the installed workspace wrapper when present:
24
+
25
+ ```bash
26
+ node scripts/loops/ironman-task-runner.mjs route --message "<original user message>" --confirm-execute [source options]
27
+ node scripts/loops/ironman-task-runner.mjs run-once --notify
28
+ node scripts/loops/ironman-task-runner.mjs status --json
29
+ node scripts/loops/ironman-task-runner.mjs peek --json
30
+ ```
31
+
32
+ Pass the original request faithfully. Preserve source channel, target, account, message id, and reply-to metadata so progress, human gates, and terminal results return to the originating conversation. Missing delivery routing must fail closed.
33
+
34
+ ## Task vs Project Classification
35
+
36
+ Classify scope before enqueueing.
37
+
38
+ ### Scoped task
39
+
40
+ A bounded change, diagnosis, review, or deliverable with a clear local acceptance target can use one task contract.
41
+
42
+ ### Project-level objective
43
+
44
+ Treat a request as project-level when the user asks to build/develop/finish a complete product or system, achieve an overall outcome, or otherwise describes a multi-milestone terminal goal.
45
+
46
+ For a project-level objective:
47
+
48
+ 1. Run project intake and create a project spec.
49
+ 2. Write an explicit terminal-state/completion contract.
50
+ 3. Build a complete backlog covering every requirement and known acceptance dimension.
51
+ 4. Link queue tasks to the project backlog and terminal contract.
52
+ 5. Continue through implementation, verification, revisions, and the next actionable backlog item within the authorized safety boundary.
53
+ 6. Stop only when total project acceptance passes, or a genuine human authorization/product decision/external-state blocker prevents meaningful progress.
54
+
55
+ Never silently narrow a complete-project request into “first milestone” and call that the Loop complete. A single queue task or milestone may be complete while the project remains active.
56
+
57
+ Recommended commands:
58
+
59
+ ```bash
60
+ loop-engineering project-intake --root <workspace> --name <project> --brief "<full brief>" --type auto
61
+ loop-engineering project-plan --root <workspace> --project <project>
62
+ loop-engineering project-status --root <workspace> --project <project>
63
+ ```
64
+
65
+ The project completion contract must contain:
66
+
67
+ - terminal user-visible outcome;
68
+ - in-scope and explicitly out-of-scope capabilities;
69
+ - complete requirement/backlog mapping;
70
+ - acceptance checks and evidence locations;
71
+ - operational/security/data/deployment requirements when relevant;
72
+ - unresolved decisions and required authority;
73
+ - a rule that milestone completion cannot satisfy project completion;
74
+ - final acceptance status with unmet items and blockers.
75
+
76
+ If implementation reveals missing work, amend the project backlog/contract before continuing. Do not redefine the terminal goal downward to fit completed work.
77
+
78
+ ## Completion Semantics
79
+
80
+ Use precise language:
81
+
82
+ - `阶段完成` or `任务完成`: one task/milestone passed its own acceptance checks.
83
+ - `项目完成` or `Loop 跑完`: only when the project completion contract is fully accepted and no required work remains.
84
+ - `blocked`: only for a concrete blocker requiring human authority/input or an external state change, with evidence and a specific unblock request.
85
+ - `needs_revision`: acceptance found actionable gaps; create a changed-strategy revision rather than claiming completion.
86
+ - `superseded`: a newer explicit loop request replaced the task; preserve lineage and evidence.
87
+
88
+ Final reporting for project work must always state both task/milestone status and total-project status.
89
+
90
+ ## Safety and Authority
91
+
92
+ Loop invocation authorizes the requested workflow, not unlimited external action.
93
+
94
+ Require separate explicit confirmation for:
95
+
96
+ - external messages, publication, social posting, or outreach;
97
+ - destructive deletion or difficult-to-recover changes;
98
+ - production configuration/deployment changes not already clearly requested;
99
+ - credential creation/change/exposure;
100
+ - paid model/API usage beyond an established budget;
101
+ - memory deletion or migration;
102
+ - device/process instrumentation such as `frida`, `tcpdump`, `adb`, `mitmproxy`, hooks, attach/spawn, decrypt, `su`, `kill`, or `pkill`.
103
+
104
+ Human permission prompts and missing authorization are stop conditions, not retryable failures. `INSTALL_FAILED_USER_RESTRICTED`, device unauthorized, permission denied, and equivalent states require a concrete human-action gate.
105
+
106
+ Timeouts must terminate the spawned process group. After instrumentation timeouts, verify that no child instrumentation/proxy process remains.
107
+
108
+ ## Operating Flow
109
+
110
+ 1. Read existing project docs, loop configs, queue state, and relevant dirty worktree state.
111
+ 2. Classify task vs project and define the correct contract before execution.
112
+ 3. Use `route-message` or the installed conversation wrapper to preserve source metadata and apply immediate/queue-only/amend/supersede semantics.
113
+ 4. Run preflight before mutable work.
114
+ 5. Execute one bounded tick or the project’s next actionable backlog item.
115
+ 6. Emit ordered progress: planning, preflight, worker start, checkpoints, verification, acceptance, final judgement.
116
+ 7. Inspect run artifacts; never infer success only from dispatcher exit code.
117
+ 8. If acceptance fails, write a revision request with changed diagnosis/tactic/evidence/verification.
118
+ 9. Run `doctor` after configuration or queue changes.
119
+ 10. For projects, re-read project status and completion contract, then automatically advance to the next safe actionable item.
120
+ 11. Report terminal status with evidence, unmet items, blockers, and next action.
121
+
122
+ Do not add cron/timers until one manual tick passes.
123
+
124
+ ## Core CLI
125
+
126
+ Prefer the installed CLI:
127
+
128
+ ```bash
129
+ loop-engineering verify --root <workspace>
130
+ loop-engineering doctor --root <workspace> [--json]
131
+ loop-engineering summarize --root <workspace> --limit 20
132
+ loop-engineering route-message --root <workspace> --message "<message>" --queue <queue> --route --confirm-execute [--supersede-active | --amend-active] [source options]
133
+ loop-engineering queue-status --root <workspace> --queue <queue>
134
+ loop-engineering queue-peek --root <workspace> --queue <queue>
135
+ loop-engineering run-queue --root <workspace> --config configs/loops/queues/<queue>.json
136
+ loop-engineering queue-revision-next --root <workspace> --queue <queue> --task-id <id>
137
+ loop-engineering queue-lineage --root <workspace> --queue <queue> --task-id <id>
138
+ loop-engineering queue-lineage-bundle --root <workspace> --queue <queue> --task-id <id>
139
+ loop-engineering queue-human-decision --root <workspace> --queue <queue> --task-id <id> --decision approve|request_changes|reject
140
+ loop-engineering queue-human-input-resolve --root <workspace> --queue <queue> --gate-id <task:checkpoint> --input "<response>"
141
+ loop-engineering queue-terminal-notify --root <workspace> --queue <queue> (--notify-command "<command>" | --dry-run)
142
+ loop-engineering queue-human-input-notify --root <workspace> --queue <queue> (--notify-command "<command>" | --dry-run)
143
+ ```
144
+
145
+ If the package is available only in the workspace:
146
+
147
+ ```bash
148
+ node packages/loop-engineering/bin/loop-engineering.mjs <command>
149
+ ```
150
+
151
+ Use `run-queue-drain` only when batch draining is explicitly intended. Conversation routing normally runs one task/tick and uses supersede/amend behavior.
152
+
153
+ ## Revision Discipline
154
+
155
+ A dispatcher-successful run is not automatically accepted. Inspect `final_judgement.json`, acceptance reviews, checkpoints, and verification evidence.
156
+
157
+ When acceptance needs changes:
158
+
159
+ - mark `needs_revision`;
160
+ - retain the failed source task;
161
+ - use `queue-revision-next`;
162
+ - require a changed diagnosis, implementation tactic, evidence source, or verification step;
163
+ - inspect lineage before forcing repeated attempts.
164
+
165
+ Default revision policy may stop after three rounds, two repeated goal signatures, or repeated unchanged strategy. `--force` requires an explicit human override after lineage review.
166
+
167
+ ## Code Work
168
+
169
+ For L2 code-changing tasks, prefer isolated worktrees. The runner prepares reviewable local changes and verification evidence; it does not implicitly commit, push, publish, deploy, merge, or delete branches.
170
+
171
+ Safe review flow:
172
+
173
+ ```bash
174
+ loop-engineering code-task-status --root <workspace> --queue <queue>
175
+ loop-engineering code-worktree-inspect --root <workspace> --queue <queue> --task-id <id>
176
+ loop-engineering code-worktree-diff --root <workspace> --queue <queue> --task-id <id>
177
+ loop-engineering code-task-autoflow --root <workspace> --queue <queue> --task-id <id> --until closeout
178
+ loop-engineering code-patch-apply-plan --root <workspace> --patch <patch> --json
179
+ ```
180
+
181
+ Applying a patch and cleaning a worktree require their explicit confirmation flags. Preserve unrelated user changes and never treat a dirty worktree as disposable.
182
+
183
+ ## Observability and Artifacts
184
+
185
+ Use read-only diagnostics before mutation:
186
+
187
+ ```bash
188
+ loop-engineering doctor --root <workspace> --json
189
+ loop-engineering summarize --root <workspace> --queue <queue> --limit 20
190
+ loop-engineering project-status --root <workspace> --project <project>
191
+ ```
192
+
193
+ Task artifacts live under:
194
+
195
+ ```text
196
+ runtime/loops/<queue>/tasks/<task_id>/
197
+ runtime/loops/<queue>/runs/
198
+ runtime/loops/<queue>/{inbox,active,done,failed,canceled}/
199
+ ```
200
+
201
+ Expected evidence includes `task_contract.json`, `acceptance_plan.json`, `dev_plan.json`, checkpoints, acceptance reviews, `final_judgement.json`, revision requests, amendments, supersede markers, progress notifications, and lineage bundles.
202
+
203
+ Project artifacts live under:
204
+
205
+ ```text
206
+ configs/loops/projects/<project>.json
207
+ runtime/loops/projects/<project>/
208
+ ```
209
+
210
+ Summaries must cite the latest run/task/project evidence, verification performed, unmet checks, and blocker reason. Keep raw noisy logs in runtime artifacts; durable memory receives only distilled decisions, recurring failures, accepted safety rules, and verified completion facts.
211
+
212
+ ## Scheduler Policy
213
+
214
+ Use scheduler ticks only after manual verification. Adaptive schedules may speed up with successful queued work and back off on empty queues, failures, long runs, or human gates.
215
+
216
+ Progress notification must be scoped and idempotent. Report failures, human gates, status changes, and terminal completion promptly; throttle routine progress and idle updates.
217
+
218
+ ## Final Checklist
219
+
220
+ Before saying a loop is finished, verify:
221
+
222
+ - Was this a scoped task or project-level objective?
223
+ - Is the correct contract present and current?
224
+ - Were all amendments applied?
225
+ - Did verification and acceptance pass?
226
+ - Is `final_judgement.json` acceptable?
227
+ - For a project, are all completion-contract items accepted and the backlog terminal?
228
+ - Are there any unmet requirements, pending revisions, gates, or external-write confirmations?
229
+ - Does the report distinguish milestone status from total-project status?
230
+ - Are evidence paths and next actions included?
231
+
232
+ If any project requirement remains, report a phase/task result and continue with the next authorized item; do not claim the project or Loop is complete.
@@ -0,0 +1,117 @@
1
+ # npm Package
2
+
3
+ Package name: `taskforce-loop-engineering`
4
+ Version: `0.7.0`
5
+
6
+ Install from npm:
7
+
8
+ ```bash
9
+ npm install -g taskforce-loop-engineering
10
+ ```
11
+
12
+ Installed commands:
13
+
14
+ ```bash
15
+ loop-engineering init --root /path/to/workspace
16
+ loop-engineering verify --root /path/to/workspace
17
+ loop-engineering run --root /path/to/workspace --config configs/loops/<id>.json
18
+ loop-engineering status --root /path/to/workspace
19
+ loop-engineering doctor --root /path/to/workspace
20
+ loop-engineering summarize --root /path/to/workspace --limit 20
21
+ loop-engineering project-intake --root /path/to/workspace --name <project> --brief "Project brief"
22
+ loop-engineering project-plan --root /path/to/workspace --project <project>
23
+ loop-engineering project-status --root /path/to/workspace --project <project>
24
+ loop-engineering enqueue --root /path/to/workspace --queue <queue> --title "Title" --task "Task body"
25
+ loop-engineering queue-init --root /path/to/workspace --queue <queue>
26
+ loop-engineering code-queue-init --root /path/to/workspace --queue <queue>
27
+ loop-engineering run-queue --root /path/to/workspace --config configs/loops/queues/<queue>.json
28
+ loop-engineering queue-status --root /path/to/workspace --queue <queue>
29
+ loop-engineering queue-scheduler-tick --root /path/to/workspace --config configs/loops/queues/<queue>.json
30
+ loop-engineering queue-peek --root /path/to/workspace --queue <queue>
31
+ loop-engineering queue-cancel --root /path/to/workspace --queue <queue> --task-id <id>
32
+ loop-engineering queue-requeue --root /path/to/workspace --queue <queue> --task-id <id>
33
+ loop-engineering queue-revision-next --root /path/to/workspace --queue <queue> --task-id <id>
34
+ loop-engineering queue-lineage --root /path/to/workspace --queue <queue> --task-id <id>
35
+ loop-engineering queue-lineage-bundle --root /path/to/workspace --queue <queue> --task-id <id>
36
+ loop-engineering queue-human-decision --root /path/to/workspace --queue <queue> --task-id <id> --decision approve|request_changes|reject
37
+ loop-engineering code-worktree-list --root /path/to/workspace --queue <queue>
38
+ loop-engineering code-worktree-inspect --root /path/to/workspace --queue <queue> --task-id <id>
39
+ loop-engineering code-worktree-diff --root /path/to/workspace --queue <queue> --task-id <id>
40
+ loop-engineering code-worktree-export --root /path/to/workspace --queue <queue> --task-id <id>
41
+ loop-engineering code-patch-verify --root /path/to/workspace --patch runtime/loops/<queue>/patches/<id>.patch
42
+ loop-engineering code-patch-apply-plan --root /path/to/workspace --patch runtime/loops/<queue>/patches/<id>.patch
43
+ loop-engineering code-patch-apply --root /path/to/workspace --patch runtime/loops/<queue>/patches/<id>.patch --confirm-apply
44
+ loop-engineering code-review-bundle --root /path/to/workspace --queue <queue> --task-id <id>
45
+ loop-engineering code-task-closeout --root /path/to/workspace --queue <queue> --task-id <id>
46
+ loop-engineering code-task-autoflow --root /path/to/workspace --queue <queue> --task-id <id>
47
+ loop-engineering code-task-autoflow --root /path/to/workspace --queue <queue> --all-actionable --until closeout
48
+ loop-engineering code-task-finish --root /path/to/workspace --queue <queue> --task-id <id> --confirm-apply --confirm-cleanup
49
+ loop-engineering code-task-run --root /path/to/workspace --queue <queue> --title "Title" --task "Task body" --confirm-apply --confirm-cleanup
50
+ loop-engineering code-task-dashboard --root /path/to/workspace --queue <queue>
51
+ loop-engineering code-task-status --root /path/to/workspace --queue <queue>
52
+ loop-engineering code-worktree-cleanup-plan --root /path/to/workspace --queue <queue>
53
+ loop-engineering code-worktree-cleanup --root /path/to/workspace --queue <queue> --confirm-cleanup
54
+ agent-loop status --root /path/to/workspace
55
+ LOOP_WORKDIR=/path/to/workspace run-loop-cron.sh configs/loops/<id>.json
56
+ ```
57
+
58
+ `code-queue-init` creates an L2 assisted code queue config. Each task runs in
59
+ an isolated git worktree and branch, then runs configured verification commands
60
+ and records diff/status summaries. It does not push, merge, or delete
61
+ worktrees.
62
+
63
+ `queue-scheduler-tick` is the adaptive queue cadence command. It treats 10
64
+ minutes as the bootstrap interval, writes live cadence state to
65
+ `runtime/loops/<queue>/scheduler/state.json`, speeds up after successful work
66
+ when tasks remain queued, and backs off for empty queues, failures, human gates,
67
+ or long runs.
68
+
69
+ `project-intake` is the high-level entry for fuzzy project briefs. It writes a
70
+ deterministic project spec draft, human-readable plan, action policy, checks,
71
+ and initial backlog under `runtime/loops/projects/<project>/` without enqueuing
72
+ or executing work. `project-plan` solidifies that draft into
73
+ `configs/loops/projects/<project>.json`, generates the queue config, and writes
74
+ the initial backlog artifact. `project-status` aggregates the project queues
75
+ without changing queue state.
76
+
77
+ `code-worktree-list`, `code-worktree-inspect`, `code-worktree-diff`,
78
+ `code-worktree-export`, `code-patch-verify`, `code-patch-apply-plan`,
79
+ `code-patch-apply`, `code-review-bundle`, `code-task-closeout`,
80
+ `code-task-autoflow`, `code-task-finish`, `code-task-run`, `code-task-dashboard`,
81
+ `code-task-status`, `code-worktree-cleanup-plan`, and
82
+ `code-worktree-cleanup`
83
+ are review and
84
+ handoff commands for code queues.
85
+ They report branch, path, dirty status, verification status, diff summaries,
86
+ patch output, exported patch artifacts, untracked files, whether an exported
87
+ patch still passes `git apply --check --binary`, whether it is safe to apply,
88
+ review bundle files, which retained worktrees are cleanup candidates, and
89
+ confirmation-gated cleanup of reviewed worktrees. Closeout artifacts summarize
90
+ the task's final review, patch, apply-plan, cleanup, and next-action state.
91
+ Status ledgers summarize task-level queue, worktree, patch, review, closeout,
92
+ cleanup, and next-action state without writing artifacts.
93
+ Dashboards summarize queue counts, task counts, next-action counts,
94
+ cleanup/orphan state, priority tasks, and recommended commands without writing
95
+ artifacts.
96
+ Finish applies one reviewed patch to the main workspace and removes that one
97
+ reviewed worktree only after default patch, review, and closeout artifacts are
98
+ present and both `--confirm-apply` and `--confirm-cleanup` are supplied; it
99
+ also writes a finish artifact. Status and dashboard views read finish artifacts:
100
+ tasks ready to land report `ready_to_finish`, and successfully finished tasks
101
+ report `landed` with finish status, patch-applied, and worktree-cleaned fields.
102
+ Task run enqueues one code task, processes one worktree queue run, runs
103
+ autoflow through closeout, finishes the reviewed task, and reruns configured
104
+ worktree verification commands in the main workspace.
105
+ Autoflow runs export, patch verification, apply-plan, and review generation by
106
+ default, and can also write closeout artifacts with `--until closeout`; it skips
107
+ existing artifacts unless `--force` is supplied. Batch autoflow with
108
+ `--all-actionable` reads the status ledger and runs the same safe flow across
109
+ tasks that need export, review, or closeout artifacts.
110
+ Actual patch application requires `--confirm-apply` and still does not stage,
111
+ commit, push, merge, or change queue state.
112
+ Actual worktree cleanup requires `--confirm-cleanup`; dirty worktrees require a
113
+ default exported patch, passing patch verification, and an existing review
114
+ bundle.
115
+
116
+ The package contains `bin/`, `lib/`, `scripts/`, `templates/`, and
117
+ `skills/taskforce-loop-engineering/`.
@@ -0,0 +1,41 @@
1
+ {
2
+ "queue": "code-tasks",
3
+ "description": "L2 assisted code task queue. Each task runs in an isolated git worktree and records verification plus diff summaries. It never pushes, merges, or deletes worktrees.",
4
+ "dispatcher": "node scripts/dispatch-code-task.mjs",
5
+ "preflightConfig": "configs/loops/workspace-health.json",
6
+ "timeoutMs": 1800000,
7
+ "leaseMs": 1860000,
8
+ "staleActiveMs": 3600000,
9
+ "retry": {
10
+ "maxAttempts": 1,
11
+ "retryDelayMs": 0,
12
+ "retryExitCodes": [
13
+ 1
14
+ ],
15
+ "requiresHumanActionPatterns": [
16
+ "INSTALL_FAILED_USER_RESTRICTED",
17
+ "device unauthorized",
18
+ "no devices/emulators found",
19
+ "Permission denied",
20
+ "Operation not permitted",
21
+ "requires human",
22
+ "需要人工",
23
+ "权限未开"
24
+ ]
25
+ },
26
+ "revisionPolicy": {
27
+ "enabled": true,
28
+ "maxRevisionRounds": 3,
29
+ "sameFailureThreshold": 2,
30
+ "requireStrategyChange": true
31
+ },
32
+ "worktree": {
33
+ "enabled": true,
34
+ "baseDir": "runtime/loops/code-tasks/worktrees",
35
+ "branchPrefix": "loop/code-tasks",
36
+ "verifyCommands": [
37
+ "npm test"
38
+ ],
39
+ "keepOnSuccess": true
40
+ }
41
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "queue": "agent-tasks",
3
+ "description": "Generic queue runner config. Keep dispatcher local to the target workspace.",
4
+ "dispatcher": "node scripts/dispatch-task.mjs",
5
+ "preflightConfig": "configs/loops/workspace-health.json",
6
+ "timeoutMs": 1800000,
7
+ "leaseMs": 1860000,
8
+ "staleActiveMs": 3600000,
9
+ "scheduler": {
10
+ "initialInterval": "10m",
11
+ "minInterval": "1m",
12
+ "maxInterval": "4h",
13
+ "speedupFactor": 0.5,
14
+ "backoffFactor": 2,
15
+ "idleBackoffFactor": 2,
16
+ "humanGateBackoffFactor": 3,
17
+ "longRunHeadroomFactor": 1.25,
18
+ "jitter": "30s",
19
+ "progressReport": {
20
+ "enabled": true,
21
+ "minInterval": "30m",
22
+ "idleInterval": "4h",
23
+ "notifyOnFailure": true,
24
+ "notifyOnHumanGate": true,
25
+ "notifyOnCompletion": true,
26
+ "notifyOnStatusChange": true
27
+ }
28
+ },
29
+ "retry": {
30
+ "maxAttempts": 1,
31
+ "retryDelayMs": 0,
32
+ "retryExitCodes": [
33
+ 1
34
+ ],
35
+ "requiresHumanActionPatterns": [
36
+ "INSTALL_FAILED_USER_RESTRICTED",
37
+ "device unauthorized",
38
+ "no devices/emulators found",
39
+ "Permission denied",
40
+ "Operation not permitted",
41
+ "requires human",
42
+ "需要人工",
43
+ "权限未开"
44
+ ]
45
+ },
46
+ "revisionPolicy": {
47
+ "enabled": true,
48
+ "maxRevisionRounds": 3,
49
+ "sameFailureThreshold": 2,
50
+ "requireStrategyChange": true
51
+ }
52
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "id": "workspace-health",
3
+ "goal": "Keep this workspace loop-ready and detect obvious drift.",
4
+ "level": "L1",
5
+ "mode": "report-only",
6
+ "maxRuntimeMs": 120000,
7
+ "description": "A safe first loop: local read-only checks plus durable run ledger.",
8
+ "humanGates": [
9
+ "source edits",
10
+ "external messages",
11
+ "destructive commands",
12
+ "production config changes"
13
+ ],
14
+ "breaker": {
15
+ "maxConsecutiveFailures": 3,
16
+ "sameFailureThreshold": 2
17
+ },
18
+ "checks": [
19
+ {
20
+ "id": "git-status",
21
+ "type": "command",
22
+ "cmd": "git status --short",
23
+ "expectExitCode": 0,
24
+ "timeoutMs": 10000,
25
+ "allowNonEmptyOutput": true
26
+ },
27
+ {
28
+ "id": "loop-config-dir",
29
+ "type": "files",
30
+ "paths": [
31
+ "configs/loops"
32
+ ]
33
+ }
34
+ ]
35
+ }