feat(research-guidance): prohibit target-codebase edits during research#20
Open
cdeutsch wants to merge 1 commit into
Open
feat(research-guidance): prohibit target-codebase edits during research#20cdeutsch wants to merge 1 commit into
cdeutsch wants to merge 1 commit into
Conversation
Adds a top-level Anti-Pattern and a dedicated "Handling Direct Edit
Requests During Research" section. The rule: do not edit files in
target codebases during research, even when the user requests it.
Capture the change as a plan task (or a research amendment that
names a future task) instead.
Why this rule exists:
During a recent research session (tailwind-app-marketing-sync, in
a separate projects repo), the agent accepted a direct user
instruction to edit globals.css in the target codebase mid-research.
The user quickly reverted and captured the change as a Phase 1 task.
The failure mode: a user reacts to a research finding with an
imperative instruction ("fix X", "update Y"), the agent dutifully
executes it, and planning / dry-run / materialization get bypassed.
This breaks the SDLC's front-loaded research-and-plan discipline.
Auto mode does not authorize phase-skipping either.
What the section specifies:
- Pause when the user gives a direct edit instruction during research.
- Ask: amend research (capture as a named future task) or hold for
planning?
- If the user wants the edit executed out-of-band anyway, require
explicit phase-skipping confirmation and log the deviation.
Explicit exception:
Files that ARE editable during research, because they are the SDLC
authoring substrate, not target codebases:
- features/<name>/ — research docs, FEATURE_LOG.md
- the SDLC projects directory's own CLAUDE.md (policy updates)
- the drvr-sdlc-plugin's own files (skill prompts, hooks, templates)
A matching project-level principle has been added to the
driver-sdlc-projects CLAUDE.md so the rule applies regardless of
whether research-guidance is the active skill.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cdeutsch
commented
Apr 22, 2026
| - The drvr-sdlc-plugin's own files (skill prompts, hooks, templates) | ||
|
|
||
| These are not "target codebases" — they are the SDLC authoring substrate. The restriction applies to the codebases under research, named in `research/00-overview.md`'s Codebases table. | ||
|
|
Author
There was a problem hiding this comment.
This might be a bit verbose.
Basically just need something to prevent editing the codebase during research.
My prompt was something like:
let's update the .dark block from globals.css to be empty with a comment on how it works. Remove any other overrides that are outside the block in globals.css
The context was to update the research docs to say that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a top-level Anti-Pattern and a dedicated "Handling Direct Edit Requests During Research" section. The rule: do not edit files in target codebases during research, even when the user requests it. Capture the change as a plan task (or a research amendment that names a future task) instead.
Why this rule exists:
During a recent research session (tailwind-app-marketing-sync, in a separate projects repo), the agent accepted a direct user instruction to edit globals.css in the target codebase mid-research. The user quickly reverted and captured the change as a Phase 1 task.
The failure mode: a user reacts to a research finding with an imperative instruction ("fix X", "update Y"), the agent dutifully executes it, and planning / dry-run / materialization get bypassed. This breaks the SDLC's front-loaded research-and-plan discipline. Auto mode does not authorize phase-skipping either.
What the section specifies:
Explicit exception:
Files that ARE editable during research, because they are the SDLC authoring substrate, not target codebases:
A matching project-level principle has been added to the driver-sdlc-projects CLAUDE.md so the rule applies regardless of whether research-guidance is the active skill.