repo-harness 0.3.0 → 0.4.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.
- package/AGENTS.md +5 -4
- package/CLAUDE.md +5 -4
- package/README.es.md +5 -5
- package/README.fr.md +5 -5
- package/README.ja.md +5 -5
- package/README.md +41 -35
- package/README.zh-CN.md +36 -31
- package/assets/hooks/lib/workflow-state.sh +28 -4
- package/assets/hooks/post-edit-guard.sh +9 -9
- package/assets/hooks/prompt-guard.sh +8 -6
- package/assets/hooks/session-start-context.sh +49 -0
- package/assets/partials/04-project-structure.partial.md +1 -1
- package/assets/partials/05-workflow.partial.md +2 -2
- package/assets/partials/07-footer.partial.md +1 -1
- package/assets/partials/08-orchestration.partial.md +2 -2
- package/assets/partials-agents/02-operating-mode.partial.md +1 -1
- package/assets/partials-agents/03-orchestration.partial.md +2 -2
- package/assets/partials-agents/04-task-protocol.partial.md +3 -3
- package/assets/partials-agents/08-deep-docs.partial.md +1 -1
- package/assets/reference-configs/agentic-development-flow.md +1 -1
- package/assets/reference-configs/harness-overview.md +3 -1
- package/assets/reference-configs/heartbeat-triage.md +57 -0
- package/assets/reference-configs/hook-operations.md +1 -1
- package/assets/reference-configs/sprint-contracts.md +11 -0
- package/assets/skill-commands/repo-harness-architecture/SKILL.md +2 -0
- package/assets/skill-version.json +6 -2
- package/assets/templates/contract.template.md +18 -0
- package/assets/templates/helpers/architecture-event.ts +354 -1
- package/assets/templates/helpers/architecture-queue.sh +647 -0
- package/assets/templates/helpers/archive-architecture-request.sh +11 -8
- package/assets/templates/helpers/capability-resolver.ts +34 -3
- package/assets/templates/helpers/capture-plan.sh +1 -1
- package/assets/templates/helpers/check-architecture-sync.sh +287 -0
- package/assets/templates/helpers/check-skill-version.ts +24 -5
- package/assets/templates/helpers/check-task-sync.sh +5 -2
- package/assets/templates/helpers/check-task-workflow.sh +4 -3
- package/assets/templates/helpers/codex-handoff-resume.sh +4 -4
- package/assets/templates/helpers/contract-run.ts +402 -0
- package/assets/templates/helpers/contract-worktree.sh +20 -0
- package/assets/templates/helpers/ensure-task-workflow.sh +45 -29
- package/assets/templates/helpers/heartbeat-triage.sh +317 -0
- package/assets/templates/helpers/inspect-project-state.ts +2 -2
- package/assets/templates/helpers/migrate-workflow-docs.ts +60 -31
- package/assets/templates/helpers/new-plan.sh +1 -1
- package/assets/templates/helpers/plan-to-todo.sh +19 -1
- package/assets/templates/helpers/workflow-contract.ts +1 -1
- package/assets/templates/implementation-notes.template.md +1 -1
- package/assets/templates/plan.template.md +1 -1
- package/assets/workflow-contract.v1.json +47 -10
- package/docs/reference-configs/agentic-development-flow.md +1 -1
- package/docs/reference-configs/harness-overview.md +3 -1
- package/docs/reference-configs/heartbeat-triage.md +57 -0
- package/docs/reference-configs/hook-operations.md +1 -1
- package/docs/reference-configs/loop-engine-cutover-gate.md +39 -0
- package/docs/reference-configs/loop-engine-nl-decision-table.md +137 -0
- package/docs/reference-configs/sprint-contracts.md +11 -0
- package/package.json +2 -1
- package/scripts/architecture-event.ts +354 -1
- package/scripts/architecture-queue.sh +647 -0
- package/scripts/archive-architecture-request.sh +11 -8
- package/scripts/capability-resolver.ts +34 -3
- package/scripts/capture-plan.sh +1 -1
- package/scripts/check-architecture-sync.sh +287 -0
- package/scripts/check-npm-release.sh +1 -0
- package/scripts/check-skill-version.ts +24 -5
- package/scripts/check-task-sync.sh +5 -2
- package/scripts/check-task-workflow.sh +4 -3
- package/scripts/codex-handoff-resume.sh +4 -4
- package/scripts/contract-run.ts +402 -0
- package/scripts/contract-worktree.sh +20 -0
- package/scripts/create-project-dirs.sh +8 -21
- package/scripts/ensure-task-workflow.sh +45 -29
- package/scripts/heartbeat-triage.sh +317 -0
- package/scripts/hook-dispatch-diet-report.ts +234 -0
- package/scripts/init-project.sh +7 -27
- package/scripts/inspect-project-state.ts +2 -2
- package/scripts/lib/project-init-lib.sh +60 -14
- package/scripts/loop-engine-cutover-gate.ts +324 -0
- package/scripts/migrate-project-template.sh +34 -35
- package/scripts/migrate-workflow-docs.ts +60 -31
- package/scripts/new-plan.sh +1 -1
- package/scripts/plan-to-todo.sh +19 -1
- package/scripts/route-nl-vs-ts-eval.ts +679 -0
- package/scripts/workflow-contract.ts +1 -1
- package/src/cli/commands/status.ts +1 -1
- package/src/cli/hook/state-snapshot.ts +388 -0
- package/src/cli/hook-entry.ts +8 -0
- package/assets/templates/helpers/architecture-drift.sh +0 -482
- package/scripts/architecture-drift.sh +0 -482
package/AGENTS.md
CHANGED
|
@@ -10,7 +10,7 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
10
10
|
- `.ai/context/capabilities.json` for the capability registry and longest-prefix context boundaries
|
|
11
11
|
- `tasks/workstreams/` for capability long-running workstreams that project durable progress into local contracts
|
|
12
12
|
- `tasks/lessons.md` for correction-derived rules
|
|
13
|
-
- `
|
|
13
|
+
- `docs/researches/` for deep repo knowledge
|
|
14
14
|
- `tasks/notes/` for task-local implementation decisions, deviations, tradeoffs, and open questions
|
|
15
15
|
- `plans/` for timestamped plans, with `plans/archive/` for history
|
|
16
16
|
- `.ai/harness/workflow-contract.json` for the installed workflow contract manifest
|
|
@@ -26,11 +26,11 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
26
26
|
- Treat hook execution as central-first: trusted repos run `~/.repo-harness/hooks/` (bash shim) or the packaged CLI copy; this self-host repo pins `"hook_source": "repo"` in `.ai/harness/policy.json` so `.ai/hooks/` stays the live development runtime, with `assets/hooks/` as the product source mirrored on install. User-level `~/.claude/settings.json` and `~/.codex/hooks.json` are the host adapters.
|
|
27
27
|
- Keep the umbrella hierarchy explicit: architecture owns stable truth, capability contracts own local agent context, `tasks/workstreams/<domain>/<capability>/` owns durable progress, and `tasks/todo.md` owns only deferred medium/long-term goals with tradeoff and revisit trigger.
|
|
28
28
|
- Treat `.ai/context/capabilities.json` as the source of truth for capability prefixes; `agent-context-blocks.txt` and nested agent files are compatibility inputs only.
|
|
29
|
-
- Keep architecture drift handling split: `architecture-
|
|
29
|
+
- Keep architecture drift handling split: `architecture-queue.sh` writes architecture requests/events, `workstream-sync.sh` maintains durable capability workstreams, and `context-contract-sync.sh` only updates controlled local `CLAUDE.md`/`AGENTS.md` architecture blocks.
|
|
30
30
|
- Keep `assets/workflow-contract.v1.json` and `.ai/harness/workflow-contract.json` in sync.
|
|
31
31
|
- Keep `CLAUDE.md` and `AGENTS.md` short; put detailed guidance in `docs/reference-configs/`.
|
|
32
32
|
- Treat Codex auto-compact as a fallback only; use `.ai/harness/handoff/current.md` and `.ai/harness/handoff/resume.md` for long-task rollover.
|
|
33
|
-
- Treat `_ref/` as an occasional ignored external reference checkout cache, not a commit surface or daily workflow. Agents may read or refresh it for comparison; when it influences a decision, cite the source repo plus commit/tag and path in `tasks/notes/` or `
|
|
33
|
+
- Treat `_ref/` as an occasional ignored external reference checkout cache, not a commit surface or daily workflow. Agents may read or refresh it for comparison; when it influences a decision, cite the source repo plus commit/tag and path in `tasks/notes/` or `docs/researches/`.
|
|
34
34
|
- Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files under `deploy/sql/`, and env examples.
|
|
35
35
|
- Treat `_ops/` as ignored local operations state for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit `_ops/*`.
|
|
36
36
|
- Treat contract-level task execution as worktree-first: `scripts/plan-to-todo.sh --plan <approved-plan>` starts `scripts/contract-worktree.sh start --plan <approved-plan>` when policy enables it, and completed blocks finish through Waza `/check` plus `scripts/contract-worktree.sh finish`.
|
|
@@ -50,6 +50,7 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
50
50
|
```bash
|
|
51
51
|
bun test
|
|
52
52
|
bash scripts/check-deploy-sql-order.sh
|
|
53
|
+
bash scripts/check-architecture-sync.sh
|
|
53
54
|
bash scripts/check-task-sync.sh
|
|
54
55
|
bash scripts/check-task-workflow.sh --strict
|
|
55
56
|
bun scripts/inspect-project-state.ts --repo . --format text
|
|
@@ -79,7 +80,7 @@ bash scripts/migrate-project-template.sh --repo . --dry-run
|
|
|
79
80
|
- Latest snapshot: `(none yet)`
|
|
80
81
|
- Semantic diagram source: `docs/architecture/modules/runtime-harness/hook-adapters.md`
|
|
81
82
|
- Latest human diagram: `(none yet)`
|
|
82
|
-
- Pending architecture request: `
|
|
83
|
+
- Pending architecture request: `(none)`
|
|
83
84
|
|
|
84
85
|
## Active Workstreams
|
|
85
86
|
|
package/CLAUDE.md
CHANGED
|
@@ -10,7 +10,7 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
10
10
|
- `.ai/context/capabilities.json` for the capability registry and longest-prefix context boundaries
|
|
11
11
|
- `tasks/workstreams/` for capability long-running workstreams that project durable progress into local contracts
|
|
12
12
|
- `tasks/lessons.md` for correction-derived rules
|
|
13
|
-
- `
|
|
13
|
+
- `docs/researches/` for deep repo knowledge
|
|
14
14
|
- `tasks/notes/` for task-local implementation decisions, deviations, tradeoffs, and open questions
|
|
15
15
|
- `plans/` for timestamped plans, with `plans/archive/` for history
|
|
16
16
|
- `.ai/harness/workflow-contract.json` for the installed workflow contract manifest
|
|
@@ -26,11 +26,11 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
26
26
|
- Treat hook execution as central-first: trusted repos run `~/.repo-harness/hooks/` (bash shim) or the packaged CLI copy; this self-host repo pins `"hook_source": "repo"` in `.ai/harness/policy.json` so `.ai/hooks/` stays the live development runtime, with `assets/hooks/` as the product source mirrored on install. User-level `~/.claude/settings.json` and `~/.codex/hooks.json` are the host adapters.
|
|
27
27
|
- Keep the umbrella hierarchy explicit: architecture owns stable truth, capability contracts own local agent context, `tasks/workstreams/<domain>/<capability>/` owns durable progress, and `tasks/todo.md` owns only deferred medium/long-term goals with tradeoff and revisit trigger.
|
|
28
28
|
- Treat `.ai/context/capabilities.json` as the source of truth for capability prefixes; `agent-context-blocks.txt` and nested agent files are compatibility inputs only.
|
|
29
|
-
- Keep architecture drift handling split: `architecture-
|
|
29
|
+
- Keep architecture drift handling split: `architecture-queue.sh` writes architecture requests/events, `workstream-sync.sh` maintains durable capability workstreams, and `context-contract-sync.sh` only updates controlled local `CLAUDE.md`/`AGENTS.md` architecture blocks.
|
|
30
30
|
- Keep `assets/workflow-contract.v1.json` and `.ai/harness/workflow-contract.json` in sync.
|
|
31
31
|
- Keep `CLAUDE.md` and `AGENTS.md` short; put detailed guidance in `docs/reference-configs/`.
|
|
32
32
|
- Treat Codex auto-compact as a fallback only; use `.ai/harness/handoff/current.md` and `.ai/harness/handoff/resume.md` for long-task rollover.
|
|
33
|
-
- Treat `_ref/` as an occasional ignored external reference checkout cache, not a commit surface or daily workflow. Agents may read or refresh it for comparison; when it influences a decision, cite the source repo plus commit/tag and path in `tasks/notes/` or `
|
|
33
|
+
- Treat `_ref/` as an occasional ignored external reference checkout cache, not a commit surface or daily workflow. Agents may read or refresh it for comparison; when it influences a decision, cite the source repo plus commit/tag and path in `tasks/notes/` or `docs/researches/`.
|
|
34
34
|
- Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files under `deploy/sql/`, and env examples.
|
|
35
35
|
- Treat `_ops/` as ignored local operations state for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit `_ops/*`.
|
|
36
36
|
- Treat contract-level task execution as worktree-first: `scripts/plan-to-todo.sh --plan <approved-plan>` starts `scripts/contract-worktree.sh start --plan <approved-plan>` when policy enables it, and completed blocks finish through Waza `/check` plus `scripts/contract-worktree.sh finish`.
|
|
@@ -50,6 +50,7 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
50
50
|
```bash
|
|
51
51
|
bun test
|
|
52
52
|
bash scripts/check-deploy-sql-order.sh
|
|
53
|
+
bash scripts/check-architecture-sync.sh
|
|
53
54
|
bash scripts/check-task-sync.sh
|
|
54
55
|
bash scripts/check-task-workflow.sh --strict
|
|
55
56
|
bun scripts/inspect-project-state.ts --repo . --format text
|
|
@@ -79,7 +80,7 @@ bash scripts/migrate-project-template.sh --repo . --dry-run
|
|
|
79
80
|
- Latest snapshot: `(none yet)`
|
|
80
81
|
- Semantic diagram source: `docs/architecture/modules/runtime-harness/hook-adapters.md`
|
|
81
82
|
- Latest human diagram: `(none yet)`
|
|
82
|
-
- Pending architecture request: `
|
|
83
|
+
- Pending architecture request: `(none)`
|
|
83
84
|
|
|
84
85
|
## Active Workstreams
|
|
85
86
|
|
package/README.es.md
CHANGED
|
@@ -186,8 +186,8 @@ adoptar este workflow.
|
|
|
186
186
|
npx -y repo-harness init
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
La npm package release line
|
|
190
|
-
|
|
189
|
+
La npm package release line y el generated workflow stamp usan ahora la misma
|
|
190
|
+
línea `0.4.x`. `repo-harness init` es el bootstrap
|
|
191
191
|
global y `repo-harness update` es el refresco repo-local. `repo-harness init`
|
|
192
192
|
configura el CLI, los hook adapters de nivel usuario, Waza, Mermaid, el brain
|
|
193
193
|
root y CodeGraph MCP; el viejo camino Claude plugin `scripts/setup-plugins.sh`
|
|
@@ -325,12 +325,12 @@ Guards habituales:
|
|
|
325
325
|
|
|
326
326
|
## Release actual
|
|
327
327
|
|
|
328
|
-
- npm package: `repo-harness@0.
|
|
329
|
-
- Generated workflow
|
|
328
|
+
- npm package: `repo-harness@0.4.0`
|
|
329
|
+
- Generated workflow stamp: `repo-harness@0.4.0+template@0.4.0`
|
|
330
330
|
- GitHub repository: `Ancienttwo/repo-harness`
|
|
331
331
|
- Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
332
332
|
|
|
333
|
-
## Current Model
|
|
333
|
+
## Current Model
|
|
334
334
|
|
|
335
335
|
- El question flow usa **12 grouped decision points**, infiriendo primero los harness defaults.
|
|
336
336
|
- El plan menu está por capas: los **Core Plans (A-F)** primero, los **Custom Presets (G-K)** solo cuando hace falta.
|
package/README.fr.md
CHANGED
|
@@ -190,8 +190,8 @@ de ce workflow.
|
|
|
190
190
|
npx -y repo-harness init
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
La release line du package npm
|
|
194
|
-
|
|
193
|
+
La release line du package npm et le generated workflow stamp utilisent
|
|
194
|
+
désormais la même ligne `0.4.x`. `repo-harness init`
|
|
195
195
|
sert au bootstrap global et `repo-harness update` sert au rafraîchissement
|
|
196
196
|
repo-local. `repo-harness init` configure le CLI, les hook adapters de niveau
|
|
197
197
|
utilisateur, Waza, Mermaid, le brain root et CodeGraph MCP ; l'ancien chemin
|
|
@@ -329,12 +329,12 @@ Guards courants :
|
|
|
329
329
|
|
|
330
330
|
## Release actuelle
|
|
331
331
|
|
|
332
|
-
- npm package : `repo-harness@0.
|
|
333
|
-
- Generated workflow
|
|
332
|
+
- npm package : `repo-harness@0.4.0`
|
|
333
|
+
- Generated workflow stamp : `repo-harness@0.4.0+template@0.4.0`
|
|
334
334
|
- GitHub repository : `Ancienttwo/repo-harness`
|
|
335
335
|
- Release history : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
336
336
|
|
|
337
|
-
## Current Model
|
|
337
|
+
## Current Model
|
|
338
338
|
|
|
339
339
|
- Le question flow utilise **12 grouped decision points**, en inférant d'abord les harness defaults.
|
|
340
340
|
- Le plan menu est hiérarchisé : **Core Plans (A-F)** en priorité, **Custom Presets (G-K)** uniquement quand c'est nécessaire.
|
package/README.ja.md
CHANGED
|
@@ -159,8 +159,8 @@ flowchart TD
|
|
|
159
159
|
npx -y repo-harness init
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
npm package
|
|
163
|
-
|
|
162
|
+
npm package と generated workflow stamp は現在同じ `0.4.x` release line を使います。
|
|
163
|
+
`repo-harness init` は global bootstrap、`repo-harness update` は
|
|
164
164
|
repo-local refresh です。`repo-harness init` は CLI、user-level hook adapters、Waza、Mermaid、
|
|
165
165
|
brain root、CodeGraph MCP を設定し、退役した `scripts/setup-plugins.sh` の Claude plugin path は使いません。
|
|
166
166
|
|
|
@@ -293,12 +293,12 @@ hook がブロックしたときは、まず terminal の構造化された出
|
|
|
293
293
|
|
|
294
294
|
## 現在の Release
|
|
295
295
|
|
|
296
|
-
- npm package:`repo-harness@0.
|
|
297
|
-
- Generated workflow
|
|
296
|
+
- npm package:`repo-harness@0.4.0`
|
|
297
|
+
- Generated workflow stamp:`repo-harness@0.4.0+template@0.4.0`
|
|
298
298
|
- GitHub repository:`Ancienttwo/repo-harness`
|
|
299
299
|
- Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
300
300
|
|
|
301
|
-
## Current Model
|
|
301
|
+
## Current Model
|
|
302
302
|
|
|
303
303
|
- Question flow は **12 grouped decision points** を使い、まず harness defaults を推論します。
|
|
304
304
|
- Plan menu は階層化されています。**Core Plans (A-F)** を優先し、**Custom Presets (G-K)** は必要なときだけ現れます。
|
package/README.md
CHANGED
|
@@ -34,28 +34,25 @@ This repository now dogfoods its own tasks-first contract. It is both:
|
|
|
34
34
|
read a 1KB capability contract or query the index instead of spending thousands of
|
|
35
35
|
tokens rediscovering structure.
|
|
36
36
|
|
|
37
|
-
## What's New in 0.
|
|
38
|
-
|
|
39
|
-
- **
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- **
|
|
44
|
-
`
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- **
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- **Legacy surface cleanup.** The retired `repo-harness-skill`,
|
|
57
|
-
`project-initializer`, `PROJECT_INITIALIZER_*` fallbacks, duplicate shell
|
|
58
|
-
classifier table, orphan version checker, and split observer hooks are gone.
|
|
37
|
+
## What's New in 0.4.0
|
|
38
|
+
|
|
39
|
+
- **Loop-engine evidence surfaces.** `repo-harness-hook state-snapshot --json`,
|
|
40
|
+
the NL decision-table reference, route A/B evals, and the cutover gate make
|
|
41
|
+
prompt-routing experiments measurable while keeping the TypeScript classifier
|
|
42
|
+
authoritative until evidence says otherwise.
|
|
43
|
+
- **Architecture queue gate.** `scripts/architecture-queue.sh`,
|
|
44
|
+
`scripts/check-architecture-sync.sh`, and the expanded architecture event
|
|
45
|
+
helper replace the retired append-only drift script with a derived request
|
|
46
|
+
index that can gate stale architecture state.
|
|
47
|
+
- **Contract delegation pilot.** Contract templates now include
|
|
48
|
+
`budget`, `permission_scope`, and `roles`, and `scripts/contract-run.ts`
|
|
49
|
+
can run explicit worker/verifier child commands against contract exit
|
|
50
|
+
criteria.
|
|
51
|
+
- **Heartbeat triage.** `scripts/heartbeat-triage.sh` records scheduled
|
|
52
|
+
workflow checks, sprint-next signals, and architecture request state into the
|
|
53
|
+
repo-local triage inbox.
|
|
54
|
+
- **Workflow asset sync.** New helpers, docs, tests, and generated-repo assets
|
|
55
|
+
keep the self-host runtime and installed template copies aligned.
|
|
59
56
|
|
|
60
57
|
## What repo-harness Does
|
|
61
58
|
|
|
@@ -118,7 +115,10 @@ The diagram below assumes the harness is already installed in the repo. It shows
|
|
|
118
115
|
the normal lifecycle from a program sprint backlog down to one contract task:
|
|
119
116
|
draft or select the task, project it into execution files, check out the
|
|
120
117
|
contract worktree when policy requires it, implement under hooks, verify, review,
|
|
121
|
-
complete the sprint task when applicable, and close out.
|
|
118
|
+
complete the sprint task when applicable, and close out. The 0.4.0 loop-system
|
|
119
|
+
surfaces add scheduled heartbeat discovery, state-snapshot/eval evidence for
|
|
120
|
+
routing changes, architecture queue freshness, and optional contract-run
|
|
121
|
+
delegation without changing the file-backed authority model.
|
|
122
122
|
|
|
123
123
|
```mermaid
|
|
124
124
|
flowchart TD
|
|
@@ -126,10 +126,12 @@ flowchart TD
|
|
|
126
126
|
Sprint -->|yes| SprintDoc["Sprint PRD + backlog<br/>tasks/sprints/*.sprint.md"]
|
|
127
127
|
SprintDoc --> NextTask["Select next sprint task<br/>sprint-backlog.sh next"]
|
|
128
128
|
Sprint -->|no| UserTask["User task or planning prompt"]
|
|
129
|
+
Heartbeat["Heartbeat triage<br/>scripts/heartbeat-triage.sh<br/>.ai/harness/triage/"] --> UserTask
|
|
129
130
|
NextTask --> UserTask
|
|
130
131
|
|
|
131
132
|
UserTask --> Discovery["Due diligence<br/>P1 map, P2 trace, P3 decision"]
|
|
132
|
-
Discovery -->
|
|
133
|
+
Discovery --> LoopEvidence["Loop evidence when routing changes<br/>state-snapshot --json<br/>route-nl-vs-ts / cutover gate"]
|
|
134
|
+
LoopEvidence --> PlanDraft["Draft plan<br/>plans/plan-*.md"]
|
|
133
135
|
PlanDraft --> PlanReview{"Plan ready for execution?"}
|
|
134
136
|
PlanReview -->|no| Refine["Refine plan, scope, evidence contract"]
|
|
135
137
|
Refine --> PlanDraft
|
|
@@ -142,18 +144,23 @@ flowchart TD
|
|
|
142
144
|
Project --> ReviewFile["Review file<br/>tasks/reviews/YYYYMMDD-HHMM-task-slug.review.md"]
|
|
143
145
|
Project --> Notes["Task notes<br/>tasks/notes/YYYYMMDD-HHMM-task-slug.notes.md"]
|
|
144
146
|
|
|
145
|
-
Contract -->
|
|
147
|
+
Contract --> Delegation["Delegation contract<br/>budget / permission_scope / roles"]
|
|
148
|
+
Delegation --> Delegate{"Use contract-run delegation?"}
|
|
149
|
+
Delegate -->|yes| ContractRun["Worker/verifier child run<br/>scripts/contract-run.ts"]
|
|
150
|
+
Delegate -->|no| WorktreePolicy{"Contract worktree required?"}
|
|
146
151
|
WorktreePolicy -->|yes| Checkout["Checkout isolated worktree<br/>contract-worktree.sh start --plan<br/>branch codex/task-slug"]
|
|
147
152
|
WorktreePolicy -->|no| CurrentTree["Use current worktree<br/>small or explicitly allowed slice"]
|
|
148
153
|
Checkout --> Implement
|
|
149
154
|
CurrentTree --> Implement
|
|
155
|
+
ContractRun --> Changes
|
|
150
156
|
|
|
151
157
|
Implement["Edit and run commands"] --> PreHooks["Pre-edit guards<br/>PlanStatusGuard, ContractScopeGuard, WorktreeGuard"]
|
|
152
158
|
PreHooks -->|blocked| ScopeFix["Fix plan, contract, worktree, or scope"]
|
|
153
159
|
ScopeFix --> Implement
|
|
154
160
|
PreHooks -->|allowed| Changes["Code, docs, tests, or config changes"]
|
|
155
161
|
Changes --> PostHooks["Post-edit and post-bash hooks<br/>trace, drift request, handoff, check evidence"]
|
|
156
|
-
PostHooks -->
|
|
162
|
+
PostHooks --> ArchQueue["Architecture queue<br/>architecture-queue.sh record/reindex<br/>check-architecture-sync.sh"]
|
|
163
|
+
ArchQueue --> Verify["Run verification<br/>tests plus repo workflow checks"]
|
|
157
164
|
|
|
158
165
|
Verify --> Checks["Structured evidence<br/>.ai/harness/checks/latest.json<br/>.ai/harness/runs/*.json"]
|
|
159
166
|
Checks --> CheckReview["Evaluator review<br/>Waza /check -> review file"]
|
|
@@ -201,13 +208,12 @@ npx -y repo-harness update
|
|
|
201
208
|
repository to install or refresh workflow files, hook assets, host adapters,
|
|
202
209
|
skill aliases, and repo-local verification surfaces from the current npm package.
|
|
203
210
|
|
|
204
|
-
The npm package
|
|
205
|
-
|
|
211
|
+
The npm package and generated workflow stamp now share the `0.4.x` release line.
|
|
212
|
+
The `0.4.0` package keeps first-run
|
|
206
213
|
global bootstrap (`repo-harness init`) separate from repo-local refresh
|
|
207
|
-
(`repo-harness update`)
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
observers into one cheaper path.
|
|
214
|
+
(`repo-harness update`) while adding the loop-engine state snapshot, architecture
|
|
215
|
+
queue gate, contract delegation pilot, heartbeat triage helper, and generated
|
|
216
|
+
asset sync for those workflow surfaces.
|
|
211
217
|
These sit on top of the renamed `repo-harness` CLI, user-level hook
|
|
212
218
|
adapter bootstrap, AI-native scaffold overlays, the typed prompt-guard decision
|
|
213
219
|
engine, plan-stem task artifact naming, `REPO_HARNESS_*` runtime aliases, Waza
|
|
@@ -358,12 +364,12 @@ Most common guards:
|
|
|
358
364
|
|
|
359
365
|
## Current Release
|
|
360
366
|
|
|
361
|
-
- npm package: `repo-harness@0.
|
|
362
|
-
- Generated workflow
|
|
367
|
+
- npm package: `repo-harness@0.4.0`
|
|
368
|
+
- Generated workflow stamp: `repo-harness@0.4.0+template@0.4.0`
|
|
363
369
|
- GitHub repository: `Ancienttwo/repo-harness`
|
|
364
370
|
- Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
365
371
|
|
|
366
|
-
## Current Model
|
|
372
|
+
## Current Model
|
|
367
373
|
|
|
368
374
|
- Question flow uses **12 grouped decision points** with harness defaults inferred first.
|
|
369
375
|
- Plan menu is tiered:
|
package/README.zh-CN.md
CHANGED
|
@@ -23,25 +23,21 @@ repo-local workflow 的自托管样例。
|
|
|
23
23
|
做渐进式上下文加载:一份小而稳定的 root context(约 12KB),加上只在改到对应文件时才加载的
|
|
24
24
|
capability 块。agent 读一份 1KB 的 capability 合约或查索引,而不是花上千 token 重新摸清结构。
|
|
25
25
|
|
|
26
|
-
## 0.
|
|
27
|
-
|
|
28
|
-
- **
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- **
|
|
32
|
-
`
|
|
33
|
-
|
|
34
|
-
- **
|
|
35
|
-
`
|
|
36
|
-
|
|
37
|
-
- **
|
|
38
|
-
|
|
39
|
-
- **
|
|
40
|
-
|
|
41
|
-
context-budget probes。
|
|
42
|
-
- **Legacy surface 清理。** 已退休的 `repo-harness-skill`、`project-initializer`、
|
|
43
|
-
`PROJECT_INITIALIZER_*` fallbacks、重复 shell classifier table、孤立 version checker
|
|
44
|
-
和拆分 observer hooks 都已移除。
|
|
26
|
+
## 0.4.0 新特性
|
|
27
|
+
|
|
28
|
+
- **Loop-engine 证据面。** `repo-harness-hook state-snapshot --json`、NL
|
|
29
|
+
decision-table、route A/B eval 和 cutover gate 让 prompt-routing 实验可度量;
|
|
30
|
+
在证据达标前,TypeScript classifier 仍是权威路径。
|
|
31
|
+
- **Architecture queue gate。** `scripts/architecture-queue.sh`、
|
|
32
|
+
`scripts/check-architecture-sync.sh` 和扩展后的 architecture event helper
|
|
33
|
+
取代已退休的 append-only drift 脚本,用派生 request index 检查 stale 架构状态。
|
|
34
|
+
- **Contract delegation pilot。** Contract template 新增 `budget`、
|
|
35
|
+
`permission_scope`、`roles`,`scripts/contract-run.ts` 可用显式
|
|
36
|
+
worker/verifier child commands 按 contract exit criteria 执行试点。
|
|
37
|
+
- **Heartbeat triage。** `scripts/heartbeat-triage.sh` 把定时 workflow checks、
|
|
38
|
+
sprint-next 信号和 architecture request 状态写入 repo-local triage inbox。
|
|
39
|
+
- **Workflow asset sync。** 新 helpers、docs、tests 和 generated-repo assets
|
|
40
|
+
保持 self-host runtime 与安装模板副本同步。
|
|
45
41
|
|
|
46
42
|
## 产品做什么
|
|
47
43
|
|
|
@@ -90,7 +86,9 @@ classifier/state-machine 层不再散落在 shell 条件分支里。
|
|
|
90
86
|
下面这张图假设目标仓库已经安装 harness。它展示的是从 program sprint backlog
|
|
91
87
|
到单个 contract task 的正常闭环:先选择或形成任务,再投射到执行文件,需要时
|
|
92
88
|
checkout 隔离 worktree,在 hooks 保护下实现,然后验证、review、external acceptance,
|
|
93
|
-
必要时标记 sprint task 完成,最后 closeout。
|
|
89
|
+
必要时标记 sprint task 完成,最后 closeout。0.4.0 的 loop-system surface
|
|
90
|
+
新增 heartbeat 定时发现、state-snapshot/eval 证据、architecture queue freshness,
|
|
91
|
+
以及可选的 contract-run 委派,但 source of truth 仍然是 repo 内文件合约。
|
|
94
92
|
|
|
95
93
|
```mermaid
|
|
96
94
|
flowchart TD
|
|
@@ -98,10 +96,12 @@ flowchart TD
|
|
|
98
96
|
Sprint -->|是| SprintDoc["Sprint PRD + backlog<br/>tasks/sprints/*.sprint.md"]
|
|
99
97
|
SprintDoc --> NextTask["选择下一个 sprint task<br/>sprint-backlog.sh next"]
|
|
100
98
|
Sprint -->|否| UserTask["用户任务或 planning prompt"]
|
|
99
|
+
Heartbeat["Heartbeat triage<br/>scripts/heartbeat-triage.sh<br/>.ai/harness/triage/"] --> UserTask
|
|
101
100
|
NextTask --> UserTask
|
|
102
101
|
|
|
103
102
|
UserTask --> Discovery["前置调查<br/>P1 map, P2 trace, P3 decision"]
|
|
104
|
-
Discovery -->
|
|
103
|
+
Discovery --> LoopEvidence["路由变更时的 loop evidence<br/>state-snapshot --json<br/>route-nl-vs-ts / cutover gate"]
|
|
104
|
+
LoopEvidence --> PlanDraft["Draft plan<br/>plans/plan-*.md"]
|
|
105
105
|
PlanDraft --> PlanReview{"Plan 是否可执行?"}
|
|
106
106
|
PlanReview -->|否| Refine["收敛 scope 和 evidence contract"]
|
|
107
107
|
Refine --> PlanDraft
|
|
@@ -114,18 +114,23 @@ flowchart TD
|
|
|
114
114
|
Project --> ReviewFile["Review file<br/>tasks/reviews/YYYYMMDD-HHMM-task-slug.review.md"]
|
|
115
115
|
Project --> Notes["Task notes<br/>tasks/notes/YYYYMMDD-HHMM-task-slug.notes.md"]
|
|
116
116
|
|
|
117
|
-
Contract -->
|
|
117
|
+
Contract --> Delegation["Delegation contract<br/>budget / permission_scope / roles"]
|
|
118
|
+
Delegation --> Delegate{"是否使用 contract-run 委派?"}
|
|
119
|
+
Delegate -->|是| ContractRun["Worker/verifier child run<br/>scripts/contract-run.ts"]
|
|
120
|
+
Delegate -->|否| WorktreePolicy{"是否需要 contract worktree?"}
|
|
118
121
|
WorktreePolicy -->|是| Checkout["Checkout 隔离 worktree<br/>contract-worktree.sh start --plan<br/>branch codex/task-slug"]
|
|
119
122
|
WorktreePolicy -->|否| CurrentTree["使用当前 worktree<br/>小任务或明确允许的 slice"]
|
|
120
123
|
Checkout --> Implement
|
|
121
124
|
CurrentTree --> Implement
|
|
125
|
+
ContractRun --> Changes
|
|
122
126
|
|
|
123
127
|
Implement["编辑和运行命令"] --> PreHooks["Pre-edit guards<br/>PlanStatusGuard, ContractScopeGuard, WorktreeGuard"]
|
|
124
128
|
PreHooks -->|blocked| ScopeFix["修正 plan、contract、worktree 或 scope"]
|
|
125
129
|
ScopeFix --> Implement
|
|
126
130
|
PreHooks -->|allowed| Changes["代码、文档、测试或配置改动"]
|
|
127
131
|
Changes --> PostHooks["Post-edit / post-bash hooks<br/>trace, drift request, handoff, check evidence"]
|
|
128
|
-
PostHooks -->
|
|
132
|
+
PostHooks --> ArchQueue["Architecture queue<br/>architecture-queue.sh record/reindex<br/>check-architecture-sync.sh"]
|
|
133
|
+
ArchQueue --> Verify["运行验证<br/>tests plus repo workflow checks"]
|
|
129
134
|
|
|
130
135
|
Verify --> Checks["结构化 evidence<br/>.ai/harness/checks/latest.json<br/>.ai/harness/runs/*.json"]
|
|
131
136
|
Checks --> CheckReview["Evaluator review<br/>Waza /check -> review file"]
|
|
@@ -171,11 +176,11 @@ npx -y repo-harness update
|
|
|
171
176
|
安装或刷新 workflow files、hook assets、host adapters、skill aliases 和
|
|
172
177
|
repo-local verification surfaces。
|
|
173
178
|
|
|
174
|
-
npm package
|
|
175
|
-
|
|
176
|
-
和 repo-local 刷新(`repo-harness update
|
|
177
|
-
|
|
178
|
-
|
|
179
|
+
npm package 和 generated workflow stamp 现在共用 `0.4.x` release line。
|
|
180
|
+
`repo-harness@0.4.0` 继续把首次全局引导(`repo-harness init`)
|
|
181
|
+
和 repo-local 刷新(`repo-harness update`)拆开,同时新增 loop-engine state
|
|
182
|
+
snapshot、architecture queue gate、contract delegation pilot、heartbeat triage
|
|
183
|
+
helper,以及这些 workflow surfaces 的 generated asset sync。
|
|
179
184
|
这些能力叠加在改名后的 CLI、user-level hook adapter bootstrap、AI-native scaffold overlays、
|
|
180
185
|
typed prompt-guard decision engine、plan-stem task artifact 命名、`REPO_HARNESS_*`
|
|
181
186
|
runtime aliases、Waza runtime skill sync,以及 maintainer 发布 npm 前使用的 release gate 之上。
|
|
@@ -314,12 +319,12 @@ hook block 工作时,先看 terminal 里的结构化输出。核心字段是
|
|
|
314
319
|
|
|
315
320
|
## 当前 Release
|
|
316
321
|
|
|
317
|
-
- npm package:`repo-harness@0.
|
|
318
|
-
- Generated workflow
|
|
322
|
+
- npm package:`repo-harness@0.4.0`
|
|
323
|
+
- Generated workflow stamp:`repo-harness@0.4.0+template@0.4.0`
|
|
319
324
|
- GitHub repository:`Ancienttwo/repo-harness`
|
|
320
325
|
- Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
321
326
|
|
|
322
|
-
## Current Model
|
|
327
|
+
## Current Model
|
|
323
328
|
|
|
324
329
|
- Question flow 使用 **12 grouped decision points**,先推断 harness defaults。
|
|
325
330
|
- Plan menu 分层:**Core Plans (A-F)** 优先,**Custom Presets (G-K)** 只在需要时出现。
|
|
@@ -889,18 +889,42 @@ workflow_pending_orchestration_summary() {
|
|
|
889
889
|
printf '\n'
|
|
890
890
|
}
|
|
891
891
|
|
|
892
|
+
latest_research_report() {
|
|
893
|
+
local research_dir="${1:-docs/researches}"
|
|
894
|
+
local file mtime latest_file="" latest_mtime=0
|
|
895
|
+
|
|
896
|
+
[[ -d "$research_dir" ]] || return 1
|
|
897
|
+
|
|
898
|
+
while IFS= read -r -d '' file; do
|
|
899
|
+
case "$(basename "$file")" in
|
|
900
|
+
README.md)
|
|
901
|
+
continue
|
|
902
|
+
;;
|
|
903
|
+
esac
|
|
904
|
+
|
|
905
|
+
mtime="$(workflow_read_file_mtime "$file" || true)"
|
|
906
|
+
if [[ -n "$mtime" && "$mtime" -gt "$latest_mtime" ]]; then
|
|
907
|
+
latest_mtime="$mtime"
|
|
908
|
+
latest_file="$file"
|
|
909
|
+
fi
|
|
910
|
+
done < <(find "$research_dir" -type f -name '*.md' -print0 2>/dev/null)
|
|
911
|
+
|
|
912
|
+
[[ -n "$latest_file" ]] || return 1
|
|
913
|
+
printf '%s' "$latest_file"
|
|
914
|
+
}
|
|
915
|
+
|
|
892
916
|
has_research_for_new_plan() {
|
|
893
|
-
local
|
|
894
|
-
local latest_plan research_mtime plan_mtime
|
|
917
|
+
local latest_plan latest_report research_mtime plan_mtime
|
|
895
918
|
|
|
896
|
-
|
|
919
|
+
latest_report="$(latest_research_report || true)"
|
|
920
|
+
[[ -n "$latest_report" ]] || return 1
|
|
897
921
|
|
|
898
922
|
latest_plan="$(get_latest_plan || true)"
|
|
899
923
|
if [[ -z "$latest_plan" ]]; then
|
|
900
924
|
return 0
|
|
901
925
|
fi
|
|
902
926
|
|
|
903
|
-
research_mtime="$(workflow_read_file_mtime "$
|
|
927
|
+
research_mtime="$(workflow_read_file_mtime "$latest_report" || true)"
|
|
904
928
|
plan_mtime="$(workflow_read_file_mtime "$latest_plan" || true)"
|
|
905
929
|
|
|
906
930
|
[[ -n "$research_mtime" && -n "$plan_mtime" && "$research_mtime" -gt "$plan_mtime" ]]
|
|
@@ -29,22 +29,22 @@ run_continuous_contract_verification() {
|
|
|
29
29
|
fi
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
local
|
|
32
|
+
run_architecture_queue_sync() {
|
|
33
|
+
local queue_output status
|
|
34
34
|
|
|
35
|
-
[[ -x "scripts/architecture-
|
|
35
|
+
[[ -x "scripts/architecture-queue.sh" ]] || return 0
|
|
36
36
|
|
|
37
|
-
if
|
|
37
|
+
if queue_output="$(bash "scripts/architecture-queue.sh" record --file "$FILE_PATH" 2>&1)"; then
|
|
38
38
|
:
|
|
39
39
|
else
|
|
40
40
|
status=$?
|
|
41
|
-
[[ -n "$
|
|
42
|
-
echo "[SyncChain] WARN: architecture-
|
|
41
|
+
[[ -n "$queue_output" ]] && printf '%s\n' "$queue_output"
|
|
42
|
+
echo "[SyncChain] WARN: architecture-queue failed for $FILE_PATH (exit $status)"
|
|
43
43
|
return 0
|
|
44
44
|
fi
|
|
45
|
-
[[ -n "$
|
|
45
|
+
[[ -n "$queue_output" ]] && printf '%s\n' "$queue_output"
|
|
46
46
|
|
|
47
|
-
if printf '%s\n' "$
|
|
47
|
+
if printf '%s\n' "$queue_output" | grep -q '^\[ArchitectureDrift\] Request:'; then
|
|
48
48
|
if [[ -x "scripts/context-contract-sync.sh" ]]; then
|
|
49
49
|
if bash "scripts/context-contract-sync.sh" sync-latest; then
|
|
50
50
|
:
|
|
@@ -154,7 +154,7 @@ if [[ -x "$SCRIPT_DIR/anti-simplification.sh" ]]; then
|
|
|
154
154
|
bash "$SCRIPT_DIR/anti-simplification.sh" "$FILE_PATH" </dev/null || true
|
|
155
155
|
fi
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
run_architecture_queue_sync
|
|
158
158
|
|
|
159
159
|
run_brain_doc_sync
|
|
160
160
|
|
|
@@ -847,8 +847,10 @@ emit_workflow_file_guards() {
|
|
|
847
847
|
echo "[LessonGuard] tasks/lessons.md has updates. Review prevention rules before coding."
|
|
848
848
|
fi
|
|
849
849
|
|
|
850
|
-
|
|
851
|
-
|
|
850
|
+
local changed_research
|
|
851
|
+
changed_research="$(has_changes_glob '^docs/researches/.*\.md$' || true)"
|
|
852
|
+
if [ -n "$changed_research" ]; then
|
|
853
|
+
echo "[ResearchGuard] ${changed_research} updated. Review research deeply before planning or implementation."
|
|
852
854
|
fi
|
|
853
855
|
|
|
854
856
|
local changed_plan
|
|
@@ -896,11 +898,11 @@ if [ "$plan_start_intent" -eq 1 ]; then
|
|
|
896
898
|
latest_plan="$(get_latest_plan || true)"
|
|
897
899
|
if [[ -n "$latest_plan" ]]; then
|
|
898
900
|
plan_research_ready=0
|
|
899
|
-
echo "[ResearchGate] Advisory:
|
|
900
|
-
echo "[ResearchGate]
|
|
901
|
+
echo "[ResearchGate] Advisory: docs/researches/*.md is missing or older than $latest_plan; skipping automatic Draft plan creation."
|
|
902
|
+
echo "[ResearchGate] Add or update a docs/researches/ report with fresh findings before creating the next plan."
|
|
901
903
|
else
|
|
902
|
-
echo "[ResearchGate] WARNING:
|
|
903
|
-
echo " 首次创建计划:建议先写
|
|
904
|
+
echo "[ResearchGate] WARNING: no docs/researches/*.md report exists yet. Consider creating one with current findings before drafting the plan."
|
|
905
|
+
echo " 首次创建计划:建议先写 docs/researches/<date-topic>.md,但不阻塞。"
|
|
904
906
|
fi
|
|
905
907
|
fi
|
|
906
908
|
fi
|
|
@@ -158,6 +158,46 @@ ${pending_lines}
|
|
|
158
158
|
EOF_CONTEXT
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
architecture_queue_pending() {
|
|
162
|
+
local requests_dir="docs/architecture/requests"
|
|
163
|
+
local pending_count="0"
|
|
164
|
+
local oldest_epoch="" oldest_days="unknown"
|
|
165
|
+
local now_epoch request detected detected_date detected_epoch
|
|
166
|
+
|
|
167
|
+
[[ -d "$requests_dir" ]] || return 1
|
|
168
|
+
|
|
169
|
+
now_epoch="$(date '+%s' 2>/dev/null || true)"
|
|
170
|
+
while IFS= read -r request; do
|
|
171
|
+
[[ -f "$request" ]] || continue
|
|
172
|
+
grep -Eq '^> \*\*Status\*\*:[[:space:]]*Pending[[:space:]]*$' "$request" || continue
|
|
173
|
+
pending_count=$((pending_count + 1))
|
|
174
|
+
detected="$(awk '/^> \*\*Detected\*\*:/ {sub(/^.*> \*\*Detected\*\*:[[:space:]]*/, ""); print; exit}' "$request" | xargs || true)"
|
|
175
|
+
detected_date="${detected%%T*}"
|
|
176
|
+
detected_epoch=""
|
|
177
|
+
if [[ "$detected_date" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
|
|
178
|
+
detected_epoch="$(date -j -f '%Y-%m-%d' "$detected_date" '+%s' 2>/dev/null || date -d "$detected_date" '+%s' 2>/dev/null || true)"
|
|
179
|
+
fi
|
|
180
|
+
if [[ -n "$detected_epoch" && ( -z "$oldest_epoch" || "$detected_epoch" -lt "$oldest_epoch" ) ]]; then
|
|
181
|
+
oldest_epoch="$detected_epoch"
|
|
182
|
+
fi
|
|
183
|
+
done < <(find "$requests_dir" -maxdepth 1 -type f -name '*.md' | sort)
|
|
184
|
+
|
|
185
|
+
[[ "$pending_count" -gt 0 ]] || return 1
|
|
186
|
+
if [[ -n "$now_epoch" && -n "$oldest_epoch" && "$now_epoch" -ge "$oldest_epoch" ]]; then
|
|
187
|
+
oldest_days="$(( (now_epoch - oldest_epoch) / 86400 ))d"
|
|
188
|
+
fi
|
|
189
|
+
|
|
190
|
+
cat <<EOF_CONTEXT
|
|
191
|
+
# Architecture Queue
|
|
192
|
+
|
|
193
|
+
${pending_count} capabilities have pending architecture drift (oldest ${oldest_days}). Run:
|
|
194
|
+
|
|
195
|
+
\`\`\`bash
|
|
196
|
+
bash scripts/architecture-queue.sh status
|
|
197
|
+
\`\`\`
|
|
198
|
+
EOF_CONTEXT
|
|
199
|
+
}
|
|
200
|
+
|
|
161
201
|
pending_plan_capture_context() {
|
|
162
202
|
local active_plan summary draft_path prompt_slug kind source_ref capture_source source_arg
|
|
163
203
|
|
|
@@ -335,6 +375,15 @@ if [[ -n "$pending_context" ]]; then
|
|
|
335
375
|
fi
|
|
336
376
|
fi
|
|
337
377
|
|
|
378
|
+
architecture_context="$(architecture_queue_pending || true)"
|
|
379
|
+
if [[ -n "$architecture_context" ]]; then
|
|
380
|
+
if [[ -n "$context" ]]; then
|
|
381
|
+
context="${context}"$'\n'"${architecture_context}"
|
|
382
|
+
else
|
|
383
|
+
context="$architecture_context"
|
|
384
|
+
fi
|
|
385
|
+
fi
|
|
386
|
+
|
|
338
387
|
pending_capture_context="$(pending_plan_capture_context || true)"
|
|
339
388
|
if [[ -n "$pending_capture_context" ]]; then
|
|
340
389
|
if [[ -n "$context" ]]; then
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
- Keep stable product truth in `docs/spec.md`.
|
|
42
42
|
- Keep sprint done definitions in `tasks/contracts/`, `tasks/reviews/`, and task-local implementation notes in `tasks/notes/`.
|
|
43
43
|
- Keep resumable state in `.ai/harness/handoff/current.md`.
|
|
44
|
-
- Treat `_ref/` as an occasional ignored external reference checkout cache; read or refresh it for comparison, but keep it out of commits and cite repo+commit/tag+path in `tasks/notes/` or `
|
|
44
|
+
- Treat `_ref/` as an occasional ignored external reference checkout cache; read or refresh it for comparison, but keep it out of commits and cite repo+commit/tag+path in `tasks/notes/` or `docs/researches/` when it influences a decision.
|
|
45
45
|
- Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files under `deploy/sql/`, and env examples.
|
|
46
46
|
- Treat `_ops/` as ignored local operations state for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit `_ops/*`.
|
|
47
47
|
- Treat contract-level execution as worktree-first: `scripts/plan-to-todo.sh --plan <approved-plan>` starts a linked `codex/<slug>` worktree when policy enables it, and `scripts/contract-worktree.sh finish` merges back only after Waza `/check` and sprint verification pass.
|