[issue-3288][slice-1/6] Documenter agent: snapshot of current... - #3318
Merged
Conversation
Reframe the documenter agent's task instructions and role definition so it documents the current state of the code rather than a changelog of what changed. - pipelines.py: the implement-phase documenter prompt now instructs current-state (snapshot) documentation, forbids SDLC artifacts (slice numbers, TASK-N ids, phase/HITL iteration numbers) in any doc/docstring/comment, prefers rationale over chronology, and folds new state into the snapshot while removing stale ledger entries. The per-phase summary and plan-phase orientation drop the change/phase-id framing. The --no-changes-needed no-op propose path is preserved behaviorally; only the example reason string drops its slice reference. - agent_roles.py: DOCUMENTER_ROLE description and responsibilities use snapshot framing; the FileAccessPattern (allowed/blocked_write) is byte-unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cover task-1-3: assert the documenter prompt assembly and role definition carry current-state (snapshot) framing, while the gateway write boundaries stay byte-identical. test_pipeline_prompts.py: - New TestDocumenterSnapshotFraming: the implement-phase documenter block instructs current-state/snapshot docs, forbids SDLC artifacts (slice numbers, TASK-N ids, phase/HITL iteration numbers) in any doc/docstring/comment, prefers rationale over chronology, drops the old change-oriented opening, and still emits the --no-changes-needed no-op propose path with a non-slice example reason. Per-phase summary and producer orientation also assert snapshot framing. - De-pinned two stale assertions that referenced the removed "Focus your documentation on changes from plan phase" string. test_agent_roles.py: - New TestDocumenterRoleSnapshotFraming pins DOCUMENTER_ROLE allowed_write / blocked_write byte-for-byte, asserts the lookup helper and can_write() behavior, and checks the description / responsibilities express snapshot framing. 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.
Text-only prompt/role edits making the documenter write current-state snapshots, not change-logs. Reframe the documenter "## Your Task" block in orchestrator/routes/pipelines.py and DOCUMENTER_ROLE in shared/egg_contracts/agent_roles.py to: describe the current state as if pipeline machinery never existed; never emit slice/TASK/phase/HITL ids into any doc/docstring/comment; include history only when tangibly valuable (rationale over chronology); fold new state into the snapshot and REMOVE stale ledger entries rather than append. Preserve verbatim the BRC no-op propose path and the DOCUMENTER_ROLE file_access boundaries. Establishes the go-forward standard the corpus is cleaned against.
Base PR: #3317
What's in this PR
Commits (3):
This slice
Documenter agent: snapshot of current state, not a ledger of changes
Files affected:
orchestrator/routes/pipelines.pyshared/egg_contracts/agent_roles.pyorchestrator/tests/test_pipeline_prompts.pyshared/egg_contracts/tests/test_agent_roles.pyTasks (3) + acceptance criteria
{phase_obj.id}" — reframe to current state without leaking the phase id as a documentation target. (c) the plan-phase orientation/no-op branch (≈14157). PRESERVE the "### When the slice warrants no doc updates (BRC: a producer with no work in a slice has no accepted no-op path — empty proposal deadlocks against reviewer NACK + escalates to HITL (gap in #2581/#2444) #3027)" no-op propose block (≈14800) and the plan-phase no-op branch behaviorally unchanged — the documenter MUST still propose--no-changes-neededwhen there is no doc impact; only reword the example reason string (≈14818, "e.g. slice-3 is a pure decomposition…") to a non-slice example. Do not touch any other agent's prompt block.--no-changes-neededno-op propose path is still present and behaviorally unchanged (implement-phase block and plan-phase branch); the no-op example reason no longer references a slice. - No other agent role's prompt text is modified.description="Updates documentation for the changes"and the change-orientedresponsibilities("Update relevant documentation", "Ensure README files are current", etc.) to snapshot framing: describe the current state of the code after a change; never embed SDLC artifacts (slice/TASK/phase/HITL iteration numbers) in docs, docstrings, or comments; prefer rationale over chronology; fold new state into the snapshot and remove stale ledger entries. PRESERVE the FileAccessPattern EXACTLY — allowed_write (docs/, **/README.md, /*.md, .egg-state/agent-outputs/) and blocked_write (/.py, **/.ts/tsx/js/jsx/go, tests/, .egg-state/contracts/, .github/) are a hard constraint and must not change. Keep the explanatory comments on the blocked_write entries (e.g. the No agent role can modify .github/ (CI workflows): hard-blocked by both egg patterns AND likely by GitHub auth scope #2508 branch-protection rationale) — those are load-bearing rationale, not ledger noise.--no-changes-neededno-op propose instruction for the no-doc-impact case. Add/extend a role test under shared/egg_contracts/tests/ asserting DOCUMENTER_ROLE retains its allowed_write / blocked_write boundaries after the wording change. Run viamake test.make testpasses for the touched suites.Stack
issue-3288egg/issue-3288/work