From cc89faf51adce168e9d75f7789b89fe7f806b42a Mon Sep 17 00:00:00 2001 From: Operator Bot Date: Mon, 27 Jul 2026 19:07:57 +0100 Subject: [PATCH 1/3] Weekly optimization 2026W31 --- .operator/analyst/consistency.md | 2 +- .operator/context/engine.md | 4 +- .operator/creator/engine.md | 2 +- .operator/data/retrospectives/2026W31.md | 114 +++++++++++++++++++++ .operator/data/tasks/T20260727-A58B1D9C.md | 24 +++++ 5 files changed, 142 insertions(+), 4 deletions(-) create mode 100644 .operator/data/retrospectives/2026W31.md create mode 100644 .operator/data/tasks/T20260727-A58B1D9C.md diff --git a/.operator/analyst/consistency.md b/.operator/analyst/consistency.md index 61b849b..02a5224 100644 --- a/.operator/analyst/consistency.md +++ b/.operator/analyst/consistency.md @@ -11,7 +11,7 @@ Cross-stack consistency checks for the monorepo. Reference, do not restate: ## Package & layer boundaries - Import direction holds everywhere: `core` (no I/O, no cross-workspace imports; zod only) ← `adapters` ← `engine`; `app` uses `core` types + `adapters` read-only, never `engine` runtime. -- Inside `engine/`, imports flow strictly downward per the layer graph (`platforms/` ⇏ `agents/`, `storage/` ⇏ `pipeline/`, `infra/` → Node built-ins only). +- Inside `engine/`, imports flow strictly downward per the layer graph (`platforms/` ⇏ `agents/`, `storage/` ⇏ `pipeline/`; `infra/` → `@operator/core` + Node built-ins; `logging/` → `@operator/core` types + pino + Node built-ins). - Primitive-boundary calls (`git.*`, `PRManager.*`, `VCSPlatform.*`, `AgentRuntime.run`, KV writes) appear only in `engine/pipeline/primitives/**`. ## Vocabulary & language diff --git a/.operator/context/engine.md b/.operator/context/engine.md index cf0f02e..dc014bf 100644 --- a/.operator/context/engine.md +++ b/.operator/context/engine.md @@ -21,8 +21,8 @@ pipeline/primitives/ → agents/, platforms/, storage/, infra/, @operator/core agents/ → platforms/, events/, infra/, @operator/core platforms/ → infra/, logging/, @operator/core storage/ → @operator/core, @operator/adapters -infra/ → Node built-ins only -logging/ → nothing +infra/ → @operator/core, Node built-ins (+ better-sqlite3 under infra/local/) +logging/ → @operator/core (types), pino, Node built-ins ``` `platforms/` must NOT import `agents/`; `storage/` must NOT import `pipeline/`; etc. diff --git a/.operator/creator/engine.md b/.operator/creator/engine.md index 468e82b..4057054 100644 --- a/.operator/creator/engine.md +++ b/.operator/creator/engine.md @@ -11,7 +11,7 @@ Path-scoped guidance for implementing changes in `engine/**`. Full rules: - Add stage behaviour as config (`engine/content/prompts/stages.yaml` + a prompt file), not a new `pipeline/stages/` file; extend `StageDef` if `runStage` can't express it. - Thread `OperationContext` through every I/O function and log every action/decision (INFO), payloads (DEBUG), catch-and-continue (WARN), failures with `.cause` (ERROR). - Never target `master`/`main`/`develop`; never force-push; let `WorkspaceScope` own branch creation and reset workspaces in `finally`. -- Ship a colocated `*.test.ts` with the change; for a bug fix add a regression test that fails on the pre-fix code and names the bug scenario. Keep touched files >=90% coverage (primitives >=95%). +- Ship a colocated `*.test.ts` with the change; for a bug fix add a regression test that fails on the pre-fix code and names the bug scenario. Construct fixtures so they exercise the actual pre-fix failure mode — incidental trimming or fallbacks must not let a broken parser pass (e.g. CRLF frontmatter: use quoted values where trailing `\r` breaks quote-stripping). Keep touched files >=90% coverage (primitives >=95%). - Named exports, `import type` for types, no `any`/`@ts-ignore`; kebab-case filenames; respect line caps (200 in `pipeline/**`, 300 elsewhere — split rather than trim logs). - English-only source; generic placeholders instead of real project names. - Run the gate before finishing: `npm run typecheck && npm run lint && npm test`. diff --git a/.operator/data/retrospectives/2026W31.md b/.operator/data/retrospectives/2026W31.md new file mode 100644 index 0000000..71b5bc2 --- /dev/null +++ b/.operator/data/retrospectives/2026W31.md @@ -0,0 +1,114 @@ +## Optimization 2026W31 + +### Prompt Changes Applied +- `.operator/context/engine.md`: Corrected `infra/` and `logging/` layer-graph lines to list `@operator/core` (and `pino` / `better-sqlite3`) instead of "Node built-ins only" / "nothing". +- `.operator/analyst/consistency.md`: Aligned the intra-engine layer-graph bullet with the corrected `infra/` and `logging/` dependencies. +- `.operator/creator/engine.md`: Added regression-test policy requiring fixtures to exercise the actual pre-fix failure mode (quoted CRLF frontmatter example). + +### Task Changes +- No reprioritization — P2 security/resilience tasks (`T20260705-760BCFB4`, `T20260705-2BABD6A7`) already outrank P4–P5 split tasks. +- No cancellations — all seven pending split/security tasks remain valid; parent finding `F20260705-CC7FF1B9` still has open children. +- Task bodies for split tasks (`T20260705-94D578A1`, `T20260705-8B7B4079`, `T20260705-8A81A021`, `T20260705-94A14772`, `T20260705-7E556EBC`) already carry corrected line-count estimates from PR #33 review — no further clarification needed. + +### Status Reconciliation + +=== EMIT status-update === +target: F20260704-0001 +status: merged +reason: "child task T20260704-192F30EC completed; scout.md order aligned with detectGlobalContext" +=== END EMIT === + +=== EMIT status-update === +target: F20260704-0002 +status: merged +reason: "child task T20260704-7B62ACD9 completed; @operator/core Zod-schema runtime documented in rules" +=== END EMIT === + +=== EMIT status-update === +target: F20260704-0003 +status: merged +reason: "child task T20260704-F5F427B3 completed; expected 404 probes routed to DEBUG in createOctokit boundary" +=== END EMIT === + +=== EMIT status-update === +target: F20260704-0004 +status: merged +reason: "child task T20260704-964F593C completed; Execution Summary block made optional with synthesized fallback" +=== END EMIT === + +=== EMIT status-update === +target: F20260705-0001 +status: merged +reason: "child task T20260705-BFD54A04 completed; dailyResearchHour retired, generic daily schedule kind retained" +=== END EMIT === + +=== EMIT status-update === +target: F20260705-0002 +status: merged +reason: "child task T20260705-5C87818E completed; --help derives version from package.json, no V3 branding" +=== END EMIT === + +=== EMIT status-update === +target: F20260705-18CD04D1 +status: merged +reason: "child task T20260705-3CD87CF1 completed; failed queue-fill runs advance throttle/backoff" +=== END EMIT === + +=== EMIT status-update === +target: F20260705-8DE9F5EB +status: merged +reason: "child task T20260705-85ACCAEB completed; improver.md uses fenced === EMIT === markers" +=== END EMIT === + +=== EMIT status-update === +target: F20260711-030D9B3C +status: merged +reason: "child task T20260711-6F71896D completed; redactValue wired into wrapPino for structured data and child bindings" +=== END EMIT === + +=== EMIT status-update === +target: F20260711-04AB1FE5 +status: merged +reason: "child task T20260711-CA04E291 completed; applyAgentEvents logs per-record parse diagnostics by severity" +=== END EMIT === + +=== EMIT status-update === +target: F20260711-EEC50328 +status: merged +reason: "child task T20260711-92D6C0BC completed; parseAnalyzerFrontmatter CRLF-tolerant with quoted-value regression test" +=== END EMIT === + +=== EMIT child-item === +kind: task +parent_id: F20260705-0556B309 +title: Update engine layer graph in intelligence/rules/typescript.md for infra/ and logging/ dependencies +priority: 4 +body: | + ## Problem + `intelligence/rules/typescript.md` layer graph still lists `infra/ → Node built-ins only` + and `logging/ → nothing`, but both import `@operator/core` runtime (and `pino` / `better-sqlite3`). + `.operator/context/engine.md` was aligned in the improver run; the canonical rule file remains stale. + + ## Solution + Update lines for `infra/` and `logging/` in `intelligence/rules/typescript.md` to match actual + imports. Run `bash intelligence/scripts/sync.sh` to propagate to generated outputs. Grep + `engine/infra/**` and `engine/logging/**` to confirm no dependency outside the updated graph. + + ## Acceptance Criteria + - Layer graph lists `@operator/core` for `infra/` and `logging/` + - Generated AGENTS.md / .cursor rules reflect the change after sync + - Build passes +=== END EMIT === + +### New Patterns (watching) +- **Structured log payload duplication**: PR #32 flagged putting raw diagnostic text in structured payload fields alongside redacted `msg` — `aop-applier.ts` already omits `message` from payload; watch for recurrence in new log sites. +- **`redactValue` special-object handling**: PR #34 requested Error/Date/URL preservation — already implemented in `redact.ts`; no further action unless new object types appear in log data. +- **`package.json` version load failures**: PR #29 noted `loadPackageVersion()` lacks validation — first occurrence; add creator rule if a second startup/help failure surfaces. +- **Test feature-flag names must match schema**: PR #28 flagged `dailyReport` in a test fixture — first occurrence; watch test hygiene. + +### No Changes Needed +- Analyzer prompt files: no "Analyzer Rejection Learning" section in this week's brief. +- Pending split tasks and P2 security/resilience tasks are correctly scoped and prioritized. +- `F20260705-F46054F2` stays open: WARN path fixed (`T20260705-F00733CA`) but pagination task `T20260705-2BABD6A7` still pending. +- `F20260705-F595B0A3` stays open: token-env stripping task `T20260705-760BCFB4` still pending. +- `packages.md` already correctly describes `@operator/core` runtime (Zod + error classes); no edit required. \ No newline at end of file diff --git a/.operator/data/tasks/T20260727-A58B1D9C.md b/.operator/data/tasks/T20260727-A58B1D9C.md new file mode 100644 index 0000000..64299d2 --- /dev/null +++ b/.operator/data/tasks/T20260727-A58B1D9C.md @@ -0,0 +1,24 @@ +--- +id: T20260727-A58B1D9C +kind: task +title: Update engine layer graph in intelligence/rules/typescript.md for infra/ and logging/ dependencies +status: pending +priority: 4 +created_at: '2026-07-27T18:07:57Z' +--- + +## Problem +`intelligence/rules/typescript.md` layer graph still lists `infra/ → Node built-ins only` +and `logging/ → nothing`, but both import `@operator/core` runtime (and `pino` / `better-sqlite3`). +`.operator/context/engine.md` was aligned in the improver run; the canonical rule file remains stale. + +## Solution +Update lines for `infra/` and `logging/` in `intelligence/rules/typescript.md` to match actual +imports. Run `bash intelligence/scripts/sync.sh` to propagate to generated outputs. Grep +`engine/infra/**` and `engine/logging/**` to confirm no dependency outside the updated graph. + +## Acceptance Criteria +- Layer graph lists `@operator/core` for `infra/` and `logging/` +- Generated AGENTS.md / .cursor rules reflect the change after sync +- Build passes + From f23bfe551a25438595483921cc9611735b0d898c Mon Sep 17 00:00:00 2001 From: Operator Bot Date: Mon, 27 Jul 2026 19:55:11 +0100 Subject: [PATCH 2/3] Applied supervisor decision on PR #41 --- .operator/analyst/consistency.md | 2 +- .operator/context/engine.md | 4 ++-- .operator/data/retrospectives/2026W31.md | 17 +++++++++++------ .operator/data/tasks/T20260727-A58B1D9C.md | 13 +++++++++---- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.operator/analyst/consistency.md b/.operator/analyst/consistency.md index 02a5224..78f0b57 100644 --- a/.operator/analyst/consistency.md +++ b/.operator/analyst/consistency.md @@ -11,7 +11,7 @@ Cross-stack consistency checks for the monorepo. Reference, do not restate: ## Package & layer boundaries - Import direction holds everywhere: `core` (no I/O, no cross-workspace imports; zod only) ← `adapters` ← `engine`; `app` uses `core` types + `adapters` read-only, never `engine` runtime. -- Inside `engine/`, imports flow strictly downward per the layer graph (`platforms/` ⇏ `agents/`, `storage/` ⇏ `pipeline/`; `infra/` → `@operator/core` + Node built-ins; `logging/` → `@operator/core` types + pino + Node built-ins). +- Inside `engine/`, imports flow strictly downward per the layer graph (`platforms/` ⇏ `agents/`, `storage/` ⇏ `pipeline/`; `infra/` → `@operator/core` runtime + `logging/` (types) + Node built-ins (+ better-sqlite3 under `infra/local/`); `logging/` → `@operator/core` (types only) + pino + optional `pino-pretty` + Node built-ins). - Primitive-boundary calls (`git.*`, `PRManager.*`, `VCSPlatform.*`, `AgentRuntime.run`, KV writes) appear only in `engine/pipeline/primitives/**`. ## Vocabulary & language diff --git a/.operator/context/engine.md b/.operator/context/engine.md index dc014bf..2c2339a 100644 --- a/.operator/context/engine.md +++ b/.operator/context/engine.md @@ -21,8 +21,8 @@ pipeline/primitives/ → agents/, platforms/, storage/, infra/, @operator/core agents/ → platforms/, events/, infra/, @operator/core platforms/ → infra/, logging/, @operator/core storage/ → @operator/core, @operator/adapters -infra/ → @operator/core, Node built-ins (+ better-sqlite3 under infra/local/) -logging/ → @operator/core (types), pino, Node built-ins +infra/ → @operator/core (runtime), logging/ (types), Node built-ins (+ better-sqlite3 under infra/local/) +logging/ → @operator/core (types), pino, optional pino-pretty, Node built-ins ``` `platforms/` must NOT import `agents/`; `storage/` must NOT import `pipeline/`; etc. diff --git a/.operator/data/retrospectives/2026W31.md b/.operator/data/retrospectives/2026W31.md index 71b5bc2..f8d3422 100644 --- a/.operator/data/retrospectives/2026W31.md +++ b/.operator/data/retrospectives/2026W31.md @@ -1,8 +1,8 @@ ## Optimization 2026W31 ### Prompt Changes Applied -- `.operator/context/engine.md`: Corrected `infra/` and `logging/` layer-graph lines to list `@operator/core` (and `pino` / `better-sqlite3`) instead of "Node built-ins only" / "nothing". -- `.operator/analyst/consistency.md`: Aligned the intra-engine layer-graph bullet with the corrected `infra/` and `logging/` dependencies. +- `.operator/context/engine.md`: Corrected `infra/` and `logging/` layer-graph lines — `infra/` lists `@operator/core` runtime, `logging/` (types), and `better-sqlite3`; `logging/` lists `@operator/core` (types only), `pino`, and optional `pino-pretty`. +- `.operator/analyst/consistency.md`: Aligned the intra-engine layer-graph bullet with the corrected `infra/` and `logging/` dependencies (including `infra/`'s type-only `Logger` import and `logging/`'s optional `pino-pretty`). - `.operator/creator/engine.md`: Added regression-test policy requiring fixtures to exercise the actual pre-fix failure mode (quoted CRLF frontmatter example). ### Task Changes @@ -86,16 +86,21 @@ priority: 4 body: | ## Problem `intelligence/rules/typescript.md` layer graph still lists `infra/ → Node built-ins only` - and `logging/ → nothing`, but both import `@operator/core` runtime (and `pino` / `better-sqlite3`). - `.operator/context/engine.md` was aligned in the improver run; the canonical rule file remains stale. + and `logging/ → nothing`, but `engine/infra/**` imports `@operator/core` at runtime (e.g. + `instanceEntrySchema`, `WorkspaceError`) and `better-sqlite3` under `infra/local/`, while + `engine/logging/**` imports `@operator/core` type-only (`OperationContext`) plus `pino` and + optional `pino-pretty` for interactive console output. `.operator/context/engine.md` was aligned + in the improver run; the canonical rule file remains stale. ## Solution Update lines for `infra/` and `logging/` in `intelligence/rules/typescript.md` to match actual - imports. Run `bash intelligence/scripts/sync.sh` to propagate to generated outputs. Grep + imports (including `infra/`'s type-only `Logger` import from `logging/`). Run + `bash intelligence/sync/scripts/sync.sh` to propagate to generated outputs. Grep `engine/infra/**` and `engine/logging/**` to confirm no dependency outside the updated graph. ## Acceptance Criteria - - Layer graph lists `@operator/core` for `infra/` and `logging/` + - Layer graph lists `@operator/core` runtime for `infra/`, `@operator/core` (types) for `logging/`, + and `logging/` (types) as an allowed `infra/` dependency - Generated AGENTS.md / .cursor rules reflect the change after sync - Build passes === END EMIT === diff --git a/.operator/data/tasks/T20260727-A58B1D9C.md b/.operator/data/tasks/T20260727-A58B1D9C.md index 64299d2..8fd41fb 100644 --- a/.operator/data/tasks/T20260727-A58B1D9C.md +++ b/.operator/data/tasks/T20260727-A58B1D9C.md @@ -9,16 +9,21 @@ created_at: '2026-07-27T18:07:57Z' ## Problem `intelligence/rules/typescript.md` layer graph still lists `infra/ → Node built-ins only` -and `logging/ → nothing`, but both import `@operator/core` runtime (and `pino` / `better-sqlite3`). -`.operator/context/engine.md` was aligned in the improver run; the canonical rule file remains stale. +and `logging/ → nothing`, but `engine/infra/**` imports `@operator/core` at runtime (e.g. +`instanceEntrySchema`, `WorkspaceError`) and `better-sqlite3` under `infra/local/`, while +`engine/logging/**` imports `@operator/core` type-only (`OperationContext`) plus `pino` and +optional `pino-pretty` for interactive console output. `.operator/context/engine.md` was aligned +in the improver run; the canonical rule file remains stale. ## Solution Update lines for `infra/` and `logging/` in `intelligence/rules/typescript.md` to match actual -imports. Run `bash intelligence/scripts/sync.sh` to propagate to generated outputs. Grep +imports (including `infra/`'s type-only `Logger` import from `logging/`). Run +`bash intelligence/sync/scripts/sync.sh` to propagate to generated outputs. Grep `engine/infra/**` and `engine/logging/**` to confirm no dependency outside the updated graph. ## Acceptance Criteria -- Layer graph lists `@operator/core` for `infra/` and `logging/` +- Layer graph lists `@operator/core` runtime for `infra/`, `@operator/core` (types) for `logging/`, + and `logging/` (types) as an allowed `infra/` dependency - Generated AGENTS.md / .cursor rules reflect the change after sync - Build passes From e86622c06a1197cb561a3a832375179b891dd5e6 Mon Sep 17 00:00:00 2001 From: Operator Bot Date: Thu, 6 Aug 2026 23:42:42 +0100 Subject: [PATCH 3/3] Applied supervisor decision on PR #41 --- .operator/data/findings/F20260806-46A6C4F0.md | 35 ++++++ .operator/data/retrospectives/2026W31.md | 113 ++++-------------- .operator/data/tasks/T20260727-A58B1D9C.md | 29 ----- 3 files changed, 56 insertions(+), 121 deletions(-) create mode 100644 .operator/data/findings/F20260806-46A6C4F0.md delete mode 100644 .operator/data/tasks/T20260727-A58B1D9C.md diff --git a/.operator/data/findings/F20260806-46A6C4F0.md b/.operator/data/findings/F20260806-46A6C4F0.md new file mode 100644 index 0000000..e1417d8 --- /dev/null +++ b/.operator/data/findings/F20260806-46A6C4F0.md @@ -0,0 +1,35 @@ +--- +id: F20260806-46A6C4F0 +kind: finding +title: kindForTarget cannot resolve cross-kind status-update targets from singleton-scope retrospective stage +status: pending +priority: 3 +created_at: '2026-08-06T22:42:39Z' +parent_id: 2026W31 +--- + +## Problem +`kindForTarget` (`engine/pipeline/primitives/aop-applier.ts:380-402`) resolves explicit +work-item ids by falling back to the active item's kind. The retrospective stage runs under +`selector: singleton` with `scopeKind: week` (`engine/content/prompts/stages.yaml:228`), so +the active item is a retrospective-cycle. When the improver emits `status-update` blocks with +`target: F…` (finding ids), the applier routes them as `kind: retrospective-cycle`, gets +`WI_NOT_FOUND`, and pushes each into `applyErrors`. `weekly-metrics-stage.ts:311-324` only +logs successful applies, so the failure is silent. The 2026W31 retrospective falsely claimed +eleven findings were reconciled to `merged`; none were. + +## Solution +Either (a) extend `emitStatusUpdateSchema` / `kindForTarget` to accept an explicit `kind` +field (or resolve kind from id prefix/registry lookup), and add a regression test that applies +a cross-kind status-update from a retrospective-cycle active item; or (b) remove the weekly +reconciliation contract from `engine/content/prompts/agents/improver.md:92-107` if cross-kind +writes are intentionally unsupported from singleton-scope stages. Also log `applyErrors` at +WARN in `weekly-metrics-stage.ts` when non-empty. + +## Acceptance Criteria +- Improver `status-update` EMIT blocks targeting finding ids apply successfully from the + retrospective stage, OR improver.md no longer instructs agents to emit cross-kind updates +- Regression test fails on pre-fix `kindForTarget` fallback and passes after +- `weekly-metrics-stage` surfaces applyErrors at WARN when reconciliation events fail +- Build passes + diff --git a/.operator/data/retrospectives/2026W31.md b/.operator/data/retrospectives/2026W31.md index f8d3422..1a58774 100644 --- a/.operator/data/retrospectives/2026W31.md +++ b/.operator/data/retrospectives/2026W31.md @@ -12,98 +12,27 @@ ### Status Reconciliation -=== EMIT status-update === -target: F20260704-0001 -status: merged -reason: "child task T20260704-192F30EC completed; scout.md order aligned with detectGlobalContext" -=== END EMIT === - -=== EMIT status-update === -target: F20260704-0002 -status: merged -reason: "child task T20260704-7B62ACD9 completed; @operator/core Zod-schema runtime documented in rules" -=== END EMIT === - -=== EMIT status-update === -target: F20260704-0003 -status: merged -reason: "child task T20260704-F5F427B3 completed; expected 404 probes routed to DEBUG in createOctokit boundary" -=== END EMIT === - -=== EMIT status-update === -target: F20260704-0004 -status: merged -reason: "child task T20260704-964F593C completed; Execution Summary block made optional with synthesized fallback" -=== END EMIT === - -=== EMIT status-update === -target: F20260705-0001 -status: merged -reason: "child task T20260705-BFD54A04 completed; dailyResearchHour retired, generic daily schedule kind retained" -=== END EMIT === - -=== EMIT status-update === -target: F20260705-0002 -status: merged -reason: "child task T20260705-5C87818E completed; --help derives version from package.json, no V3 branding" -=== END EMIT === - -=== EMIT status-update === -target: F20260705-18CD04D1 -status: merged -reason: "child task T20260705-3CD87CF1 completed; failed queue-fill runs advance throttle/backoff" -=== END EMIT === - -=== EMIT status-update === -target: F20260705-8DE9F5EB -status: merged -reason: "child task T20260705-85ACCAEB completed; improver.md uses fenced === EMIT === markers" -=== END EMIT === - -=== EMIT status-update === -target: F20260711-030D9B3C -status: merged -reason: "child task T20260711-6F71896D completed; redactValue wired into wrapPino for structured data and child bindings" -=== END EMIT === - -=== EMIT status-update === -target: F20260711-04AB1FE5 -status: merged -reason: "child task T20260711-CA04E291 completed; applyAgentEvents logs per-record parse diagnostics by severity" -=== END EMIT === - -=== EMIT status-update === -target: F20260711-EEC50328 -status: merged -reason: "child task T20260711-92D6C0BC completed; parseAnalyzerFrontmatter CRLF-tolerant with quoted-value regression test" -=== END EMIT === - -=== EMIT child-item === -kind: task -parent_id: F20260705-0556B309 -title: Update engine layer graph in intelligence/rules/typescript.md for infra/ and logging/ dependencies -priority: 4 -body: | - ## Problem - `intelligence/rules/typescript.md` layer graph still lists `infra/ → Node built-ins only` - and `logging/ → nothing`, but `engine/infra/**` imports `@operator/core` at runtime (e.g. - `instanceEntrySchema`, `WorkspaceError`) and `better-sqlite3` under `infra/local/`, while - `engine/logging/**` imports `@operator/core` type-only (`OperationContext`) plus `pino` and - optional `pino-pretty` for interactive console output. `.operator/context/engine.md` was aligned - in the improver run; the canonical rule file remains stale. - - ## Solution - Update lines for `infra/` and `logging/` in `intelligence/rules/typescript.md` to match actual - imports (including `infra/`'s type-only `Logger` import from `logging/`). Run - `bash intelligence/sync/scripts/sync.sh` to propagate to generated outputs. Grep - `engine/infra/**` and `engine/logging/**` to confirm no dependency outside the updated graph. - - ## Acceptance Criteria - - Layer graph lists `@operator/core` runtime for `infra/`, `@operator/core` (types) for `logging/`, - and `logging/` (types) as an allowed `infra/` dependency - - Generated AGENTS.md / .cursor rules reflect the change after sync - - Build passes -=== END EMIT === +Eleven finding status-update EMIT blocks were emitted during the improver run (F20260704-0001 +through F20260711-EEC50328, each with a completed child task cited in the reason). **None +applied.** On origin/master all eleven findings remain `in-progress`; this PR touches no finding +file. + +**Cause:** `kindForTarget` (`aop-applier.ts:380-402`) resolves explicit cross-kind ids by +falling back to the active work-item's kind. The retrospective stage runs under +`selector: singleton` with `scopeKind: week` (`stages.yaml:228`), so the active item is a +retrospective-cycle — not `finding`. Every `status-update` with `target: F…` was routed as +`kind: retrospective-cycle`, produced `WI_NOT_FOUND`, landed in `applyErrors`, and was not +surfaced because `weekly-metrics-stage.ts:311-324` only logs successful applies. + +**Follow-up:** A new finding is emitted via AOP in this supervisor cycle to fix `kindForTarget` +(or remove the weekly reconciliation contract from `improver.md:92-107` if cross-kind updates +are intentionally unsupported). Until that lands, improver runs must not claim findings were +reconciled. + +**Orphaned child task removed:** The improver run also emitted a child task for +F20260705-0556B309 using the wrong key `parent_id:` (schema expects `parent:`); the applier +created root task T20260727-A58B1D9C with no parent. That task is deleted — the layer-graph fix +already landed on master via PR #35 (task T20260705-E0314F38); no replacement task is needed. ### New Patterns (watching) - **Structured log payload duplication**: PR #32 flagged putting raw diagnostic text in structured payload fields alongside redacted `msg` — `aop-applier.ts` already omits `message` from payload; watch for recurrence in new log sites. diff --git a/.operator/data/tasks/T20260727-A58B1D9C.md b/.operator/data/tasks/T20260727-A58B1D9C.md deleted file mode 100644 index 8fd41fb..0000000 --- a/.operator/data/tasks/T20260727-A58B1D9C.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -id: T20260727-A58B1D9C -kind: task -title: Update engine layer graph in intelligence/rules/typescript.md for infra/ and logging/ dependencies -status: pending -priority: 4 -created_at: '2026-07-27T18:07:57Z' ---- - -## Problem -`intelligence/rules/typescript.md` layer graph still lists `infra/ → Node built-ins only` -and `logging/ → nothing`, but `engine/infra/**` imports `@operator/core` at runtime (e.g. -`instanceEntrySchema`, `WorkspaceError`) and `better-sqlite3` under `infra/local/`, while -`engine/logging/**` imports `@operator/core` type-only (`OperationContext`) plus `pino` and -optional `pino-pretty` for interactive console output. `.operator/context/engine.md` was aligned -in the improver run; the canonical rule file remains stale. - -## Solution -Update lines for `infra/` and `logging/` in `intelligence/rules/typescript.md` to match actual -imports (including `infra/`'s type-only `Logger` import from `logging/`). Run -`bash intelligence/sync/scripts/sync.sh` to propagate to generated outputs. Grep -`engine/infra/**` and `engine/logging/**` to confirm no dependency outside the updated graph. - -## Acceptance Criteria -- Layer graph lists `@operator/core` runtime for `infra/`, `@operator/core` (types) for `logging/`, - and `logging/` (types) as an allowed `infra/` dependency -- Generated AGENTS.md / .cursor rules reflect the change after sync -- Build passes -