Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions templates/commands/converge.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ Create an internal model (do not echo raw artifacts):

### 4. Assess the Codebase and Classify Findings

Include every existing task in the intent inventory, regardless of checkbox state or
Convergence phase: completion claims are not evidence. Verify current behavior against
the spec, plan, tasks, and constitution; for corrective task chains, assess the resulting
behavior, not superseded implementation details. Check both unmet obligations and
implementation that contradicts, exceeds, or falls outside the stated intent.

For each item in the intent inventory, inspect the current code in scope and produce a
`Finding` only where there is a gap. Classify every finding by **gap type**:

Expand Down
37 changes: 37 additions & 0 deletions tests/test_converge_template_scaffold.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""Scaffold checks for the converge command's task-assessment guidance.

These tests verify that the generated prompt includes the instructions needed
to scaffold assessment of every task, including tasks marked complete or added
during an earlier Convergence phase. They do not execute an LLM or assert how
an LLM will respond.
"""

from pathlib import Path

REPO_ROOT = Path(__file__).parent.parent
CONVERGE_TEMPLATE = REPO_ROOT / "templates" / "commands" / "converge.md"


def _normalized_template() -> str:
return " ".join(CONVERGE_TEMPLATE.read_text(encoding="utf-8").split())


def test_converge_scaffold_includes_complete_assessment_guidance():
text = _normalized_template()
required_clauses = (
"Include every existing task in the intent inventory",
"regardless of checkbox state or Convergence phase",
"completion claims are not evidence",
"Verify current behavior against the spec, plan, tasks, and constitution",
"for corrective task chains, assess the resulting behavior, "
"not superseded implementation details",
"Check both unmet obligations and implementation that contradicts, exceeds, "
"or falls outside the stated intent",
)

for clause in required_clauses:
assert clause in text, f"converge.md is missing scaffold guidance: {clause!r}"


def test_converge_scaffold_uses_the_defined_intent_inventory():
assert "assessment inventory" not in _normalized_template()
Loading