fix: clarify create-story context extraction and state age handling

This commit is contained in:
Dicky Moore 2026-02-08 23:25:01 +00:00
parent 5e8289fe26
commit 95b437023d
2 changed files with 18 additions and 8 deletions

View File

@ -175,10 +175,16 @@ input_file_patterns:
Business context and value - Success criteria <!-- Previous story analysis for context continuity -->
<check if="story_num > 1">
<action>Set {{previous_story_num}} = {{story_num}} - 1</action>
<action>Load previous story file: {{story_dir}}/{{epic_num}}-{{previous_story_num}}-*.md</action> **PREVIOUS STORY INTELLIGENCE:** -
Dev notes and learnings from previous story - Review feedback and corrections needed - Files that were created/modified and their
patterns - Testing approaches that worked/didn't work - Problems encountered and solutions found - Code patterns established <action>Extract
all learnings that could impact current story implementation</action>
<action>Load previous story file: {{story_dir}}/{{epic_num}}-{{previous_story_num}}-*.md</action>
<action>Extract previous story intelligence:
- Dev notes and learnings from previous story
- Review feedback and corrections needed
- Files that were created/modified and their patterns
- Testing approaches that worked/didn't work
- Problems encountered and solutions found
- Code patterns established
</action>
<action>Extract all learnings that could impact current story implementation</action>
</check>
<!-- Git intelligence for previous work patterns -->

View File

@ -15,6 +15,7 @@
- Set status_file_found = false
- Set standalone_mode = true
- Set warning = ""
- Set status_load_error_reason = ""
- Set suggestion = ""
- Set next_workflow = ""
- Set next_agent = ""
@ -97,12 +98,15 @@
<action>Read state file and extract: timestamps, mode, scan_level, current_step, completed_steps, project_classification</action>
<action>Validate last_updated from state file:
- If last_updated is missing or invalid, set state_age_hours = 999 and mark state as stale
- Otherwise parse timestamp and continue
- Otherwise parse last_updated into validated_last_updated
</action>
<action>Extract cached project_type_id(s) from state file if present</action>
<action>Calculate age of state file (current time - last_updated)</action>
<action>Calculate state_age_hours:
- If validated_last_updated exists, compute current time - validated_last_updated
- Otherwise keep state_age_hours = 999
</action>
<check if="state file age >= 24 hours">
<check if="state_age_hours >= 24">
<action>Display: "Found old state file (>24 hours). Starting fresh scan."</action>
<action>Attempt to create archive directory: {output_folder}/.archive/</action>
<check if="archive directory creation failed">
@ -125,7 +129,7 @@
<action>Continue to Step 3</action>
</check>
<check if="state file age < 24 hours">
<check if="state_age_hours < 24">
<ask>I found an in-progress workflow state from {{last_updated}}.