forked from cleveragents/cleveragents-core
d59fa47fd0
Add the missing plan prompt CLI command and wire it through the local A2A facade into PlanLifecycleService so operator guidance can be injected into active execute-phase plans per the specification. The lifecycle flow now validates active state, records user-intervention decisions, and returns structured queue/decision metadata for rich and machine-readable output envelopes across all supported formats. Also stabilize flaky quality gates discovered while implementing #885 by hardening integration helper timeouts, relaxing an overly strict CLI-core timing assertion, defaulting test worker concurrency to serial for determinism, switching ASV to spawn launch mode for runner stability, and documenting the controlled transform sandbox exec/compile path for static security hooks. ISSUES CLOSED: #885 Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
46 lines
2.2 KiB
Gherkin
46 lines
2.2 KiB
Gherkin
Feature: Plan prompt command
|
|
As a CleverAgents user
|
|
I want to provide guidance to an executing plan
|
|
So that the plan can continue with human-in-the-loop input
|
|
|
|
Scenario: Plan prompt command is discoverable in help
|
|
When I run plan command help
|
|
Then help output should include plan prompt command
|
|
|
|
Scenario: Plan prompt delivers guidance and returns spec envelope in json
|
|
Given a mocked lifecycle service prompt response
|
|
When I run plan prompt with plan id "01HXM8C2ZK4Q7C2B3F2R4VYV6J" and guidance "Use mocks for database tests" in format "json"
|
|
Then the prompt command should succeed
|
|
And lifecycle prompt should be called with plan id "01HXM8C2ZK4Q7C2B3F2R4VYV6J" and guidance "Use mocks for database tests"
|
|
And prompt output envelope should contain command "plan prompt"
|
|
And prompt output envelope should contain status "ok"
|
|
And prompt output data should include queued guidance
|
|
|
|
Scenario Outline: Plan prompt renders successfully across output formats
|
|
Given a mocked lifecycle service prompt response
|
|
When I run plan prompt with plan id "01HXM8C2ZK4Q7C2B3F2R4VYV6J" and guidance "Use mocks for database tests" in format "<format>"
|
|
Then the prompt command should succeed
|
|
And prompt output should include guidance text "Use mocks for database tests"
|
|
|
|
Examples:
|
|
| format |
|
|
| rich |
|
|
| color |
|
|
| table |
|
|
| plain |
|
|
| json |
|
|
| yaml |
|
|
|
|
Scenario: Plan prompt aborts when plan is not in active execute phase
|
|
Given lifecycle service rejects prompt for inactive plan phase
|
|
When I run plan prompt with plan id "01HXM8C2ZK4Q7C2B3F2R4VYV6J" and guidance "Use mocks for database tests" in format "json"
|
|
Then the prompt command should abort
|
|
And prompt output should mention inactive execute phase
|
|
|
|
Scenario: A2A facade routes _cleveragents plan prompt to lifecycle service
|
|
Given an A2A facade with a lifecycle prompt service
|
|
When I dispatch _cleveragents plan prompt for plan "01HXM8C2ZK4Q7C2B3F2R4VYV6J" and guidance "Use mocks for database tests"
|
|
Then facade prompt response should not be a stub
|
|
And facade prompt response should contain plan id "01HXM8C2ZK4Q7C2B3F2R4VYV6J"
|
|
And facade prompt response should contain guidance "Use mocks for database tests"
|