@exaudeus/workrail 3.11.2 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/console/assets/index-DW78t31j.css +1 -0
  2. package/dist/console/assets/index-EsSXrC_a.js +28 -0
  3. package/dist/console/index.html +2 -2
  4. package/dist/di/container.js +8 -0
  5. package/dist/di/tokens.d.ts +1 -0
  6. package/dist/di/tokens.js +1 -0
  7. package/dist/infrastructure/session/HttpServer.js +2 -14
  8. package/dist/manifest.json +139 -91
  9. package/dist/mcp/boundary-coercion.d.ts +2 -0
  10. package/dist/mcp/boundary-coercion.js +73 -0
  11. package/dist/mcp/handler-factory.d.ts +1 -1
  12. package/dist/mcp/handler-factory.js +13 -6
  13. package/dist/mcp/handlers/shared/request-workflow-reader.d.ts +10 -2
  14. package/dist/mcp/handlers/shared/request-workflow-reader.js +27 -10
  15. package/dist/mcp/handlers/shared/workflow-source-visibility.d.ts +3 -1
  16. package/dist/mcp/handlers/shared/workflow-source-visibility.js +7 -3
  17. package/dist/mcp/handlers/v2-execution/replay.js +25 -1
  18. package/dist/mcp/handlers/v2-execution/start.js +23 -17
  19. package/dist/mcp/handlers/v2-manage-workflow-source.d.ts +7 -0
  20. package/dist/mcp/handlers/v2-manage-workflow-source.js +50 -0
  21. package/dist/mcp/handlers/v2-workflow.js +123 -8
  22. package/dist/mcp/output-schemas.d.ts +393 -0
  23. package/dist/mcp/output-schemas.js +49 -1
  24. package/dist/mcp/server.js +2 -0
  25. package/dist/mcp/tool-descriptions.js +20 -0
  26. package/dist/mcp/tools.js +6 -0
  27. package/dist/mcp/types/tool-description-types.d.ts +1 -1
  28. package/dist/mcp/types/tool-description-types.js +1 -0
  29. package/dist/mcp/types/workflow-tool-edition.d.ts +1 -1
  30. package/dist/mcp/types.d.ts +2 -0
  31. package/dist/mcp/v2/tool-registry.js +8 -0
  32. package/dist/mcp/v2/tools.d.ts +15 -0
  33. package/dist/mcp/v2/tools.js +8 -1
  34. package/dist/v2/durable-core/constants.d.ts +1 -0
  35. package/dist/v2/durable-core/constants.js +2 -1
  36. package/dist/v2/durable-core/domain/observation-builder.d.ts +4 -1
  37. package/dist/v2/durable-core/domain/observation-builder.js +9 -0
  38. package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +76 -16
  39. package/dist/v2/durable-core/schemas/session/events.d.ts +26 -5
  40. package/dist/v2/durable-core/schemas/session/events.js +2 -1
  41. package/dist/v2/infra/in-memory/managed-source-store/index.d.ts +8 -0
  42. package/dist/v2/infra/in-memory/managed-source-store/index.js +33 -0
  43. package/dist/v2/infra/local/data-dir/index.d.ts +2 -0
  44. package/dist/v2/infra/local/data-dir/index.js +6 -0
  45. package/dist/v2/infra/local/managed-source-store/index.d.ts +15 -0
  46. package/dist/v2/infra/local/managed-source-store/index.js +164 -0
  47. package/dist/v2/infra/local/session-summary-provider/index.js +2 -0
  48. package/dist/v2/infra/local/workspace-anchor/index.js +1 -0
  49. package/dist/v2/ports/data-dir.port.d.ts +2 -0
  50. package/dist/v2/ports/managed-source-store.port.d.ts +25 -0
  51. package/dist/v2/ports/managed-source-store.port.js +2 -0
  52. package/dist/v2/ports/workspace-anchor.port.d.ts +3 -0
  53. package/dist/v2/projections/resume-ranking.d.ts +1 -0
  54. package/dist/v2/usecases/console-routes.js +26 -0
  55. package/dist/v2/usecases/console-service.js +25 -6
  56. package/dist/v2/usecases/console-types.d.ts +22 -1
  57. package/dist/v2/usecases/worktree-service.d.ts +10 -0
  58. package/dist/v2/usecases/worktree-service.js +136 -0
  59. package/package.json +1 -1
  60. package/workflows/adaptive-ticket-creation.json +276 -282
  61. package/workflows/architecture-scalability-audit.json +317 -0
  62. package/workflows/document-creation-workflow.json +70 -191
  63. package/workflows/documentation-update-workflow.json +59 -309
  64. package/workflows/intelligent-test-case-generation.json +37 -212
  65. package/workflows/personal-learning-materials-creation-branched.json +1 -21
  66. package/workflows/presentation-creation.json +143 -308
  67. package/workflows/relocation-workflow-us.json +161 -535
  68. package/workflows/routines/tension-driven-design.json +5 -5
  69. package/workflows/scoped-documentation-workflow.json +110 -181
  70. package/workflows/workflow-for-workflows.v2.json +21 -5
  71. package/dist/console/assets/index-C5C4nDs4.css +0 -1
  72. package/dist/console/assets/index-CSUqsoQl.js +0 -28
  73. package/workflows/CHANGELOG-bug-investigation.md +0 -298
  74. package/workflows/bug-investigation.agentic.json +0 -212
  75. package/workflows/bug-investigation.json +0 -112
  76. package/workflows/mr-review-workflow.agentic.json +0 -538
  77. package/workflows/mr-review-workflow.json +0 -277
@@ -1,350 +1,100 @@
1
1
  {
2
2
  "id": "documentation-update-workflow",
3
3
  "name": "Documentation Update & Maintenance Workflow",
4
- "version": "1.0.0",
5
- "description": "UPDATE and MAINTAIN existing documentation. Analyzes Git history to detect staleness, identifies outdated sections, and systematically refreshes docs while preserving valuable content. Perfect for: refreshing docs after code changes, scheduled maintenance, addressing feedback. NOT for creating new docs - use scoped-documentation-workflow or document-creation-workflow for new documentation.",
6
- "clarificationPrompts": [
7
- "Which existing documentation needs to be updated? (provide file paths or scope description)",
8
- "When was this documentation last updated? (approximate date or 'unknown')",
9
- "What prompted this update? (code changes, new requirements, feedback, scheduled maintenance)",
10
- "Are there specific sections you know need updating, or should I perform a comprehensive analysis?",
11
- "Should I preserve the existing structure and style, or are you open to improvements?",
12
- "What level of change validation do you need? (minimal review, standard validation, comprehensive verification)"
13
- ],
4
+ "version": "2.0.0",
5
+ "description": "Update and maintain existing documentation. Uses git history to detect staleness, maps sections to current code, and systematically refreshes outdated content while preserving valuable accurate sections. For updating existing docs not for creating new documentation.",
14
6
  "preconditions": [
15
- "Existing documentation files are accessible and identifiable",
16
- "Agent has access to codebase analysis tools and git history",
17
- "Agent can read, analyze, and modify documentation files",
7
+ "Target documentation files are accessible",
8
+ "Agent has git access to the repository containing both docs and code",
9
+ "Agent can read and modify the documentation files",
18
10
  "The related codebase scope is accessible for analysis"
19
11
  ],
20
12
  "metaGuidance": [
21
- "**FUNCTION DEFINITIONS:**",
22
- "fun analyzeDocumentationCurrency(docPath, scope) = 'Analyze {docPath} against current {scope} implementation. Check: accuracy, completeness, outdated references, missing features, deprecated content. Score currency 1-10.'",
23
- "fun identifyChanges(scope, since) = 'Analyze codebase changes in {scope} since {since}. Find: new files, modified APIs, architectural changes, deprecated features. Create change impact assessment.'",
24
- "fun mapDocToCode(docPath, scope) = 'Map sections of {docPath} to specific code locations in {scope}. Identify which documentation sections correspond to which code areas for targeted updates.'",
25
- "fun preserveValidContent(docPath) = 'Identify sections in {docPath} that are still accurate and valuable. Mark for preservation during update process. Include: well-written explanations, accurate examples, valid references.'",
26
- "fun createUpdatePlan(docPath, changes, outdated) = 'Create systematic update plan for {docPath} based on {changes} and {outdated} analysis. Prioritize: critical inaccuracies, missing features, structural improvements.'",
27
- "fun updateDocSection(docPath, section, newContent) = 'Update {section} in {docPath} with {newContent}. Preserve formatting style, maintain navigation links, update cross-references as needed.'",
28
- "fun validateUpdatedDoc(docPath, scope) = 'Validate updated {docPath} against {scope}: technical accuracy, completeness, consistency, navigation integrity, examples validity.'",
29
- "fun updateDocContext(section, content) = 'Update UPDATE_CONTEXT.md {section} with {content}. Track update progress, decisions, and validation results.'",
30
- "fun addResumptionJson(phase) = 'Update UPDATE_CONTEXT.md resumption section with: workflowId, completedSteps to {phase}, context variables for workflow_next.'",
31
- "fun trackUpdateProgress(completed, current) = 'Update progress: \u2705 {completed}, \ud83d\udd04 {current}, \u23f3 Remaining phases. Include sections updated and validation status.'",
32
- "**PROGRESS TRACKING FUNCTIONS:**",
33
- "fun initUpdateProgressTracking(scope, docs) = 'Create live progress doc: <YYYY-MM-DD>--<scope>--update-progress.md. Initialize sections: Section Registry, Update Matrix, Quality Gates, Progress Log, Validation Results. Set updateProgressDocPath context",
34
- "variable.'",
35
- "fun registerDocumentSections(docs) = 'Catalog all sections across {docs}: Section | Document | Status | Priority | Complexity | UpdateType. Status starts as \"identified\". Set totalSections context variable.'",
36
- "fun updateSectionStatus(section, status, quality, findings) = 'Update matrix: {section} | {status} | {quality}/10 | {findings} | timestamp. Status: identified/analyzing/updating/validated/complete.'",
37
- "fun checkUpdateGate(gate) = 'Validate update gate: {gate}. Gates: assessment-complete, planning-complete, updates-complete, validation-complete. Update Quality Gates section with \u2705/\u274c status.'",
38
- "fun enforceUpdateGates() = 'Before proceeding, verify ALL required gates passed. Cannot advance if any \u274c status in Quality Gates. List specific blockers and required actions.'",
39
- "fun calculateUpdateMetrics() = 'Compute and update: sectionsAnalyzed%, sectionsUpdated%, overallQualityScore, sectionsAtRisk. Set context variables for validation.'",
40
- "fun logUpdateStep(phase, section, action) = 'Append to Progress Log: [{timestamp}] Phase {phase}: {section} - {action}. Include: findings, issues, time invested, decisions made.'",
41
- "fun appendUpdateEvidence(validation, result, evidence) = 'Log validation result with evidence: {validation} validation = {result}. Evidence: content checked, examples tested, references verified.'",
42
- "**GIT CHANGE DETECTION FUNCTIONS:**",
43
- "fun mapDocumentationScope(docPath) = 'Extract referenced code paths from {docPath} and infer scopePaths[]'",
44
- "fun getDocLastCommit(docPath) = 'Run git log -1 for {docPath}; set gitDocLastCommitSha and gitDocLastCommitTs'",
45
- "fun getChangesSince(scopePaths, sinceSha) = 'Run git log/diff since {sinceSha} across {scopePaths}; populate gitChanges[] with file, sha, date, message'",
46
- "fun classifyCommitImpact(commit) = 'Use message/diff heuristics \u2192 critical/high/medium/low'",
47
- "fun detectAPISurfaceChanges(diff) = 'Detect export/interface/class signature changes to determine breaking or high-impact changes'",
48
- "fun detectConfigSchemaChanges(diff) = 'Detect config/descriptor/schema option additions/removals or type changes'",
49
- "fun computeStalenessScore(changes, lastTs) = 'Weighted score by impact, volume, and age; set stalenessScore (0-100)'",
50
- "fun decideUpdateUrgency(score) = 'Map stalenessScore to updateUrgency: immediate (\u226540) / scheduled (20-39) / monitor (<20)'",
51
- "fun recordGitEvidence(changes) = 'Append commit SHAs, messages, and rationale to UPDATE_CONTEXT.md and progress doc'",
52
- "fun verifyNoMissedPaths(scopePaths) = 'Ensure scopePaths cover actually changed paths; expand if needed'",
53
- "fun finalizeUpdateReport() = 'Complete progress document with final metrics, lessons learned, maintenance recommendations, handoff checklist. Mark status=COMPLETE.'",
54
- "**UPDATE PRINCIPLES:**",
55
- "PRESERVATION FIRST: Preserve valuable existing content that remains accurate and well-written.",
56
- "TARGETED CHANGES: Focus updates on specific outdated or inaccurate sections rather than wholesale rewrites.",
57
- "CONSISTENCY MAINTENANCE: Maintain existing style, structure, and navigation patterns unless improvements are clearly needed.",
58
- "INCREMENTAL IMPROVEMENT: Make the documentation better while updating, but avoid scope creep beyond the core update needs.",
59
- "VALIDATION RIGOR: All updated technical content must be verified against current codebase state.",
60
- "**UPDATE STRATEGIES:**",
61
- "ADDITIVE: Add new sections for new features or concepts",
62
- "CORRECTIVE: Fix inaccurate information and outdated references",
63
- "EXPANSIVE: Expand thin sections with more detail where needed",
64
- "REDUCTIVE: Remove or deprecate content for removed features",
65
- "STRUCTURAL: Improve organization while preserving content",
66
- "**QUALITY GATES:**",
67
- "Every updated section must pass technical accuracy validation against current code.",
68
- "Cross-references and navigation must remain intact after updates.",
69
- "Examples and code snippets must be tested for current validity.",
70
- "Tone and style should remain consistent with preserved sections.",
71
- "**EFFICIENCY FOCUS:**",
72
- "Prioritize high-impact updates that provide maximum value for effort invested.",
73
- "Leverage existing good content rather than recreating from scratch.",
74
- "Focus on sections that are most critical for users or most outdated.",
75
- "Use git history to understand what has actually changed rather than analyzing everything."
13
+ "NOTES-FIRST DURABILITY: use output.notesMarkdown as the primary durable record. Do NOT create UPDATE_CONTEXT.md, progress tracking files, or any sidecar markdown. Notes survive rewinds; sidecar files may not.",
14
+ "GIT-EVIDENCE-FIRST: staleness judgment must be grounded in actual git log output. Do not assert a doc is stale based on reading it alone. Run git log; record commit SHAs and messages as evidence.",
15
+ "PRESERVATION-FIRST: keep accurate, well-written content unchanged. Only update what is demonstrably stale or incorrect. Targeted updates are better than wholesale rewrites.",
16
+ "VERIFY AGAINST CODE: all updated technical content must be checked against current codebase state. Code examples and API references must match what is actually in the code today.",
17
+ "DEGRADE AND DISCLOSE: if git history is unavailable or shallow for some paths, classify staleness as medium and note what evidence is missing. Never block proceed with what is available.",
18
+ "SELF-EXECUTE: explore first with tools. Ask the user only what you genuinely cannot determine from the codebase and git history. The one real confirmation gate is the update plan before executing edits.",
19
+ "LOOP DISCIPLINE: the update loop runs without per-section gates the plan was approved in phase-2. Only pause if a section requires changes beyond what the approved plan covers; note the deviation and ask."
76
20
  ],
77
21
  "steps": [
78
22
  {
79
- "id": "phase-0-update-assessment",
80
- "title": "Phase 0: Update Assessment & Planning",
81
- "prompt": "**UPDATE ASSESSMENT** - Analyze existing documentation and determine update scope and strategy.\n\n**STEP 1: Documentation Inventory**\n- Locate and catalog all existing documentation files\n- Identify the scope/codebase areas these documents cover\n- Note file formats, structure, and current organization\n- Check for documentation metadata (last updated dates, authors, etc.)\n\n**STEP 2: Currency Analysis** \nUse analyzeDocumentationCurrency() for each document:\n- **Technical Accuracy**: How much of the technical content is still correct?\n- **Completeness**: What features or components are missing from documentation?\n- **Reference Validity**: Are code examples, file paths, and API references current?\n- **Structural Soundness**: Is the organization still logical and helpful?\n\n**STEP 3: Change Impact Assessment**\nUse identifyChanges() to analyze:\n- **Code Changes**: What has changed in the codebase since last documentation update?\n- **New Features**: What new functionality needs documentation?\n- **Deprecated Elements**: What documented features are no longer valid?\n- **Architectural Shifts**: Have there been structural changes affecting documentation?\n\n**STEP 4: Update Strategy Classification**\n- **Minor Update**: Small corrections and additions (< 20% content change)\n- **Moderate Update**: Significant sections need refresh (20-50% content change)\n- **Major Update**: Substantial restructuring or content overhaul (> 50% content change)\n- **Hybrid Approach**: Different sections need different levels of update\n\n**STEP 5: Priority Assessment**\nRank update needs by:\n- **Critical**: Inaccurate information that could cause problems\n- **Important**: Missing information for new features or significant gaps\n- **Beneficial**: Improvements that would add value but aren't essential\n\n**OUTPUT**: \n- Set `updateScope`, `updateStrategy`, `updatePriority` context variables\n- Create preliminary update plan with effort estimates",
82
- "agentRole": "You are a documentation assessment specialist with expertise in evaluating existing documentation quality and determining optimal update strategies. Your strength lies in efficiently identifying what needs updating while preserving valuable existing content.",
83
- "guidance": [
84
- "Focus on identifying real changes and gaps, not just potential improvements",
85
- "Consider the effort/value ratio - not everything needs to be perfect",
86
- "Preserve high-quality existing content wherever possible",
87
- "Use git history and codebase analysis to understand actual changes"
88
- ],
89
- "requireConfirmation": true
90
- },
91
- {
92
- "id": "phase-0a-update-context-setup",
93
- "title": "Phase 0a: Initialize Update Context",
94
- "prompt": "**CREATE UPDATE CONTEXT** - Set up tracking and coordination for the update process.\n\nCreate UPDATE_CONTEXT.md with:\n\n## 1. UPDATE SUMMARY\n- **Target Documentation**: Files and scope being updated\n- **Update Trigger**: What prompted this update\n- **Strategy**: {updateStrategy} with {updatePriority} priority\n- **Timeline**: Expected effort and completion target\n\n## 2. CURRENT STATE ANALYSIS\n- **Currency Assessment**: Technical accuracy and completeness scores\n- **Change Analysis**: Key code changes since last update\n- **Impact Assessment**: Which sections need which types of updates\n- **Preservation Plan**: High-quality content to maintain\n\n## 3. UPDATE PLAN\n- **Priority Order**: Which sections to update first\n- **Update Types**: Additive, corrective, expansive, reductive, structural\n- **Validation Strategy**: How updates will be verified\n- **Risk Mitigation**: Backup and rollback plans\n\n## 4. PROGRESS TRACKING\n- trackUpdateProgress('Phase 0', 'Phase 1')\n- \u2705 Completed: Assessment, Context Setup\n- \ud83d\udd04 Current: Detailed Analysis\n- \u23f3 Remaining: Change Analysis, Updates, Validation\n\n## 5. FUNCTION DEFINITIONS\n{Include all function definitions from metaGuidance}\n\n## 6. RESUMPTION INSTRUCTIONS\n**How to Resume:**\n1. Call workflow_get with id: \"documentation-update-workflow\", mode: \"preview\"\n2. Call workflow_next with JSON from addResumptionJson(phase-0a)\n\n**Set updateContextInitialized = true**",
95
- "agentRole": "You are setting up the coordination framework for a systematic documentation update process.",
96
- "guidance": [
97
- "Create clear tracking of what needs to be updated and why",
98
- "Establish baseline for measuring update progress",
99
- "Set up structure for tracking validation and quality"
100
- ],
101
- "requireConfirmation": false
102
- },
103
- {
104
- "id": "phase-0z-git-baseline-triage",
105
- "title": "Phase 0z: Git Baseline & Staleness Triage",
106
- "prompt": "**GIT TRIAGE** - Establish documentation freshness relative to code.\n\n**BASELINE STEPS**:\n1) mapDocumentationScope(docPaths) \u2192 derive scopePaths[] from referenced code in docs\n2) getDocLastCommit(docPaths) \u2192 set gitDocLastCommitSha/Ts\n3) getChangesSince(scopePaths, gitDocLastCommitSha) \u2192 populate gitChanges[]\n4) classifyCommitImpact(commit) for each change; detectAPISurfaceChanges/detectConfigSchemaChanges via diffs\n5) computeStalenessScore(gitChanges, gitDocLastCommitTs); decideUpdateUrgency(stalenessScore)\n6) recordGitEvidence(gitChanges) into UPDATE_CONTEXT.md and progress doc\n\n**THRESHOLDS**:\n- immediate: stalenessScore \u2265 40\n- scheduled: 20\u201339\n- monitor: < 20\n\n**OUTPUT**:\n- Set stalenessScore, updateUrgency, gitChanges[]; add evidence links",
107
- "agentRole": "You are establishing a deterministic, evidence-based triage of documentation freshness using Git history.",
108
- "guidance": [
109
- "Prefer commit evidence over subjective judgment",
110
- "Classify impact using message and diff heuristics",
111
- "Capture commit SHAs and rationale in UPDATE_CONTEXT.md"
112
- ],
113
- "requireConfirmation": false
114
- },
115
- {
116
- "id": "phase-0z1-git-triage-gate",
117
- "title": "Phase 0z1: Git Triage Gate",
118
- "prompt": "**GIT TRIAGE GATE** - Block unless triage indicates work is needed or monitoring is justified.\n\n**GATE VALIDATION**:\n- \u2705 stalenessScore computed and updateUrgency set\n- \u2705 gitChanges[] recorded with evidence\n\n**BLOCKING CONDITIONS**:\n- If updateUrgency == 'monitor' AND user did not request a forced update \u2192 document in UPDATE_CONTEXT.md and proceed to exit or reassess scheduling.\n- Otherwise proceed to Phase 0b.",
119
- "agentRole": "You are enforcing deterministic entry criteria based on Git-derived staleness.",
120
- "validationCriteria": [
121
- {
122
- "type": "contains",
123
- "value": "stalenessScore",
124
- "message": "Triage must set stalenessScore"
125
- },
126
- {
127
- "type": "contains",
128
- "value": "updateUrgency",
129
- "message": "Triage must set updateUrgency"
130
- }
131
- ],
132
- "requireConfirmation": true
133
- },
134
- {
135
- "id": "phase-0b-initialize-progress-tracking",
136
- "title": "Phase 0b: Initialize Progress Tracking System",
137
- "prompt": "**INITIALIZE PROGRESS TRACKING** - Set up comprehensive progress monitoring and enforcement for update process.\n\n**STEP 1: Create Live Progress Document**\nUse initUpdateProgressTracking(scope, docs) to create timestamped progress file:\n- File: `<YYYY-MM-DD>--<scope>--update-progress.md`\n- Sections: Section Registry, Update Matrix, Quality Gates, Progress Log, Validation Results\n- Set `updateProgressDocPath` context variable\n\n**STEP 2: Discover and Register All Documentation Sections**\nUse registerDocumentSections(docs) to:\n- Systematically catalog all sections across documentation files\n- Create Section Registry table with: Section | Document | Status | Priority | Complexity | UpdateType\n- Set `totalSections` context variable for tracking\n- Initialize all sections with status 'identified'\n\n**STEP 3: Initialize Quality Gates**\nSet up enforcement checkpoints:\n- **Assessment Gates**: Gap Analysis Complete, Priority Classification, Risk Assessment\n- **Planning Gates**: Update Plan Validated, Resource Allocation, Timeline Confirmed\n- **Update Gates**: Section Updates Complete, Quality Validation, Cross-Reference Integrity\n- **Completion Gates**: Final Validation, Handoff Ready\n\n**STEP 4: Set Baseline Metrics**\nUse calculateUpdateMetrics() to establish:\n- `sectionsAnalyzed` = 0%\n- `sectionsUpdated` = 0%\n- `overallQualityScore` = current baseline score\n- `sectionsAtRisk` = sections requiring critical updates\n\n**OUTPUT**: Live progress document created with systematic tracking ready for update process",
138
- "agentRole": "You are setting up a comprehensive progress tracking and enforcement system that will ensure systematic coverage and prevent incomplete updates.",
139
- "guidance": [
140
- "This creates the enforcement mechanism for thorough documentation updates",
141
- "All sections must be registered before systematic updates can begin",
142
- "Progress document will be updated throughout the workflow",
143
- "Quality gates will block progression until requirements are met"
144
- ],
145
- "requireConfirmation": false
23
+ "id": "phase-0-assess",
24
+ "title": "Phase 0: Assess Documentation & Establish Git Baseline",
25
+ "prompt": "Locate the target documentation and establish an evidence-based staleness assessment before you decide anything.\n\n**Step 1: Locate and inventory target docs**\n- Identify all documentation files in scope\n- Note file formats, structure, and rough section organization\n- Infer the code paths these docs reference (scopePaths)\n\n**Step 2: Git baseline**\n- Run `git log -1 <docPath>` for each target doc to get the last commit SHA and date\n- Run `git log <lastCommitSha>..HEAD -- <scopePaths>` to get all code changes since the doc was last updated\n- For each commit, classify impact: API/breaking (new exports, changed interfaces, removed functions), behavioral (changed logic), config (schema/option changes), or minor (refactor, rename, test-only)\n\n**Step 3: Staleness classification (rubric-based)**\n\nScore these three dimensions:\n- **Impact**: any API/breaking changes? any behavioral or config changes?\n- **Volume**: how many commits changed the relevant scope since last doc update?\n- **Age**: how many days since the doc was last committed?\n\nDerive `stalenessLevel`:\n- `high`: any API/breaking impact, OR volume > 5 commits AND age > 90 days\n- `medium`: volume > 2 commits, OR age > 60 days, OR behavioral/config changes present\n- `low`: few changes, nothing impacting documented behavior, age < 60 days\n- If git history is unavailable: `medium` note what is missing\n\nDerive `updateUrgency`:\n- `high` staleness `immediate`\n- `medium` staleness `scheduled`\n- `low` staleness `monitor` if user did not request a forced update, document why and offer to exit\n\n**Capture:**\n- `targetDocPaths`, `scopePaths`\n- `gitLastDocCommitSha`, `gitLastDocCommitDate`\n- `stalenessLevel`, `updateUrgency`\n- `gitChangeSummary` prose summary of what changed and why it matters for the docs",
26
+ "requireConfirmation": {
27
+ "var": "updateUrgency",
28
+ "equals": "monitor"
29
+ }
146
30
  },
147
31
  {
148
- "id": "phase-0c-assessment-completion-gate",
149
- "title": "Phase 0c: Assessment Completion Gate",
150
- "prompt": "**ASSESSMENT COMPLETION GATE** - Verify all sections are discovered and classified before proceeding to detailed analysis.\n\n**GATE VALIDATION**:\nUse checkUpdateGate('assessment-complete') to verify:\n- \u2705 All documentation sections identified and registered\n- \u2705 Section Registry table complete with all required fields\n- \u2705 `totalSections` context variable is set\n- \u2705 All sections have status 'identified' with initial priority classification\n\n**ENFORCEMENT**:\nUse enforceUpdateGates() - Cannot proceed to analysis until:\n- Section discovery is 100% complete\n- No sections have status 'unknown' or 'missing'\n- Quality gate shows \u2705 Assessment Complete\n\n**METRICS UPDATE**:\nUse calculateUpdateMetrics() to update baseline:\n- Total sections discovered: {totalSections}\n- Analysis readiness: \u2705/\u274c\n- Ready for detailed analysis: \u2705/\u274c\n\n**OUTPUT**: Assessment gate validation with clear proceed/block decision",
151
- "agentRole": "You are enforcing systematic section discovery completion before allowing detailed gap analysis to begin.",
152
- "guidance": [
153
- "This gate prevents incomplete discovery from propagating through analysis",
154
- "All sections must be registered with proper classification",
155
- "Cannot proceed until section discovery is verified complete",
156
- "Update progress document with gate status"
157
- ],
158
- "validationCriteria": [
159
- {
160
- "type": "contains",
161
- "value": "Assessment Complete: \u2705",
162
- "message": "Cannot proceed until assessment completion gate passes"
163
- }
164
- ],
165
- "requireConfirmation": true
166
- },
167
- {
168
- "id": "phase-1-detailed-gap-analysis",
169
- "title": "Phase 1: Detailed Gap & Change Analysis",
170
- "prompt": "**DETAILED ANALYSIS** - Deep dive into specific gaps and changes requiring documentation updates.\n\n**ANALYSIS TASKS:**\n\n1. **Section-by-Section Mapping**:\n Use mapDocToCode() for each documentation file:\n - Map each documentation section to specific code areas\n - Identify sections that no longer have corresponding code\n - Find code areas that lack documentation coverage\n - Note sections where code has significantly changed\n\n2. **Content Quality Assessment**:\n Use preserveValidContent() to identify:\n - **Excellent Content**: Well-written, accurate, comprehensive sections to preserve\n - **Good Content**: Mostly accurate but needs minor updates\n - **Outdated Content**: Requires significant revision or replacement\n - **Invalid Content**: No longer relevant and should be removed\n\n3. **Change Impact Deep Dive**:\n For each identified change:\n - **API Changes**: New methods, changed signatures, deprecated functions\n - **Behavioral Changes**: Different functionality or workflows\n - **Architectural Changes**: New patterns, moved components, refactored structure\n - **Configuration Changes**: New settings, changed defaults, deprecated options\n\n4. **Example and Reference Validation**:\n - Test all code examples for current validity\n - Verify file paths and references are accurate\n - Check external links and resources\n - Validate configuration examples and settings\n\n5. **User Journey Impact**:\n - How do changes affect documented workflows?\n - Are setup/getting started guides still accurate?\n - Do troubleshooting sections address current issues?\n - Are integration examples still valid?\n\n**CREATE DETAILED UPDATE MATRIX**:\n```\n| Section | Current Quality | Code Alignment | Update Type | Priority | Effort |\n|---------|----------------|---------------|-------------|----------|--------|\n| API Ref | 6/10 | Outdated | Corrective | High | Medium |\n| Setup | 9/10 | Good | Minor | Low | Low |\n```\n\n**OUTPUT**: \n- Comprehensive gap analysis with specific update requirements\n- Validated list of content to preserve vs content to update\n- Prioritized update plan with effort estimates",
171
- "agentRole": "You are conducting detailed analysis to create a precise, actionable update plan based on actual code changes and documentation gaps.",
172
- "guidance": [
173
- "Be specific about what needs updating and why",
174
- "Focus on user-impacting changes first",
175
- "Preserve high-quality existing content wherever possible",
176
- "Create actionable update requirements, not just observations"
177
- ],
32
+ "id": "phase-1-analyze",
33
+ "title": "Phase 1: Section-by-Section Gap Analysis",
34
+ "prompt": "Now map each documentation section to current code and classify what needs to change.\n\nFor each section in the target docs:\n1. **Map to code** — which files, functions, APIs, or behaviors does this section describe?\n2. **Assess accuracy** — does the current code match what the section says? Check API signatures, config options, behavioral descriptions, examples, and file paths.\n3. **Classify the section action**:\n - `preserve` still accurate, well-written; keep unchanged\n - `update` needs correction or expansion; note specifically what changed\n - `remove` describes something that no longer exists\n\n4. **Assign update type** for sections marked `update`:\n - `corrective` fix inaccurate information\n - `additive` add missing coverage for new features\n - `expansive` expand thin explanations\n - `reductive` remove deprecated or removed content\n - `structural` reorganize while preserving content\n\n5. **Assign priority** for sections marked `update`:\n - `critical` inaccurate content that would cause errors or confusion for users\n - `important` missing or outdated content for significant features or workflows\n - `beneficial` improvements that add value but aren't blocking\n\n**Capture:**\n- `sectionInventory` list of all sections with: sectionId, action (preserve/update/remove), updateType, priority, and a one-line reason\n\nEvery section must be classified before moving on.",
178
35
  "requireConfirmation": false
179
36
  },
180
37
  {
181
- "id": "phase-2-update-prioritization",
182
- "title": "Phase 2: Update Planning & Prioritization",
183
- "prompt": "**UPDATE PLANNING** - Create systematic plan for implementing documentation updates.\n\n**PRIORITIZATION FRAMEWORK**:\n\n1. **Critical Priority** (must update immediately):\n - Inaccurate information that could cause errors or confusion\n - Security-related changes or deprecated practices\n - Breaking changes that affect user workflows\n - Completely incorrect examples or references\n\n2. **High Priority** (should update soon):\n - New features that users need to know about\n - Significant API or behavior changes\n - Missing documentation for commonly used functionality\n - Outdated setup or integration instructions\n\n3. **Medium Priority** (valuable but not urgent):\n - Clarifications and expansions of existing content\n - Minor API changes and additions\n - Improved examples or additional use cases\n - Better organization or navigation\n\n4. **Low Priority** (nice to have):\n - Style and formatting improvements\n - Additional context or background information\n - Enhanced examples or alternative approaches\n - Proactive documentation for edge cases\n\n**UPDATE SEQUENCING**:\n1. **Foundation First**: Core concepts and setup instructions\n2. **User Journey**: Critical path functionality and common use cases\n3. **Reference Material**: API documentation and comprehensive coverage\n4. **Enhancement**: Examples, troubleshooting, advanced topics\n\n**RESOURCE ALLOCATION**:\n- Estimate effort required for each section update\n- Consider dependencies between sections\n- Plan for validation and review time\n- Account for cross-reference updates\n\n**RISK MITIGATION**:\n- Create backup of existing documentation\n- Plan incremental updates to minimize disruption\n- Identify rollback points if issues arise\n- Schedule validation checkpoints\n\n**CREATE IMPLEMENTATION PLAN**:\nUse createUpdatePlan() to generate:\n- Ordered list of updates with specific tasks\n- Success criteria for each update\n- Validation requirements and checkpoints\n- Timeline with milestones\n\n**OUTPUT**: \n- Detailed implementation plan with clear priorities\n- Resource and timeline estimates\n- Risk mitigation and quality assurance plan",
184
- "agentRole": "You are creating a practical, actionable plan that efficiently addresses the most important documentation updates while managing risk and resources effectively.",
185
- "guidance": [
186
- "Focus on user impact when prioritizing updates",
187
- "Balance comprehensiveness with practical resource constraints",
188
- "Plan for validation and quality assurance throughout the process",
189
- "Consider dependencies and logical update sequences"
190
- ],
38
+ "id": "phase-2-plan",
39
+ "title": "Phase 2: Update Plan",
40
+ "prompt": "Build the ordered update plan based on the section inventory, then confirm it with me before you start editing anything.\n\nFrom `sectionInventory`, create `updatePlan` as an ordered list:\n1. All `critical` updates first\n2. `important` updates next\n3. `beneficial` updates last (may defer if scope is large)\n\nFor each entry in the plan:\n- Section name and location\n- Update type (corrective / additive / expansive / reductive / structural)\n- Specific description of what to change and why\n- What content to preserve unchanged\n\nAlso note:\n- Total sections to update vs total sections to preserve\n- Any `remove` entries that need explicit deletion\n- Any sections that are `beneficial` you recommend deferring\n\n**This step requires confirmation** I need to review the plan before you make edits to the documentation files.\n\n**Capture:**\n- `updatePlan` ordered list as described above\n- `sectionsRemaining` total count of sections to update (for loop tracking)",
191
41
  "requireConfirmation": true
192
42
  },
193
43
  {
194
- "id": "phase-2a-planning-completion-gate",
195
- "title": "Phase 2a: Planning Completion Gate",
196
- "prompt": "**PLANNING COMPLETION GATE** - Verify comprehensive planning is complete before beginning systematic updates.\n\n**GATE VALIDATION**:\nUse checkUpdateGate('planning-complete') to verify:\n- \u2705 All sections have assigned priorities and update types\n- \u2705 Implementation plan created with specific tasks and timelines\n- \u2705 Resource allocation and effort estimates completed\n- \u2705 Risk mitigation and quality assurance plans established\n\n**ENFORCEMENT**:\nUse enforceUpdateGates() - Cannot proceed to updates until:\n- Planning coverage is 100% complete\n- All high-priority sections have detailed update plans\n- Quality gate shows \u2705 Planning Complete\n\n**METRICS UPDATE**:\nUse calculateUpdateMetrics() to update baseline:\n- Sections planned: {totalSections}\n- Planning quality score: \u22658/10 required\n- Ready for systematic updates: \u2705/\u274c\n\n**OUTPUT**: Planning gate validation with clear proceed/block decision",
197
- "agentRole": "You are enforcing comprehensive planning completion before allowing systematic updates to begin. No section can be updated without proper planning.",
198
- "guidance": [
199
- "This gate prevents poorly planned updates from creating quality issues",
200
- "All sections must have detailed update requirements",
201
- "Cannot proceed until planning quality meets standards",
202
- "Update progress document with planning gate status"
203
- ],
204
- "validationCriteria": [
205
- {
206
- "type": "contains",
207
- "value": "Planning Complete: \u2705",
208
- "message": "Cannot proceed until planning completion gate passes"
209
- }
210
- ],
211
- "requireConfirmation": true
212
- },
213
- {
214
- "id": "phase-2b-git-plan-verification",
215
- "title": "Phase 2b: Git-Based Plan Verification",
216
- "prompt": "**PLAN VERIFICATION (GIT)** - Ensure the implementation plan covers all high/critical Git-identified changes.\n\n**VERIFICATION TASKS**:\n- verifyNoMissedPaths(scopePaths) \u2192 expand monitored scope if needed\n- Cross-check gitChanges[] (critical/high) against implementation plan entries\n- Ensure each critical/high change maps to a concrete update task with success criteria\n- Record any uncovered changes and add them to plan\n\n**OUTPUT**:\n- Updated implementation plan with guaranteed coverage for high-impact changes\n- Evidence in UPDATE_CONTEXT.md of verification and adjustments",
217
- "agentRole": "You are validating that the update plan addresses all high-impact Git-detected changes before execution.",
218
- "guidance": [
219
- "Nothing critical/high can be unplanned",
220
- "Prefer explicit mapping from commit impact to update task",
221
- "Record rationale for any intentionally deferred items"
222
- ],
223
- "requireConfirmation": true
224
- },
225
- {
226
- "id": "phase-3-systematic-updates",
44
+ "id": "phase-3-update-loop",
227
45
  "type": "loop",
228
46
  "title": "Phase 3: Systematic Documentation Updates",
229
47
  "loop": {
230
- "type": "for",
231
- "count": 10,
232
- "maxIterations": 10,
233
- "iterationVar": "updateIteration"
48
+ "type": "while",
49
+ "conditionSource": {
50
+ "kind": "artifact_contract",
51
+ "contractRef": "wr.contracts.loop_control",
52
+ "loopId": "documentation_update_loop"
53
+ },
54
+ "maxIterations": 15
234
55
  },
235
56
  "body": [
236
57
  {
237
- "id": "select-and-validate-update",
238
- "title": "Select and Validate Next Update",
239
- "prompt": "**SELECT AND VALIDATE UPDATE** - Choose and prepare the next priority update.\n\n**UPDATE SELECTION**:\n- Choose highest priority remaining update from implementation plan\n- Verify prerequisites and dependencies are completed\n- Review specific requirements and success criteria\n\n**PRE-UPDATE VALIDATION**:\n- Re-verify current code state for this section\n- Confirm the update is still needed and plan is still valid\n- Check for any new changes that might affect the update\n\n**PROGRESS TRACKING**:\n- Call updateSectionStatus(selectedSection, 'updating', 0, 'update initiated')\n- Call logUpdateStep('3-Selection', selectedSection, 'selected for update and pre-validated')\n\n**OUTPUT**: Validated update ready for implementation with clear requirements",
240
- "agentRole": "You are selecting and validating the next documentation update to ensure it's ready for implementation.",
241
- "guidance": [
242
- "Choose updates based on priority and dependencies",
243
- "Validate that the update is still needed and relevant",
244
- "Ensure prerequisites are met before proceeding",
245
- "Document any changes to requirements or scope"
246
- ],
58
+ "id": "select-section",
59
+ "title": "Select Next Section",
60
+ "prompt": "Choose the next section from `updatePlan` (follow the priority order).\n\nIdentify:\n- The section to update (name, location in doc)\n- The update type and what specifically needs to change\n- What content in this section to preserve unchanged\n\n**Capture:** `currentSection`, `currentUpdateType`, `currentUpdateDescription`, `currentPreservationNotes`",
247
61
  "requireConfirmation": false
248
62
  },
249
63
  {
250
- "id": "implement-content-update",
251
- "title": "Implement Content Update",
252
- "prompt": "**IMPLEMENT CONTENT UPDATE** - Execute the validated update with quality standards.\n\n**CONTENT UPDATE**: Use updateDocSection() to implement changes:\n- **Preserve Style**: Maintain existing tone, format, and structure\n- **Update Accuracy**: Correct technical information and references\n- **Expand Coverage**: Add missing information for new features\n- **Improve Clarity**: Enhance explanations while preserving good content\n- **Update Examples**: Refresh code samples and references\n\n**CROSS-REFERENCE MAINTENANCE**:\n- Update internal links affected by changes\n- Verify external references are still valid\n- Maintain table of contents and navigation\n- Update related sections that reference changed content\n\n**PROGRESS TRACKING**:\n- Call logUpdateStep('3-Implementation', selectedSection, 'content update executed with quality preservation')\n- Update Section Registry with implementation details and quality status\n\n**OUTPUT**: Updated documentation section with preserved style and improved content",
253
- "agentRole": "You are implementing the content update while preserving quality and maintaining consistency.",
254
- "guidance": [
255
- "Focus on preserving valuable existing content and style",
256
- "Maintain technical accuracy with current codebase",
257
- "Update cross-references and navigation as needed",
258
- "Balance improvements with content preservation"
259
- ],
64
+ "id": "implement-update",
65
+ "title": "Implement the Update",
66
+ "prompt": "Make the update to `currentSection` in the documentation file.\n\nApply the update type:\n- **corrective**: fix the inaccurate content; verify the correction against current code\n- **additive**: add the missing section or content; keep style consistent with surrounding content\n- **expansive**: expand the thin explanation; do not rewrite well-written surrounding text\n- **reductive**: remove or deprecate the outdated content; update any internal links that referenced it\n- **structural**: reorganize; preserve all content, only change structure\n\nFor every update:\n- Preserve the existing tone, formatting, and style of the target doc\n- Update any internal cross-references affected by the change\n- Do NOT rewrite sections that are working well just because you are editing nearby",
260
67
  "requireConfirmation": false
261
68
  },
262
69
  {
263
- "id": "validate-update-quality",
264
- "title": "Validate Update Quality",
265
- "prompt": "**VALIDATE UPDATE QUALITY** - Verify the update meets professional standards.\n\n**QUALITY VALIDATION**:\n- **Technical Accuracy**: All technical information verified against current code\n- **Examples Testing**: Code examples tested and confirmed working\n- **Style Consistency**: Tone and format consistent with preserved sections\n- **Integration Quality**: Good integration with surrounding content\n- **Cross-Reference Integrity**: All internal links working correctly\n\n**PROGRESS TRACKING**:\n- Document what was updated and why\n- Note any discoveries or additional needs identified\n- Update completion percentage and remaining work\n- Flag any issues or blockers encountered\n\n**ENHANCED PROGRESS TRACKING**:\n- Call updateSectionStatus(selectedSection, 'validated', qualityScore, 'update completed and validated')\n- Call appendUpdateEvidence('section-validation', qualityScore + '/10', 'quality checklist completed')\n- Use calculateUpdateMetrics() to update overall completion percentage\n\n**OUTPUT**: Quality-validated update with progress tracking and next steps",
266
- "agentRole": "You are ensuring the implemented update meets professional quality standards before continuing.",
267
- "guidance": [
268
- "Be thorough but practical in quality assessment",
269
- "Focus on issues that would impact user experience",
270
- "Document patterns to improve future updates",
271
- "Track progress systematically for transparency"
272
- ],
70
+ "id": "verify-section",
71
+ "title": "Verify the Updated Section",
72
+ "prompt": "Verify that the update to `currentSection` is correct before moving on.\n\nCheck:\n1. **Technical accuracy** does every technical claim match the current codebase? Check the code directly if needed.\n2. **Code examples** are all code blocks in this section syntactically valid and behaviorally correct against current APIs?\n3. **Preservation** what did you keep unchanged? Confirm the preserved content is still present and intact.\n4. **Cross-references** are any internal links pointing to or from this section still working?\n\nDecrement `sectionsRemaining` by 1.\n\nRecord findings in notes: what you changed, what you preserved, any issues found.\n\n**Capture:** updated `sectionsRemaining`",
273
73
  "requireConfirmation": false
274
- }
275
- ],
276
- "requireConfirmation": false
277
- },
278
- {
279
- "id": "phase-3a-updates-completion-gate",
280
- "title": "Phase 3a: Updates Completion Gate",
281
- "prompt": "**UPDATES COMPLETION GATE** - Verify all critical and high-priority sections have been systematically updated before comprehensive validation.\n\n**GATE VALIDATION**:\nUse checkUpdateGate('updates-complete') to verify:\n- \u2705 Critical Priority Sections: 100% updated and validated\n- \u2705 High Priority Sections: \u226595% updated and validated\n- \u2705 Section Status: All completed sections have status 'validated'\n- \u2705 Quality Threshold: Average section quality score \u22658/10\n\n**ENFORCEMENT**:\nUse enforceUpdateGates() - Cannot proceed to comprehensive validation until:\n- All critical sections completed successfully\n- High-priority coverage meets minimum threshold\n- Quality gate shows \u2705 Updates Complete\n\n**METRICS CALCULATION**:\nUse calculateUpdateMetrics() to compute:\n- `sectionsUpdated` = percentage of planned sections completed\n- `overallQualityScore` = weighted average across updated sections\n- `sectionsAtRisk` = count of sections below quality threshold\n\n**BLOCKING CONDITIONS**:\nCannot proceed if:\n- Any critical priority section incomplete\n- High-priority coverage < 95%\n- Average quality score < 8.0\n- Any updated section has validation issues\n\n**OUTPUT**: Updates completion gate status with specific blockers if any",
282
- "agentRole": "You are enforcing systematic update completion with quality standards before allowing comprehensive validation.",
283
- "guidance": [
284
- "This gate prevents incomplete updates from reaching final validation",
285
- "Critical and high-priority sections must meet quality standards",
286
- "Cannot proceed until update coverage and quality thresholds met",
287
- "Progress document must show comprehensive update completion"
288
- ],
289
- "validationCriteria": [
290
- {
291
- "type": "contains",
292
- "value": "Updates Complete: \u2705",
293
- "message": "Cannot proceed until updates completion gate passes"
294
74
  },
295
75
  {
296
- "type": "contains",
297
- "value": "Quality Threshold: \u2705",
298
- "message": "Cannot proceed until quality standards met (avg \u22658/10)"
76
+ "id": "phase-3-loop-decision",
77
+ "title": "Continue or Stop",
78
+ "prompt": "Decide whether to update another section.\n\n- If `sectionsRemaining` > 0: continue.\n- If `sectionsRemaining` = 0: stop.\n\nEmit a `wr.loop_control` artifact for `documentation_update_loop` with `decision` set to `continue` or `stop`.",
79
+ "outputContract": {
80
+ "contractRef": "wr.contracts.loop_control"
81
+ },
82
+ "requireConfirmation": false
299
83
  }
300
84
  ],
301
- "requireConfirmation": true
302
- },
303
- {
304
- "id": "phase-4-comprehensive-validation",
305
- "title": "Phase 4: Comprehensive Documentation Validation",
306
- "prompt": "**COMPREHENSIVE VALIDATION** - Validate all updated documentation as an integrated whole.\n\n**VALIDATION SCOPE**:\n\n1. **End-to-End Consistency**:\n - Read through all updated documentation as a user would\n - Check for consistent terminology and concepts\n - Verify logical flow between sections\n - Ensure cross-references work bidirectionally\n\n2. **Technical Accuracy Verification**:\n Use validateUpdatedDoc() for each document:\n - Re-verify all technical claims against current codebase\n - Test all code examples in sequence\n - Validate configuration examples and settings\n - Check API references and method signatures\n\n3. **User Journey Validation**:\n - Walk through documented workflows from start to finish\n - Verify setup and getting started instructions\n - Test integration examples and use cases\n - Confirm troubleshooting guidance addresses current issues\n\n4. **Navigation and Structure**:\n - Test all internal links and cross-references\n - Verify table of contents accuracy\n - Check that document structure serves user needs\n - Ensure search and navigation work effectively\n\n5. **Completeness Assessment**:\n - Compare against original gap analysis to ensure all critical issues addressed\n - Identify any new gaps discovered during updates\n - Verify that update goals have been achieved\n - Assess whether documentation now serves its intended purpose\n\n**VALIDATION TESTS**:\n- **Fresh Eyes Test**: Review as if seeing documentation for the first time\n- **Expert Review**: Validate technical depth and accuracy\n- **User Scenario Test**: Follow common user workflows using only the documentation\n- **Cross-Reference Test**: Verify all links and references work correctly\n\n**QUALITY METRICS**:\n- Technical accuracy score (1-10)\n- User experience rating (1-10) \n- Completeness assessment (% of identified gaps addressed)\n- Consistency rating (1-10)\n\n**IMPROVEMENT IDENTIFICATION**:\n- Note any remaining issues or enhancement opportunities\n- Identify patterns for future documentation maintenance\n- Document lessons learned from this update process\n- Create recommendations for ongoing documentation practices\n\n**OUTPUT**: \n- Comprehensive validation report with quality metrics\n- List of any remaining issues and recommended actions\n- Assessment of update success against original goals",
307
- "agentRole": "You are conducting final comprehensive validation to ensure the updated documentation meets professional standards and serves user needs effectively.",
308
- "guidance": [
309
- "Take a fresh perspective - review as if seeing the docs for the first time",
310
- "Focus on user experience and practical usability",
311
- "Be thorough but recognize that perfection isn't always necessary",
312
- "Document insights that will improve future maintenance processes"
313
- ],
314
- "requireConfirmation": true
85
+ "requireConfirmation": false
315
86
  },
316
87
  {
317
- "id": "phase-4a-validation-completion-gate",
318
- "title": "Phase 4a: Validation Completion Gate",
319
- "prompt": "**VALIDATION COMPLETION GATE** - Verify comprehensive validation is complete before final handoff.\n\n**GATE VALIDATION**:\nUse checkUpdateGate('validation-complete') to verify:\n- \u2705 Technical Accuracy: All updated content verified against current codebase\n- \u2705 User Experience: Documentation tested with realistic user scenarios\n- \u2705 Cross-Reference Integrity: All internal and external links validated\n- \u2705 Quality Standards: Overall documentation meets professional standards\n\n**ENFORCEMENT**:\nUse enforceUpdateGates() - Cannot proceed to handoff until:\n- Comprehensive validation completed successfully\n- All validation tests passed with acceptable scores\n- Quality gate shows \u2705 Validation Complete\n\n**FINAL METRICS CALCULATION**:\nUse calculateUpdateMetrics() to compute final results:\n- `sectionsUpdated` = final completion percentage\n- `overallQualityScore` = final quality assessment\n- `validationEvidence` = comprehensive validation documentation\n\n**OUTPUT**: Validation completion gate status confirming readiness for handoff",
320
- "agentRole": "You are conducting final validation gate check to ensure the updated documentation is ready for professional handoff.",
321
- "guidance": [
322
- "This is the final quality gate - ensure all validation criteria met",
323
- "Documentation must meet professional standards for handoff",
324
- "All validation evidence must be properly documented",
325
- "Cannot proceed until validation completion confirmed"
326
- ],
327
- "validationCriteria": [
328
- {
329
- "type": "contains",
330
- "value": "Validation Complete: \u2705",
331
- "message": "Cannot proceed until validation completion gate passes"
332
- }
333
- ],
334
- "requireConfirmation": true
88
+ "id": "phase-4-validate",
89
+ "title": "Phase 4: End-to-End Validation",
90
+ "prompt": "Read through all updated documentation as a fresh reader and validate it as a whole.\n\n1. **End-to-end consistency** read the docs in order. Is terminology consistent? Does the logical flow make sense? Do sections refer to each other correctly?\n\n2. **Technical accuracy pass** for any section you feel uncertain about, verify it against current code now. If verification reveals a remaining inaccuracy, note it explicitly: what is wrong, where it is, and what the correct information should be. Do not silently pass a section you are unsure about.\n\n3. **User journey test** walk through the key documented workflows from start to finish using only the documentation. Do setup instructions work? Are the most important use cases covered correctly?\n\n4. **Navigation and structure** — are all cross-references working? Is the table of contents (if present) accurate? Can a user find what they need?\n\n5. **Completeness check** look back at the original gap analysis. Were all critical and important updates completed? Note explicitly if any were deferred.\n\nDocument what you found: any remaining issues, any sections that still need work, and your overall assessment of the documentation quality after the update.",
91
+ "requireConfirmation": false
335
92
  },
336
93
  {
337
- "id": "phase-5-update-completion",
338
- "title": "Phase 5: Update Completion & Handoff",
339
- "prompt": "**UPDATE COMPLETION** - Finalize the documentation update process and prepare for handoff.\n\n**COMPLETION TASKS**:\n\n1. **Final Documentation Package**:\n - Organize all updated documentation files\n - Create or update index/navigation files\n - Ensure consistent formatting and style\n - Add metadata about update date and scope\n\n2. **Update Summary Creation**:\n Create DOCUMENTATION_UPDATE_SUMMARY.md with:\n - **What Was Updated**: Specific sections and files changed\n - **Why Updates Were Needed**: Original issues and gaps addressed\n - **Key Changes Made**: Summary of major updates and improvements\n - **Validation Results**: Quality metrics and testing outcomes\n - **Remaining Items**: Any identified but unaddressed issues\n\n3. **Maintenance Guidance**:\n - **Next Update Triggers**: When to consider future updates\n - **Monitoring Approach**: How to detect when updates are needed\n - **Update Process**: Lessons learned and recommended approach\n - **Contact Information**: Who to consult for future updates\n\n4. **Process Documentation**:\n - Document the update process used for future reference\n - Note what worked well and what could be improved\n - Create template or checklist for future updates\n - Record time invested and efficiency metrics\n\n5. **Final Validation**:\n - Confirm all planned updates completed successfully\n - Verify documentation package is complete and usable\n - Ensure handoff materials are clear and comprehensive\n - Test final documentation from user perspective\n\n**HANDOFF DELIVERABLES**:\n- Updated documentation files with consistent quality\n- Comprehensive update summary and change log\n- Maintenance guidance for future updates\n- Process documentation and lessons learned\n- Quality metrics and validation results\n\n**SUCCESS METRICS**:\n- Percentage of identified gaps addressed\n- Technical accuracy improvement (before/after scores)\n- User experience enhancement (measurable improvements)\n- Process efficiency (time/effort invested vs value delivered)\n\n**FINAL CONTEXT UPDATE**:\n- Complete UPDATE_CONTEXT.md with final status\n- Document total effort invested and outcomes achieved\n- Include recommendations for future documentation maintenance\n- Provide clear resumption instructions if further work needed\n\n**FINAL PROGRESS COMPLETION**:\n- Call finalizeUpdateReport() to complete progress document\n- Mark all Quality Gates as \u2705 COMPLETE\n- Set final context variables: sectionsUpdated=100%, validationComplete=100%\n- Generate comprehensive handoff metrics and recommendations\n\n**OUTPUT**: \n- Complete updated documentation package ready for use\n- Comprehensive handoff documentation\n- Clear assessment of update success and remaining opportunities",
340
- "agentRole": "You are completing a professional documentation update project with comprehensive handoff materials and success metrics.",
341
- "guidance": [
342
- "Focus on delivering value and clear outcomes",
343
- "Provide practical guidance for future maintenance",
344
- "Document lessons learned to improve future processes",
345
- "Ensure the updated documentation truly serves its intended purpose"
346
- ],
347
- "requireConfirmation": true
94
+ "id": "phase-5-complete",
95
+ "title": "Phase 5: Completion & Handoff",
96
+ "prompt": "Summarize the completed documentation update and provide maintenance guidance.\n\n**Summary to include in notes:**\n- Which files were updated\n- Total sections updated vs preserved vs removed\n- Key changes made (especially corrections to inaccurate content)\n- Validation results from phase 4\n- Any items intentionally deferred with a brief rationale\n\n**Maintenance recommendations:**\n- What triggers should prompt the next update? (e.g., specific code areas that change frequently, upcoming planned changes)\n- Are there any sections that remain at risk of going stale quickly?\n- Any structural improvements to consider for a future update pass?\n\nThe notes from this step serve as the handoff record for future maintainers.",
97
+ "requireConfirmation": false
348
98
  }
349
99
  ]
350
- }
100
+ }