From 79e33f0b7774ee0da81746817bc7cfabe35d01f8 Mon Sep 17 00:00:00 2001 From: bouillipx Date: Tue, 3 Mar 2026 16:49:03 +0800 Subject: [PATCH 1/2] docs(agent): archive refactor-dare-agent-structure-split closeout Archive the completed refactor-dare-agent-structure-split OpenSpec change after PR #163 merged. Key changes: - run openspec archive so the completed change moves under openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split - sync the modularized DareAgent orchestration requirement back into openspec/specs/core-runtime/spec.md - move the feature aggregation record into docs/features/archive/ and rewrite artifact links to the archived change path - fix the archived tasks evidence note so task 3.1 no longer claims branch-level coverage is pending - record archive verification evidence for openspec list, full spec validation, and governance evidence truth Rationale: PR #163 completed the last implementation and review work for A-101, but the change still remained active in OpenSpec and the feature doc still lived under docs/features/. This commit performs the required completion-archive step so governance state, spec state, and evidence state all match the merged runtime history. --- .../refactor-dare-agent-structure-split.md | 21 +++++++++++++++---- .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/core-runtime/spec.md | 0 .../tasks.md | 2 +- openspec/specs/core-runtime/spec.md | 15 +++++++++++++ 7 files changed, 33 insertions(+), 5 deletions(-) rename docs/features/{ => archive}/refactor-dare-agent-structure-split.md (75%) rename openspec/changes/{refactor-dare-agent-structure-split => archive/2026-03-03-refactor-dare-agent-structure-split}/.openspec.yaml (100%) rename openspec/changes/{refactor-dare-agent-structure-split => archive/2026-03-03-refactor-dare-agent-structure-split}/design.md (100%) rename openspec/changes/{refactor-dare-agent-structure-split => archive/2026-03-03-refactor-dare-agent-structure-split}/proposal.md (100%) rename openspec/changes/{refactor-dare-agent-structure-split => archive/2026-03-03-refactor-dare-agent-structure-split}/specs/core-runtime/spec.md (100%) rename openspec/changes/{refactor-dare-agent-structure-split => archive/2026-03-03-refactor-dare-agent-structure-split}/tasks.md (95%) diff --git a/docs/features/refactor-dare-agent-structure-split.md b/docs/features/archive/refactor-dare-agent-structure-split.md similarity index 75% rename from docs/features/refactor-dare-agent-structure-split.md rename to docs/features/archive/refactor-dare-agent-structure-split.md index e42d83fd..02429c82 100644 --- a/docs/features/refactor-dare-agent-structure-split.md +++ b/docs/features/archive/refactor-dare-agent-structure-split.md @@ -4,7 +4,7 @@ doc_kind: feature topics: ["agent", "refactor", "orchestration", "testing"] created: 2026-03-03 updated: 2026-03-03 -status: active +status: archived mode: openspec --- @@ -16,9 +16,11 @@ mode: openspec ## OpenSpec Artifacts -- Proposal: `openspec/changes/refactor-dare-agent-structure-split/proposal.md` -- Design: `openspec/changes/refactor-dare-agent-structure-split/design.md` -- Tasks: `openspec/changes/refactor-dare-agent-structure-split/tasks.md` +- Proposal: `openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/proposal.md` +- Design: `openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/design.md` +- Specs: + - `openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/specs/core-runtime/spec.md` +- Tasks: `openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/tasks.md` ## Governance Anchors @@ -35,6 +37,11 @@ mode: openspec - `../../.venv/bin/python -m pytest -q tests/unit/test_dare_agent_orchestration_split.py::test_run_tool_loop_retries_until_done_predicate_is_satisfied` - `../../.venv/bin/python -m pytest -q tests/unit/test_dare_agent_orchestration_split.py` - `../../.venv/bin/python -m pytest -q tests/unit/test_five_layer_agent.py tests/unit/test_dare_agent_hook_governance.py tests/unit/test_dare_agent_hook_transport_boundary.py` +- `git push origin codex/refactor-dare-agent-structure-split` +- `openspec archive refactor-dare-agent-structure-split -y` +- `openspec list` +- `openspec validate --specs --strict --json --no-interactive` +- `./scripts/ci/check_governance_evidence_truth.sh` ### Results @@ -44,6 +51,11 @@ mode: openspec - `../../.venv/bin/python -m pytest -q tests/unit/test_dare_agent_orchestration_split.py::test_run_tool_loop_retries_until_done_predicate_is_satisfied`: passed (`1 passed, 1 warning`) after the PR #163 review fix raised `max_calls` above the expected completion point, so the retry coverage now proves the loop exits on `done_predicate` satisfaction instead of coincidentally stopping at the budget ceiling. - `../../.venv/bin/python -m pytest -q tests/unit/test_dare_agent_orchestration_split.py`: passed (`9 passed, 1 warning`) with both the existing façade delegation assertions and the new direct execution-unit tests. - `../../.venv/bin/python -m pytest -q tests/unit/test_five_layer_agent.py tests/unit/test_dare_agent_hook_governance.py tests/unit/test_dare_agent_hook_transport_boundary.py`: passed (`39 passed, 1 warning`) after the new unit tests landed, confirming no regression on the previously accepted A-101 coverage surface. +- `git push origin codex/refactor-dare-agent-structure-split`: published the verification branch and enabled PR `#163`. +- `openspec archive refactor-dare-agent-structure-split -y`: archived the completed change to `openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/` and synced the modularization requirement back into the main `core-runtime` spec. +- `openspec list`: after archive, `refactor-dare-agent-structure-split` no longer appears in the active change list, confirming the change is out of execution scope. +- `openspec validate --specs --strict --json --no-interactive`: passed (`39/39` specs valid, `0` failures) after the `core-runtime` spec was updated during archive. +- `./scripts/ci/check_governance_evidence_truth.sh`: passed after the archive move, artifact-link rewrite, and evidence closeout updates were synchronized. ### Behavior Verification @@ -62,3 +74,4 @@ mode: openspec - Historical owner feedback thread: `https://github.com/zts212653/Deterministic-Agent-Runtime-Engine/pull/117` - Final verification PR: `https://github.com/zts212653/Deterministic-Agent-Runtime-Engine/pull/163` - PR #163 review thread: `https://github.com/zts212653/Deterministic-Agent-Runtime-Engine/pull/163#discussion_r2875871921` +- Archive target: `openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/` diff --git a/openspec/changes/refactor-dare-agent-structure-split/.openspec.yaml b/openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/.openspec.yaml similarity index 100% rename from openspec/changes/refactor-dare-agent-structure-split/.openspec.yaml rename to openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/.openspec.yaml diff --git a/openspec/changes/refactor-dare-agent-structure-split/design.md b/openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/design.md similarity index 100% rename from openspec/changes/refactor-dare-agent-structure-split/design.md rename to openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/design.md diff --git a/openspec/changes/refactor-dare-agent-structure-split/proposal.md b/openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/proposal.md similarity index 100% rename from openspec/changes/refactor-dare-agent-structure-split/proposal.md rename to openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/proposal.md diff --git a/openspec/changes/refactor-dare-agent-structure-split/specs/core-runtime/spec.md b/openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/specs/core-runtime/spec.md similarity index 100% rename from openspec/changes/refactor-dare-agent-structure-split/specs/core-runtime/spec.md rename to openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/specs/core-runtime/spec.md diff --git a/openspec/changes/refactor-dare-agent-structure-split/tasks.md b/openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/tasks.md similarity index 95% rename from openspec/changes/refactor-dare-agent-structure-split/tasks.md rename to openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/tasks.md index 7cfe7853..e3a004f9 100644 --- a/openspec/changes/refactor-dare-agent-structure-split/tasks.md +++ b/openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/tasks.md @@ -37,7 +37,7 @@ - `dare_framework/agent/_internal/orchestration.py` - New targeted tests: - `tests/unit/test_dare_agent_orchestration_split.py` - - Current scope verifies facade-to-internal delegation wiring; branch-level success/failure/approval/policy/retry coverage remains pending under task 3.1. + - Current scope now covers both facade-to-internal delegation wiring and direct `_internal` success/failure/approval/policy/retry branches completed under task 3.1. - Regression suites executed: - `/Users/lang/workspace/github/Deterministic-Agent-Runtime-Engine/.venv/bin/pytest -q tests/unit/test_five_layer_agent.py tests/unit/test_dare_agent_hook_governance.py tests/unit/test_dare_agent_hook_transport_boundary.py tests/unit/test_dare_agent_orchestration_split.py` - `PYTHONPYCACHEPREFIX=/tmp/pycache python3 -m compileall -q dare_framework tests` diff --git a/openspec/specs/core-runtime/spec.md b/openspec/specs/core-runtime/spec.md index 461747b0..07b99494 100644 --- a/openspec/specs/core-runtime/spec.md +++ b/openspec/specs/core-runtime/spec.md @@ -227,3 +227,18 @@ The runtime SHALL support deterministic approval rule scopes (`once`, `session`, - **WHEN** the model requests `run_command` with command `git status --short` - **THEN** the invocation matches and is auto-approved +### Requirement: DareAgent orchestration implementation is modularized with behavior parity +The runtime SHALL implement session/milestone/execute/tool orchestration through explicit internal execution modules while preserving the externally observable behavior of `DareAgent`. + +- `DareAgent` MUST remain the public orchestration entry point and API owner. +- Core loop internals MUST be decomposed into dedicated execution units with clear ownership boundaries. +- Refactoring MUST NOT change existing runtime semantics for budget checks, hook emission, security policy gates, approval flow, event logging, and structured failure returns. + +#### Scenario: Refactored orchestration preserves execution semantics +- **WHEN** the runtime executes the existing milestone/execute/tool paths after modularization +- **THEN** it preserves prior success/failure semantics, including policy gating and error normalization behavior + +#### Scenario: Core loop logic is unit-testable without full agent integration +- **WHEN** loop behaviors are verified in targeted unit tests for extracted execution units +- **THEN** key control-flow branches (success, denial, approval-required, retry, failure) are validated without requiring full end-to-end agent integration tests + From ff7c3c07e85fa116531d8e62595023f01691c968 Mon Sep 17 00:00:00 2001 From: bouillipx Date: Tue, 3 Mar 2026 17:02:31 +0800 Subject: [PATCH 2/2] docs(feature): record archive PR evidence for refactor-dare-agent-structure-split Update the archived feature aggregation record after opening PR #168. Key changes: - add the completion-archive PR link to the review and merge-gate evidence section - keep the archived feature doc as the single audit entry for this closeout - rerun governance evidence truth after the link update Rationale: The archive commit closed the OpenSpec change, but the audit record still lacked the final pull request that carries the completion-archive step. Recording that PR in the archived feature doc keeps the evidence chain complete for later review. --- docs/features/archive/refactor-dare-agent-structure-split.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/features/archive/refactor-dare-agent-structure-split.md b/docs/features/archive/refactor-dare-agent-structure-split.md index 02429c82..4f8d462b 100644 --- a/docs/features/archive/refactor-dare-agent-structure-split.md +++ b/docs/features/archive/refactor-dare-agent-structure-split.md @@ -74,4 +74,5 @@ mode: openspec - Historical owner feedback thread: `https://github.com/zts212653/Deterministic-Agent-Runtime-Engine/pull/117` - Final verification PR: `https://github.com/zts212653/Deterministic-Agent-Runtime-Engine/pull/163` - PR #163 review thread: `https://github.com/zts212653/Deterministic-Agent-Runtime-Engine/pull/163#discussion_r2875871921` +- Completion-archive PR: `https://github.com/zts212653/Deterministic-Agent-Runtime-Engine/pull/168` - Archive target: `openspec/changes/archive/2026-03-03-refactor-dare-agent-structure-split/`