feat: Assistant can refine the scenario, the Detection & Response narrative, or both (#44) - #57
Merged
Merged
Conversation
The AttackGen Assistant could only refine the generated scenario, not the purple-team Detection & Response narrative introduced in v0.13. Hand the narrative across in the cross-page handoff and add a target selector so the chat can edit either artifact. - scenario_page: _persist_and_render stashes last_defense_narrative (None when there's no narrative, so a stale one can't survive a plain-scenario regen). - Assistant page: 'Editing: Scenario / Detection & Response' radio (shown only when a narrative exists) routes the artifact, system prompt, and LangSmith trace tags; per-target chat histories avoid cross-contamination. Editing the narrative passes the scenario as read-only reference context. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e Assistant The Assistant could refine the scenario or the Detection & Response narrative, but not both together, so a cross-cutting change (industry, threat actor, technique, timeline) had to be made twice and could drift between the two. Add a third 'Scenario + Detection & Response' target that shows both artifacts, feeds both into the model context, and instructs the model to apply changes consistently across them. Each target keeps its own chat history. Verified end-to-end in the browser: a single 'education -> hospital' instruction in combined mode rewrote both the scenario and the narrative coherently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eam editing Covers the Assistant editing the Detection & Response narrative (#44) and the new combined 'Scenario + Detection & Response' editing mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Closes #44.
What
The AttackGen Assistant could only refine the generated scenario, not the purple-team Detection & Response narrative added in v0.13 (#42). This lets the chat edit the scenario, the narrative, or both together.
Behaviour
last_defense_narrative, mirroringlast_scenario_text).purple_team_narrativeon the defense and combined paths).Not in scope (matching the issue's framing)
narrative_mdis an edit target.Verification
test_scenario_page.pyasserts the newlast_defense_narrativehandoff across all three defense states (none / deterministic-only / narrative).🤖 Generated with Claude Code