@exaudeus/workrail 3.66.0 → 3.67.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "workflow-for-workflows",
3
3
  "name": "Workflow Authoring Workflow",
4
- "version": "2.4.0",
4
+ "version": "2.5.0",
5
5
  "metricsProfile": "design",
6
6
  "description": "Use this to author or modernize a WorkRail workflow. Guides through understanding the task, defining effectiveness targets, designing architecture and quality gates, drafting, validating, assigning tags, and handing off.",
7
7
  "about": "## Workflow Authoring Workflow\n\nThis is the standard WorkRail workflow for creating a new workflow from scratch or modernizing an existing one. It is the trust gate for all other workflows: a workflow is not considered production-ready until it has passed through here.\n\n**What it does:**\nThe workflow walks through the full authoring lifecycle: understanding the task, choosing the right baseline and archetype, designing the phase and quality-gate architecture, drafting the workflow JSON, running structural validators, auditing state fields for bloat, simulating execution against real scenarios, running an adversarial quality review, and producing a final trust handoff. For modernization tasks it builds a value inventory first to ensure enforcement mechanisms, domain knowledge, and behavioral rules are preserved or equivalently replaced.\n\n**When to use it:**\n- You want to author a new WorkRail workflow for a recurring task or problem\n- You have an existing workflow that is outdated, uses legacy patterns (pseudo-DSL, regex validation, satisfaction-score loops), or produces shallow results\n- You want a workflow that will pass the WorkRail quality bar and be trusted to run in production\n\n**What it produces:**\nA validated, tagged workflow JSON file with a `validatedAgainstSpecVersion` stamp. A final trust handoff with readiness verdict, known failure modes, residual weaknesses, and testing guidance.\n\n**How to get good results:**\nDescribe the recurring task the workflow should solve, who will run it, and what a satisfying result looks like. For modernization, point to the existing workflow file. The workflow reads the schema and authoring spec itself -- you do not need to know the JSON format in advance.",
@@ -211,10 +211,8 @@
211
211
  ],
212
212
  "procedure": [
213
213
  "Decide the phase list, one-line goal for each phase, and overall ordering.",
214
- "Identify meaningful input classifications that require different workflow paths. For each variant dimension, decide the branching mechanism: `runCondition` on separate steps (diverging paths), `promptFragments` (additive behavior on a shared base), or a separate workflow entirely. For each captured variable that drives branching, define its closed set of valid values — unexpected values are a common source of silent misbehavior.",
215
214
  "Design loops with explicit exit rules, bounded maxIterations, and real reasons for another pass.",
216
- "Decide confirmation gates, delegation vs template injection vs direct execution, promptFragments, references, artifacts, and metaGuidance.",
217
- "If the authored workflow encodes domain knowledge tied to a specific version of an external system or codebase, decide how to handle staleness: prefer reading the codebase at runtime over hardcoding patterns, or explicitly document versioned assumptions so they surface as maintenance debt."
215
+ "Decide confirmation gates, delegation vs template injection vs direct execution, promptFragments, references, artifacts, and metaGuidance."
218
216
  ],
219
217
  "outputRequired": {
220
218
  "notesMarkdown": "Structured workflow outline, loop design, confirmation design, delegation design, artifact plan, and modernization mapping.",
@@ -267,7 +265,7 @@
267
265
  "procedure": [
268
266
  "Decide whether the authored workflow needs a hypothesis step, neutral fact packet, reviewer or validator families, contradiction loop, final validation bundle, or explicit blind-spot handling.",
269
267
  "Design the confidence model, blind-spot model, and state economy plan.",
270
- "Decide the hard-gate dimensions that would make the authored workflow unsafe or unsatisfying if they fail. Choose the right enforcement mechanism for each gate: `assessments` + `assessmentRefs` + `assessmentConsequences` for bounded confidence judgments (each dimension captures a distinct orthogonal failure mode see `mr-review-workflow.agentic.v2.json` and `bug-investigation.agentic.v2.json`); `validationCriteria` with context-aware conditions for completion-gating on structured checklists or required output content (the engine enforces that required content appears in the response before the step can complete, without a loop — conditions on individual rules can match the workflow's branching context); a re-verification loop for fix-and-verify cycles where the agent must act then prove the action worked. Do not default to a loop when `validationCriteria` is the right tool, or to `requireConfirmation` when a hard gate is needed.",
268
+ "Decide the hard-gate dimensions that would make the authored workflow unsafe or unsatisfying if they fail. If hard gates exist, implement them using the native `assessments` + `assessmentRefs` + `assessmentConsequences` schema fields rather than informal notes or `requireConfirmation` alone. Each dimension should capture a distinct orthogonal failure mode -- not restate the workflow's existing confidence band. See `mr-review-workflow.agentic.v2.json` and `bug-investigation.agentic.v2.json` as exemplars.",
271
269
  "Write the redesign triggers that should force architectural revision rather than cosmetic refinement."
272
270
  ],
273
271
  "outputRequired": {
@@ -556,84 +554,14 @@
556
554
  "text": "For modernize_existing: add a heritage_reviewer to the adversarial bundle. Its job is to check each valueInventory item and find what was lost or weakened -- it ignores format improvements. It must answer: which enforcement mechanisms are now prose-only? Which domain knowledge items are absent? Which behavioral rules were removed without equivalent replacement? Heritage_reviewer findings drive enforcementStrength and modernizationDiscipline scores."
557
555
  }
558
556
  ],
559
- "hasValidation": true,
557
+ "requireConfirmation": false,
560
558
  "validationCriteria": [
561
- {
562
- "type": "contains",
563
- "value": "voiceClarity",
564
- "message": "Review must score voiceClarity"
565
- },
566
- {
567
- "type": "contains",
568
- "value": "ceremonyLevel",
569
- "message": "Review must score ceremonyLevel"
570
- },
571
- {
572
- "type": "contains",
573
- "value": "loopSoundness",
574
- "message": "Review must score loopSoundness"
575
- },
576
- {
577
- "type": "contains",
578
- "value": "delegationBoundedness",
579
- "message": "Review must score delegationBoundedness"
580
- },
581
- {
582
- "type": "contains",
583
- "value": "artifactClarity",
584
- "message": "Review must score artifactClarity"
585
- },
586
- {
587
- "type": "contains",
588
- "value": "taskEffectiveness",
589
- "message": "Review must score taskEffectiveness"
590
- },
591
- {
592
- "type": "contains",
593
- "value": "falseConfidenceResistance",
594
- "message": "Review must score falseConfidenceResistance"
595
- },
596
- {
597
- "type": "contains",
598
- "value": "stateMinimality",
599
- "message": "Review must score stateMinimality"
600
- },
601
- {
602
- "type": "contains",
603
- "value": "coverageSharpness",
604
- "message": "Review must score coverageSharpness"
605
- },
606
- {
607
- "type": "contains",
608
- "value": "domainFit",
609
- "message": "Review must score domainFit"
610
- },
611
- {
612
- "type": "contains",
613
- "value": "handoffUtility",
614
- "message": "Review must score handoffUtility"
615
- },
616
559
  {
617
560
  "type": "contains",
618
561
  "value": "complexityScaling",
619
562
  "message": "Review must score complexityScaling"
620
- },
621
- {
622
- "type": "contains",
623
- "value": "enforcementStrength",
624
- "message": "Review must score enforcementStrength"
625
- },
626
- {
627
- "type": "contains",
628
- "value": "modernizationDiscipline",
629
- "condition": {
630
- "var": "authoringMode",
631
- "equals": "modernize_existing"
632
- },
633
- "message": "Modernization reviews must score modernizationDiscipline"
634
563
  }
635
564
  ],
636
- "requireConfirmation": false,
637
565
  "assessmentRefs": [
638
566
  "authoring-integrity-gate",
639
567
  "outcome-effectiveness-gate"
@@ -743,6 +671,33 @@
743
671
  },
744
672
  "requireConfirmation": false
745
673
  },
674
+ {
675
+ "id": "phase-7b-declare-metrics-profile",
676
+ "title": "Phase 7b: Declare metricsProfile",
677
+ "promptBlocks": {
678
+ "goal": "Declare the metricsProfile field in the authored workflow JSON, or explicitly justify omitting it. The metricsProfile field enables engine-injected metrics instrumentation footers in step prompts. When set, the engine injects context key accumulation reminders into every step prompt -- guiding compliant agents to report outcome, commit SHAs, PR numbers, and diff stats at session completion. Without this field, captureConfidence is always 'none' and no session metrics are collected.",
679
+ "procedure": [
680
+ "Choose the correct profile based on what the workflow produces:",
681
+ " - 'coding': produces code commits. Use for implementation, refactoring, bug-fix, migration, and documentation-writing workflows.",
682
+ " - 'review': produces a review decision on a PR or MR. Use for code review, audit, and change validation workflows.",
683
+ " - 'research': produces a finding or recommendation but no commits. Use for investigation, diagnosis, and analysis workflows.",
684
+ " - 'design': produces a design artifact (pitch, spec, ADR, architecture doc) but no commits.",
685
+ " - 'ticket': creates or updates work items in an external system (Jira, GitHub Issues, Linear).",
686
+ " - 'none': meta-workflow, authoring tool, utility routine, or no measurable outcome. Set explicitly and document the reason.",
687
+ "Add `\"metricsProfile\": \"<profile>\"` as a top-level field in the workflow JSON, after `recommendedPreferences` if that field exists.",
688
+ "If choosing 'none', record the justification in your notes so the decision is auditable."
689
+ ],
690
+ "constraints": [
691
+ "Do not invent a new profile value. The closed set is: 'coding', 'review', 'research', 'design', 'ticket', 'none'.",
692
+ "The engine does NOT derive the profile from tags automatically. You must set it explicitly.",
693
+ "workflow-for-workflows itself produces a workflow JSON artifact (a design output) -- use 'design'. It does not commit code."
694
+ ],
695
+ "outputRequired": {
696
+ "notesMarkdown": "State the chosen metricsProfile and a one-line justification. If omitting, explain why."
697
+ }
698
+ },
699
+ "requireConfirmation": false
700
+ },
746
701
  {
747
702
  "id": "phase-7-final-trust-handoff",
748
703
  "title": "Phase 7: Final Trust Handoff",