okstra 0.123.0 → 0.125.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 +1 -0
- package/docs/architecture/storage-model.md +3 -1
- package/docs/architecture.md +16 -2
- package/docs/cli.md +3 -1
- package/docs/for-ai/README.md +41 -35
- 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 +87 -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 +106 -106
- 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 +6 -6
- package/docs/pr-template-usage.md +34 -34
- package/docs/project-structure-overview.md +91 -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 +33 -33
- package/docs/task-process/implementation.md +38 -38
- 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 +1 -1
- package/runtime/prompts/coding-preflight/frameworks/node-server.md +1 -1
- package/runtime/prompts/launch.template.md +1 -1
- package/runtime/prompts/lead/convergence.md +10 -20
- package/runtime/prompts/lead/okstra-lead-contract.md +15 -17
- package/runtime/prompts/lead/plan-body-verification.md +18 -18
- package/runtime/prompts/lead/report-writer.md +46 -44
- 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 +1 -1
- package/runtime/prompts/profiles/_implementation-executor.md +1 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +28 -2
- package/runtime/prompts/profiles/error-analysis.md +2 -2
- package/runtime/prompts/profiles/final-verification.md +1 -1
- package/runtime/prompts/profiles/implementation-planning.md +13 -13
- package/runtime/prompts/profiles/implementation.md +2 -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 +17 -18
- package/runtime/python/okstra_ctl/models.py +4 -2
- package/runtime/python/okstra_ctl/run.py +8 -2
- package/runtime/python/okstra_ctl/stage_fix_carry.py +112 -0
- package/runtime/schemas/final-report-v1.0.schema.json +6 -6
- 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 +39 -747
- package/runtime/skills/okstra-inspect/facets/cost.md +84 -0
- package/runtime/skills/okstra-inspect/facets/error-zip.md +41 -0
- package/runtime/skills/okstra-inspect/facets/errors.md +69 -0
- package/runtime/skills/okstra-inspect/facets/history.md +90 -0
- package/runtime/skills/okstra-inspect/facets/logs.md +89 -0
- package/runtime/skills/okstra-inspect/facets/recap.md +96 -0
- package/runtime/skills/okstra-inspect/facets/report.md +61 -0
- package/runtime/skills/okstra-inspect/facets/status.md +145 -0
- package/runtime/skills/okstra-inspect/facets/time.md +56 -0
- package/runtime/skills/okstra-manager/SKILL.md +1 -1
- package/runtime/skills/okstra-memory/SKILL.md +3 -3
- package/runtime/skills/okstra-pr-gen/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-gen/SKILL.md +36 -30
- 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 +15 -3
- package/runtime/templates/prd/brief.template.md +92 -92
- package/runtime/templates/project-docs/task-index.template.md +1 -1
- 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-verification-input.template.md +6 -6
- 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-schedule.py +1 -1
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
# okstra-schedule-gen AI Manual
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Source
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- schedule
|
|
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
7
|
- schedule validator: [`validators/validate-schedule.py`](../../../validators/validate-schedule.py)
|
|
8
|
-
- workStatus inference
|
|
8
|
+
- workStatus inference reference: [`skills/okstra-inspect/SKILL.md`](../../../skills/okstra-inspect/SKILL.md)
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Purpose
|
|
11
11
|
|
|
12
|
-
`okstra-schedule-gen
|
|
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
13
|
|
|
14
|
-
|
|
14
|
+
Output location:
|
|
15
15
|
|
|
16
16
|
```text
|
|
17
17
|
<PROJECT_ROOT>/.okstra/tasks/<task-group-segment>/schedule/<task-group-segment>-plan-<YYYY-MM-DD_HH-MM-SS>.md
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## When to Use
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Use it when:
|
|
23
23
|
|
|
24
|
-
-
|
|
25
|
-
- `.okstra/discovery/task-catalog.json
|
|
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
26
|
|
|
27
|
-
|
|
27
|
+
Do not use it when:
|
|
28
28
|
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
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
32
|
|
|
33
33
|
## Preflight
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
A single Bash call:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
okstra preflight --runtime claude-code --json
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
runtime
|
|
41
|
+
If there is no runtime or project setup, point the user to `/okstra-setup` and stop.
|
|
42
42
|
|
|
43
|
-
## task-group
|
|
43
|
+
## Resolving the task-group
|
|
44
44
|
|
|
45
|
-
1. `.okstra/discovery/task-catalog.json
|
|
46
|
-
2.
|
|
47
|
-
3. catalog entry
|
|
48
|
-
4. raw `taskGroup
|
|
49
|
-
5.
|
|
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
50
|
|
|
51
|
-
|
|
51
|
+
On zero matches, output `That task-group could not be found.` and stop.
|
|
52
52
|
|
|
53
53
|
## workStatus filter
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Check the workStatus in each manifest. When it is missing or empty, apply `okstra-inspect`'s `status.4` inference table.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Exclude:
|
|
58
58
|
|
|
59
59
|
- explicit `done`
|
|
60
60
|
- inferred `done`
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Include:
|
|
63
63
|
|
|
64
64
|
- `todo`
|
|
65
65
|
- `in-progress`
|
|
66
66
|
- `blocked`
|
|
67
67
|
- `phase-done`
|
|
68
|
-
-
|
|
68
|
+
- other non-done inferred/display states
|
|
69
69
|
|
|
70
|
-
|
|
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
71
|
|
|
72
72
|
## per-task data extraction
|
|
73
73
|
|
|
74
|
-
manifest
|
|
74
|
+
Read from the manifest:
|
|
75
75
|
|
|
76
76
|
- `taskId`, `taskGroup`, `taskKey`
|
|
77
77
|
- `workCategory`
|
|
@@ -81,7 +81,7 @@ manifest에서 읽는다:
|
|
|
81
81
|
- `workStatus`
|
|
82
82
|
- `latestReportPath`
|
|
83
83
|
|
|
84
|
-
report
|
|
84
|
+
Parse from the report:
|
|
85
85
|
|
|
86
86
|
- Title / Problem statement
|
|
87
87
|
- Solution / Architecture
|
|
@@ -90,45 +90,45 @@ report에서 파싱한다:
|
|
|
90
90
|
- Rollback strategy
|
|
91
91
|
- Effort, Risk, Priority, Scope, Repos
|
|
92
92
|
|
|
93
|
-
report
|
|
93
|
+
If there is no report or the manifest pointer is stale, fall back:
|
|
94
94
|
|
|
95
|
-
1. `taskRootPath
|
|
96
|
-
2.
|
|
97
|
-
3.
|
|
98
|
-
4.
|
|
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
99
|
|
|
100
|
-
|
|
100
|
+
Mark a specific section's parse failure as `[PARSE-ERROR: <section>]` and continue.
|
|
101
101
|
|
|
102
102
|
## client-facing audience rule
|
|
103
103
|
|
|
104
|
-
schedule
|
|
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
105
|
|
|
106
|
-
|
|
106
|
+
Remove from the output:
|
|
107
107
|
|
|
108
|
-
- permission/authority
|
|
108
|
+
- permission/authority confirmation steps
|
|
109
109
|
- approval waiting buffer
|
|
110
110
|
- stakeholder coordination
|
|
111
|
-
-
|
|
111
|
+
- legal/organizational sign-off
|
|
112
112
|
- `Consolidated User Decision Checklist`
|
|
113
|
-
- `####
|
|
113
|
+
- `#### Items requiring user confirmation`
|
|
114
114
|
- `Done`, `Ready?`, `Blocking Decisions` column
|
|
115
115
|
- checkbox list/cell
|
|
116
116
|
|
|
117
|
-
effort
|
|
117
|
+
effort and Gantt reflect engineering duration only.
|
|
118
118
|
|
|
119
119
|
## phase classification
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
Default mapping:
|
|
122
122
|
|
|
123
123
|
| workCategory | phase |
|
|
124
124
|
|---|---|
|
|
125
|
-
| `bugfix` | High/Med-High risk
|
|
125
|
+
| `bugfix` | Phase 1 when High/Med-High risk, otherwise Phase 2 |
|
|
126
126
|
| `feature` | Phase 2 |
|
|
127
127
|
| `improvement` | Phase 2 |
|
|
128
128
|
| `refactor` | Phase 3 |
|
|
129
129
|
| `ops` | Phase 3 |
|
|
130
130
|
| `docs` / `doc` | Phase 2 |
|
|
131
|
-
| `unknown`
|
|
131
|
+
| `unknown` or undefined | Phase 2, add a rationale note |
|
|
132
132
|
|
|
133
133
|
priority override:
|
|
134
134
|
|
|
@@ -136,16 +136,16 @@ priority override:
|
|
|
136
136
|
- `P1`, `P2`: Phase 2
|
|
137
137
|
- `P3`: Phase 3
|
|
138
138
|
|
|
139
|
-
ambiguous
|
|
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
140
|
|
|
141
141
|
## section contract
|
|
142
142
|
|
|
143
|
-
|
|
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
144
|
|
|
145
|
-
top-level
|
|
145
|
+
top-level contract sections:
|
|
146
146
|
|
|
147
147
|
1. `## At a Glance`
|
|
148
|
-
2. `## Executive Summary` (
|
|
148
|
+
2. `## Executive Summary` (includes the mandatory subsection `### Effort Sizing Criteria` — checked by `validate-schedule.py`)
|
|
149
149
|
3. `## Task Dependency Graph`
|
|
150
150
|
4. `## Phase 1: Critical Fixes`
|
|
151
151
|
5. `## Phase 2: Enhancements`
|
|
@@ -157,14 +157,14 @@ top-level 계약 sections:
|
|
|
157
157
|
|
|
158
158
|
optional sections:
|
|
159
159
|
|
|
160
|
-
- `## Gantt Chart`: `Task Dependency Graph
|
|
161
|
-
- `## Glossary`:
|
|
160
|
+
- `## Gantt Chart`: between `Task Dependency Graph` and `Phase 1`.
|
|
161
|
+
- `## Glossary`: last section. Use only when opaque codes remain in the body.
|
|
162
162
|
|
|
163
|
-
phase
|
|
163
|
+
Keep the heading even when a phase has no task, and write `_none_`.
|
|
164
164
|
|
|
165
165
|
## top header
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
Shape:
|
|
168
168
|
|
|
169
169
|
```markdown
|
|
170
170
|
# <Title> — Work Schedule
|
|
@@ -173,32 +173,32 @@ phase에 task가 없어도 heading을 유지하고 `_없음_`을 쓴다.
|
|
|
173
173
|
> Source: okstra <mode> (<N> tasks included, <M> done excluded)
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
title suffix `— Work Schedule
|
|
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
177
|
|
|
178
178
|
## At a Glance
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
This totals line must be present exactly.
|
|
181
181
|
|
|
182
182
|
```markdown
|
|
183
|
-
|
|
183
|
+
**<N> tasks total / estimated effort: <X.X> ~ <Y.Y> days (Effort sum)**
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
-
Effort-to-day mapping
|
|
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
187
|
|
|
188
|
-
enum
|
|
188
|
+
enum values:
|
|
189
189
|
|
|
190
|
-
| Field |
|
|
190
|
+
| Field | value |
|
|
191
191
|
|---|---|
|
|
192
192
|
| Effort | `S`, `M`, `L`, `XL`, `XXL` |
|
|
193
193
|
| Priority | `P0`, `P1`, `P2`, `P3` |
|
|
194
194
|
| Risk | `Very Low`, `Low`, `Medium`, `Med-High`, `High` |
|
|
195
195
|
| Phase | `1`, `2`, `3` |
|
|
196
196
|
|
|
197
|
-
`Med-High
|
|
197
|
+
`Med-High` is canonical.
|
|
198
198
|
|
|
199
199
|
## per-task block
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
Every task block has a `| Item | Detail |` table. field row order:
|
|
202
202
|
|
|
203
203
|
1. `**Category**`
|
|
204
204
|
2. `**Priority**`
|
|
@@ -208,25 +208,25 @@ enum 값:
|
|
|
208
208
|
6. `**Scope**`
|
|
209
209
|
7. `**Repo**`
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
Then the subsection order:
|
|
212
212
|
|
|
213
213
|
1. `**Problem**:`
|
|
214
214
|
2. `**Solution**:`
|
|
215
|
-
3. `**Work Breakdown**:` —
|
|
216
|
-
4. `**Verification Commands**:` —
|
|
215
|
+
3. `**Work Breakdown**:` — followed by a `| Step | File | Action | Detail |` table
|
|
216
|
+
4. `**Verification Commands**:` — followed by a ` ```bash ` fenced block
|
|
217
217
|
5. `**Rollback**:`
|
|
218
218
|
|
|
219
|
-
`[NEEDS-OKSTRA-RUN]`
|
|
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
220
|
|
|
221
221
|
## Task Dependency Graph
|
|
222
222
|
|
|
223
|
-
dependency
|
|
223
|
+
When there is no dependency, literal:
|
|
224
224
|
|
|
225
225
|
```markdown
|
|
226
|
-
|
|
226
|
+
_none_
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
When dependencies exist, use a plain fenced block. Do not attach a language tag.
|
|
230
230
|
|
|
231
231
|
````
|
|
232
232
|
```
|
|
@@ -235,28 +235,28 @@ DEV-2 -> DEV-4
|
|
|
235
235
|
```
|
|
236
236
|
````
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
Use only the ASCII arrow `->`.
|
|
239
239
|
|
|
240
240
|
## Gantt Chart
|
|
241
241
|
|
|
242
|
-
**directive override (
|
|
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
243
|
|
|
244
|
-
|
|
244
|
+
By default, render. If there is any day signal, produce a chart even as a rough estimate.
|
|
245
245
|
|
|
246
|
-
|
|
246
|
+
Render-condition examples:
|
|
247
247
|
|
|
248
|
-
- 2
|
|
249
|
-
- 1
|
|
250
|
-
- source report
|
|
251
|
-
-
|
|
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
252
|
|
|
253
|
-
|
|
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
254
|
|
|
255
255
|
```markdown
|
|
256
|
-
> _Gantt Chart
|
|
256
|
+
> _Gantt Chart skipped: <concrete reason referencing the actual data>._
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
Gantt
|
|
259
|
+
The Gantt is plain fenced ASCII. Do not use Mermaid, PlantUML, Graphviz, or a date axis.
|
|
260
260
|
|
|
261
261
|
````
|
|
262
262
|
```
|
|
@@ -269,52 +269,52 @@ Phase 2
|
|
|
269
269
|
```
|
|
270
270
|
````
|
|
271
271
|
|
|
272
|
-
axis
|
|
272
|
+
The axis uses relative day count only. Do not put in a calendar date, weekday, or "today + N".
|
|
273
273
|
|
|
274
|
-
## opaque code
|
|
274
|
+
## handling opaque code
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
Do not surface internal report codes (`FC-5`, `UC-3`, `M2`, etc.) as-is.
|
|
277
277
|
|
|
278
|
-
|
|
278
|
+
Option A: inline replacement with a short description.
|
|
279
279
|
|
|
280
|
-
|
|
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
281
|
|
|
282
|
-
decision-item letter
|
|
282
|
+
Do not put decision-item letter codes (`A1`, `B2`, `C3`, `D4`) in the schedule.
|
|
283
283
|
|
|
284
284
|
## validation
|
|
285
285
|
|
|
286
|
-
|
|
286
|
+
After writing, re-read it and run the validator before the completion message.
|
|
287
287
|
|
|
288
288
|
```bash
|
|
289
289
|
python3 ~/.okstra/lib/validators/validate-schedule.py <output-path>
|
|
290
290
|
```
|
|
291
291
|
|
|
292
|
-
|
|
292
|
+
If the installed validator is absent, use the repo validator.
|
|
293
293
|
|
|
294
294
|
```bash
|
|
295
295
|
python3 validators/validate-schedule.py <output-path>
|
|
296
296
|
```
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
On failure, fix the file and re-validate. Fall back to a manual checklist only when there is no validator.
|
|
299
299
|
|
|
300
|
-
##
|
|
300
|
+
## completion message
|
|
301
301
|
|
|
302
302
|
```text
|
|
303
|
-
Schedule
|
|
304
|
-
-
|
|
305
|
-
-
|
|
306
|
-
-
|
|
307
|
-
-
|
|
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
308
|
```
|
|
309
309
|
|
|
310
|
-
##
|
|
311
|
-
|
|
312
|
-
- heading
|
|
313
|
-
- `## Cumulative Timeline
|
|
314
|
-
-
|
|
315
|
-
- Gantt
|
|
316
|
-
-
|
|
317
|
-
- checkbox, Done, Ready, Blocking Decisions column
|
|
318
|
-
- internal approval/blocker/user-decision
|
|
319
|
-
-
|
|
320
|
-
- timestamp collision
|
|
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 |
|