@exaudeus/workrail 0.5.0 → 0.6.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.
package/package.json
CHANGED
|
@@ -72,7 +72,28 @@
|
|
|
72
72
|
"INTELLIGENT QUESTIONING: Use analysis findings to ask targeted, valuable clarifying questions.",
|
|
73
73
|
"ADAPTIVE STRUCTURE: Adjust documentation format and depth based on scope complexity and user needs.",
|
|
74
74
|
"CONTEXT PRESERVATION: Maintain detailed workflow context for seamless resumption across sessions.",
|
|
75
|
-
"COLLABORATIVE READY: Structure workflow for easy handoffs and team collaboration on large scopes."
|
|
75
|
+
"COLLABORATIVE READY: Structure workflow for easy handoffs and team collaboration on large scopes.",
|
|
76
|
+
"**VERTICAL SLICE FUNCTIONS:**",
|
|
77
|
+
"fun findSliceCandidates(scope, analysis) = 'Propose slice candidates grouped by feature/aspect (e.g., Realtime, Sending, Notifications, Storage, API). Use dependency clusters, call graphs, and data-flow boundaries. Return sliceCandidates[].'",
|
|
78
|
+
"fun chooseSliceHeuristics(preferences) = 'Select grouping heuristics: user-journey, bounded-context, subsystem, data-flow, interface-surface. Set sliceHeuristics context variable.'",
|
|
79
|
+
"fun deriveSlices(candidates, heuristics, components) = 'Generate slice definitions with: name, rationale, includedComponents[], entryPoints[], dependencies[], dataFlows[], risks[], plannedDocSections[]. Set sliceDocuments context variable.'",
|
|
80
|
+
"fun mapComponentsToSlices(components, slices) = 'Assign each component to ≥1 slice (allow overlaps if justified). Produce coverage map and set orphanComponents[]. Update Coverage Matrix by slice.'",
|
|
81
|
+
"fun checkSliceCoverageGate() = 'Ensure 100% component coverage across slices; no orphanComponents; overlaps have rationale. Update Quality Gates with status.'",
|
|
82
|
+
"fun optimizeSliceDocStructure(slices) = 'For each slice, create doc skeleton: Overview, Responsibilities, Public APIs, Data Flow, Dependencies, Error Handling, Edge Cases, Troubleshooting, Quality Signals.'",
|
|
83
|
+
"**DIVIO/TEMPLATE & QUALITY FUNCTIONS:**",
|
|
84
|
+
"fun createSliceTemplates(slices) = 'Create per-slice pages: Tutorial.md, HowTo.md, Concepts.md, Reference.md with standard headers and placeholders.'",
|
|
85
|
+
"fun enforceDivioSections(slice) = 'Verify required sections exist per page. Missing sections become blockers.'",
|
|
86
|
+
"fun generateSliceQuickstart(slice) = 'Produce a runnable Quickstart achieving first success in <5 minutes. Record commands and expected outputs.'",
|
|
87
|
+
"fun importReferenceArtifacts(slice) = 'Import OpenAPI/GraphQL/TypeDoc/Sphinx outputs into Reference.md with anchors and language tabs.'",
|
|
88
|
+
"fun addInteractiveSamples(slice) = 'Add Mermaid flow diagrams and Postman/cURL/API console samples for key paths.'",
|
|
89
|
+
"fun generateDiagrams(slice) = 'Create Mermaid diagrams: sequence (key flows), component (architecture), state (lifecycles) as applicable; save under docs/diagrams.'",
|
|
90
|
+
"fun generateTables(slice) = 'Produce tables for API endpoints, config options, errors, metrics; include columns for version, deprecation, owners.'",
|
|
91
|
+
"fun lintLinksAndCrossRefs(docs) = 'Check all intra/inter-doc links, anchors, and references; produce report and fix list.'",
|
|
92
|
+
"fun requireOwnership(slice) = 'Ensure owner metadata (team, maintainers) exists for each slice; update governance table.'",
|
|
93
|
+
"fun checkHelloWorldGate(slice) = 'Validate Quickstart is runnable, complete, and <5 minutes including prerequisites.'",
|
|
94
|
+
"fun checkLinkLintGate(docs) = 'Block progression if any broken links/anchors remain. Append evidence to progress doc.'",
|
|
95
|
+
"fun checkOwnershipGate(slices) = 'Block progression if any slice lacks owners; show missing entries and required actions.'",
|
|
96
|
+
"fun checkVisualsGate(slice) = 'Enforce presence of required visuals: ≥1 sequence diagram, ≥1 component diagram, and ≥1 key table per slice unless not applicable with rationale.'"
|
|
76
97
|
],
|
|
77
98
|
|
|
78
99
|
"steps": [
|
|
@@ -267,6 +288,34 @@
|
|
|
267
288
|
],
|
|
268
289
|
"requireConfirmation": true
|
|
269
290
|
},
|
|
291
|
+
{
|
|
292
|
+
"id": "phase-4a-vertical-slice-derivation",
|
|
293
|
+
"title": "Phase 4a: Vertical Slice Derivation & Mapping",
|
|
294
|
+
"prompt": "**VERTICAL SLICE PLANNING** - Derive a set of focused, standalone documents grouped by aspect/feature of the scope.\n\n**INPUTS**:\n- Use results from Phases 1-2 (analysis, existing docs) and answers from Phase 3 clarifications\n\n**TASKS**:\n1) Use findSliceCandidates(scope, analysis) to propose candidate slices (e.g., Realtime, Sending, Receiving, Storage, API, Admin, Observability)\n2) Use chooseSliceHeuristics(userPreferences) to pick grouping strategy (bounded context, user journey, subsystem, data flow)\n3) Use deriveSlices(sliceCandidates, sliceHeuristics, registeredComponents) to generate sliceDocuments[] with: name, rationale, includedComponents[], entryPoints[], dependencies[], dataFlows[], risks[], plannedDocSections[]\n4) Use mapComponentsToSlices(registeredComponents, sliceDocuments) to ensure every component is assigned; set orphanComponents[] if any\n5) Use optimizeSliceDocStructure(sliceDocuments) to define consistent per-slice document skeleton\n\n**OUTPUTS**:\n- Set context: useSlices=true, sliceHeuristics, sliceDocuments[]\n- Create SlicePlan.md summarizing slices with coverage table and rationales\n- Update DOCUMENTATION_CONTEXT.md with slice plan and navigation\n- If useSlices=true, plan to set documentationStructure = sliceDocuments in Phase 4\n\n**PROGRESS TRACKING**:\n- Log analysis step for slice planning\n- Update Coverage Matrix by slice and component\n- Calculate preliminary documentation units count",
|
|
295
|
+
"agentRole": "You are designing vertical slices that are cohesive, maintainable, and map cleanly to code boundaries for standalone docs that compose the whole.",
|
|
296
|
+
"guidance": [
|
|
297
|
+
"Favor slices that align with dependency clusters and clear data-flow boundaries",
|
|
298
|
+
"Avoid giant slices; keep each doc focused and navigable",
|
|
299
|
+
"Allow limited overlap only when justified by shared cross-cutting code",
|
|
300
|
+
"Ensure each slice can be read as 'every page is page one'"
|
|
301
|
+
],
|
|
302
|
+
"requireConfirmation": true
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"id": "phase-4b-slice-coverage-gate",
|
|
306
|
+
"title": "Phase 4b: Slice Coverage Gate",
|
|
307
|
+
"prompt": "**SLICE COVERAGE GATE** - Enforce that all components are covered by at least one slice and no orphans remain.\n\n**VALIDATION**:\nUse checkSliceCoverageGate() to verify:\n- 100% of registered components mapped to sliceDocuments\n- Overlaps (components in >1 slice) have recorded rationale\n- No orphanComponents remain\n- Slice skeletons defined (optimizeSliceDocStructure)\n\n**ENFORCEMENT**:\nUse enforceProgressGates() to block if any condition fails. List specific missing components or rationale.\n\n**OUTPUT**:\n- Gate status recorded in progress doc\n- Proceed only when coverage is complete\n- Set documentationStructure = sliceDocuments when useSlices=true",
|
|
308
|
+
"agentRole": "You are enforcing coverage so vertical slices truly partition or appropriately overlay the scope without gaps.",
|
|
309
|
+
"guidance": [
|
|
310
|
+
"No component may remain unmapped",
|
|
311
|
+
"Keep slices cohesive and justifiable",
|
|
312
|
+
"Document any intentional overlaps with reasons"
|
|
313
|
+
],
|
|
314
|
+
"validationCriteria": [
|
|
315
|
+
{ "type": "contains", "value": "Slice Coverage: ✅", "message": "All components must be mapped to slices" }
|
|
316
|
+
],
|
|
317
|
+
"requireConfirmation": true
|
|
318
|
+
},
|
|
270
319
|
|
|
271
320
|
{
|
|
272
321
|
"id": "phase-4-documentation-planning",
|
|
@@ -285,86 +334,83 @@
|
|
|
285
334
|
{
|
|
286
335
|
"id": "phase-5-comprehensive-documentation",
|
|
287
336
|
"type": "loop",
|
|
288
|
-
"title": "Phase 5: Comprehensive Documentation Creation",
|
|
337
|
+
"title": "Phase 5: Comprehensive Documentation Creation (Per-Slice Divio Pages)",
|
|
289
338
|
"loop": {
|
|
290
|
-
"type": "forEach",
|
|
339
|
+
"type": "forEach",
|
|
291
340
|
"items": "documentationStructure",
|
|
292
|
-
"itemVar": "
|
|
293
|
-
"indexVar": "
|
|
294
|
-
"maxIterations":
|
|
341
|
+
"itemVar": "currentSlice",
|
|
342
|
+
"indexVar": "sliceIndex",
|
|
343
|
+
"maxIterations": 30
|
|
295
344
|
},
|
|
296
345
|
"body": [
|
|
297
346
|
{
|
|
298
|
-
"id": "
|
|
299
|
-
"title": "
|
|
300
|
-
"prompt": "
|
|
301
|
-
"agentRole": "You
|
|
347
|
+
"id": "prepare-slice-templates",
|
|
348
|
+
"title": "Prepare Slice Templates",
|
|
349
|
+
"prompt": "Use createSliceTemplates([currentSlice]) and enforceDivioSections(currentSlice).\nCreate files: Tutorial.md, HowTo.md, Concepts.md, Reference.md with headers and placeholders.\nRecord ownership metadata and navigation links.",
|
|
350
|
+
"agentRole": "You scaffold Divio-compliant pages for the slice.",
|
|
302
351
|
"guidance": [
|
|
303
|
-
"
|
|
304
|
-
"
|
|
305
|
-
"Ensure structure supports both human and agent consumption",
|
|
306
|
-
"Initialize progress tracking for this document"
|
|
352
|
+
"Ensure required sections exist on each page",
|
|
353
|
+
"Set up standard headers and page navigation"
|
|
307
354
|
],
|
|
308
355
|
"requireConfirmation": false
|
|
309
356
|
},
|
|
310
|
-
|
|
311
357
|
{
|
|
312
|
-
"id": "
|
|
313
|
-
"title": "
|
|
314
|
-
"prompt": "
|
|
315
|
-
"agentRole": "You
|
|
358
|
+
"id": "generate-quickstart-and-hello-world",
|
|
359
|
+
"title": "Generate Quickstart and Hello World Gate",
|
|
360
|
+
"prompt": "Run generateSliceQuickstart(currentSlice). Produce a minimal runnable path to success in <5 minutes.\nThen run checkHelloWorldGate(currentSlice). Block if unmet and list fixes.",
|
|
361
|
+
"agentRole": "You ensure each slice has a fast, runnable quickstart.",
|
|
362
|
+
"guidance": [
|
|
363
|
+
"Prioritize real, copy-pasteable commands",
|
|
364
|
+
"Call out prerequisites explicitly"
|
|
365
|
+
],
|
|
366
|
+
"requireConfirmation": true
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"id": "synthesize-concepts-and-howto",
|
|
370
|
+
"title": "Write Concepts and How‑to Pages",
|
|
371
|
+
"prompt": "Populate Concepts.md with architecture, responsibilities, data flow, dependencies, and design rationale from analysis.\nPopulate HowTo.md with the top 3-7 tasks developers perform, each step-by-step with code. Cross-link to Tutorial and Reference.",
|
|
372
|
+
"agentRole": "You synthesize analysis into clear concepts and actionable how‑tos.",
|
|
316
373
|
"guidance": [
|
|
317
|
-
"
|
|
318
|
-
"
|
|
319
|
-
"Integrate user clarifications naturally",
|
|
320
|
-
"Balance depth with clarity for the intended audience"
|
|
374
|
+
"Ground every assertion in code evidence",
|
|
375
|
+
"Prefer tasks developers actually do"
|
|
321
376
|
],
|
|
322
377
|
"requireConfirmation": false
|
|
323
378
|
},
|
|
324
|
-
|
|
325
379
|
{
|
|
326
|
-
"id": "
|
|
327
|
-
"title": "
|
|
328
|
-
"prompt": "
|
|
329
|
-
"agentRole": "You
|
|
380
|
+
"id": "import-reference-and-samples",
|
|
381
|
+
"title": "Import Reference and Add Interactive Samples",
|
|
382
|
+
"prompt": "Use importReferenceArtifacts(currentSlice) to generate Reference.md from OpenAPI/TypeDoc/etc. Add language tabs.\nUse addInteractiveSamples(currentSlice) to include Mermaid diagrams and Postman/cURL.",
|
|
383
|
+
"agentRole": "You generate authoritative, current reference and interactive artifacts.",
|
|
330
384
|
"guidance": [
|
|
331
|
-
"
|
|
332
|
-
"
|
|
333
|
-
"Reference specific analysis sources for credibility",
|
|
334
|
-
"Maintain consistency across all sections"
|
|
385
|
+
"Reference must be source-of-truth and up-to-date",
|
|
386
|
+
"Include at least one sequence or flow diagram"
|
|
335
387
|
],
|
|
336
388
|
"requireConfirmation": false
|
|
337
389
|
},
|
|
338
|
-
|
|
339
390
|
{
|
|
340
|
-
"id": "
|
|
341
|
-
"title": "
|
|
342
|
-
"prompt": "
|
|
343
|
-
"agentRole": "You
|
|
391
|
+
"id": "generate-visuals-and-tables",
|
|
392
|
+
"title": "Generate Required Visuals and Tables",
|
|
393
|
+
"prompt": "Run generateDiagrams(currentSlice) to produce sequence/component/state diagrams as applicable.\nRun generateTables(currentSlice) to create API/config/errors/metrics tables with required columns.",
|
|
394
|
+
"agentRole": "You produce comprehensive visuals and structured tables for clarity.",
|
|
344
395
|
"guidance": [
|
|
345
|
-
"
|
|
346
|
-
"
|
|
347
|
-
"Ensure consistent terminology throughout",
|
|
348
|
-
"Complete all progress tracking requirements"
|
|
396
|
+
"Prefer Mermaid for diagrams stored as text",
|
|
397
|
+
"Ensure tables are complete and normalized"
|
|
349
398
|
],
|
|
350
399
|
"requireConfirmation": false
|
|
351
400
|
},
|
|
352
|
-
|
|
353
401
|
{
|
|
354
|
-
"id": "
|
|
355
|
-
"title": "Internal
|
|
356
|
-
"prompt": "
|
|
357
|
-
"agentRole": "You
|
|
402
|
+
"id": "link-lint-and-review",
|
|
403
|
+
"title": "Link Lint and Internal Review",
|
|
404
|
+
"prompt": "Run lintLinksAndCrossRefs(currentSlice.docs). Block via checkLinkLintGate(currentSlice.docs) if any broken links.\nRun checkVisualsGate(currentSlice) to enforce diagrams/tables presence.\nPerform internal review; rate documentQualityScore (≥8 required).",
|
|
405
|
+
"agentRole": "You enforce link integrity and quality standards.",
|
|
358
406
|
"guidance": [
|
|
359
|
-
"
|
|
360
|
-
"
|
|
361
|
-
"Verify technical accuracy by checking against code analysis",
|
|
362
|
-
"Assess value from both human and agent user perspectives"
|
|
407
|
+
"All links and anchors must resolve",
|
|
408
|
+
"Quality score below 8 triggers fixes"
|
|
363
409
|
],
|
|
364
410
|
"requireConfirmation": {
|
|
365
411
|
"or": [
|
|
366
|
-
{"var": "documentQualityScore", "lt": 8},
|
|
367
|
-
{"var": "automationLevel", "equals": "Low"}
|
|
412
|
+
{ "var": "documentQualityScore", "lt": 8 },
|
|
413
|
+
{ "var": "automationLevel", "equals": "Low" }
|
|
368
414
|
]
|
|
369
415
|
}
|
|
370
416
|
}
|
|
@@ -375,7 +421,7 @@
|
|
|
375
421
|
{
|
|
376
422
|
"id": "phase-5a-documentation-completion-gate",
|
|
377
423
|
"title": "Phase 5a: Documentation Completion Gate",
|
|
378
|
-
"prompt": "**DOCUMENTATION COMPLETION GATE** - Verify all components are fully documented before final integration.\n\n**COMPLETION VALIDATION**:\nUse checkCoverageGate('documentation-complete') to verify:\n- ✅ Documentation Coverage: 100%
|
|
424
|
+
"prompt": "**DOCUMENTATION COMPLETION GATE** - Verify all components and slices are fully documented before final integration.\n\n**COMPLETION VALIDATION**:\nUse checkCoverageGate('documentation-complete') and checkSliceCoverageGate() to verify:\n- ✅ Documentation Coverage: 100% components documented across slices\n- ✅ Slice Quality: All slice pages (Tutorial/How‑to/Concepts/Reference) ≥8/10\n- ✅ Quickstart: All slices pass Hello World gate\n- ✅ Links: Link-lint gate passes for all docs\n- ✅ Agent Optimization: Documents structured for agent consumption\n\n**COMPREHENSIVE CHECK**:\nUse enforceProgressGates() to ensure:\n- No components or slices remain incomplete\n- All planned documents created and validated\n- Ownership metadata present per slice\n\n**FINAL METRICS**:\nUse calculateCompletionMetrics() to compute:\n- `documentationComplete` = 100% (required)\n- `overallQualityScore` = weighted average across slices\n- `documentsAtRisk` = count of pages below quality threshold\n\n**BLOCKING CONDITIONS**:\nCannot proceed if any slice fails quickstart/links/quality or any component unmapped.\n\n**OUTPUT**: Documentation completion gate status with specific requirements if blocked",
|
|
379
425
|
"agentRole": "You are enforcing complete documentation coverage with quality standards before allowing final integration.",
|
|
380
426
|
"guidance": [
|
|
381
427
|
"No component can remain undocumented",
|
|
@@ -391,7 +437,7 @@
|
|
|
391
437
|
},
|
|
392
438
|
{
|
|
393
439
|
"type": "contains",
|
|
394
|
-
"value": "Quality
|
|
440
|
+
"value": "Slice Quality: ✅",
|
|
395
441
|
"message": "Cannot proceed until all documents meet quality standards (≥8/10)"
|
|
396
442
|
}
|
|
397
443
|
],
|
|
@@ -401,7 +447,7 @@
|
|
|
401
447
|
{
|
|
402
448
|
"id": "phase-6-final-integration",
|
|
403
449
|
"title": "Phase 6: Final Integration & Navigation Setup",
|
|
404
|
-
"prompt": "**FINAL INTEGRATION** - Create navigation, cross-references, and final documentation package.\n\n**INTEGRATION TASKS**:\n\n1. **Create
|
|
450
|
+
"prompt": "**FINAL INTEGRATION** - Create hub navigation, cross-references, and final documentation package.\n\n**INTEGRATION TASKS**:\n\n1. **Create Documentation Hub**:\n - Index page listing all slices (Tutorial, How‑to, Concepts, Reference per slice)\n - Global glossary and common patterns\n - Version switcher and changelog links\n\n2. **Cross-Reference Validation**:\n - Verify inter-slice links and \"See also\" references\n - Ensure bidirectional links where appropriate\n\n3. **Consistency Pass**:\n - Standardize terminology, style, and visuals across slices\n - Ensure code and samples use consistent languages/tabs\n\n4. **Completeness Verification**:\n - Confirm all slice gates passed (quickstart, links, quality)\n - Validate coverage against original scope boundaries\n\n5. **Agent Optimization**:\n - Add per-slice summaries and navigation metadata\n - Ensure each page is \"Every Page is Page One\" compliant\n\n**CREATE DOCUMENTATION PACKAGE**:\n- Hub index\n- Per-slice pages\n- Diagrams and samples\n- Change log\n\n**FINAL VALIDATION**: Use validateDocumentation(docs, scope)\n- Completeness and accuracy\n- Usability and maintainability\n\n**OUTPUT**: Complete, integrated documentation package ready for use",
|
|
405
451
|
"agentRole": "You are finalizing the documentation package, ensuring it works as a cohesive whole and serves its intended purpose effectively.",
|
|
406
452
|
"guidance": [
|
|
407
453
|
"Focus on the user experience of consuming this documentation",
|