okstra 0.102.1 → 0.102.3
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/README.kr.md +5 -6
- package/README.md +5 -6
- package/docs/kr/architecture/storage-model.md +1 -1
- package/docs/kr/architecture.md +8 -12
- package/docs/kr/cli.md +6 -6
- package/docs/kr/container.md +1 -1
- package/docs/kr/performance-improvement-plan-v2.md +2 -2
- package/docs/project-structure-overview.md +2 -2
- package/package.json +7 -2
- package/runtime/BUILD.json +2 -2
- package/runtime/bin/okstra-antigravity-exec.sh +1 -2
- package/runtime/bin/okstra-codex-exec.sh +1 -2
- package/runtime/bin/okstra-render-final-report.py +2 -9
- package/runtime/bin/okstra-spawn-followups.py +4 -6
- package/runtime/bin/okstra-trace-cleanup.sh +24 -4
- package/runtime/prompts/lead/okstra-lead-contract.md +2 -2
- package/runtime/prompts/lead/report-writer.md +1 -1
- package/runtime/prompts/profiles/_common-contract.md +9 -11
- package/runtime/python/okstra_ctl/codex_dispatch.py +4 -12
- package/runtime/python/okstra_ctl/consumers.py +35 -0
- package/runtime/python/okstra_ctl/container.py +4 -6
- package/runtime/python/okstra_ctl/dispatch_core.py +4 -12
- package/runtime/python/okstra_ctl/final_report_paths.py +24 -0
- package/runtime/python/okstra_ctl/handoff.py +2 -1
- package/runtime/python/okstra_ctl/implementation_stage.py +7 -11
- package/runtime/python/okstra_ctl/report_view_artifacts.py +14 -0
- package/runtime/python/okstra_ctl/report_views.py +7 -4
- package/runtime/python/okstra_ctl/run.py +3 -10
- package/runtime/python/okstra_ctl/stage_targets.py +18 -0
- package/runtime/python/okstra_ctl/wizard.py +24 -25
- package/runtime/python/okstra_ctl/wizard_stage_intent.py +54 -0
- package/runtime/python/okstra_token_usage/report.py +2 -5
- package/runtime/validators/validate-report-views.py +2 -1
- package/runtime/validators/validate-run.py +1 -11
- package/src/cli-registry.mjs +1 -1
- package/src/commands/lifecycle/install.mjs +10 -20
- package/src/commands/lifecycle/uninstall.mjs +7 -10
- package/docs/superpowers/plans/2026-05-12-ticket-id-in-reports.md +0 -638
- package/docs/superpowers/plans/2026-05-14-convergence-queue-pruning.md +0 -1568
- package/docs/superpowers/plans/2026-05-17-dual-format-final-report.md +0 -167
- package/docs/superpowers/plans/2026-05-20-final-report-language.md +0 -1501
- package/docs/superpowers/plans/2026-05-20-implementation-planning-multi-stage.md +0 -1267
- package/docs/superpowers/plans/2026-05-20-okstra-run-prompt-sot-b1.md +0 -1007
- package/docs/superpowers/plans/2026-05-20-wizard-messages-json-sot.md +0 -720
- package/docs/superpowers/plans/2026-05-20-wizard-prompt-json-sot-a1.md +0 -681
- package/docs/superpowers/plans/2026-05-21-improvement-discovery-task-type.md +0 -1691
- package/docs/superpowers/plans/2026-05-24-implementation-lead-context-slimming.md +0 -1700
- package/docs/superpowers/plans/2026-05-25-okstra-project-root-rename.md +0 -158
- package/docs/superpowers/plans/2026-05-26-wizard-3-option-picker.md +0 -860
- package/docs/superpowers/plans/2026-06-02-final-verification-protocol-hardening.md +0 -326
- package/docs/superpowers/plans/2026-06-02-okstra-run-branch-confirm-step.md +0 -337
- package/docs/superpowers/plans/2026-06-02-okstra-run-phase-pane-cleanup.md +0 -410
- package/docs/superpowers/plans/2026-06-02-requirements-discovery-fanout.md +0 -728
- package/docs/superpowers/plans/2026-06-04-adversarial-implementation-planning.md +0 -294
- package/docs/superpowers/plans/2026-06-04-adversarial-verification.md +0 -570
- package/docs/superpowers/plans/2026-06-04-coverage-critic.md +0 -516
- package/docs/superpowers/plans/2026-06-04-stage-cohesion-planner.md +0 -351
- package/docs/superpowers/plans/2026-06-04-stage-run-batching.md +0 -457
- package/docs/superpowers/plans/2026-06-05-acceptance-critic.md +0 -251
- package/docs/superpowers/plans/2026-06-05-compact-markdown-report-tables.md +0 -323
- package/docs/superpowers/plans/2026-06-05-wizard-batch-prompts.md +0 -559
- package/docs/superpowers/plans/2026-06-06-final-verification-whole-task-gate.md +0 -993
- package/docs/superpowers/plans/2026-06-06-stage-parallel-and-pending-fixes.md +0 -93
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p1.md +0 -447
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p2.md +0 -289
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p3.md +0 -774
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p4.md +0 -303
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p5-multidep-base.md +0 -387
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase2.md +0 -275
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase3.md +0 -282
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4a.md +0 -147
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4b.md +0 -262
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4c.md +0 -184
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4d.md +0 -88
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4e.md +0 -250
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa.md +0 -409
- package/docs/superpowers/plans/2026-06-09-implementation-run-artifact-stage-isolation.md +0 -320
- package/docs/superpowers/plans/2026-06-10-concurrent-run-team-guard.md +0 -456
- package/docs/superpowers/plans/2026-06-10-git-reconcile-stale-sha-recovery.md +0 -1408
- package/docs/superpowers/plans/2026-06-10-lead-worker-completion-polling-PROBE.md +0 -42
- package/docs/superpowers/plans/2026-06-10-lead-worker-completion-polling.md +0 -337
- package/docs/superpowers/plans/2026-06-10-p6-token-usage-incremental.md +0 -1029
- package/docs/superpowers/plans/2026-06-10-stage-group-handoff.md +0 -1572
- package/docs/superpowers/plans/2026-06-11-fix-cycle.md +0 -1290
- package/docs/superpowers/plans/2026-06-11-wizard-whole-task-final-verification.md +0 -526
- package/docs/superpowers/plans/2026-06-12-html-plan-approval.md +0 -1000
- package/docs/superpowers/plans/2026-06-13-repo-risk-hardening.md +0 -493
- package/docs/superpowers/plans/2026-06-14-host-runtime-auto-execution.md +0 -1775
- package/docs/superpowers/plans/2026-06-15-coding-preflight-pack-dispatch-path.md +0 -504
- package/docs/superpowers/plans/2026-06-15-internal-skill-migration-final-fixups.md +0 -342
- package/docs/superpowers/plans/2026-06-15-internal-skill-migration-fixups.md +0 -258
- package/docs/superpowers/plans/2026-06-15-internal-skill-migration-remaining-fixups.md +0 -387
- package/docs/superpowers/plans/2026-06-15-internal-skill-resource-migration.md +0 -749
- package/docs/superpowers/plans/2026-06-15-worker-prompt-anchor-final-fixups.md +0 -828
- package/docs/superpowers/plans/2026-06-15-worker-prompt-header-error-contract.md +0 -490
- package/docs/superpowers/plans/2026-06-17-okstra-error-report.md +0 -724
- package/docs/superpowers/plans/2026-06-18-subagent-pane-reclaim.md +0 -483
- package/docs/superpowers/plans/2026-06-19-agent-operating-standard.md +0 -476
- package/docs/superpowers/plans/2026-06-19-okstra-inspect-recap-facet.md +0 -647
- package/docs/superpowers/plans/2026-06-20-error-feedback-loop.md +0 -1019
- package/docs/superpowers/plans/2026-06-20-run-index-row-normalization.md +0 -583
- package/docs/superpowers/plans/2026-06-20-stage-auto-integrate-teardown.md +0 -819
- package/docs/superpowers/plans/2026-06-21-okstra-container-local-user-test.md +0 -714
- package/docs/superpowers/plans/2026-06-21-release-handoff-local-checkout.md +0 -348
- package/docs/superpowers/plans/2026-06-23-implementation-stage-multiselect-chain.md +0 -630
- package/docs/superpowers/plans/2026-06-23-implementation-step-commit-granularity.md +0 -274
- package/docs/superpowers/plans/2026-06-23-phase-batch-cleanup-enforcement.md +0 -409
- package/docs/superpowers/plans/2026-06-24-cross-project-precondition.md +0 -542
- package/docs/superpowers/plans/2026-06-24-decision-drafts-render-gap.md +0 -568
- package/docs/superpowers/plans/2026-06-24-manual-user-test-section.md +0 -203
- package/docs/superpowers/plans/2026-06-24-okstra-container-build-rename.md +0 -525
- package/docs/superpowers/specs/2026-05-12-ticket-id-in-reports-design.md +0 -131
- package/docs/superpowers/specs/2026-05-15-implementation-plan-verification-design.md +0 -254
- package/docs/superpowers/specs/2026-05-20-final-report-language-design.md +0 -383
- package/docs/superpowers/specs/2026-05-20-implementation-planning-multi-stage-design.md +0 -322
- package/docs/superpowers/specs/2026-05-20-okstra-run-prompt-sot-design.md +0 -299
- package/docs/superpowers/specs/2026-05-21-improvement-discovery-task-type-design.md +0 -335
- package/docs/superpowers/specs/2026-06-02-okstra-run-branch-confirm-step-design.md +0 -113
- package/docs/superpowers/specs/2026-06-02-okstra-run-phase-pane-cleanup-design.md +0 -173
- package/docs/superpowers/specs/2026-06-02-requirements-discovery-fanout-design.md +0 -154
- package/docs/superpowers/specs/2026-06-04-adversarial-implementation-planning-design.md +0 -90
- package/docs/superpowers/specs/2026-06-04-adversarial-verification-design.md +0 -176
- package/docs/superpowers/specs/2026-06-04-coverage-critic-design.md +0 -99
- package/docs/superpowers/specs/2026-06-04-stage-splitting-cost-aware-design.md +0 -98
- package/docs/superpowers/specs/2026-06-05-acceptance-critic-design.md +0 -90
- package/docs/superpowers/specs/2026-06-05-compact-markdown-report-tables-design.md +0 -87
- package/docs/superpowers/specs/2026-06-05-wizard-batch-prompts-design.md +0 -121
- package/docs/superpowers/specs/2026-06-06-final-verification-whole-task-gate-design.md +0 -126
- package/docs/superpowers/specs/2026-06-06-stage-worktree-isolation-design.md +0 -180
- package/docs/superpowers/specs/2026-06-06-vertical-slice-tdd-planning-design.md +0 -179
- package/docs/superpowers/specs/2026-06-07-stage-conformance-qa-design.md +0 -169
- package/docs/superpowers/specs/2026-06-09-executor-model-custom-id-cascade-design.md +0 -66
- package/docs/superpowers/specs/2026-06-09-implementation-run-artifact-stage-isolation-design.md +0 -87
- package/docs/superpowers/specs/2026-06-10-blocking-contract-posthoc-conformance-design.md +0 -168
- package/docs/superpowers/specs/2026-06-10-concurrent-run-team-guard-design.md +0 -107
- package/docs/superpowers/specs/2026-06-10-git-reconcile-stale-sha-recovery-design.md +0 -105
- package/docs/superpowers/specs/2026-06-10-lead-worker-completion-polling-design.md +0 -113
- package/docs/superpowers/specs/2026-06-10-stage-group-handoff-design.md +0 -156
- package/docs/superpowers/specs/2026-06-11-brief-entry-only-handoff-stage-entry-design.md +0 -158
- package/docs/superpowers/specs/2026-06-11-fix-cycle-design.md +0 -94
- package/docs/superpowers/specs/2026-06-11-wizard-whole-task-final-verification-design.md +0 -89
- package/docs/superpowers/specs/2026-06-12-codex-lead-adapter-design.md +0 -358
- package/docs/superpowers/specs/2026-06-12-html-plan-approval-design.md +0 -85
- package/docs/superpowers/specs/2026-06-12-stage-discipline-rule-design.md +0 -108
- package/docs/superpowers/specs/2026-06-13-forbidden-actions-ssot-design.md +0 -134
- package/docs/superpowers/specs/2026-06-13-neutral-tmux-lead-adapter-design.md +0 -284
- package/docs/superpowers/specs/2026-06-14-host-runtime-auto-execution-design.md +0 -404
- package/docs/superpowers/specs/2026-06-17-okstra-error-report-design.md +0 -123
- package/docs/superpowers/specs/2026-06-18-subagent-pane-reclaim-design.md +0 -150
- package/docs/superpowers/specs/2026-06-19-agent-operating-standard-design.md +0 -120
- package/docs/superpowers/specs/2026-06-19-okstra-inspect-recap-facet-design.md +0 -96
- package/docs/superpowers/specs/2026-06-20-error-feedback-loop-design.md +0 -171
- package/docs/superpowers/specs/2026-06-20-run-index-row-normalization-design.md +0 -112
- package/docs/superpowers/specs/2026-06-20-stage-auto-integrate-teardown-design.md +0 -145
- package/docs/superpowers/specs/2026-06-21-okstra-container-local-user-test-design.md +0 -125
- package/docs/superpowers/specs/2026-06-21-release-handoff-local-checkout-design.md +0 -113
- package/docs/superpowers/specs/2026-06-23-implementation-stage-multiselect-chain-design.md +0 -138
- package/docs/superpowers/specs/2026-06-23-implementation-step-commit-granularity-design.md +0 -120
- package/docs/superpowers/specs/2026-06-24-cross-project-precondition-design.md +0 -129
- package/docs/superpowers/specs/2026-06-24-decision-drafts-render-gap-design.md +0 -185
- package/docs/superpowers/specs/2026-06-24-manual-user-test-section-design.md +0 -121
- package/docs/superpowers/specs/2026-06-24-okstra-container-build-rename-design.md +0 -110
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
# Internal Skill Migration Remaining Fixups Implementation Plan
|
|
2
|
-
|
|
3
|
-
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
-
|
|
5
|
-
**Goal:** Close the remaining runtime-resource gaps after moving internal Okstra contracts out of agent skill discovery.
|
|
6
|
-
|
|
7
|
-
**Architecture:** Keep the public skill surface fixed at the six user-facing skills. Treat `~/.okstra/prompts/` as a required installed runtime asset, not an optional doc tree. Runtime prompt text must point workers to the resolved coding-preflight pack path from the generated launch prompt, and internal prompt resources must describe themselves as contracts/resources, never hidden skills.
|
|
8
|
-
|
|
9
|
-
**Tech Stack:** Node.js ES modules for install drift checks and JS tests, Python pytest contract tests for generated prompts/docs, markdown prompt resources, existing `npm run build` runtime sync.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Current status
|
|
14
|
-
|
|
15
|
-
Already verified as passing:
|
|
16
|
-
|
|
17
|
-
- `npm run build`
|
|
18
|
-
- targeted JS/Python/workflow checks
|
|
19
|
-
- `npm run check`
|
|
20
|
-
- smoke: `install --link .` exposes prompt resources
|
|
21
|
-
- smoke: generated prompts honor `OKSTRA_HOME` for lead contract paths
|
|
22
|
-
- smoke: dangling obsolete internal skill symlink prune
|
|
23
|
-
- runtime surface: `runtime/skills` contains only the six public skills and prompt resources exist under `runtime/prompts/`
|
|
24
|
-
|
|
25
|
-
Still failing or incomplete:
|
|
26
|
-
|
|
27
|
-
1. `okstra ensure-installed` reports OK when `~/.okstra/prompts/` is missing.
|
|
28
|
-
2. implementation executor/verifier sidecars still hardcode `~/.okstra/prompts/coding-preflight/` instead of using the resolved `Coding preflight pack` path from the launch prompt.
|
|
29
|
-
3. runtime prompt resources still describe internal contracts as “skill”.
|
|
30
|
-
4. historical backlog references still point at removed internal skill paths; decide whether to update or explicitly mark them historical.
|
|
31
|
-
|
|
32
|
-
## Task 1: Make `ensure-installed` verify prompt resources
|
|
33
|
-
|
|
34
|
-
**Files:**
|
|
35
|
-
- Modify: `src/install.mjs`
|
|
36
|
-
- Modify: `tests-js/install-runtime.test.mjs`
|
|
37
|
-
|
|
38
|
-
- [ ] **Step 1: Add required runtime prompt resource list**
|
|
39
|
-
|
|
40
|
-
In `src/install.mjs`, near the other install constants, add an exact list of prompt files that must exist for any installed runtime:
|
|
41
|
-
|
|
42
|
-
```js
|
|
43
|
-
const REQUIRED_PROMPT_RESOURCE_FILES = Object.freeze([
|
|
44
|
-
["prompts", "lead", "okstra-lead-contract.md"],
|
|
45
|
-
["prompts", "lead", "context-loader.md"],
|
|
46
|
-
["prompts", "lead", "team-contract.md"],
|
|
47
|
-
["prompts", "lead", "convergence.md"],
|
|
48
|
-
["prompts", "lead", "report-writer.md"],
|
|
49
|
-
["prompts", "coding-preflight", "overview.md"],
|
|
50
|
-
["prompts", "coding-preflight", "clean-code.md"],
|
|
51
|
-
["prompts", "coding-preflight", "frameworks", "node-server.md"],
|
|
52
|
-
["prompts", "coding-preflight", "architectures", "hexagonal.md"],
|
|
53
|
-
]);
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
This is intentionally an allowlist, not a directory wildcard. The list catches the files the launch prompt and routed coding-preflight pack depend on.
|
|
57
|
-
|
|
58
|
-
- [ ] **Step 2: Add a prompt drift helper**
|
|
59
|
-
|
|
60
|
-
In `src/install.mjs`, near `skillTargetDriftReasons` / `agentDriftReasons`, add:
|
|
61
|
-
|
|
62
|
-
```js
|
|
63
|
-
async function promptResourceDriftReasons(paths) {
|
|
64
|
-
const reasons = [];
|
|
65
|
-
for (const parts of REQUIRED_PROMPT_RESOURCE_FILES) {
|
|
66
|
-
const path = join(paths.home, ...parts);
|
|
67
|
-
if (!(await fileExists(path))) reasons.push(`missing ${path}`);
|
|
68
|
-
}
|
|
69
|
-
return reasons;
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
- [ ] **Step 3: Call prompt drift helper from `runEnsureInstalled`**
|
|
74
|
-
|
|
75
|
-
In `runEnsureInstalled`, after the schema check and before skill target checks, add:
|
|
76
|
-
|
|
77
|
-
```js
|
|
78
|
-
for (const reason of await promptResourceDriftReasons(paths)) {
|
|
79
|
-
reasons.push(reason);
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Expected behavior: a version-current install with missing prompt resources must run `runInstall(...)` instead of returning `okstra runtime OK`.
|
|
84
|
-
|
|
85
|
-
- [ ] **Step 4: Add regression test for missing prompt resources**
|
|
86
|
-
|
|
87
|
-
Update the import in `tests-js/install-runtime.test.mjs` to include `rmSync`:
|
|
88
|
-
|
|
89
|
-
```js
|
|
90
|
-
import { existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Add a test near the other install/ensure tests:
|
|
94
|
-
|
|
95
|
-
```js
|
|
96
|
-
test("ensure-installed repairs missing runtime prompt resources", () => {
|
|
97
|
-
const { root, env } = makeInstallEnv();
|
|
98
|
-
mkdirSync(join(root, ".claude"), { recursive: true });
|
|
99
|
-
|
|
100
|
-
const install = runCli(["install", "--quiet"], { ...env, OKSTRA_RUNTIME_HOST: "external" });
|
|
101
|
-
assert.equal(install.code, 0, install.stderr);
|
|
102
|
-
|
|
103
|
-
rmSync(join(root, ".okstra", "prompts"), { recursive: true, force: true });
|
|
104
|
-
|
|
105
|
-
const ensure = runCli(["ensure-installed"], { ...env, OKSTRA_RUNTIME_HOST: "external" });
|
|
106
|
-
assert.equal(ensure.code, 0, ensure.stderr);
|
|
107
|
-
assert.match(ensure.stderr, /okstra runtime needs install:/);
|
|
108
|
-
assert.equal(existsSync(join(root, ".okstra", "prompts", "lead", "okstra-lead-contract.md")), true);
|
|
109
|
-
assert.equal(existsSync(join(root, ".okstra", "prompts", "coding-preflight", "overview.md")), true);
|
|
110
|
-
});
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
- [ ] **Step 5: Run focused JS test**
|
|
114
|
-
|
|
115
|
-
Run:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
node --test tests-js/install-runtime.test.mjs
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Expected: all install-runtime subtests pass, including `ensure-installed repairs missing runtime prompt resources`.
|
|
122
|
-
|
|
123
|
-
## Task 2: Remove hardcoded coding-preflight home paths from executor/verifier sidecars
|
|
124
|
-
|
|
125
|
-
**Files:**
|
|
126
|
-
- Modify: `prompts/profiles/_coding-conventions-preflight.md`
|
|
127
|
-
- Modify: `prompts/profiles/_implementation-verifier.md`
|
|
128
|
-
- Modify: `tests/test_docs_runtime_contract.py`
|
|
129
|
-
|
|
130
|
-
- [ ] **Step 1: Update executor coding-preflight wording**
|
|
131
|
-
|
|
132
|
-
Replace the hardcoded path wording in `prompts/profiles/_coding-conventions-preflight.md` with launch-resource wording:
|
|
133
|
-
|
|
134
|
-
```markdown
|
|
135
|
-
- **Resource selection — read the routed pack, never inline it here.** Use the `Coding preflight pack:` absolute path listed in the generated launch prompt's `## Okstra Runtime Resources` block. Detect each touched file's language and framework (extension / project manifest: `package.json`, `Cargo.toml`, `pyproject.toml`, `pom.xml`, `build.gradle*`, `prisma/schema.prisma`) and read resources from that pack via the Read tool by absolute path. Always read `overview.md` (the router) + `clean-code.md`, then select per the router's three ordered stages — Stage 1 language → `languages/<lang>.md`, Stage 2 framework → `frameworks/<fw>.md` (e.g. `frameworks/node-server.md` for server-side Node), Stage 3 architecture → `architectures/<arch>.md` (e.g. `architectures/hexagonal.md` for ports-and-adapters / NestJS-hex layouts). In every stage, iterate all rules and accumulate every matching resource; do not stop after the first match.
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Also update the graceful-degradation line to avoid `~/.okstra`:
|
|
139
|
-
|
|
140
|
-
```markdown
|
|
141
|
-
- **Graceful degradation (codex / gemini executor runtimes, or any runtime where the resolved coding-preflight pack files are absent or unreadable):** do NOT skip the gate — apply the agnostic principles above plus the project's own `CLAUDE.md` / `CONTRIBUTING` / formatter+lint config, and record `coding-conventions: resource-unavailable → applied <project rules + agnostic principles>` in the final report. Never claim a resource read that did not happen.
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
- [ ] **Step 2: Update verifier coding-preflight wording**
|
|
145
|
-
|
|
146
|
-
Replace the hardcoded path wording in `prompts/profiles/_implementation-verifier.md` with:
|
|
147
|
-
|
|
148
|
-
```markdown
|
|
149
|
-
- **Load the same conventions the executor used via the routed pack.** Use the `Coding preflight pack:` absolute path listed in the generated launch prompt's `## Okstra Runtime Resources` block. Read `overview.md` first, then `clean-code.md`, then apply the router's three ordered stages: language, framework, architecture. In each stage, iterate every rule, treat a rule as matched when any listed condition is true, and accumulate every matching resource — including `frameworks/node-server.md` for server-side Node work and `architectures/hexagonal.md` for ports-and-adapters / NestJS-hex layouts. Degrade to the agnostic checks below when the resolved pack is unreadable, and record either `coding-conventions: resources=<...>` or `coding-conventions: resource-unavailable → applied <project rules + agnostic principles>`. The verifier does NOT inline language rules into the prompt; it reads the same resource files the executor used.
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
- [ ] **Step 3: Add contract test for no hardcoded default preflight path**
|
|
153
|
-
|
|
154
|
-
In `tests/test_docs_runtime_contract.py`, add:
|
|
155
|
-
|
|
156
|
-
```python
|
|
157
|
-
def test_profile_sidecars_use_resolved_coding_preflight_pack_path():
|
|
158
|
-
for relative_path in [
|
|
159
|
-
"prompts/profiles/_coding-conventions-preflight.md",
|
|
160
|
-
"prompts/profiles/_implementation-verifier.md",
|
|
161
|
-
]:
|
|
162
|
-
text = _read_doc(relative_path)
|
|
163
|
-
assert "Coding preflight pack:" in text, relative_path
|
|
164
|
-
assert "~/.okstra/prompts/coding-preflight" not in text, relative_path
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
- [ ] **Step 4: Run focused Python contract test**
|
|
168
|
-
|
|
169
|
-
Run:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
python3 -m pytest tests/test_docs_runtime_contract.py::test_profile_sidecars_use_resolved_coding_preflight_pack_path
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
Expected: the new test passes.
|
|
176
|
-
|
|
177
|
-
## Task 3: Remove stale internal-skill wording from runtime prompt resources
|
|
178
|
-
|
|
179
|
-
**Files:**
|
|
180
|
-
- Modify: `prompts/lead/context-loader.md`
|
|
181
|
-
- Modify: `prompts/lead/convergence.md`
|
|
182
|
-
- Modify: `prompts/lead/report-writer.md`
|
|
183
|
-
- Modify: `prompts/lead/team-contract.md`
|
|
184
|
-
- Modify: `prompts/coding-preflight/overview.md`
|
|
185
|
-
- Modify: `prompts/coding-preflight/languages/python.md`
|
|
186
|
-
- Modify: `prompts/coding-preflight/languages/rust.md`
|
|
187
|
-
- Modify: `tests/test_docs_runtime_contract.py`
|
|
188
|
-
|
|
189
|
-
- [ ] **Step 1: Replace internal contract self-descriptions**
|
|
190
|
-
|
|
191
|
-
Apply these exact terminology replacements where they refer to moved internal contracts/resources:
|
|
192
|
-
|
|
193
|
-
```text
|
|
194
|
-
okstra Skill Phase 1 -> okstra lead Phase 1
|
|
195
|
-
Information to be obtained after executing this skill -> Information produced after completing this contract
|
|
196
|
-
This skill governs -> This contract governs
|
|
197
|
-
this skill -> this contract
|
|
198
|
-
When the okstra skill Phase 5.5 -> When okstra lead Phase 5.5
|
|
199
|
-
If `convergence.enabled: false`, this skill is skipped -> If `convergence.enabled: false`, this contract is skipped
|
|
200
|
-
If you are reading this skill -> If you are reading this contract
|
|
201
|
-
During Phase 6 of the OKSTRA skill -> During okstra lead Phase 6
|
|
202
|
-
During Phase 7 of the OKSTRA skill -> During okstra lead Phase 7
|
|
203
|
-
During okstra Skill Phases 2–5 -> During okstra lead Phases 2–5
|
|
204
|
-
Project rules override this skill on conflict -> Project rules override this resource pack on conflict
|
|
205
|
-
project-level Python style skill -> project-level Python style guide
|
|
206
|
-
rust-guidelines skill -> `rust-guidelines` ruleset
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Do not replace legitimate mentions of public user-facing skills such as `okstra-run`, `okstra-inspect`, or generic project review rule packs under `.claude/skills`.
|
|
210
|
-
|
|
211
|
-
- [ ] **Step 2: Extend stale-wording test to runtime prompt resources**
|
|
212
|
-
|
|
213
|
-
In `tests/test_docs_runtime_contract.py`, add these runtime resources to the scan list in `test_live_docs_do_not_describe_internal_contracts_as_skills`:
|
|
214
|
-
|
|
215
|
-
```python
|
|
216
|
-
"prompts/lead/context-loader.md",
|
|
217
|
-
"prompts/lead/convergence.md",
|
|
218
|
-
"prompts/lead/report-writer.md",
|
|
219
|
-
"prompts/lead/team-contract.md",
|
|
220
|
-
"prompts/coding-preflight/overview.md",
|
|
221
|
-
"prompts/coding-preflight/languages/python.md",
|
|
222
|
-
"prompts/coding-preflight/languages/rust.md",
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
Extend `forbidden_fragments` with targeted internal-contract phrases:
|
|
226
|
-
|
|
227
|
-
```python
|
|
228
|
-
"This skill governs",
|
|
229
|
-
"this skill governs",
|
|
230
|
-
"When this skill says",
|
|
231
|
-
"Information to be obtained after executing this skill",
|
|
232
|
-
"If you are reading this skill",
|
|
233
|
-
"During Phase 6 of the OKSTRA skill",
|
|
234
|
-
"During Phase 7 of the OKSTRA skill",
|
|
235
|
-
"During okstra Skill Phases",
|
|
236
|
-
"When the okstra skill Phase",
|
|
237
|
-
"Project rules override this skill",
|
|
238
|
-
"project-level Python style skill",
|
|
239
|
-
"rust-guidelines skill",
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
- [ ] **Step 3: Run focused stale-wording test**
|
|
243
|
-
|
|
244
|
-
Run:
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
python3 -m pytest tests/test_docs_runtime_contract.py::test_live_docs_do_not_describe_internal_contracts_as_skills
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
Expected: test passes and scanned runtime resources no longer describe themselves as skills.
|
|
251
|
-
|
|
252
|
-
## Task 4: Decide historical backlog wording
|
|
253
|
-
|
|
254
|
-
**Files:**
|
|
255
|
-
- Modify: `agents/TODO.md` or leave intentionally historical with a clarifying note.
|
|
256
|
-
|
|
257
|
-
- [ ] **Step 1: Choose one policy for historical references**
|
|
258
|
-
|
|
259
|
-
Use one of these two approaches:
|
|
260
|
-
|
|
261
|
-
1. **Update historical paths to current resources** when the backlog item is still useful as maintenance guidance:
|
|
262
|
-
|
|
263
|
-
```text
|
|
264
|
-
agents/SKILL.md -> prompts/lead/okstra-lead-contract.md
|
|
265
|
-
skills/okstra-context-loader/SKILL.md -> prompts/lead/context-loader.md
|
|
266
|
-
skills/okstra-team-contract/SKILL.md -> prompts/lead/team-contract.md
|
|
267
|
-
skills/okstra-convergence/SKILL.md -> prompts/lead/convergence.md
|
|
268
|
-
skills/okstra-report-writer/SKILL.md -> prompts/lead/report-writer.md
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
2. **Keep historical paths** only if the section is intentionally archival; add one sentence at the top of the file:
|
|
272
|
-
|
|
273
|
-
```markdown
|
|
274
|
-
> Historical note: entries before 2026-06-15 may reference the former internal-skill layout; current lead contracts live under `prompts/lead/` and current coding-preflight resources live under `prompts/coding-preflight/`.
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
Recommended: update live-looking maintenance guidance and add the historical note only if old entries must remain untouched.
|
|
278
|
-
|
|
279
|
-
- [ ] **Step 2: Verify old live paths are either gone or explicitly historical**
|
|
280
|
-
|
|
281
|
-
Run:
|
|
282
|
-
|
|
283
|
-
```bash
|
|
284
|
-
python3 - <<'PY'
|
|
285
|
-
from pathlib import Path
|
|
286
|
-
text = Path('agents/TODO.md').read_text(encoding='utf-8')
|
|
287
|
-
old = 'skills/okstra-team-contract/SKILL.md'
|
|
288
|
-
if old in text:
|
|
289
|
-
assert 'Historical note:' in text
|
|
290
|
-
PY
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
Expected: exit code 0.
|
|
294
|
-
|
|
295
|
-
## Task 5: Final verification
|
|
296
|
-
|
|
297
|
-
**Files:**
|
|
298
|
-
- Generated: `runtime/` via `npm run build`
|
|
299
|
-
|
|
300
|
-
- [ ] **Step 1: Run focused tests**
|
|
301
|
-
|
|
302
|
-
Run:
|
|
303
|
-
|
|
304
|
-
```bash
|
|
305
|
-
node --test tests-js/install-runtime.test.mjs
|
|
306
|
-
python3 -m pytest tests/test_docs_runtime_contract.py tests/test_lead_runtime_marker.py
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
Expected: all listed tests pass.
|
|
310
|
-
|
|
311
|
-
- [ ] **Step 2: Re-run the failing ensure-installed smoke**
|
|
312
|
-
|
|
313
|
-
Run:
|
|
314
|
-
|
|
315
|
-
```bash
|
|
316
|
-
TMP_HOME=$(mktemp -d)
|
|
317
|
-
mkdir -p "$TMP_HOME/.claude"
|
|
318
|
-
HOME="$TMP_HOME" OKSTRA_HOME="$TMP_HOME/.okstra" OKSTRA_RUNTIME_HOST=external node bin/okstra install --quiet
|
|
319
|
-
node --input-type=module -e "import { rmSync } from 'node:fs'; import { join } from 'node:path'; rmSync(join(process.argv[1], '.okstra', 'prompts'), { recursive: true, force: true });" "$TMP_HOME"
|
|
320
|
-
HOME="$TMP_HOME" OKSTRA_HOME="$TMP_HOME/.okstra" OKSTRA_RUNTIME_HOST=external node bin/okstra ensure-installed
|
|
321
|
-
node --input-type=module -e "
|
|
322
|
-
import assert from 'node:assert/strict';
|
|
323
|
-
import { existsSync } from 'node:fs';
|
|
324
|
-
import { join } from 'node:path';
|
|
325
|
-
const home = process.argv[1];
|
|
326
|
-
assert.equal(existsSync(join(home, '.okstra', 'prompts', 'lead', 'okstra-lead-contract.md')), true);
|
|
327
|
-
assert.equal(existsSync(join(home, '.okstra', 'prompts', 'coding-preflight', 'overview.md')), true);
|
|
328
|
-
" "$TMP_HOME"
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
Expected: `ensure-installed` detects missing prompt resources, reinstalls, and the final Node assertions pass.
|
|
332
|
-
|
|
333
|
-
- [ ] **Step 3: Re-run previous smoke checks**
|
|
334
|
-
|
|
335
|
-
Run the three smoke checks from `docs/superpowers/plans/2026-06-15-internal-skill-migration-fixups.md`:
|
|
336
|
-
|
|
337
|
-
1. `install --link .` exposes prompt resources.
|
|
338
|
-
2. generated prompt honors `OKSTRA_HOME` for lead resources.
|
|
339
|
-
3. dangling obsolete internal skill symlink is pruned.
|
|
340
|
-
|
|
341
|
-
Expected: all three pass.
|
|
342
|
-
|
|
343
|
-
- [ ] **Step 4: Run full suite**
|
|
344
|
-
|
|
345
|
-
Run:
|
|
346
|
-
|
|
347
|
-
```bash
|
|
348
|
-
npm run check
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
Expected: build, JS tests, Python tests, and workflow validator pass.
|
|
352
|
-
|
|
353
|
-
- [ ] **Step 5: Runtime surface assertion**
|
|
354
|
-
|
|
355
|
-
Run:
|
|
356
|
-
|
|
357
|
-
```bash
|
|
358
|
-
node --input-type=module -e "
|
|
359
|
-
import assert from 'node:assert/strict';
|
|
360
|
-
import { readdirSync, existsSync } from 'node:fs';
|
|
361
|
-
import { join } from 'node:path';
|
|
362
|
-
import { USER_SKILL_NAMES, OBSOLETE_INTERNAL_SKILL_NAMES } from './src/skill-catalog.mjs';
|
|
363
|
-
const names = readdirSync('runtime/skills', { withFileTypes: true })
|
|
364
|
-
.filter((entry) => entry.isDirectory())
|
|
365
|
-
.map((entry) => entry.name)
|
|
366
|
-
.sort();
|
|
367
|
-
assert.deepEqual(names, [...USER_SKILL_NAMES].sort());
|
|
368
|
-
for (const name of OBSOLETE_INTERNAL_SKILL_NAMES) {
|
|
369
|
-
assert.equal(existsSync(join('runtime/skills', name)), false, name);
|
|
370
|
-
}
|
|
371
|
-
assert.equal(existsSync('runtime/prompts/lead/okstra-lead-contract.md'), true);
|
|
372
|
-
assert.equal(existsSync('runtime/prompts/coding-preflight/overview.md'), true);
|
|
373
|
-
console.log('runtime surface ok');
|
|
374
|
-
"
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
Expected: exit code 0 and `runtime surface ok`.
|
|
378
|
-
|
|
379
|
-
## Completion criteria
|
|
380
|
-
|
|
381
|
-
The migration is complete only when:
|
|
382
|
-
|
|
383
|
-
- `ensure-installed` restores missing prompt resources.
|
|
384
|
-
- executor/verifier sidecars no longer hardcode `~/.okstra/prompts/coding-preflight/`.
|
|
385
|
-
- runtime lead/coding-preflight resources do not describe internal contracts as skills.
|
|
386
|
-
- public skill surface remains exactly the six plugin-listed user skills.
|
|
387
|
-
- all focused tests, smoke checks, and `npm run check` pass freshly.
|