okstra 0.166.1 → 0.166.2

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/docs/cli.md CHANGED
@@ -130,7 +130,7 @@ For standard values and phase-specific responsibilities, see [Task type](#--task
130
130
  - `out-of-scope`: optional.
131
131
  - `candidate-cap`: 1–12; default 8.
132
132
  - Output: the `## 5.9 Improvement Candidates` table with 11 columns: Cand ID / Lens / Title / Scope / Severity / Effort / Consensus / Source workers / Recommended next-phase / Expected behavior after / Evidence.
133
- - Verdict Token: `candidates-ready` / `no-candidates` / `blocked`.
133
+ - Verdict Token: `analysis-complete` / `analysis-partial` / `blocked` — the shared analysis enum, which is what `schemas/final-report-v2.0.schema.json` admits. Finding no candidates is not a verdict: the run stays `analysis-complete` and records an empty candidate set with a `no-candidate` row per lens. (`candidates-ready` / `no-candidates` appear only in a schema-v1 legacy report's `## 7. Final Verdict`.)
134
134
  - Routing: there is no automatic spin-off. The user selects candidates and starts each under a new task ID with `requirements-discovery`, `implementation-planning`, or `error-analysis`.
135
135
  - Workers: claude + codex + antigravity + report-writer are all required.
136
136
  - Primary-pass assignment: selected analyser instances are enumerated in `requiredWorkerRoles` order, then the lead rotates the primary pass across the resolved priority lenses. Provider/model names do not affect the order, and every analyser still covers every resolved lens after its primary pass.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okstra",
3
- "version": "0.166.1",
3
+ "version": "0.166.2",
4
4
  "description": "Host-aware multi-provider cross-verification orchestrator runtime and agent skills.",
5
5
  "license": "MIT",
6
6
  "author": "devonshin",
@@ -1,5 +1,5 @@
1
1
  {
2
- "package": "0.166.1",
3
- "builtAt": "2026-08-11T12:28:22.915Z",
2
+ "package": "0.166.2",
3
+ "builtAt": "2026-08-11T13:40:27.396Z",
4
4
  "repoRoot": "/home/runner/work/okstra/okstra"
5
5
  }
@@ -54,7 +54,7 @@
54
54
  - v1 legacy branch: when validating or rerendering an existing schema-v1 report, preserve its `## 5.9 Improvement Candidates` table and legacy Markdown contract; do not rewrite that historical data into v2 implicitly.
55
55
  - the `## 5.9 Improvement Candidates` table populated with rows that obey the 11-column schema from `validators/validate_improvement_report.py` (Cand ID `I-NNN`, Lens from whitelist, Title, Scope ⊆ scan-scope, Severity, Effort, Consensus, Source workers `<worker>:<id>` from {claude, codex, antigravity}, Recommended next-phase ∈ {requirements-discovery, implementation-planning, error-analysis}, Expected behavior after, Evidence as path:line list). `Expected behavior after` states, in one observable sentence, what becomes different once the candidate is applied — it is the seed of the downstream brief's `EB-NNN` / `EO-NNN`. A candidate you cannot write this cell for is a preference, not a finding: drop it rather than filling the cell with a restatement of the title.
56
56
  - `Consensus` cells in `## 5.9 Improvement Candidates` use the table enum exactly: `full`, `partial`, `contested`, `worker-unique`. Map convergence's `full-consensus` / `partial-consensus` labels to `full` / `partial` before writing the table.
57
- - `## 7. Final Verdict` Verdict Token {`candidates-ready`, `no-candidates`, `blocked`}; Direction `routing`; Next Step "ask the user to select K candidates (see the ## 5.9 table)"
57
+ - Verdict Token — **branch-specific, and the two branches do not share a vocabulary.** On the current v2 branch use the shared analysis enum: `analysis-complete` when every resolved lens was examined, `analysis-partial` when one could not be, `blocked` when the scan itself could not run. `schemas/final-report-v2.0.schema.json` admits only those three for `verdictCard.verdictToken` / `finalVerdict.verdictToken`, so a v2 report carrying `candidates-ready` fails Phase 7. **Finding no candidates is not a verdict**: it is an empty `candidates[]` plus a `lensCoverage[]` row per lens with `status: no-candidate` and its evidence-backed rationale — the verdict stays `analysis-complete`. `candidates-ready` / `no-candidates` belong to the v1 legacy `## 7. Final Verdict` Markdown alone, where `validators/validate_improvement_report.py` enforces them. Both branches: Direction `routing`; Next Step "ask the user to select K candidates (see the ## 5.9 table)".
58
58
  - `## 3. Recommended Next Steps` first entry summarises per-candidate routing and proposes new task-key names of the form `<task-group>/imp-<Cand-ID>`
59
59
  - author the shared schema-v2 report fields plus `improvementDiscovery.candidates[]`, `improvementDiscovery.lensCoverage[]`, `improvementDiscovery.selectionLimit`, and `improvementDiscovery.userNarrative` in data.json. `candidates[]` carries the same 11 logical fields described above; `lensCoverage[]` records either candidate IDs or an evidence-backed no-candidate rationale for every resolved lens. `schemas/final-report-v2.0.schema.json` and `validators/validate_improvement_report.py` enforce this contract. The renderers independently derive AI handoff Markdown and human HTML; never author a free-form report.
60
60
  - Clarification request policy (phase-specific addenda — shared policy is in `_common-contract.md`):
@@ -44,7 +44,13 @@ PROFILE_SECTIONS = (
44
44
  "Non-goals",
45
45
  )
46
46
  WORKER_PROFILE_SECTIONS_BY_TASK_TYPE = {
47
+ # `Brief consumption` carries the reporter-confirmation rules — do not infer an
48
+ # unconfirmed `intent-check:` / `conversion-block:`, carry it forward as a
49
+ # blocker instead. Those bind the analysis worker, and the packet is the only
50
+ # profile text a worker receives, so a phase that omits the section ships a
51
+ # worker that can turn an unconfirmed intent into a settled requirement.
47
52
  "requirements-discovery": (
53
+ "Brief consumption",
48
54
  "Worker discovery procedure",
49
55
  ),
50
56
  "error-analysis": (
@@ -52,6 +58,7 @@ WORKER_PROFILE_SECTIONS_BY_TASK_TYPE = {
52
58
  "Worker diagnosis procedure",
53
59
  ),
54
60
  "implementation-planning": (
61
+ "Brief consumption",
55
62
  "Worker planning procedure",
56
63
  "Pre-planning context exploration",
57
64
  "Design principles applied when scoring options",
@@ -60,7 +67,13 @@ WORKER_PROFILE_SECTIONS_BY_TASK_TYPE = {
60
67
  "Worker verification procedure",
61
68
  ),
62
69
  "improvement-discovery": (
70
+ "Brief consumption",
63
71
  "Worker candidate procedure",
72
+ # Every analyser examines every resolved lens but leads with its own, and
73
+ # keeps duplicate / conflicting relations. Held only in the lead's profile,
74
+ # the workers converge on the same easy lens and the cross-check thins out
75
+ # while the aggregate still looks complete.
76
+ "Worker diversity rule",
64
77
  ),
65
78
  }
66
79
  CLARIFICATION_SECTIONS = (
@@ -726,9 +726,10 @@
726
726
  "type": "object",
727
727
  "description": "RENDER_IF taskType == release-handoff. §5.6 deliverables.",
728
728
  "required": [
729
- "sourceVerificationReport",
729
+ "handoffScope",
730
730
  "featureBranchState",
731
731
  "userSelections",
732
+ "localCheckoutOutcome",
732
733
  "executedCommands",
733
734
  "commitList",
734
735
  "mergeConflictProbe",
@@ -737,6 +738,37 @@
737
738
  "userNarrative"
738
739
  ],
739
740
  "additionalProperties": false,
741
+ "allOf": [
742
+ {
743
+ "if": {
744
+ "properties": {
745
+ "handoffScope": {
746
+ "properties": {
747
+ "mode": {
748
+ "const": "stage-group"
749
+ }
750
+ },
751
+ "required": [
752
+ "mode"
753
+ ]
754
+ }
755
+ },
756
+ "required": [
757
+ "handoffScope"
758
+ ]
759
+ },
760
+ "then": {
761
+ "required": [
762
+ "sourceVerificationReports"
763
+ ]
764
+ },
765
+ "else": {
766
+ "required": [
767
+ "sourceVerificationReport"
768
+ ]
769
+ }
770
+ }
771
+ ],
740
772
  "properties": {
741
773
  "handoffScope": {
742
774
  "type": "object",
@@ -761,11 +793,25 @@
761
793
  },
762
794
  "collectorBranch": {
763
795
  "type": "string"
796
+ },
797
+ "mergeCommits": {
798
+ "type": "array",
799
+ "description": "Assemble's merge commit SHAs, in the order the stages were merged into the collector branch. Without them the collector branch's contents cannot be traced back to the stages that produced them once the branch moves on.",
800
+ "items": {
801
+ "type": "string",
802
+ "minLength": 7
803
+ }
804
+ },
805
+ "dependencyClosureVerdict": {
806
+ "type": "string",
807
+ "minLength": 1,
808
+ "description": "Whether the selected stages are closed under their dependencies, and on what basis. A stage-group PR that ships a stage without its predecessor is the failure this records."
764
809
  }
765
810
  }
766
811
  },
767
812
  "sourceVerificationReport": {
768
813
  "type": "object",
814
+ "description": "whole-task mode: the one final-verification report this handoff ships. Required unless handoffScope.mode is stage-group.",
769
815
  "required": [
770
816
  "path",
771
817
  "verdictTokenQuote"
@@ -782,6 +828,59 @@
782
828
  }
783
829
  }
784
830
  },
831
+ "sourceVerificationReports": {
832
+ "type": "array",
833
+ "description": "stage-group mode: one row per selected stage, because that handoff ships several verified stages and a single report path cannot say which stage each verdict belongs to.",
834
+ "minItems": 1,
835
+ "items": {
836
+ "type": "object",
837
+ "required": [
838
+ "stage",
839
+ "path",
840
+ "verdictTokenQuote"
841
+ ],
842
+ "additionalProperties": false,
843
+ "properties": {
844
+ "stage": {
845
+ "type": "integer",
846
+ "minimum": 1
847
+ },
848
+ "path": {
849
+ "type": "string",
850
+ "minLength": 1
851
+ },
852
+ "verdictTokenQuote": {
853
+ "type": "string",
854
+ "minLength": 1
855
+ }
856
+ }
857
+ }
858
+ },
859
+ "localCheckoutOutcome": {
860
+ "type": "object",
861
+ "description": "What the `local checkout` action did, including when it was not taken. `removedWorktree` is the command's own field: a non-empty path means the okstra worktree was removed, an empty string means it was already gone and the branch survived. Recording a removal that did not happen is the error this shape exists to prevent.",
862
+ "required": [
863
+ "status"
864
+ ],
865
+ "additionalProperties": false,
866
+ "properties": {
867
+ "status": {
868
+ "enum": [
869
+ "not-run",
870
+ "checked-out"
871
+ ]
872
+ },
873
+ "branch": {
874
+ "type": "string"
875
+ },
876
+ "mainWorktreePath": {
877
+ "type": "string"
878
+ },
879
+ "removedWorktree": {
880
+ "type": "string"
881
+ }
882
+ }
883
+ },
785
884
  "featureBranchState": {
786
885
  "type": "object",
787
886
  "required": [
@@ -835,7 +934,9 @@
835
934
  ]
836
935
  },
837
936
  "h3": {
937
+ "description": "The PR title/body confirmation. `not-run` when H1 was `local checkout` or `skip` — those routes never reach the question, and inventing an answer for a question that was never asked is the failure this value prevents.",
838
938
  "enum": [
939
+ "not-run",
839
940
  "use as-is",
840
941
  "edit then proceed",
841
942
  "cancel"
@@ -544,13 +544,22 @@ Carried-forward plan items retain their prior verdicts verbatim; each such item
544
544
  - Mode: `{{ releaseHandoff.handoffScope.mode | mdcell }}`
545
545
  {% if releaseHandoff.handoffScope.stages %}- Stages: {{ releaseHandoff.handoffScope.stages | join(', ') | mdcell }}
546
546
  {% endif %}{% if releaseHandoff.handoffScope.collectorBranch %}- Collector branch: `{{ releaseHandoff.handoffScope.collectorBranch | mdcell }}`
547
+ {% endif %}{% if releaseHandoff.handoffScope.mergeCommits %}- Assemble merge commits: {{ releaseHandoff.handoffScope.mergeCommits | join(', ') | mdcell }}
548
+ {% endif %}{% if releaseHandoff.handoffScope.dependencyClosureVerdict %}- Dependency closure: {{ releaseHandoff.handoffScope.dependencyClosureVerdict | mdcell }}
547
549
  {% endif %}
548
550
  {% endif %}
549
551
  ### 5.6.1 Source Verification Report
550
-
552
+ {% if releaseHandoff.sourceVerificationReports %}
553
+ | Stage | Report path (project-relative) | Quoted `Verdict Token` row |
554
+ |-------|--------------------------------|----------------------------|
555
+ {% for row in releaseHandoff.sourceVerificationReports -%}
556
+ | {{ row.stage | mdcell }} | `{{ row.path | mdcell }}` | {{ row.verdictTokenQuote | mdcell }} |
557
+ {% endfor %}
558
+ {%- else %}
551
559
  - Path (project-relative): `{{ releaseHandoff.sourceVerificationReport.path }}`
552
560
  - Quoted `Verdict Token` row from that report's `## 7.` table:
553
561
  > {{ releaseHandoff.sourceVerificationReport.verdictTokenQuote | mdquote(2) }}
562
+ {% endif %}
554
563
 
555
564
  ### 5.6.2 Feature Branch & Working-Tree State{% if t("releaseHandoff.branchStateAside") != "captured at run start" %} ({{ t("releaseHandoff.branchStateAside") }}){% endif %}
556
565
 
@@ -571,7 +580,7 @@ Carried-forward plan items retain their prior verdicts verbatim; each such item
571
580
  {% endif %}
572
581
  | H2 | {{ t("releaseHandoff.h2Body") }} | `{{ (releaseHandoff.userSelections.h2 or t("releaseHandoff.h2DefaultLabel")) | mdcell }}` | {{ t("releaseHandoff.h2OptionsLabel") }} |
573
582
  | H2b | Merge conflict probe | `{{ (releaseHandoff.userSelections.h2b or releaseHandoff.mergeConflictProbe.kind) | mdcell }}` | `not-run` / `clean` / `proceed anyway` / `change base branch` / `cancel` |
574
- | H3 | {{ t("releaseHandoff.h3Body") }} | `{{ releaseHandoff.userSelections.h3 | mdcell }}` | `use as-is` / `edit then proceed` / `cancel` |
583
+ | H3 | {{ t("releaseHandoff.h3Body") }} | `{{ releaseHandoff.userSelections.h3 | mdcell }}` | `not-run` / `use as-is` / `edit then proceed` / `cancel` |
575
584
 
576
585
  ### 5.6.4 Executed Commands
577
586
 
@@ -623,6 +632,12 @@ Carried-forward plan items retain their prior verdicts verbatim; each such item
623
632
 
624
633
  {{ releaseHandoff.routingRecommendation }}
625
634
 
635
+ ### 5.6.9 Local Checkout Outcome
636
+
637
+ - Status: `{{ releaseHandoff.localCheckoutOutcome.status | mdcell }}`
638
+ {% if releaseHandoff.localCheckoutOutcome.status == 'checked-out' %}- Checked out `{{ releaseHandoff.localCheckoutOutcome.branch | mdcell }}` into `{{ releaseHandoff.localCheckoutOutcome.mainWorktreePath | mdcell }}`
639
+ - okstra worktree: {% if releaseHandoff.localCheckoutOutcome.removedWorktree %}`{{ releaseHandoff.localCheckoutOutcome.removedWorktree | mdcell }}` removed{% else %}none removed — already torn down, so the branch survived{% endif %}
640
+ {% endif %}
626
641
  {% endif %}
627
642
  {% if header.taskType == 'implementation' %}
628
643
  ## 5.7 Implementation Deliverables
@@ -39,7 +39,8 @@
39
39
  <h2>{{ t('tasks.release-handoff.commits-delivered') }}</h2>
40
40
  {% if handoff.commitList is mapping %}<p>{{ t('tasks.release-handoff.there-are-no-commits') }}</p>{% else %}
41
41
  <table><thead><tr><th>{{ t('tasks.release-handoff.commit') }}</th><th>{{ t('tasks.release-handoff.subject') }}</th><th>{{ t('tasks.release-handoff.files') }}</th></tr></thead><tbody>{% for row in handoff.commitList %}<tr>{{ row_key(pairs=[("SHA", row.shortSha), ("Order", loop.index)]) }}<td>{{ row.subject | inline_code }}</td><td>{% for file in row.files %}<code>{{ file }}</code>{% if not loop.last %} {% endif %}{% endfor %}</td></tr>{% endfor %}</tbody></table>{% endif %}
42
- <p data-report-field="releaseHandoff.sourceVerificationReport"><strong>{{ t('tasks.release-handoff.the-verification-report-this-rests-on') }}</strong> — <code>{{ handoff.sourceVerificationReport.path }}</code> · {{ handoff.sourceVerificationReport.verdictTokenQuote | inline_code }}</p>
42
+ {% if handoff.sourceVerificationReports %}<p data-report-field="releaseHandoff.sourceVerificationReports"><strong>{{ t('tasks.release-handoff.the-verification-report-this-rests-on') }}</strong>{% for row in handoff.sourceVerificationReports %} stage {{ row.stage }}: <code>{{ row.path }}</code> · {{ row.verdictTokenQuote | inline_code }}{% endfor %}</p>
43
+ {% else %}<p data-report-field="releaseHandoff.sourceVerificationReport"><strong>{{ t('tasks.release-handoff.the-verification-report-this-rests-on') }}</strong> — <code>{{ handoff.sourceVerificationReport.path }}</code> · {{ handoff.sourceVerificationReport.verdictTokenQuote | inline_code }}</p>{% endif %}
43
44
  </section>
44
45
 
45
46
  <section data-report-section="next-action">