okstra 0.122.0 → 0.124.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/README.md +5 -2
- package/docs/architecture/storage-model.md +15 -1
- package/docs/architecture.md +45 -7
- package/docs/cli.md +47 -5
- package/docs/for-ai/README.md +42 -36
- package/docs/for-ai/skills/okstra-brief-gen.md +105 -105
- package/docs/for-ai/skills/okstra-container-build.md +61 -61
- package/docs/for-ai/skills/okstra-graphify.md +64 -0
- package/docs/for-ai/skills/okstra-inspect.md +86 -86
- package/docs/for-ai/skills/okstra-manager.md +32 -32
- package/docs/for-ai/skills/okstra-memory.md +49 -50
- package/docs/for-ai/skills/okstra-pr-gen.md +48 -0
- package/docs/for-ai/skills/okstra-rollup.md +58 -58
- package/docs/for-ai/skills/okstra-run.md +95 -95
- package/docs/for-ai/skills/okstra-schedule-gen.md +320 -0
- package/docs/for-ai/skills/okstra-setup.md +63 -64
- package/docs/for-ai/skills/okstra-user-response.md +48 -0
- package/docs/performance-improvement-plan-v2.md +4 -4
- package/docs/pr-template-usage.md +34 -34
- package/docs/project-structure-overview.md +92 -70
- package/docs/task-process/README.md +33 -33
- package/docs/task-process/common-flow.md +26 -26
- package/docs/task-process/error-analysis.md +20 -21
- package/docs/task-process/final-verification.md +41 -41
- package/docs/task-process/implementation-planning.md +52 -28
- package/docs/task-process/implementation.md +51 -32
- package/docs/task-process/release-handoff.md +46 -46
- package/docs/task-process/requirements-discovery.md +22 -23
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/workers/antigravity-worker.md +4 -4
- package/runtime/agents/workers/claude-worker.md +2 -2
- package/runtime/agents/workers/codex-worker.md +4 -4
- package/runtime/agents/workers/report-writer-worker.md +4 -4
- package/runtime/bin/lib/okstra/usage.sh +3 -3
- package/runtime/prompts/coding-preflight/frameworks/node-server.md +1 -1
- package/runtime/prompts/launch.template.md +6 -3
- package/runtime/prompts/lead/convergence.md +11 -21
- package/runtime/prompts/lead/okstra-lead-contract.md +16 -18
- package/runtime/prompts/lead/plan-body-verification.md +47 -18
- package/runtime/prompts/lead/report-writer.md +50 -45
- package/runtime/prompts/lead/team-contract.md +11 -122
- package/runtime/prompts/profiles/_common-contract.md +15 -22
- package/runtime/prompts/profiles/_implementation-deliverable.md +4 -2
- package/runtime/prompts/profiles/_implementation-executor.md +6 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +3 -3
- package/runtime/prompts/profiles/error-analysis.md +2 -2
- package/runtime/prompts/profiles/final-verification.md +3 -1
- package/runtime/prompts/profiles/implementation-planning.md +24 -14
- package/runtime/prompts/profiles/implementation.md +1 -1
- package/runtime/prompts/profiles/improvement-discovery.md +1 -1
- package/runtime/prompts/profiles/release-handoff.md +3 -3
- package/runtime/prompts/profiles/requirements-discovery.md +18 -18
- package/runtime/prompts/wizard/prompts.ko.json +44 -0
- package/runtime/python/okstra_ctl/codex_dispatch.py +23 -1
- package/runtime/python/okstra_ctl/design_prep.py +1462 -0
- package/runtime/python/okstra_ctl/design_surfaces.py +243 -0
- package/runtime/python/okstra_ctl/final_report_schema.py +33 -1
- package/runtime/python/okstra_ctl/implementation_stage.py +35 -0
- package/runtime/python/okstra_ctl/incremental_carry.py +294 -21
- package/runtime/python/okstra_ctl/incremental_scope.py +51 -5
- package/runtime/python/okstra_ctl/material.py +1 -1
- package/runtime/python/okstra_ctl/model_discovery.py +98 -0
- package/runtime/python/okstra_ctl/models.py +8 -3
- package/runtime/python/okstra_ctl/render.py +5 -0
- package/runtime/python/okstra_ctl/run.py +53 -5
- package/runtime/python/okstra_ctl/user_response.py +67 -2
- package/runtime/python/okstra_ctl/wizard.py +283 -3
- package/runtime/python/okstra_token_usage/report.py +11 -0
- package/runtime/schemas/final-report-v1.0.schema.json +336 -0
- package/runtime/skills/_fragments/bash-invocation-rule.md +1 -0
- package/runtime/skills/_fragments/preflight-outdated-cli.md +1 -0
- package/runtime/skills/_fragments/python-bootstrap-note.md +1 -0
- package/runtime/skills/okstra-brief-gen/SKILL.md +117 -122
- package/runtime/skills/okstra-container-build/SKILL.md +24 -14
- package/runtime/skills/okstra-graphify/SKILL.md +12 -4
- package/runtime/skills/okstra-inspect/SKILL.md +105 -99
- package/runtime/skills/okstra-manager/SKILL.md +1 -1
- package/runtime/skills/okstra-memory/SKILL.md +3 -3
- package/runtime/skills/okstra-rollup/SKILL.md +12 -6
- package/runtime/skills/okstra-run/SKILL.md +49 -88
- package/runtime/skills/{okstra-schedule → okstra-schedule-gen}/SKILL.md +38 -32
- package/runtime/skills/okstra-setup/SKILL.md +1 -1
- package/runtime/skills/okstra-setup/references/project-config.md +17 -16
- package/runtime/skills/okstra-usage/SKILL.md +5 -2
- package/runtime/skills/okstra-user-response/SKILL.md +23 -9
- package/runtime/templates/prd/brief.template.md +92 -92
- package/runtime/templates/reports/error-analysis-input.template.md +1 -1
- package/runtime/templates/reports/fan-out-unit.template.md +6 -6
- package/runtime/templates/reports/final-report.template.md +67 -0
- package/runtime/templates/reports/final-verification-input.template.md +6 -6
- package/runtime/templates/reports/i18n/en.json +31 -0
- package/runtime/templates/reports/i18n/ko.json +31 -0
- package/runtime/templates/reports/implementation-input.template.md +1 -1
- package/runtime/templates/reports/implementation-planning-input.template.md +1 -1
- package/runtime/templates/reports/improvement-discovery-input.template.md +1 -1
- package/runtime/templates/reports/quick-input.template.md +1 -1
- package/runtime/templates/reports/release-handoff-input.template.md +1 -1
- package/runtime/templates/reports/schedule.template.md +22 -22
- package/runtime/templates/reports/task-brief.template.md +3 -3
- package/runtime/templates/reports/user-response.template.md +20 -20
- package/runtime/templates/worker-prompt-preamble.md +111 -13
- package/runtime/validators/validate-run.py +426 -5
- package/runtime/validators/validate-schedule.py +5 -5
- package/src/cli-registry.mjs +7 -0
- package/src/commands/inspect/design-prep.mjs +23 -0
- package/src/lib/skill-catalog.mjs +2 -1
- package/docs/for-ai/skills/okstra-schedule.md +0 -320
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
# okstra-schedule-gen AI Manual
|
|
2
|
+
|
|
3
|
+
## Source
|
|
4
|
+
|
|
5
|
+
- Skill source: [`skills/okstra-schedule-gen/SKILL.md`](../../../skills/okstra-schedule-gen/SKILL.md)
|
|
6
|
+
- schedule template: [`templates/reports/schedule.template.md`](../../../templates/reports/schedule.template.md)
|
|
7
|
+
- schedule validator: [`validators/validate-schedule.py`](../../../validators/validate-schedule.py)
|
|
8
|
+
- workStatus inference reference: [`skills/okstra-inspect/SKILL.md`](../../../skills/okstra-inspect/SKILL.md)
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
`okstra-schedule-gen` gathers the non-done tasks within a task-group and produces a client-facing work-schedule Markdown. It is not a skill for starting an execution task, and it is not a single-task analysis.
|
|
13
|
+
|
|
14
|
+
Output location:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
<PROJECT_ROOT>/.okstra/tasks/<task-group-segment>/schedule/<task-group-segment>-plan-<YYYY-MM-DD_HH-MM-SS>.md
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
Use it when:
|
|
23
|
+
|
|
24
|
+
- The user requests a "schedule", "work plan", or work-schedule table for an entire task-group.
|
|
25
|
+
- `.okstra/discovery/task-catalog.json` contains that task-group and it has at least one task that is not `done`.
|
|
26
|
+
|
|
27
|
+
Do not use it when:
|
|
28
|
+
|
|
29
|
+
- Single-task status/analysis: `okstra-inspect status`
|
|
30
|
+
- Actual phase execution: `okstra-run`
|
|
31
|
+
- An already-completed task-group: do not create a file; state that all tasks are done.
|
|
32
|
+
|
|
33
|
+
## Preflight
|
|
34
|
+
|
|
35
|
+
A single Bash call:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
okstra preflight --runtime claude-code --json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If there is no runtime or project setup, point the user to `/okstra-setup` and stop.
|
|
42
|
+
|
|
43
|
+
## Resolving the task-group
|
|
44
|
+
|
|
45
|
+
1. Read `.okstra/discovery/task-catalog.json`.
|
|
46
|
+
2. Lowercase the user-supplied task-group and strip characters outside `[a-z0-9]`.
|
|
47
|
+
3. Apply the same transform to each catalog entry's `taskGroupPathSegment` and compare.
|
|
48
|
+
4. Do not fall back to the raw `taskGroup`.
|
|
49
|
+
5. Read each matched task's `task-manifest.json` directly. The catalog may be stale; the manifest is authoritative.
|
|
50
|
+
|
|
51
|
+
On zero matches, output `That task-group could not be found.` and stop.
|
|
52
|
+
|
|
53
|
+
## workStatus filter
|
|
54
|
+
|
|
55
|
+
Check the workStatus in each manifest. When it is missing or empty, apply `okstra-inspect`'s `status.4` inference table.
|
|
56
|
+
|
|
57
|
+
Exclude:
|
|
58
|
+
|
|
59
|
+
- explicit `done`
|
|
60
|
+
- inferred `done`
|
|
61
|
+
|
|
62
|
+
Include:
|
|
63
|
+
|
|
64
|
+
- `todo`
|
|
65
|
+
- `in-progress`
|
|
66
|
+
- `blocked`
|
|
67
|
+
- `phase-done`
|
|
68
|
+
- other non-done inferred/display states
|
|
69
|
+
|
|
70
|
+
If 0 remain after filtering, do not create a schedule file; output `All tasks in this task-group are done. There is no schedule to generate.`
|
|
71
|
+
|
|
72
|
+
## per-task data extraction
|
|
73
|
+
|
|
74
|
+
Read from the manifest:
|
|
75
|
+
|
|
76
|
+
- `taskId`, `taskGroup`, `taskKey`
|
|
77
|
+
- `workCategory`
|
|
78
|
+
- `workflow.currentPhase`
|
|
79
|
+
- `workflow.currentPhaseState`
|
|
80
|
+
- `taskType`
|
|
81
|
+
- `workStatus`
|
|
82
|
+
- `latestReportPath`
|
|
83
|
+
|
|
84
|
+
Parse from the report:
|
|
85
|
+
|
|
86
|
+
- Title / Problem statement
|
|
87
|
+
- Solution / Architecture
|
|
88
|
+
- Work Breakdown
|
|
89
|
+
- Verification Commands
|
|
90
|
+
- Rollback strategy
|
|
91
|
+
- Effort, Risk, Priority, Scope, Repos
|
|
92
|
+
|
|
93
|
+
If there is no report or the manifest pointer is stale, fall back:
|
|
94
|
+
|
|
95
|
+
1. From `taskRootPath`, find the newest-mtime file under `runs/<taskType>/reports/final-report-*.md`.
|
|
96
|
+
2. If none, also look at `runs/*/reports/final-report-*.md`.
|
|
97
|
+
3. If found, parse it and put a fallback note in the schedule task block.
|
|
98
|
+
4. If still nothing, mark it `[NEEDS-OKSTRA-RUN]` and use only the manifest metadata.
|
|
99
|
+
|
|
100
|
+
Mark a specific section's parse failure as `[PARSE-ERROR: <section>]` and continue.
|
|
101
|
+
|
|
102
|
+
## client-facing audience rule
|
|
103
|
+
|
|
104
|
+
The schedule is a client-facing work plan. Do not surface the internal report's approval, blocking decisions, or items requiring user confirmation in the schedule.
|
|
105
|
+
|
|
106
|
+
Remove from the output:
|
|
107
|
+
|
|
108
|
+
- permission/authority confirmation steps
|
|
109
|
+
- approval waiting buffer
|
|
110
|
+
- stakeholder coordination
|
|
111
|
+
- legal/organizational sign-off
|
|
112
|
+
- `Consolidated User Decision Checklist`
|
|
113
|
+
- `#### Items requiring user confirmation`
|
|
114
|
+
- `Done`, `Ready?`, `Blocking Decisions` column
|
|
115
|
+
- checkbox list/cell
|
|
116
|
+
|
|
117
|
+
effort and Gantt reflect engineering duration only.
|
|
118
|
+
|
|
119
|
+
## phase classification
|
|
120
|
+
|
|
121
|
+
Default mapping:
|
|
122
|
+
|
|
123
|
+
| workCategory | phase |
|
|
124
|
+
|---|---|
|
|
125
|
+
| `bugfix` | Phase 1 when High/Med-High risk, otherwise Phase 2 |
|
|
126
|
+
| `feature` | Phase 2 |
|
|
127
|
+
| `improvement` | Phase 2 |
|
|
128
|
+
| `refactor` | Phase 3 |
|
|
129
|
+
| `ops` | Phase 3 |
|
|
130
|
+
| `docs` / `doc` | Phase 2 |
|
|
131
|
+
| `unknown` or undefined | Phase 2, add a rationale note |
|
|
132
|
+
|
|
133
|
+
priority override:
|
|
134
|
+
|
|
135
|
+
- `P0`: Phase 1
|
|
136
|
+
- `P1`, `P2`: Phase 2
|
|
137
|
+
- `P3`: Phase 3
|
|
138
|
+
|
|
139
|
+
When ambiguous, place it in the closest phase and write the rationale at the top of the phase section. This rationale is a current validator gap, so the document owns it.
|
|
140
|
+
|
|
141
|
+
## section contract
|
|
142
|
+
|
|
143
|
+
Follow the template's heading order and spelling. `validate-schedule.py` checks section order, title suffix, metadata, field labels, enum, Gantt axis, and more.
|
|
144
|
+
|
|
145
|
+
top-level contract sections:
|
|
146
|
+
|
|
147
|
+
1. `## At a Glance`
|
|
148
|
+
2. `## Executive Summary` (includes the mandatory subsection `### Effort Sizing Criteria` — checked by `validate-schedule.py`)
|
|
149
|
+
3. `## Task Dependency Graph`
|
|
150
|
+
4. `## Phase 1: Critical Fixes`
|
|
151
|
+
5. `## Phase 2: Enhancements`
|
|
152
|
+
6. `## Phase 3: Architecture`
|
|
153
|
+
7. `## Execution Priority Matrix`
|
|
154
|
+
8. `## Cross-Task Dependencies & Shared Concerns`
|
|
155
|
+
9. `## Risk Mitigation Strategy`
|
|
156
|
+
10. `## Recommended Immediate Actions`
|
|
157
|
+
|
|
158
|
+
optional sections:
|
|
159
|
+
|
|
160
|
+
- `## Gantt Chart`: between `Task Dependency Graph` and `Phase 1`.
|
|
161
|
+
- `## Glossary`: last section. Use only when opaque codes remain in the body.
|
|
162
|
+
|
|
163
|
+
Keep the heading even when a phase has no task, and write `_none_`.
|
|
164
|
+
|
|
165
|
+
## top header
|
|
166
|
+
|
|
167
|
+
Shape:
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
# <Title> — Work Schedule
|
|
171
|
+
|
|
172
|
+
> Generated: <YYYY-MM-DD HH:MM> | Project: <project-id> | Task Group: <task-group>
|
|
173
|
+
> Source: okstra <mode> (<N> tasks included, <M> done excluded)
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The validator checks the title suffix `— Work Schedule`. For `<project-id>`, prefer `task-catalog.json`'s top-level `projectId`, and if absent use the first matched manifest's `projectId`. Do not invent a value.
|
|
177
|
+
|
|
178
|
+
## At a Glance
|
|
179
|
+
|
|
180
|
+
This totals line must be present exactly.
|
|
181
|
+
|
|
182
|
+
```markdown
|
|
183
|
+
**<N> tasks total / estimated effort: <X.X> ~ <Y.Y> days (Effort sum)**
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
The Effort-to-day mapping's SSOT is the template's `### Effort Sizing Criteria` table. Build the total day range by summing the lower/upper bounds.
|
|
187
|
+
|
|
188
|
+
enum values:
|
|
189
|
+
|
|
190
|
+
| Field | value |
|
|
191
|
+
|---|---|
|
|
192
|
+
| Effort | `S`, `M`, `L`, `XL`, `XXL` |
|
|
193
|
+
| Priority | `P0`, `P1`, `P2`, `P3` |
|
|
194
|
+
| Risk | `Very Low`, `Low`, `Medium`, `Med-High`, `High` |
|
|
195
|
+
| Phase | `1`, `2`, `3` |
|
|
196
|
+
|
|
197
|
+
`Med-High` is canonical.
|
|
198
|
+
|
|
199
|
+
## per-task block
|
|
200
|
+
|
|
201
|
+
Every task block has a `| Item | Detail |` table. field row order:
|
|
202
|
+
|
|
203
|
+
1. `**Category**`
|
|
204
|
+
2. `**Priority**`
|
|
205
|
+
3. `**Effort**`
|
|
206
|
+
4. `**Status**`
|
|
207
|
+
5. `**Risk**`
|
|
208
|
+
6. `**Scope**`
|
|
209
|
+
7. `**Repo**`
|
|
210
|
+
|
|
211
|
+
Then the subsection order:
|
|
212
|
+
|
|
213
|
+
1. `**Problem**:`
|
|
214
|
+
2. `**Solution**:`
|
|
215
|
+
3. `**Work Breakdown**:` — followed by a `| Step | File | Action | Detail |` table
|
|
216
|
+
4. `**Verification Commands**:` — followed by a ` ```bash ` fenced block
|
|
217
|
+
5. `**Rollback**:`
|
|
218
|
+
|
|
219
|
+
For a `[NEEDS-OKSTRA-RUN]` or `[PARSE-ERROR: <section>]` task, fill only the available fields but place the marker right below the task heading.
|
|
220
|
+
|
|
221
|
+
## Task Dependency Graph
|
|
222
|
+
|
|
223
|
+
When there is no dependency, literal:
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
_none_
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
When dependencies exist, use a plain fenced block. Do not attach a language tag.
|
|
230
|
+
|
|
231
|
+
````
|
|
232
|
+
```
|
|
233
|
+
DEV-1 -> DEV-2, DEV-3
|
|
234
|
+
DEV-2 -> DEV-4
|
|
235
|
+
```
|
|
236
|
+
````
|
|
237
|
+
|
|
238
|
+
Use only the ASCII arrow `->`.
|
|
239
|
+
|
|
240
|
+
## Gantt Chart
|
|
241
|
+
|
|
242
|
+
**directive override (highest priority):** before applying the heuristic below, first check the directive source's `## Directive` section. Resolution order (first hit): (1) the `--directive-file <abs-path>` argument, (2) `<PROJECT_ROOT>/.okstra/tasks/<task-group-segment>/schedule/instruction-set/analysis-material.md`, (3) if none, the heuristic as-is (normal path — no warning·stop). When the directive instructs Gantt render/skip, it overrides the heuristic·skip rules, and leave one line in that section: `> _Per Directive directive: <verbatim short excerpt>._`. When the directive supplies day allocation·phase weight·sub-task decomposition, reflect it verbatim in bar length.
|
|
243
|
+
|
|
244
|
+
By default, render. If there is any day signal, produce a chart even as a rough estimate.
|
|
245
|
+
|
|
246
|
+
Render-condition examples:
|
|
247
|
+
|
|
248
|
+
- 2+ tasks have effort sizing.
|
|
249
|
+
- Even 1 task has an effort range.
|
|
250
|
+
- The source report has Part/Phase/Step decomposition.
|
|
251
|
+
- Total effort is 3 days or more.
|
|
252
|
+
|
|
253
|
+
Skip only when every task is XXL with no decomposition, or when all tasks lack both effort and decomposition. On skip, place the following blockquote at the `Gantt Chart` position.
|
|
254
|
+
|
|
255
|
+
```markdown
|
|
256
|
+
> _Gantt Chart skipped: <concrete reason referencing the actual data>._
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
The Gantt is plain fenced ASCII. Do not use Mermaid, PlantUML, Graphviz, or a date axis.
|
|
260
|
+
|
|
261
|
+
````
|
|
262
|
+
```
|
|
263
|
+
Day: 1 5 10 15 20
|
|
264
|
+
| | | | |
|
|
265
|
+
Phase 1
|
|
266
|
+
DEV-1 (M) ██████ ! crit
|
|
267
|
+
Phase 2
|
|
268
|
+
DEV-2 (L) ██████░░ est
|
|
269
|
+
```
|
|
270
|
+
````
|
|
271
|
+
|
|
272
|
+
The axis uses relative day count only. Do not put in a calendar date, weekday, or "today + N".
|
|
273
|
+
|
|
274
|
+
## handling opaque code
|
|
275
|
+
|
|
276
|
+
Do not surface internal report codes (`FC-5`, `UC-3`, `M2`, etc.) as-is.
|
|
277
|
+
|
|
278
|
+
Option A: inline replacement with a short description.
|
|
279
|
+
|
|
280
|
+
Option B: when many codes recur, resolve every code in a final `## Glossary`. The glossary table header is exactly `| Code | Description |` (English literal — checked by the validator). Milestone codes (`M1`, `M2` …) also fail the validator when left unresolved in the glossary, just like `FC-N`.
|
|
281
|
+
|
|
282
|
+
Do not put decision-item letter codes (`A1`, `B2`, `C3`, `D4`) in the schedule.
|
|
283
|
+
|
|
284
|
+
## validation
|
|
285
|
+
|
|
286
|
+
After writing, re-read it and run the validator before the completion message.
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
python3 ~/.okstra/lib/validators/validate-schedule.py <output-path>
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
If the installed validator is absent, use the repo validator.
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
python3 validators/validate-schedule.py <output-path>
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
On failure, fix the file and re-validate. Fall back to a manual checklist only when there is no validator.
|
|
299
|
+
|
|
300
|
+
## completion message
|
|
301
|
+
|
|
302
|
+
```text
|
|
303
|
+
Schedule generated: <relative-path>
|
|
304
|
+
- Included tasks: N
|
|
305
|
+
- Excluded (done) tasks: M
|
|
306
|
+
- Estimated effort: X.X ~ Y.Y days (Effort sum)
|
|
307
|
+
- Mode: lightweight
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Forbidden patterns
|
|
311
|
+
|
|
312
|
+
- Translating a heading into Korean/French/etc.
|
|
313
|
+
- Adding `## Cumulative Timeline`.
|
|
314
|
+
- Adding an extra top-level section such as `## Effort-to-Day mapping`.
|
|
315
|
+
- Rendering the Gantt as mermaid.
|
|
316
|
+
- Putting a calendar date on the Gantt axis.
|
|
317
|
+
- Creating a checkbox, Done, Ready, or Blocking Decisions column.
|
|
318
|
+
- Surfacing internal approval/blocker/user-decision items in the client schedule.
|
|
319
|
+
- Excluding a task because it has no report. Include it as `[NEEDS-OKSTRA-RUN]`.
|
|
320
|
+
- Overwriting an existing file on a timestamp collision. Append a `-2`, `-3` suffix.
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
# okstra-setup AI Manual
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Source
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Skill source: [`skills/okstra-setup/SKILL.md`](../../../skills/okstra-setup/SKILL.md)
|
|
6
6
|
- CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
|
|
7
|
-
- project
|
|
8
|
-
- install/ensure-installed
|
|
7
|
+
- project registration impl: `src/commands/lifecycle/setup.mjs`
|
|
8
|
+
- install/ensure-installed impl: `src/commands/lifecycle/install.mjs`
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Purpose
|
|
11
11
|
|
|
12
|
-
`okstra-setup
|
|
12
|
+
`okstra-setup` handles two things.
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
14
|
+
1. Machine-level runtime install: `~/.okstra/`, `~/.claude/skills/`, `~/.claude/agents/`
|
|
15
|
+
2. Project-level registration: `<PROJECT_ROOT>/.okstra/project.json`
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
It is not a day-to-day task-running skill. If a task is already prepared, route to `okstra-run` or `okstra-inspect`.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## When to use
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Use it when:
|
|
22
22
|
|
|
23
|
-
-
|
|
24
|
-
- `~/.okstra/version
|
|
25
|
-
-
|
|
23
|
+
- The user asks for "okstra setup", "setup okstra", "initialize okstra", "okstra init", "first time setup".
|
|
24
|
+
- `~/.okstra/version` is missing or looks stale.
|
|
25
|
+
- The current project has no `.okstra/project.json`.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Do not use it when:
|
|
28
28
|
|
|
29
|
-
- task run
|
|
30
|
-
- status/history/report
|
|
31
|
-
-
|
|
29
|
+
- The user wants to start a task run. Use `okstra-run` instead.
|
|
30
|
+
- The user wants to view status/history/report. Use `okstra-inspect` instead.
|
|
31
|
+
- `.okstra/project.json` already exists and only day-to-day usage is needed.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Pre-run checks
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Tell the user that Node 18+ and Python 3.10+ are required. If it is unclear whether the current working directory is inside the project that will host the okstra metadata, confirm the project root first.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Install command:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
npx -y okstra@latest install --runtime claude-code
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Treat this command as idempotent. Even if already installed, re-run it to align the runtime, skill, and agent payload with the current package version (agent payload = the `~/.claude/agents/<worker>.md` worker definitions + the `~/.okstra/installed-agents.json` manifest). If it fails, show the stderr to the user verbatim. Do not fall back to the legacy `okstra-install.sh`.
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## Command invocation rule
|
|
46
46
|
|
|
47
|
-
`okstra install
|
|
47
|
+
After `okstra install`, every subsequent command must begin with the literal `okstra` token.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Allowed forms:
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
52
|
okstra check-project --json
|
|
@@ -54,87 +54,86 @@ okstra setup --yes --project-root /abs/project --project-id my-project
|
|
|
54
54
|
okstra doctor --runtime claude-code
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Forms to avoid:
|
|
58
58
|
|
|
59
59
|
- `export PYTHONPATH=...`
|
|
60
60
|
- `eval "$(okstra paths --shell)"`
|
|
61
|
-
- `$PROJECT_ROOT`
|
|
61
|
+
- shell variables like `$PROJECT_ROOT`
|
|
62
62
|
- `$(...)` command substitution
|
|
63
|
-
- `if`, `&&`,
|
|
63
|
+
- okstra calls wrapped in `if`, `&&`, `||`
|
|
64
64
|
|
|
65
|
-
`okstra <subcmd
|
|
65
|
+
Because `okstra <subcmd>` bootstraps its own Python path, do not use `okstra paths --shell` in this skill. If you need a path, run `okstra paths --json` as a separate call and read the JSON value.
|
|
66
66
|
|
|
67
|
-
##
|
|
67
|
+
## Project root resolution
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Run first:
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
okstra check-project --json
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
Handle the result:
|
|
76
76
|
|
|
77
|
-
- `ok: true`:
|
|
78
|
-
- `ok: false`, `stage: "resolve"`:
|
|
79
|
-
- `ok: false`, `stage: "project_json_missing"`:
|
|
80
|
-
-
|
|
77
|
+
- `ok: true`: already a registered project. Show `projectRoot`, `projectJsonPath`, `projectId` to the user and confirm whether to keep it.
|
|
78
|
+
- `ok: false`, `stage: "resolve"`: get an absolute project root from the user and re-run `okstra check-project --cwd /abs/path --json`.
|
|
79
|
+
- `ok: false`, `stage: "project_json_missing"`: proceed with the normal create path.
|
|
80
|
+
- any other failure stage: show the JSON `reason` verbatim and follow the recovery the source names.
|
|
81
81
|
|
|
82
|
-
## project.json
|
|
82
|
+
## Create or keep project.json
|
|
83
83
|
|
|
84
|
-
`<PROJECT_ROOT>/.okstra/project.json
|
|
84
|
+
If `<PROJECT_ROOT>/.okstra/project.json` exists, show `projectId` and `projectRoot` and confirm whether to keep or overwrite. The default is keep. Changing the existing `projectId` requires deleting the file, so do not overwrite automatically.
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
If the file does not exist, ask for a project id. The answer must be non-empty and contain at least one alphanumeric character. Calling `okstra setup --yes` with an empty value fails, so re-ask.
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Create command:
|
|
89
89
|
|
|
90
90
|
```bash
|
|
91
91
|
okstra setup --yes --project-root /abs/project --project-id my-project
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
##
|
|
94
|
+
## Optional configuration
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
Per the source, Step 3.5 is optional configuration performed only when the user explicitly wants it — read `references/project-config.md` in the skill directory for the detailed procedure. If the defaults are enough, skip it and go to doctor.
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
Optional settings:
|
|
99
99
|
|
|
100
|
-
- `worktreeSyncDirs`:
|
|
101
|
-
- `qaCommands`:
|
|
102
|
-
- `qaEnv`:
|
|
100
|
+
- `worktreeSyncDirs`: a list of project-relative directories to symlink into the task worktree. The default is `.project-docs`, `.scratch`, `graphify-out`, `.claude`.
|
|
101
|
+
- `qaCommands`: check-only lint/format/typecheck/test commands the implementation verifier runs.
|
|
102
|
+
- `qaEnv`: the replica/test DB, local app URL, env file, and surface patterns the Tier 3 conformance script uses.
|
|
103
103
|
- PR body template: `okstra config set pr-template-path "<path>" --scope project|global`
|
|
104
104
|
- final report language: `okstra config set report-language <en|ko|auto> --scope project`
|
|
105
105
|
|
|
106
|
-
`qaCommands.cmd
|
|
106
|
+
If `qaCommands.cmd` contains a token implying mutation, the verifier refuses it. The actual authority for the deny-list is `scripts/okstra_ctl/qa_commands.py`.
|
|
107
107
|
|
|
108
|
-
##
|
|
108
|
+
## Automatic Claude settings symlink
|
|
109
109
|
|
|
110
|
-
`okstra setup
|
|
110
|
+
`okstra setup` provisions `<PROJECT_ROOT>/.claude/settings.local.json` as a symlink to `~/.okstra/templates/settings.local.json`. If an existing regular file is present, it backs it up as `.bak.<timestamp>` and then places the symlink. If a failure message appears, the user must manually merge the existing project-specific rules.
|
|
111
111
|
|
|
112
|
-
##
|
|
112
|
+
## Verify
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
Run last:
|
|
115
115
|
|
|
116
116
|
```bash
|
|
117
117
|
okstra doctor --runtime claude-code
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
If every check is OK, report setup complete. If any check fails, show the output verbatim and let the user decide whether to reinstall or skip.
|
|
121
121
|
|
|
122
|
-
##
|
|
122
|
+
## Completion message
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
Keep it short and include the following.
|
|
125
125
|
|
|
126
|
-
- runtime
|
|
126
|
+
- runtime location: `~/.okstra` (also show the `version stamp: x.y.z` line from the install summary)
|
|
127
127
|
- project metadata: `<PROJECT_ROOT>/.okstra/project.json`
|
|
128
128
|
- `projectId`
|
|
129
|
-
-
|
|
129
|
+
- next step: `/okstra-run`
|
|
130
130
|
|
|
131
|
-
##
|
|
131
|
+
## Common failure handling
|
|
132
132
|
|
|
133
|
-
|
|
|
133
|
+
| Symptom | Handling |
|
|
134
134
|
|---|---|
|
|
135
|
-
| `command not found: npx` | Node 18+
|
|
136
|
-
| `--project-id is required` | project id
|
|
137
|
-
| `projectId mismatch` |
|
|
138
|
-
| `.okstra/`
|
|
139
|
-
| `.claude/settings.local.json` symlink warning |
|
|
140
|
-
|
|
135
|
+
| `command not found: npx` | Point to installing Node 18+ |
|
|
136
|
+
| `--project-id is required` | Re-ask for the project id and re-run with a non-empty value |
|
|
137
|
+
| `projectId mismatch` | Confirm with the user which id is canonical. Do not delete automatically |
|
|
138
|
+
| `.okstra/` write EACCES | Explain the ownership/writability problem |
|
|
139
|
+
| `.claude/settings.local.json` symlink warning | Show the backup file and symlink state to the user and guide a manual merge |
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# okstra-user-response AI Manual
|
|
2
|
+
|
|
3
|
+
## Sources
|
|
4
|
+
|
|
5
|
+
- Skill source: [`skills/okstra-user-response/SKILL.md`](../../../skills/okstra-user-response/SKILL.md)
|
|
6
|
+
- Response core (CLI): [`scripts/okstra_ctl/user_response.py`](../../../scripts/okstra_ctl/user_response.py)
|
|
7
|
+
- Node wrapper: [`src/commands/inspect/user-response.mjs`](../../../src/commands/inspect/user-response.mjs)
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
`okstra-user-response` answers the **unresolved clarification questions** an okstra run left behind (the open `C-*` rows under the final report's `## 1. Clarification Items`) **in-session**, and records those answers as a `runs/<type>/user-responses/` sidecar. The next `/okstra-run` auto-attaches this sidecar via `--clarification-response`.
|
|
12
|
+
|
|
13
|
+
**Core principle — the skill never picks an answer for the user.** It only *presents* recommendations and alternatives; every `value` is the user's verbatim input. It does not call `write` until the user has explicitly confirmed (`confirmed`).
|
|
14
|
+
|
|
15
|
+
Distinguish it from starting a run (`okstra-run`), inspecting a finished task (`okstra-inspect`), and generating a brief (`okstra-brief-gen`).
|
|
16
|
+
|
|
17
|
+
## Sub-commands
|
|
18
|
+
|
|
19
|
+
| Sub-command | What it does |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `list` | List tasks that still have approval-open clarification (newest report first) |
|
|
22
|
+
| `show` | Expand one report's open `C-*` rows (statement + recommended + alternatives + contextRefs) |
|
|
23
|
+
| `write` | Record the collected answers (+ optional approval) as a `user-responses/` sidecar |
|
|
24
|
+
|
|
25
|
+
## Preflight
|
|
26
|
+
|
|
27
|
+
A single Bash call with the literal `okstra` token (not wrapped):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
okstra preflight --runtime claude-code --json
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`ok:true` → carry `projectRoot` and `projectId` as literals. `ok:false` → point to `/okstra-setup` and stop (retry a specific directory with `--cwd <dir>` — a leading `cd` breaks the permission match). Then resolve home once: `okstra paths --field home` → paste it literally into `--home`.
|
|
34
|
+
|
|
35
|
+
## Flow
|
|
36
|
+
|
|
37
|
+
1. **list**: `okstra user-response list --home <home> --project <projectId> --limit 3` → an array of `{taskKey, taskType, seq, reportPath, reportMtime, openApprovalCount, unreadable}`. If the array is empty, stop with "no open clarification". A 3-option picker (top recommendations + the final option always "Enter directly" for pasting a `reportPath`/`task-key` directly). `unreadable:true` is a §1 format drift — flag it with `⚠` and do not proceed (do not fabricate rows).
|
|
38
|
+
2. **show**: `okstra user-response show --report <reportPath>` → `rows[]` with `resolvedRefs` (the `definition` of internal tokens such as `RB-002`/`§4.7`). **Do not paste the raw `statement` as the question.** For each open row present: (a) a **self-contained question** with internal tokens expanded inline first, (b) `recommended` (only a recommendation) in plain language, (c) `alternatives[]`, (d) the raw `id`+`statement` as a secondary traceability aid. If `definition` is `null`, resolve the report `§`/`path:line` yourself **using Read**.
|
|
39
|
+
3. **decision (4 branches)**: the user picks one per item — Answer (accept the recommendation / own answer, verbatim), Ask-to-explain (explain only and hand the decision back to the user), Free-form (narrative verbatim), Hold+reframe (`disposition:"reframe"`, does not satisfy the approval gate). Each item's JSON: `{id, kind, value, rationale?, disposition}`.
|
|
40
|
+
4. **echo → confirmed gate**: before `write`, echo the whole collection (each `id`·`disposition`·`value`·`rationale`·approval) as-is and get explicit confirmation. Never `write` before `confirmed`. On any change, re-echo and re-confirm.
|
|
41
|
+
5. **approval (optional)**: only when the approval-blocking items are **all filled with an answer** and the user explicitly approved, `--approval '{"approved":true,"implementationOption":"<selected option>"}'`. If any item is unfilled/reframe, do not approve and say the gate is still open.
|
|
42
|
+
6. **write**: `okstra user-response write --report <reportPath> --answers '<json>' [--approval '<json>'] --task-key <taskKey>` → report the returned `{sidecar:<path>}`. (When a same-named sidecar exists, the same `id` is overwritten with the new value and merged.)
|
|
43
|
+
|
|
44
|
+
## Output Rules
|
|
45
|
+
|
|
46
|
+
- Concise, in the language the user is using.
|
|
47
|
+
- Give path guidance host-relative (`~/.okstra/...` or relative to `projectRoot`). Use repo paths only when pointing at a code source.
|
|
48
|
+
- **Never hand-edit a rendered report** (`runs/*/reports/*.md` / `*.data.json`). Sidecar recording goes only through the `okstra user-response write` CLI.
|
|
@@ -226,13 +226,13 @@ Goals:
|
|
|
226
226
|
|
|
227
227
|
Cautions:
|
|
228
228
|
|
|
229
|
-
- Before extracting `agents/workers/
|
|
229
|
+
- Before extracting shared worker text into `agents/workers/_cli-wrapper-template.md`, confirm that install/packaging paths and skill/agent loaders support includes.
|
|
230
230
|
- Merely moving text into a separate file can increase cost if the runtime does not inline it and the worker must read another file.
|
|
231
231
|
|
|
232
232
|
Change targets:
|
|
233
233
|
|
|
234
|
-
- `agents/workers/codex-worker.
|
|
235
|
-
- `agents/workers/antigravity-worker.
|
|
234
|
+
- `agents/workers/codex-worker.params.json`
|
|
235
|
+
- `agents/workers/antigravity-worker.params.json`
|
|
236
236
|
- `prompts/lead/team-contract.md`
|
|
237
237
|
- Install/build packaging
|
|
238
238
|
|
|
@@ -253,7 +253,7 @@ Change targets:
|
|
|
253
253
|
- `prompts/profiles/requirements-discovery.md`
|
|
254
254
|
- `scripts/okstra_ctl/workflow.py`
|
|
255
255
|
- Next-phase selection UI in `skills/okstra-run/SKILL.md`
|
|
256
|
-
- `skills/okstra-
|
|
256
|
+
- `skills/okstra-inspect/SKILL.md` (the former `okstra-status` skill folded into `okstra-inspect`)
|
|
257
257
|
- Validator expectations
|
|
258
258
|
|
|
259
259
|
Caution:
|