Repository navigation
Add cost-aware dreaming guidance and a repo-memory pilot - #75862
Conversation
Consolidate evidence into bounded derived pages and an immutable notes ledger while preserving producer state and requiring current-source recall checks. Co-authored-by: Copilot App <[email protected]>
Add a memory reuse checkpoint before tool and persistence selection, with evidence, consumer, and cost gates that avoid unnecessary dreaming workflows. Co-authored-by: Copilot App <[email protected]>
Rank existing-workflow cleanup first, bounded review by an existing agent second, and a separate dreamer last. Require a credible total-cost benefit and distinguish post-agent noop from avoiding invocation cost. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
Found one blocking correctness issue: the new scheduled dreamer lacks write permission for the repo-memory/ledger publication it is instructed to perform. The inline comment explains the failure mode.
The specialist pass was unavailable because its file-read command was rejected; this review is based on the pre-fetched diff and targeted source inspection. No code or tests were executed, per static-review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
What this change does: This adds a scheduled-dreaming guidance path, a weekly git-simulator workflow, producer recall, and contract tests. It also registers ledger maintenance and documents cache branch boundaries.
Should fix:
-
The documentation suite now runs a runtime harness (
.github/skills/agentic-workflows/tests/test_guidance.py:L194-L264)- What this is: A documentation test starts Node and re-implements temporary-memory setup to execute an inline workflow validator across three phases.
- Problem:
test_guidance.pyis a docs-contract suite, whileactions/setup/js/memory_custom_validation.test.cjsalready owns phase and validator behavior. The new bridge duplicates that test surface and makes workflow-script changes require Python test plumbing. - Fix: Move the validator cases beside the existing JavaScript tests and keep this suite to a small assertion that the workflow declares its limits and script.
- If we skip it: Each future inline validator adds another subprocess harness, and the documentation suite becomes a second runtime test runner.
-
Dreaming policy has three prose owners (
.github/aw/dreaming.md:L7-L38)- What this is: The guide repeats the dreamer decision, deterministic-cleanup ordering, and PR-cache scope already stated in
memory.md#scheduled-dreaminganddesigner.md#memory-reuse-checkpoint. - Problem: Changing the cost gate or cache boundary can leave one route stale; the added tests only check that each copy contains its phrases.
- Fix: Keep decision and scope text in
memory.md, route the designer and creator to it, and keepdreaming.mdimplementation-only. - If we skip it: Routine policy edits require synchronized documentation and test changes.
- What this is: The guide repeats the dreamer decision, deterministic-cleanup ordering, and PR-cache scope already stated in
Not checked: generated locks and correctness, security, and performance issues were outside this complexity-only review.
Verdict: fix 1 and 2 first.
Lean: -60 lines possible.
Generated by ✂️ Ponytail Reviewer for #75862 · codex · routed: gpt56 max · ~6 AIC · ⌖ ~1 AIC · ⊞ 118
Comment /ponytail to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd and /grill-with-docs. Leaving a comment review: the guidance and generated workflows verify cleanly, but the producer's read-only ledger contract is enforced only by prose, and two test assertions are weaker than they look.
📋 Key Themes & Highlights
Key Themes
- Ledger write exposure: the producer prompt forbids writes, yet its compiled lock grants
ledger_note_addandledger_note_vote. - Test quality: one negative guard matches the wrong heading level and can never fire on the leak it targets; another hard-wraps prose and will break on rewrap.
Verified (no action needed)
- ✅
agentics-maintenance.ymlregenerates with zero diff fromgh aw compileat this HEAD, so the hand-writtengit-simulator-lessonsblock is not drift. - ✅ Compiling all workflows produces no tracked changes, so the lock files match their sources.
- ✅ The
test_guidance.pysuite passes (67 tests), and the validator test runs the realmemory_custom_validation.cjs. - ✅ Cache scoping in
cache-memory.mdmatches ref-scoped restore behaviour.
Not verified
- Glob anchoring in
memory_file_eligibility.cjswas not traced.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~14 AIC · ⌖ ~2 AIC · ⊞ 5.4K
Comment /matt to run again
| standard-library `sqlite3` with `mode=ro`. Read at most 20 relevant notes with | ||
| their citations and votes. If current notes conflict with a derived lesson, | ||
| revalidate the primary evidence and abstain from the lesson when unresolved. | ||
| Votes are endorsements, not verification. Do not write or vote in this ledger. |
There was a problem hiding this comment.
[/grill-with-docs] The prompt says "Do not write or vote in this ledger," but the compiled daily-safeoutputs-git-simulator.lock.yml enables ledger_note_add and ledger_note_vote (tool list at line 334). The read-only contract is enforced only by prose, while the config grants write access to the shared ledgers/git-simulator-lessons branch.
💡 Suggested fix
If this producer should be read-only, remove the ledger write exposure from its ledger: configuration so the contract is enforced by config. If writes are intended, change the prompt to match and document who writes what. Prose alone should not be the only guard on a shared ledger.
@copilot please address this.
There was a problem hiding this comment.
The producer no longer declares ledger tools, so the read-only boundary is enforced by configuration; the lock was regenerated. Addressed in 77b4c5a0.
| self.assertIn("Do not load implementation details", section) | ||
| self.assertIn("](memory.md#scheduled-dreaming)", dreaming) | ||
| self.assertIn("Load this guide only after", dreaming) | ||
| for implementation in ("```yaml", "max-patch-size", "ledger_note_add", "### Write the dreaming prompt"): |
There was a problem hiding this comment.
[/tdd] The negative guard looks for ### Write the dreaming prompt (level 3), but the implementation heading in dreaming.md:100 is ## Write the Dreaming Prompt (level 2). A copied level-2 heading would pass this assertion, so the guard cannot catch the leak it is meant to prevent.
💡 Suggested test
Write the failing case first: add a fixture section containing ## Write the Dreaming Prompt and assert the check rejects it. Then match on lowercased heading text, ignoring the heading level, so the red test drives the fix.
@copilot please address this.
There was a problem hiding this comment.
The guard now matches the implementation heading case-insensitively at any Markdown heading level, with level-2 and level-3 regression cases. Addressed in 77b4c5a0.
| "repeated investigations", | ||
| "growing history or recall cost", | ||
| "stale/contradictory advice", | ||
| "even when the user does not mention\nmemory or dreaming", |
There was a problem hiding this comment.
[/tdd] This expectation matches a hard-wrapped two-line literal in the prose. Rewrapping memory.md would fail the test without any change in behavior, and several other assertions in this file follow the same pattern.
💡 Suggested fix
Collapse whitespace in the document text before matching, for example with ' '.join(text.split()), so the test checks wording rather than line breaks.
@copilot please address this.
There was a problem hiding this comment.
The prose contract assertions normalize whitespace before matching, so line wrapping does not affect the test. Addressed in 77b4c5a0.
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical findings expose ledger mutation privileges in a read-only consumer and unnecessary registry access, while an incomplete generated skill inventory will fail its consistency test.
4 open issues
What changed in this PR
Adds cost-aware memory-consolidation guidance to gh-aw workflow authoring and pilots it with the git simulator using existing repo-memory and ledger capabilities.
Changes:
- Discover memory-reuse needs early, preferring deterministic cleanup or an existing agent before adding a separate dreamer.
- Add bounded weekly evidence review and consumer recall while preserving simulator state and selection rules.
- Clarify cache isolation and publication limits, with regression tests and maintenance integration.
| File | Description |
|---|---|
pkg/cli/data/agentic_workflows_skill.md |
Routes consolidation requests through the memory decision guidance. |
pkg/cli/data/agentic_workflows_fallback_aw_files.json |
Registers the dreaming guide for fallback distribution. |
docs/src/content/docs/reference/cache-memory.md |
Clarifies PR-cache isolation and cross-workflow restore requirements. |
.github/workflows/weekly-git-simulator-dreaming.md |
Adds bounded consolidation, evidence checks, and derived-view validation. |
.github/workflows/daily-safeoutputs-git-simulator.md |
Adds lesson recall and separates producer-file ownership. |
.github/workflows/daily-safeoutputs-git-simulator.lock.yml |
Compiles the simulator’s runtime, ledger, and persistence configuration. |
.github/workflows/agentics-maintenance.yml |
Registers compaction for the simulator’s lessons ledger. |
.github/skills/agentic-workflows/tests/test_guidance.py |
Adds guidance, ownership, cache-scope, and validator regression checks. |
.github/skills/agentic-workflows/SKILL.md |
Adds routing for memory-consolidation requests. |
.github/aw/memory.md |
Defines cost-aware dreaming selection and persistence boundaries. |
.github/aw/dreaming.md |
Documents ownership, bounded review, publication, and consumer recall. |
.github/aw/designer.md |
Adds a memory-reuse checkpoint before persistence selection. |
.github/aw/create-agentic-workflow.md |
Connects workflow creation to the memory decision and implementation guides. |
Review effort: Max (auto)
| After loading the matching workflow prompt or skill, follow it directly: | ||
| - Design workflows from scratch via interview: `.github/aw/designer.md` | ||
| - Create new workflows: `.github/aw/create-agentic-workflow.md` | ||
| - Configure scheduled dreaming or consolidate persistent memory: `.github/aw/create-agentic-workflow.md`, then `.github/aw/memory.md#scheduled-dreaming`; load `.github/aw/dreaming.md` only when the decision and input scope justify implementation |
| ledger: | ||
| git-simulator-lessons: | ||
| type: notes | ||
| max-record-kb: 4 | ||
| max-patch-kb: 16 |
| network: | ||
| allowed: [] |
| safe-outputs: | ||
| noop: |
|
Copilot assignment requested for the following outstanding work:
Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI. Sous-chef requested-head: cbe5c78
|
Sous-chef requested-head: cbe5c78 |
…-differential Co-authored-by: gh-aw-bot <[email protected]>
Remove daily ledger mutation capabilities, project bounded regression IDs, restore producer history before final publication, and gate the publisher on trusted source-job status. Centralize dreaming policy and move executable validators into the runtime test suite. Co-authored-by: Copilot App <[email protected]>
|
Acknowledging this notice: This completion notice requests no additional code change. Its permission finding is addressed separately in the inline thread. |
|
Acknowledging this notice: This decision-gate status notice requests no code change. A no-action status is not evidence of complete review or successful publication. |
|
Acknowledging this notice: This reviewer-in-progress notice contains no actionable finding and needs no code change. It is not evidence of review completion. |
|
Acknowledging this notice: This specification-review startup notice requests no code change. Startup alone does not establish successful review completion. |
|
Acknowledging this notice: This startup notice requests no code change. The subsequent test-ownership and policy-ownership findings were addressed in their inline threads. |
|
Acknowledging this notice: This test-quality status notice requests no code change. The review batch was validated independently; a no-action status does not verify publication. |
Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
|
Copilot assignment requested for the following outstanding work:
Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI. Sous-chef requested-head: cee2f1e
|
I’m starting the requested branch update, review fixes, and CI investigation. Sous-chef requested-head: cee2f1e |
Co-authored-by: gh-aw-bot <[email protected]>
|
@copilot resolve the merge conflicts on this branch. |
…-differential # Conflicts: # pkg/workflow/compiled_lock_files_test.go # pkg/workflow/mcp_scripts_shared_queries_test.go Co-authored-by: pelikhan <[email protected]>
Resolved the merge conflicts and committed the merge from |
| @@ -0,0 +1,276 @@ | |||
| // @ts-check | |||
| "use strict"; | |||
There was a problem hiding this comment.
@copilot this file should be treated as test code and use a test suffix so that it is not copied in production builds
Co-authored-by: pelikhan <[email protected]>
|
🎉 This pull request is included in a new release. Release: |


Recurring investigators can repeatedly rediscover fixes or reuse stale advice as observations accumulate. This adds a bounded, evidence-backed consolidation pattern while teaching workflow creators not to add another model invocation unless its total benefit justifies the cost.
Approach
Important boundaries
This uses existing repo-memory and ledger storage, not a new dreaming frontmatter field or service. The validation runtime gains a documented source-job-result constant; ordinary failed-run recovery behavior is unchanged unless a custom validator opts into requiring success. Original producer evidence is preserved; votes and matching citation hashes are not truth, queued writes are not durable success, and ledger/repo-memory publication is not atomic. Daily historical semantic recall is deliberately limited to regression ranking.
Compilation security review
3a2844b7e9c422d3c10d287c895573f7108da1b3), and final artifact replacement reuses upload-artifact v7.0.2 (cf430e030ddbb5b0abf93d22962f4752f3646cd9). The generated daily ledger publisher and its action instances were removed.Validation
No workflows were dispatched; live operational benefit remains unmeasured.