Step 588: integrate phase 33a product experience
This commit is contained in:
@@ -4171,4 +4171,13 @@ target_link_libraries(step587_test PRIVATE
|
||||
tree_sitter_javascript tree_sitter_typescript
|
||||
tree_sitter_java tree_sitter_rust tree_sitter_go)
|
||||
|
||||
add_executable(step588_test tests/step588_test.cpp)
|
||||
target_include_directories(step588_test PRIVATE src)
|
||||
target_link_libraries(step588_test PRIVATE
|
||||
nlohmann_json::nlohmann_json
|
||||
unofficial::tree-sitter::tree-sitter
|
||||
tree_sitter_python tree_sitter_cpp tree_sitter_elisp
|
||||
tree_sitter_javascript tree_sitter_typescript
|
||||
tree_sitter_java tree_sitter_rust tree_sitter_go)
|
||||
|
||||
# Step 12: Dear ImGui shell scaffolding created (main.cpp exists but not built due to dependencies)
|
||||
|
||||
94
editor/src/Phase33aIntegration.h
Normal file
94
editor/src/Phase33aIntegration.h
Normal file
@@ -0,0 +1,94 @@
|
||||
#pragma once
|
||||
// Step 588: Phase 33a Integration
|
||||
|
||||
#include "CapabilityDiscoveryPanels.h"
|
||||
#include "GuidedArchitectExecutionDemoMode.h"
|
||||
#include "ValueForwardOnboardingFlow.h"
|
||||
#include "WorkflowVisualizationV2.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct Phase33aResult {
|
||||
bool onboardingReady = false;
|
||||
bool visualizationReady = false;
|
||||
bool capabilityPanelReady = false;
|
||||
bool demoModeReady = false;
|
||||
bool phase33aPass = false;
|
||||
std::vector<std::string> notes;
|
||||
};
|
||||
|
||||
class Phase33aIntegration {
|
||||
public:
|
||||
static Phase33aResult run() {
|
||||
Phase33aResult result;
|
||||
std::string error;
|
||||
|
||||
OnboardingFlowState onboarding;
|
||||
if (ValueForwardOnboardingFlow::start("default-profile", &onboarding, &error)) {
|
||||
ValueForwardOnboardingFlow::completeCurrent(&onboarding, &error);
|
||||
result.onboardingReady = !ValueForwardOnboardingFlow::valueHighlights(onboarding).empty();
|
||||
} else {
|
||||
result.notes.push_back("fail:onboarding");
|
||||
return finalize(result);
|
||||
}
|
||||
|
||||
WorkflowVisualizationGraph graph;
|
||||
result.visualizationReady =
|
||||
WorkflowVisualizationV2::addNode(&graph, {"intake", WorkflowNodeKind::Intake, "Intake", "#2F7BFF"}, &error) &&
|
||||
WorkflowVisualizationV2::addNode(&graph, {"review", WorkflowNodeKind::ReviewGate, "Review", "#2F7BFF"}, &error) &&
|
||||
WorkflowVisualizationV2::addEdge(&graph, {"edge-1", "intake", "review", "Ambiguity triggers review gate"}, &error) &&
|
||||
!WorkflowVisualizationV2::plainLanguageRoutingSummary(graph).empty();
|
||||
if (!result.visualizationReady) {
|
||||
result.notes.push_back("fail:visualization");
|
||||
return finalize(result);
|
||||
}
|
||||
|
||||
CapabilityDiscoveryPanels panels;
|
||||
result.capabilityPanelReady =
|
||||
panels.registerCategory("mcp", "MCP Tools", &error) &&
|
||||
panels.recordOperation("mcp", &error) &&
|
||||
panels.addRecommendation("mcp", "Try constrained execution demo", &error) &&
|
||||
panels.operationCountFor("mcp") == 1;
|
||||
if (!result.capabilityPanelReady) {
|
||||
result.notes.push_back("fail:capability_panels");
|
||||
return finalize(result);
|
||||
}
|
||||
|
||||
DemoModeState demo;
|
||||
IntakeQueueSimulationInput input;
|
||||
input.markdown = R"(## Goals
|
||||
- Show end-to-end value
|
||||
## Constraints
|
||||
- Enable deterministic parser behavior
|
||||
## Dependencies
|
||||
- CMake
|
||||
## Acceptance Criteria
|
||||
- Queue includes bound acceptance checks
|
||||
)";
|
||||
if (!GuidedArchitectExecutionDemoMode::start(input, &demo, &error)) {
|
||||
result.notes.push_back("fail:demo_start");
|
||||
return finalize(result);
|
||||
}
|
||||
result.demoModeReady = GuidedArchitectExecutionDemoMode::advance(&demo, &error) &&
|
||||
GuidedArchitectExecutionDemoMode::advance(&demo, &error) &&
|
||||
GuidedArchitectExecutionDemoMode::advance(&demo, &error);
|
||||
if (!result.demoModeReady) {
|
||||
result.notes.push_back("fail:demo_progression");
|
||||
return finalize(result);
|
||||
}
|
||||
|
||||
result.notes.push_back("phase33a:product_value_obvious_on_first_use");
|
||||
return finalize(result);
|
||||
}
|
||||
|
||||
private:
|
||||
static Phase33aResult finalize(Phase33aResult result) {
|
||||
result.phase33aPass = result.onboardingReady &&
|
||||
result.visualizationReady &&
|
||||
result.capabilityPanelReady &&
|
||||
result.demoModeReady;
|
||||
if (!result.phase33aPass) result.notes.push_back("phase33a:blocked");
|
||||
return result;
|
||||
}
|
||||
};
|
||||
101
editor/tests/step588_test.cpp
Normal file
101
editor/tests/step588_test.cpp
Normal file
@@ -0,0 +1,101 @@
|
||||
// Step 588: Phase 33a Integration (8 tests)
|
||||
|
||||
#include "Phase33aIntegration.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
static int passed = 0, failed = 0;
|
||||
#define TEST(name) { std::cout << " " << #name << "... "; }
|
||||
#define PASS() { std::cout << "PASS\n"; ++passed; }
|
||||
#define FAIL(msg) { std::cout << "FAIL: " << msg << "\n"; ++failed; }
|
||||
#define CHECK(cond, msg) if (!(cond)) { FAIL(msg); return; } else {}
|
||||
|
||||
static bool hasNote(const Phase33aResult& r, const std::string& note) {
|
||||
for (const auto& n : r.notes) if (n == note) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void test_full_phase33a_cycle_passes() {
|
||||
TEST(full_phase33a_cycle_passes);
|
||||
auto r = Phase33aIntegration::run();
|
||||
CHECK(r.phase33aPass, "phase should pass");
|
||||
CHECK(r.onboardingReady, "onboarding should be ready");
|
||||
CHECK(r.visualizationReady, "visualization should be ready");
|
||||
CHECK(r.capabilityPanelReady, "capability panel should be ready");
|
||||
CHECK(r.demoModeReady, "demo mode should be ready");
|
||||
CHECK(hasNote(r, "phase33a:product_value_obvious_on_first_use"), "success note missing");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_onboarding_ready_signal_true_on_pass() {
|
||||
TEST(onboarding_ready_signal_true_on_pass);
|
||||
auto r = Phase33aIntegration::run();
|
||||
CHECK(r.phase33aPass, "phase should pass");
|
||||
CHECK(r.onboardingReady, "onboarding should be true");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_visualization_ready_signal_true_on_pass() {
|
||||
TEST(visualization_ready_signal_true_on_pass);
|
||||
auto r = Phase33aIntegration::run();
|
||||
CHECK(r.phase33aPass, "phase should pass");
|
||||
CHECK(r.visualizationReady, "visualization should be true");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_capability_panel_ready_signal_true_on_pass() {
|
||||
TEST(capability_panel_ready_signal_true_on_pass);
|
||||
auto r = Phase33aIntegration::run();
|
||||
CHECK(r.phase33aPass, "phase should pass");
|
||||
CHECK(r.capabilityPanelReady, "capability panel should be true");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_demo_mode_ready_signal_true_on_pass() {
|
||||
TEST(demo_mode_ready_signal_true_on_pass);
|
||||
auto r = Phase33aIntegration::run();
|
||||
CHECK(r.phase33aPass, "phase should pass");
|
||||
CHECK(r.demoModeReady, "demo mode should be true");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_no_blocked_note_on_success() {
|
||||
TEST(no_blocked_note_on_success);
|
||||
auto r = Phase33aIntegration::run();
|
||||
CHECK(r.phase33aPass, "phase should pass");
|
||||
CHECK(!hasNote(r, "phase33a:blocked"), "blocked note should be absent");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_notes_include_only_success_path_marker() {
|
||||
TEST(notes_include_only_success_path_marker);
|
||||
auto r = Phase33aIntegration::run();
|
||||
CHECK(r.phase33aPass, "phase should pass");
|
||||
CHECK(r.notes.size() == 1, "exactly one success note expected");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_phase_flag_matches_component_conjunction() {
|
||||
TEST(phase_flag_matches_component_conjunction);
|
||||
auto r = Phase33aIntegration::run();
|
||||
const bool conjunction = r.onboardingReady && r.visualizationReady &&
|
||||
r.capabilityPanelReady && r.demoModeReady;
|
||||
CHECK(r.phase33aPass == conjunction, "phase flag should equal component conjunction");
|
||||
PASS();
|
||||
}
|
||||
|
||||
int main() {
|
||||
std::cout << "Step 588: Phase 33a Integration\n";
|
||||
|
||||
test_full_phase33a_cycle_passes(); // 1
|
||||
test_onboarding_ready_signal_true_on_pass(); // 2
|
||||
test_visualization_ready_signal_true_on_pass(); // 3
|
||||
test_capability_panel_ready_signal_true_on_pass(); // 4
|
||||
test_demo_mode_ready_signal_true_on_pass(); // 5
|
||||
test_no_blocked_note_on_success(); // 6
|
||||
test_notes_include_only_success_path_marker(); // 7
|
||||
test_phase_flag_matches_component_conjunction(); // 8
|
||||
|
||||
std::cout << "\nResults: " << passed << "/" << (passed + failed) << " passed\n";
|
||||
return failed == 0 ? 0 : 1;
|
||||
}
|
||||
37
progress.md
37
progress.md
@@ -11089,3 +11089,40 @@ review, queue, constrained edits, and verification stages.
|
||||
- `editor/src/GuidedArchitectExecutionDemoMode.h` within header-size limit (`95` <= `600`)
|
||||
- `editor/tests/step587_test.cpp` within test-file size guidance (`182` lines)
|
||||
- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md`
|
||||
|
||||
### Step 588: Phase 33a Integration
|
||||
**Status:** PASS (8/8 tests)
|
||||
|
||||
Integrates Phase 33a product-experience components into a single first-use
|
||||
readiness gate for onboarding value visibility.
|
||||
|
||||
**Files added:**
|
||||
- `editor/src/Phase33aIntegration.h` - Phase 33a integration module:
|
||||
- onboarding flow readiness check
|
||||
- workflow visualization readiness check
|
||||
- capability panel readiness check
|
||||
- guided demo-mode progression check
|
||||
- phase pass synthesis with success/blocking notes
|
||||
- `editor/tests/step588_test.cpp` - 8 tests covering:
|
||||
- full phase pass path
|
||||
- component readiness signal behavior
|
||||
- note emission behavior
|
||||
- phase flag conjunction behavior
|
||||
|
||||
**Files modified:**
|
||||
- `editor/CMakeLists.txt` - `step588_test` target
|
||||
|
||||
**Verification run:**
|
||||
- `cmake -S editor -B editor/build-native` - PASS
|
||||
- `cmake --build editor/build-native --target step588_test step587_test` - PASS
|
||||
- `./editor/build-native/step588_test` - PASS (8/8)
|
||||
- `./editor/build-native/step587_test` - PASS (12/12) regression coverage
|
||||
|
||||
**Architecture gate check:**
|
||||
- `editor/src/Phase33aIntegration.h` within header-size limit (`94` <= `600`)
|
||||
- `editor/tests/step588_test.cpp` within test-file size guidance (`101` lines)
|
||||
- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md`
|
||||
|
||||
**Phase 33a totals (584-588):**
|
||||
- **Steps completed:** 5
|
||||
- **New tests in this phase plan:** 56/56 passing
|
||||
|
||||
Reference in New Issue
Block a user