Skip to content

refactor(prompts): deduplicate vv-controller template sections against universal injection - #44

Merged
osovv merged 2 commits into
mainfrom
factory/deduplikatsiya-instruktsiy-vv-controller-4-odnoi
Nov 8, 2026
Merged

osovv merged 2 commits into
mainfrom
factory/deduplikatsiya-instruktsiy-vv-controller-4-odnoi

Conversation

@osovv

@osovv osovv commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Why the change

Four system-prompt sections (working_state, assumption_discipline, editing_workflow, reroute_on_evidence) reached the vv-controller model twice with conflicting wordings — once from the bundled template and once from the plugin's universal injection — because the plugin's includes-based dedup guard cannot collapse differently-worded copies.

Special things to note

  • The universal injection versions (September 2026 calibration) win; the template's editing_workflow section was the only one with unique content, and its two lines (read the local contract before editing; stop on unclear or unexpectedly broad edits) were merged into the injected section before the template copy was removed.
  • Contract tests on both sides were updated deliberately: template-side assertions now pin the dedup contract (the four tags must be absent from the template), and the plugin side gained an assembled template-plus-injection test that counts each tag exactly once. No wording checks were weakened — the injected editing_workflow wording assertions keep their pinned lines and gain the two merged ones.
  • GRACE graph and verification entries (M-CLI-MANAGED-AGENTS, M-PLUGIN-SYSTEM-CONTEXT-INJECTION, V-M-*) were resynced to describe the single-source split; grace lint is clean and grace status reports only the expected unexplained-drift listing of the touched files.

Change outline

  templates/agents/vv-controller.md
- <working_state>…</working_state>        (template copy removed)
- <assumption_discipline>…</assumption_discipline>
- <editing_workflow>…</editing_workflow>
- <reroute_on_evidence>…</reroute_on_evidence>

  src/plugins/system-context-injection/index.ts   UNIVERSAL_PRIMARY_SYSTEM_CONTEXTS
  <editing_workflow>
+   Before editing, understand the relevant local contract, nearby tests, and surrounding code.
    When editing files, prefer the `edit` tool over shell-based rewrites when it is available.
    Read the file first, then use exact `line#hash#anchor` refs from the latest `read` output when present.
    Reserve `bash` for tests, builds, git, and other non-file-edit commands.
+   If direct editing reveals unclear behavior or unexpectedly broad scope, stop and reroute instead of continuing speculatively.
  </editing_workflow>

  src/plugins/system-context-injection.integration.test.ts
+ test("assembled vv-controller template plus injection keeps each universal section once")
+   // each of the four tags: exactly 1 occurrence in template + injection

Module contracts/CHANGE_SUMMARY of both sides and the GRACE graph/verification entries were synced in the same change.

osovv added 2 commits November 7, 2026 21:26
…sal injection

The working_state, assumption_discipline, editing_workflow, and
reroute_on_evidence sections reached the vv-controller model twice with
conflicting wordings: once from the bundled template and once from the
system-context-injection plugin's universal sections, which the
includes-based dedup guard cannot collapse.

The universal injected versions become the single source: the four
sections are removed from templates/agents/vv-controller.md, and the
template-only editing_workflow lines (read the local contract before
editing; stop on unclear or unexpectedly broad edits) are merged into
the injected section first. Template-side contract tests now pin the
dedup contract, the plugin integration test gains an assembled
template-plus-injection test counting each tag exactly once, and both
sides' module contracts, change summaries, and the GRACE graph and
verification entries are synced.
…aph and verification

Keep this branch's dedup contract entries for managed agents and the
system-context-injection plugin (universal injection as the single source
of the working_state, assumption_discipline, editing_workflow, and
reroute_on_evidence sections) alongside the session-owned-settings updates
from origin/main, adopting its family-settings-resolved wording in the
plugin entry. All other graph and verification updates come from
origin/main unchanged.
@osovv
osovv merged commit 6c5a615 into main Nov 8, 2026
1 check passed
osovv added a commit that referenced this pull request Nov 8, 2026
Resolve in favor of the consolidated seven-section controller guidance
(PRs #44 approach superseded per PR #47 description): the bundled
template stays the canonical wording source and system-context-injection
projects shared guidance from it via guidance.ts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant