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
46 changes: 21 additions & 25 deletions docs/product/current_run.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
# Current Run

## Active Feature

- Name: System Status (Golden Exemplar)
- Backlog ID: B-000
- Goal: Provide a robust, end-to-end full-stack slice that proves the frontend, backend, and testing architectures are fully operational and correctly mapped.
- Operating Mode: Build

## Linked Artifacts

- Brief: docs/product/briefs/system_status.md
- Contract: docs/product/contracts/system_status.md
- Architecture: docs/product/architecture.md
- Launch Checklist: docs/ops/launch_checklist.md

## Definition Of Done

- [x] Feature brief is current and accepted.
- [x] Contract covers success, error, loading, and security-sensitive behavior.
- [x] UI states are defined for configuration and validation.
- [x] Live delivery path is implemented and tested.
- [x] Failure path is explicitly tested end-to-end in the browser.

## Active Tasks

Golden Exemplar is complete and verified. Factory is ready for the next feature.
<feature_spec id="B-000" mode="Build">
<name>System Status (Golden Exemplar)</name>
<goal>Provide a robust, end-to-end full-stack slice that proves the frontend, backend, and testing architectures are fully operational and correctly mapped.</goal>
</feature_spec>

<artifacts>
<link type="Brief">docs/product/briefs/system_status.md</link>
<link type="Contract">docs/product/contracts/system_status.md</link>
<link type="Architecture">docs/product/architecture.md</link>
</artifacts>

<definition_of_done>
<requirement status="complete">Feature brief is current and accepted.</requirement>
<requirement status="complete">Contract covers success, error, loading, and security-sensitive behavior.</requirement>
<requirement status="complete">UI states are defined for configuration and validation.</requirement>
<requirement status="complete">Live delivery path is implemented and tested.</requirement>
</definition_of_done>

<active_tasks>
Golden Exemplar is complete and verified. Factory is ready for the next feature.
</active_tasks>
5 changes: 3 additions & 2 deletions engine/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ def run_os(user_input, flags=None):
agent_queue.append("Engineering")
teardown_prompt = user_input.replace("[TEARDOWN]", "").strip()
current_prompt = teardown_prompt + "\n\nCRITICAL: Execute Teardown."
elif "[START:" in user_input:
match = re.search(r"\[START:\s*(.*?)\]", user_input)
elif "<forge_instruction" in user_input:
# Match the new Hybrid XML/MD data contract from Brain OS
match = re.search(r'<forge_instruction route="([^"]+)">', user_input, re.IGNORECASE)
if match:
agent_queue.append(match.group(1).strip())
current_prompt = user_input
Expand Down
7 changes: 6 additions & 1 deletion tests/engine/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@


def test_cli_requires_prompt(monkeypatch, capsys):
from engine.cli import main
monkeypatch.setattr("engine.cli.boot", lambda: None)

# SHIFT-LEFT: Prevent the test from reading a stale handoff.md file on disk
monkeypatch.setattr("os.path.exists", lambda path: False)

# ADD "as excinfo" HERE:
with pytest.raises(SystemExit) as excinfo:
main([]) # No args
main([])

captured = capsys.readouterr()
assert "Usage: python engine/cli.py 'Your prompt'" in captured.out
Expand Down
2 changes: 1 addition & 1 deletion tests/engine/test_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ def call(self, agent_name, sys_prompt, user_prompt):
runtime.run_os("[TEARDOWN] Remove the new feature")

# 4. Test START OVERRIDE routing
runtime.run_os("[START: Design] Make it pretty")
runtime.run_os('<forge_instruction route="Design">Make it pretty</forge_instruction>')
Loading