@yandy-r/ycc-opencode 6.1.0 → 6.2.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 +7 -3
- package/agents/code-researcher.md +3 -3
- package/agents/feature-researcher.md +1 -1
- package/agents/implementor.md +4 -4
- package/agents/pr-comment-fixer.md +1 -1
- package/agents/release-fix-applier.md +1 -1
- package/agents/review-fixer.md +1 -1
- package/package.json +1 -1
- package/shared/references/artifact-store.md +613 -0
- package/shared/references/branch-prep.md +2 -0
- package/shared/references/forge-detection.md +3 -2
- package/shared/references/review-artifact-format.md +13 -6
- package/shared/references/review-checklist.md +3 -2
- package/shared/references/review-dispatch.md +15 -10
- package/shared/references/target-capability-matrix.md +42 -6
- package/shared/references/visual-mode.md +19 -13
- package/shared/references/worktree-strategy.md +12 -8
- package/shared/scripts/artifact-body.sh +71 -0
- package/shared/scripts/artifact-store-pointer.sh +245 -0
- package/shared/scripts/ci-monitor.sh +9 -4
- package/shared/scripts/collect-linear-keys.sh +77 -0
- package/shared/scripts/lib/ci-classify.sh +13 -10
- package/shared/scripts/lib/forge.sh +13 -4
- package/shared/scripts/prepare-feature-branch.sh +96 -10
- package/shared/scripts/release-ci-monitor.sh +2 -2
- package/shared/scripts/report-bundle-drift.sh +1 -1
- package/shared/scripts/resolve-artifact-store.sh +636 -0
- package/shared/scripts/validate-file-paths.sh +11 -4
- package/skills/blueprint/SKILL.md +48 -13
- package/skills/clean/SKILL.md +1 -1
- package/skills/clean/scripts/detect-project-type.sh +2 -2
- package/skills/clean/scripts/generate-report.sh +34 -5
- package/skills/clean/scripts/validate-safety.sh +9 -6
- package/skills/code-report/SKILL.md +26 -14
- package/skills/code-report/scripts/check-prerequisites.sh +72 -12
- package/skills/code-report/templates/report-structure.md +1 -1
- package/skills/code-review/SKILL.md +68 -17
- package/skills/code-review/references/pr-procedure.md +28 -15
- package/skills/compatibility-audit/scripts/audit-target-features.sh +1 -1
- package/skills/deep-research/SKILL.md +28 -5
- package/skills/deep-research/references/completion-summary-template.md +3 -2
- package/skills/deep-research/scripts/validate-research.sh +8 -2
- package/skills/feature-research/SKILL.md +48 -25
- package/skills/feature-research/scripts/validate-research.sh +51 -12
- package/skills/feature-research/scripts/validate-spec.sh +53 -22
- package/skills/feature-research/templates/research-agents.md +15 -14
- package/skills/feature-research/templates/spec-structure.md +5 -0
- package/skills/formatters/scripts/apply-aliases.sh +3 -1
- package/skills/formatters/scripts/apply-ci.sh +3 -1
- package/skills/git-workflow/SKILL.md +2 -1
- package/skills/git-workflow/references/pr-creation.md +10 -0
- package/skills/git-workflow/scripts/analyze-changes.sh +21 -11
- package/skills/git-workflow/scripts/create-pr.sh +51 -6
- package/skills/git-workflow/scripts/validate-commit.sh +26 -14
- package/skills/hooks-workflow/scripts/verify-hooks.sh +1 -1
- package/skills/implement-plan/SKILL.md +35 -16
- package/skills/implement-plan/references/agent-task-prompt.md +8 -5
- package/skills/implement-plan/references/linear-sync.md +20 -0
- package/skills/implement-plan/references/output-formats.md +17 -2
- package/skills/implement-plan/references/plan-inputs.md +23 -4
- package/skills/implement-plan/scripts/check-prerequisites.sh +95 -49
- package/skills/implement-plan/scripts/parse-dependencies.sh +10 -10
- package/skills/init/SKILL.md +77 -42
- package/skills/init/references/flag-reference.md +41 -17
- package/skills/init/references/project-profile-heuristics.md +3 -0
- package/skills/init/references/template-library.md +15 -5
- package/skills/init/scripts/profile-project.sh +26 -0
- package/skills/init/scripts/render-template.py +2 -2
- package/skills/init/templates/AGENTS.md.tmpl +6 -0
- package/skills/init/templates/git/gitignore.tmpl +5 -0
- package/skills/orchestrate/SKILL.md +17 -2
- package/skills/parallel-plan/SKILL.md +14 -8
- package/skills/plan/SKILL.md +18 -2
- package/skills/plan/references/planning-tracks.md +1 -1
- package/skills/plan-workflow/SKILL.md +67 -32
- package/skills/plan-workflow/references/checkpoint-messages.md +23 -14
- package/skills/plan-workflow/references/plan-structure.md +1 -1
- package/skills/plan-workflow/references/planning-agents.md +11 -9
- package/skills/plan-workflow/references/research-agents-optimized.md +12 -10
- package/skills/plan-workflow/references/research-agents.md +11 -10
- package/skills/plan-workflow/scripts/check-prerequisites.sh +50 -11
- package/skills/plan-workflow/scripts/check-state.sh +53 -9
- package/skills/plan-workflow/scripts/persist-or-fail.sh +21 -7
- package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +28 -14
- package/skills/plan-workflow/scripts/validate-research-artifacts.sh +35 -10
- package/skills/plan-workflow/scripts/validate-shared.sh +56 -15
- package/skills/plan-workflow/scripts/validate-workflow-plan.sh +48 -17
- package/skills/pr-autofix/SKILL.md +19 -4
- package/skills/pr-autofix/references/output-templates.md +3 -2
- package/skills/pr-autofix/scripts/fetch-pr-comments.sh +1 -2
- package/skills/pr-autofix/scripts/post-summary.sh +1 -2
- package/skills/pr-autofix/scripts/resolve-thread.sh +3 -4
- package/skills/prp-implement/SKILL.md +31 -16
- package/skills/prp-implement/references/agent-task-prompt.md +5 -2
- package/skills/prp-implement/references/detection.md +4 -1
- package/skills/prp-implement/references/linear-sync.md +25 -0
- package/skills/prp-implement/references/report-output.md +15 -2
- package/skills/prp-plan/SKILL.md +62 -30
- package/skills/prp-plan/references/enhanced-researchers.md +8 -9
- package/skills/prp-plan/scripts/validate-prp-plan.sh +42 -18
- package/skills/prp-pr/SKILL.md +14 -1
- package/skills/prp-prd/SKILL.md +21 -9
- package/skills/prp-spec/SKILL.md +30 -20
- package/skills/quick-fix/SKILL.md +6 -4
- package/skills/quick-review/SKILL.md +62 -25
- package/skills/release-model/scripts/collect-signals.sh +9 -3
- package/skills/releaser/scripts/publish-release.sh +6 -3
- package/skills/research-to-issues/SKILL.md +33 -14
- package/skills/research-to-issues/scripts/validate-prerequisites.sh +45 -23
- package/skills/research-to-issues/templates/task-issue.md +4 -0
- package/skills/research-to-issues/templates/tracking-issue.md +3 -0
- package/skills/review-fix/SKILL.md +96 -14
- package/skills/review-fix/references/fix-report.md +10 -10
- package/skills/review-fix/references/plan.md +5 -2
- package/skills/shared-context/SKILL.md +14 -11
- package/skills/visual-plan/SKILL.md +26 -8
- package/skills/visual-recap/SKILL.md +1 -1
- package/skills/write-docs/scripts/audit-documentation.sh +44 -10
- package/skills/write-docs/scripts/generate-doc-index.sh +10 -3
|
@@ -11,13 +11,13 @@ Convert planning and research output into structured GitHub issues with tracking
|
|
|
11
11
|
|
|
12
12
|
## Supported Source Types
|
|
13
13
|
|
|
14
|
-
| Source Type | Produced By | Input Path Pattern
|
|
15
|
-
| ------------- | ---------------------------------------- | ----------------------------------- |
|
|
16
|
-
| deep-research | `deep-research` | Directory with `RESEARCH-REPORT.md` |
|
|
17
|
-
| feature-spec | `feature-research` | `docs/plans/*/feature-spec.md` |
|
|
18
|
-
| parallel-plan | `parallel-plan`, `plan-workflow` | `docs/plans/*/parallel-plan.md` |
|
|
19
|
-
| prp-plan | `prp-plan` | `docs/prps/plans/*.plan.md` |
|
|
20
|
-
| prd | `prp-prd` | `docs/prps/prds/*.prd.md` |
|
|
14
|
+
| Source Type | Produced By | Input Path Pattern (local mode) | Linear cache (linear mode) |
|
|
15
|
+
| ------------- | ---------------------------------------- | ----------------------------------- | ------------------------------------------------ |
|
|
16
|
+
| deep-research | `deep-research` | Directory with `RESEARCH-REPORT.md` | Directory with `RESEARCH-REPORT.md` (`--source`) |
|
|
17
|
+
| feature-spec | `feature-research` | `docs/plans/*/feature-spec.md` | `.ycc/artifacts/<slug>/feature-spec.md` |
|
|
18
|
+
| parallel-plan | `parallel-plan`, `plan-workflow` | `docs/plans/*/parallel-plan.md` | `.ycc/artifacts/<slug>/parallel-plan.md` |
|
|
19
|
+
| prp-plan | `prp-plan` | `docs/prps/plans/*.plan.md` | `.ycc/artifacts/<slug>/prp-plan.md` |
|
|
20
|
+
| prd | `prp-prd` | `docs/prps/prds/*.prd.md` | `.ycc/artifacts/<slug>/prd.md` |
|
|
21
21
|
|
|
22
22
|
## Current Task
|
|
23
23
|
|
|
@@ -26,7 +26,9 @@ Convert planning and research output into structured GitHub issues with tracking
|
|
|
26
26
|
Parse arguments:
|
|
27
27
|
|
|
28
28
|
- **--source PATH**: Path to source file or directory (aliases: `--research-dir`)
|
|
29
|
-
-
|
|
29
|
+
- **feature-name** or **Linear reference** (positional, optional): resolved through the artifact store in Step 1
|
|
30
|
+
- **--type TYPE**: Explicit source type (`deep-research`, `feature-spec`, `parallel-plan`, `prp-plan`, `prd`). Auto-detected if omitted.
|
|
31
|
+
- **--store=local|linear**: Artifact-store override; strip it into `STORE_FLAG` (empty when absent) and forward it to every resolver call
|
|
30
32
|
- **--dry-run**: Preview all issues that would be created without creating them
|
|
31
33
|
- **--skip-anti-scope**: Skip creating issues for anti-scope/deferred items
|
|
32
34
|
- **--skip-gaps**: Skip creating issues for research gaps
|
|
@@ -74,11 +76,26 @@ Check if GitHub MCP tools are available by looking for tools matching `mcp__gith
|
|
|
74
76
|
|
|
75
77
|
### Step 1: Identify Source
|
|
76
78
|
|
|
77
|
-
Determine the source path:
|
|
79
|
+
Determine the source path through the artifact store (`{{package-root}}/shared/references/artifact-store.md` > Review and report skills > Research to issues). First print the mode and read `ARTIFACT_STORE=` from stdout:
|
|
78
80
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
```bash
|
|
82
|
+
bash "{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --shell
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
1. `--source PATH` or `--research-dir PATH` → use that path. A path under `.ycc/artifacts/` or with a leading `linear:` frontmatter block is a linear source; any other path keeps local behavior.
|
|
86
|
+
2. A Linear reference (issue key, `linear.app` issue/Project/Document URL, as defined in artifact-store.md > Implementation skills > Inputs) selects linear mode (`STORE_FLAG=--store=linear` when empty; with `--store=local`, abort with `A Linear plan reference requires linear mode; drop --store=local.`). Apply the **Linear call gate**, then follow Implementation skills > Resolve and hydrate steps 2-3: Lookup the source kind (`--type`, else `parallel-plan`, then `prp-plan`, `feature-spec`, `prd`), map the hit to a slug, and Load it into `--ensure --kind=<kind> --slug=<slug>`. Use that absolute cache path. `--dry-run` writes nothing: reuse an existing cache read-only, or read the fetched body from a temporary file outside the repository.
|
|
87
|
+
3. A feature name → resolve each candidate kind without `--ensure`, in the same order as item 2 (`--type` first when given, else `parallel-plan`, `prp-plan`, `feature-spec`, `prd`), and use the first existing file, so a plan with a `tasks` map wins over its feature spec:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
bash "{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --kind=<parallel-plan|prp-plan|feature-spec|prd> --slug=<feature-name>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Under `ARTIFACT_STORE_SOURCE=default`, an existing local `docs/plans/<feature-name>/` (or `docs/prps/` file) keeps local mode, as in Implementation skills > Inputs. In linear mode, a missing cache runs Lookup/Load as in item 2 (gate first); never report "not found" without querying Linear.
|
|
94
|
+
|
|
95
|
+
4. Otherwise, local mode searches the common locations: `docs/plans/`, `docs/prps/plans/`, `docs/prps/prds/`, `docs/research/`, `research/`. Linear mode searches `.ycc/artifacts/*/` in the current checkout, then the main checkout, then runs Lookup.
|
|
96
|
+
5. If not found, ask the user to specify the path
|
|
97
|
+
|
|
98
|
+
Local mode keeps today's discovery, output, and Linear-free behavior unchanged. Retain the source's leading frontmatter `linear.issue` and `tasks` map (linear sources only) for Step 6.
|
|
82
99
|
|
|
83
100
|
### Step 2: Run Validation
|
|
84
101
|
|
|
@@ -136,6 +153,8 @@ Construct a complete plan:
|
|
|
136
153
|
- **For each child item** -> 1 child issue with full agentic context
|
|
137
154
|
- **For each extra item** -> 1 child issue grouped under appropriate tracker
|
|
138
155
|
|
|
156
|
+
**Linear task links (linear-sourced plans only).** Linear task issues are created by the planning skill's Save, never here: this skill creates GitHub/Forgejo issues only and makes no Linear writes. When the plan frontmatter has a `tasks` map, add `Refs <KEY>` (that task's `tasks.<id>.issue`, keyed by the literal task heading id) to each child issue whose task id is mapped, and add `Refs <linear.issue>` to every tracking issue when `linear.issue` is set. Unmapped tasks get no Linear line. Local-mode sources never get these lines.
|
|
157
|
+
|
|
139
158
|
### Step 7: Compute Labels
|
|
140
159
|
|
|
141
160
|
Collect all unique labels needed. Read `{{package-root}}/skills/research-to-issues/references/label-taxonomy.md` for the full color scheme. Always include the `source:{type}` provenance label.
|
|
@@ -196,7 +215,7 @@ Same process as Step 11 for anti-scope items, research gaps, and decision items
|
|
|
196
215
|
|
|
197
216
|
### Step 13: Create Tracking Issues
|
|
198
217
|
|
|
199
|
-
Compose tracking issue bodies using `{{package-root}}/skills/research-to-issues/templates/tracking-issue.md`. Populate checkbox lists with links to child issue numbers (e.g., `- [ ] #42 Set up data models`).
|
|
218
|
+
Compose tracking issue bodies using `{{package-root}}/skills/research-to-issues/templates/tracking-issue.md`. Populate checkbox lists with links to child issue numbers (e.g., `- [ ] #42 Set up data models`). Include the `Refs <linear.issue>` line from Step 6 when present.
|
|
200
219
|
|
|
201
220
|
**MCP (preferred):** `mcp__github__create_issue` with title `"Phase {N}: {title}"` or `"Batch {N}: {title}"`, body, labels.
|
|
202
221
|
|
|
@@ -253,7 +272,7 @@ EOF
|
|
|
253
272
|
- **Labels are created with --force** -- safe to run multiple times
|
|
254
273
|
- **Issue order matters** -- create child issues before tracking issues (need issue numbers)
|
|
255
274
|
- **MCP-first** -- GitHub operations prefer MCP tools with automatic `gh` CLI fallback
|
|
256
|
-
- **No implementation** -- this skill creates issues only. It does not write code or create plans.
|
|
275
|
+
- **No implementation** -- this skill creates issues only. It does not write code or create plans, and never creates Linear issues (planning Save owns Linear task issues).
|
|
257
276
|
- **Templates are guides** -- adapt fields to whatever is actually present in the source
|
|
258
277
|
- **Agentic-friendly** -- every child issue includes mandatory reading, scope, implementation guidance, and validation criteria to support autonomous engineering workflows
|
|
259
278
|
|
|
@@ -26,10 +26,15 @@ set -euo pipefail
|
|
|
26
26
|
# Detect the forge provider and select the matching CLI (gh / tea).
|
|
27
27
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
|
28
28
|
FORGE_LIB="${SCRIPT_DIR}/../../../shared/scripts/lib/forge.sh"
|
|
29
|
-
[[ -f "$FORGE_LIB" ]] || FORGE_LIB="${SCRIPT_DIR}/../../../shared/scripts/lib/forge.sh"
|
|
30
29
|
# shellcheck source=/dev/null
|
|
31
30
|
source "$FORGE_LIB"
|
|
32
31
|
|
|
32
|
+
# Plans are judged by their body: leading identity frontmatter (linear:, tasks:)
|
|
33
|
+
# is metadata and must never satisfy or hide headings and task markers.
|
|
34
|
+
ARTIFACT_BODY_LIB="${SCRIPT_DIR}/../../../shared/scripts/artifact-body.sh"
|
|
35
|
+
# shellcheck source=/dev/null
|
|
36
|
+
source "$ARTIFACT_BODY_LIB"
|
|
37
|
+
|
|
33
38
|
SOURCE_PATH="${1:-}"
|
|
34
39
|
EXPLICIT_TYPE=""
|
|
35
40
|
DETECTED_TYPE=""
|
|
@@ -130,20 +135,28 @@ else
|
|
|
130
135
|
DETECTED_TYPE="feature-spec"
|
|
131
136
|
elif [[ "$BASENAME" == "parallel-plan.md" ]]; then
|
|
132
137
|
DETECTED_TYPE="parallel-plan"
|
|
133
|
-
elif [[ "$BASENAME" == *.plan.md ]]; then
|
|
138
|
+
elif [[ "$BASENAME" == *.plan.md || "$BASENAME" == "prp-plan.md" ]]; then
|
|
139
|
+
# prp-plan.md / prd.md are the linear artifact-store cache names.
|
|
134
140
|
DETECTED_TYPE="prp-plan"
|
|
135
|
-
elif [[ "$BASENAME" == *.prd.md ]]; then
|
|
141
|
+
elif [[ "$BASENAME" == *.prd.md || "$BASENAME" == "prd.md" ]]; then
|
|
136
142
|
DETECTED_TYPE="prd"
|
|
137
143
|
else
|
|
138
|
-
# Content-based fallback: check first 40 lines
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
# Content-based fallback: check the first 40 body lines (frontmatter
|
|
145
|
+
# skipped) for signature headers. HEAD_CONTENT is matched with
|
|
146
|
+
# here-strings, not `echo | grep -q`, so pipefail cannot SIGPIPE the
|
|
147
|
+
# writer and misread a present header (YAN-1587).
|
|
148
|
+
if SOURCE_BODY=$(artifact_body "$SOURCE_PATH" 2>/dev/null); then
|
|
149
|
+
HEAD_CONTENT=$(head -40 <<<"$SOURCE_BODY")
|
|
150
|
+
else
|
|
151
|
+
HEAD_CONTENT=""
|
|
152
|
+
fi
|
|
153
|
+
if grep -q "## Critically Relevant Files" <<<"$HEAD_CONTENT"; then
|
|
141
154
|
DETECTED_TYPE="parallel-plan"
|
|
142
|
-
elif
|
|
155
|
+
elif grep -q "## Mandatory Reading\|## Step-by-Step Tasks" <<<"$HEAD_CONTENT"; then
|
|
143
156
|
DETECTED_TYPE="prp-plan"
|
|
144
|
-
elif
|
|
157
|
+
elif grep -q "## Problem Statement" <<<"$HEAD_CONTENT"; then
|
|
145
158
|
DETECTED_TYPE="prd"
|
|
146
|
-
elif
|
|
159
|
+
elif grep -q "## Executive Summary" <<<"$HEAD_CONTENT"; then
|
|
147
160
|
DETECTED_TYPE="feature-spec"
|
|
148
161
|
else
|
|
149
162
|
ERRORS+=("ERROR: Could not detect source type from file: $BASENAME. Use --type to specify.")
|
|
@@ -157,6 +170,15 @@ else
|
|
|
157
170
|
if [[ -n "$DETECTED_TYPE" ]]; then
|
|
158
171
|
echo "DETECTED_TYPE: $DETECTED_TYPE"
|
|
159
172
|
|
|
173
|
+
# Read the plan body once for the type-specific checks below (frontmatter
|
|
174
|
+
# skipped). Matched with here-strings, never `artifact_body | grep -q`.
|
|
175
|
+
SOURCE_BODY=""
|
|
176
|
+
if [[ "$DETECTED_TYPE" != "deep-research" && -f "$SOURCE_PATH" ]]; then
|
|
177
|
+
if ! SOURCE_BODY=$(artifact_body "$SOURCE_PATH" 2>/dev/null); then
|
|
178
|
+
ERRORS+=("ERROR: Failed to read source file: $SOURCE_PATH")
|
|
179
|
+
SOURCE_BODY=""
|
|
180
|
+
fi
|
|
181
|
+
fi
|
|
160
182
|
case "$DETECTED_TYPE" in
|
|
161
183
|
deep-research)
|
|
162
184
|
if [[ ! -d "$SOURCE_PATH" ]]; then
|
|
@@ -194,12 +216,12 @@ else
|
|
|
194
216
|
ERRORS+=("ERROR: feature-spec source must be a file: $SOURCE_PATH")
|
|
195
217
|
else
|
|
196
218
|
echo "OK: Source file exists: $SOURCE_PATH"
|
|
197
|
-
if grep -q "## Executive Summary" "$
|
|
219
|
+
if grep -q "## Executive Summary" <<<"$SOURCE_BODY"; then
|
|
198
220
|
echo "OK: Contains expected ## Executive Summary header"
|
|
199
221
|
else
|
|
200
222
|
ERRORS+=("WARNING: Missing ## Executive Summary header -- file may not be a valid feature-spec")
|
|
201
223
|
fi
|
|
202
|
-
if grep -q "## Task Breakdown Preview\|## Recommendations" "$
|
|
224
|
+
if grep -q "## Task Breakdown Preview\|## Recommendations" <<<"$SOURCE_BODY"; then
|
|
203
225
|
echo "OK: Contains task/recommendation structure"
|
|
204
226
|
else
|
|
205
227
|
ERRORS+=("WARNING: Missing task breakdown or recommendations section")
|
|
@@ -211,12 +233,12 @@ else
|
|
|
211
233
|
ERRORS+=("ERROR: parallel-plan source must be a file: $SOURCE_PATH")
|
|
212
234
|
else
|
|
213
235
|
echo "OK: Source file exists: $SOURCE_PATH"
|
|
214
|
-
if grep -q "## Critically Relevant Files\|## Implementation Plan" "$
|
|
236
|
+
if grep -q "## Critically Relevant Files\|## Implementation Plan" <<<"$SOURCE_BODY"; then
|
|
215
237
|
echo "OK: Contains expected parallel-plan structure"
|
|
216
238
|
else
|
|
217
239
|
ERRORS+=("WARNING: Missing expected parallel-plan headers")
|
|
218
240
|
fi
|
|
219
|
-
TASK_COUNT=$(grep -c "^####.*Task" "$
|
|
241
|
+
TASK_COUNT=$(grep -c "^####.*Task" <<<"$SOURCE_BODY") || TASK_COUNT=0
|
|
220
242
|
echo "INFO: Found approximately $TASK_COUNT tasks"
|
|
221
243
|
fi
|
|
222
244
|
;;
|
|
@@ -225,23 +247,23 @@ else
|
|
|
225
247
|
ERRORS+=("ERROR: prp-plan source must be a file: $SOURCE_PATH")
|
|
226
248
|
else
|
|
227
249
|
echo "OK: Source file exists: $SOURCE_PATH"
|
|
228
|
-
if grep -q "## Step-by-Step Tasks\|## Tasks\|## Summary" "$
|
|
250
|
+
if grep -q "## Step-by-Step Tasks\|## Tasks\|## Summary" <<<"$SOURCE_BODY"; then
|
|
229
251
|
echo "OK: Contains expected PRP plan structure"
|
|
230
252
|
else
|
|
231
253
|
ERRORS+=("WARNING: Missing expected PRP plan headers")
|
|
232
254
|
fi
|
|
233
|
-
if grep -q "## Batches" "$
|
|
255
|
+
if grep -q "## Batches" <<<"$SOURCE_BODY"; then
|
|
234
256
|
echo "INFO: Parallel/batch mode detected"
|
|
235
257
|
else
|
|
236
258
|
echo "INFO: Sequential mode detected"
|
|
237
259
|
fi
|
|
238
260
|
# Detect format variant: standard (### Task N:) or narrative (**TN —)
|
|
239
|
-
if grep -q "^### Task [0-9]" "$
|
|
261
|
+
if grep -q "^### Task [0-9]" <<<"$SOURCE_BODY"; then
|
|
240
262
|
echo "INFO: Standard format detected (### Task N: headings)"
|
|
241
|
-
TASK_COUNT=$(grep -c "^### Task [0-9]" "$
|
|
242
|
-
elif grep -q '^\*\*T[0-9]' "$
|
|
263
|
+
TASK_COUNT=$(grep -c "^### Task [0-9]" <<<"$SOURCE_BODY") || TASK_COUNT=0
|
|
264
|
+
elif grep -q '^\*\*T[0-9]' <<<"$SOURCE_BODY"; then
|
|
243
265
|
echo "INFO: Narrative format detected (**TN bold markers)"
|
|
244
|
-
TASK_COUNT=$(grep -c '^\*\*T[0-9]' "$
|
|
266
|
+
TASK_COUNT=$(grep -c '^\*\*T[0-9]' <<<"$SOURCE_BODY") || TASK_COUNT=0
|
|
245
267
|
else
|
|
246
268
|
TASK_COUNT=0
|
|
247
269
|
fi
|
|
@@ -253,19 +275,19 @@ else
|
|
|
253
275
|
ERRORS+=("ERROR: prd source must be a file: $SOURCE_PATH")
|
|
254
276
|
else
|
|
255
277
|
echo "OK: Source file exists: $SOURCE_PATH"
|
|
256
|
-
if grep -q "## Problem Statement" "$
|
|
278
|
+
if grep -q "## Problem Statement" <<<"$SOURCE_BODY"; then
|
|
257
279
|
echo "OK: Contains expected ## Problem Statement header"
|
|
258
280
|
else
|
|
259
281
|
ERRORS+=("WARNING: Missing ## Problem Statement header -- file may not be a valid PRD")
|
|
260
282
|
fi
|
|
261
|
-
if grep -q "## Implementation Phases" "$
|
|
283
|
+
if grep -q "## Implementation Phases" <<<"$SOURCE_BODY"; then
|
|
262
284
|
echo "OK: Contains Implementation Phases section"
|
|
263
|
-
PHASE_COUNT=$(grep -c "^| [0-9]" "$
|
|
285
|
+
PHASE_COUNT=$(grep -c "^| [0-9]" <<<"$SOURCE_BODY") || PHASE_COUNT=0
|
|
264
286
|
echo "INFO: Found approximately $PHASE_COUNT phases"
|
|
265
287
|
else
|
|
266
288
|
ERRORS+=("WARNING: Missing ## Implementation Phases section")
|
|
267
289
|
fi
|
|
268
|
-
if grep -q "## Success Metrics\|## Key Hypothesis" "$
|
|
290
|
+
if grep -q "## Success Metrics\|## Key Hypothesis" <<<"$SOURCE_BODY"; then
|
|
269
291
|
echo "OK: Contains success/hypothesis structure"
|
|
270
292
|
else
|
|
271
293
|
ERRORS+=("WARNING: Missing success metrics or hypothesis section")
|
|
@@ -48,6 +48,8 @@ Use this template for implementation task issues created from parallel-plan or P
|
|
|
48
48
|
> Extracted from: {source_document}
|
|
49
49
|
> Task: {task_id} of {total_tasks}
|
|
50
50
|
> Phase/Batch: {phase_or_batch}
|
|
51
|
+
|
|
52
|
+
{linear_refs_line}
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
## Field Descriptions
|
|
@@ -67,6 +69,7 @@ Use this template for implementation task issues created from parallel-plan or P
|
|
|
67
69
|
| task_id | "Task N.M" identifier | "Task N" identifier |
|
|
68
70
|
| total_tasks | Total task count across all phases | Total task count |
|
|
69
71
|
| phase_or_batch | "Phase N: {name}" | "Batch N" (parallel) or sequential position |
|
|
72
|
+
| linear_refs_line | `Refs <KEY>` from frontmatter `tasks` map | Same |
|
|
70
73
|
|
|
71
74
|
## Field Adaptation
|
|
72
75
|
|
|
@@ -77,6 +80,7 @@ Not all fields will be present in every source. Adapt:
|
|
|
77
80
|
- If no explicit dependencies, write "None -- this task can start independently"
|
|
78
81
|
- If mandatory reading is empty, write "No mandatory prereading identified. Review the source document for full context."
|
|
79
82
|
- For files lists, use relative paths from project root
|
|
83
|
+
- Omit `{linear_refs_line}` for local sources and for tasks absent from the `tasks` map
|
|
80
84
|
|
|
81
85
|
## Label Assignment Rules
|
|
82
86
|
|
|
@@ -21,6 +21,8 @@ Use this template for phase-level, batch-level, or cluster-level tracking issues
|
|
|
21
21
|
|
|
22
22
|
{optional_sections}
|
|
23
23
|
|
|
24
|
+
{linear_refs_line}
|
|
25
|
+
|
|
24
26
|
## Notes
|
|
25
27
|
|
|
26
28
|
- This is a tracking issue. Individual items are linked above.
|
|
@@ -114,6 +116,7 @@ Testing approach and validation commands from the plan.
|
|
|
114
116
|
| checkbox_list | Generated from child issues after creation | "- [ ] #12 Set up data models" |
|
|
115
117
|
| success_criteria | Success criteria, acceptance criteria from source | Bulleted list of criteria |
|
|
116
118
|
| dependency_summary | Phase/batch dependencies from plan | "Requires Phase 1 complete" |
|
|
119
|
+
| linear_refs_line | `Refs <linear.issue>` (linear sources) | "Refs YAN-1152" |
|
|
117
120
|
|
|
118
121
|
## Label Assignment
|
|
119
122
|
|
|
@@ -28,8 +28,9 @@ Extract flags from `$ARGUMENTS` before treating the remainder as the input:
|
|
|
28
28
|
| `--dry-run` | Print the fix plan and stop. Do not dispatch fixers or modify files. |
|
|
29
29
|
| `--worktree` | Legacy no-op; worktree mode is default (auto-detect from artifact) |
|
|
30
30
|
| `--no-worktree` | Apply fixes directly in current working tree |
|
|
31
|
+
| `--store=<mode>` | Artifact store override, `local` or `linear` |
|
|
31
32
|
|
|
32
|
-
Strip the supported flags from `$ARGUMENTS` and set `PARALLEL_MODE`, `MIN_SEVERITY`, `DRY_RUN`, and `WORKTREE_MODE=true` unless `--no-worktree` is present. The remaining text is the input selector.
|
|
33
|
+
Strip the supported flags from `$ARGUMENTS` and set `PARALLEL_MODE`, `MIN_SEVERITY`, `DRY_RUN`, and `WORKTREE_MODE=true` unless `--no-worktree` is present. Keep `--store=local|linear` verbatim as `STORE_FLAG` (empty when absent) and forward it to every resolver call. The remaining text is the input selector.
|
|
33
34
|
|
|
34
35
|
**Questions:** class `failure-recovery` (Path B/C between-batch failure): headless (no question tool or chat turn), stop, preserve completed fixes, and print the failing batch plus the resume command; class `clarify` (blank input): headless, print the resolved artifact path and stop. See `{{package-root}}/shared/references/question-policy.md`.
|
|
35
36
|
|
|
@@ -37,10 +38,66 @@ Strip the supported flags from `$ARGUMENTS` and set `PARALLEL_MODE`, `MIN_SEVERI
|
|
|
37
38
|
|
|
38
39
|
- Both `--parallel`:
|
|
39
40
|
|
|
40
|
-
Input resolution —
|
|
41
|
-
`
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
Input resolution — print the mode first:
|
|
42
|
+
`"{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --shell`.
|
|
43
|
+
Apply the local-review rule below before anything else. Then, in linear mode,
|
|
44
|
+
apply the **Linear call gate** from
|
|
45
|
+
`{{package-root}}/shared/references/artifact-store.md` before any
|
|
46
|
+
Linear call, write or `--ensure`; rules are in its Review and report skills > Review fixes.
|
|
47
|
+
|
|
48
|
+
- Path ending `.md` → resolve a relative path against the current directory
|
|
49
|
+
first, then against `git rev-parse --show-toplevel` (printed review paths
|
|
50
|
+
are toplevel-relative). A path under `.ycc/artifacts/` or with a leading
|
|
51
|
+
`linear:` frontmatter block is a linear review: set `STORE_FLAG=--store=linear`
|
|
52
|
+
when empty (with `--store=local`, abort:
|
|
53
|
+
`A Linear review requires linear mode; drop --store=local.`).
|
|
54
|
+
- Digits `N` → resolve kind `review-pr-N` (no `--ensure`) with slug `review`
|
|
55
|
+
in local mode (unchanged `docs/prps/reviews/pr-<N>-review.md`, worktree then
|
|
56
|
+
main repo). Linear mode: the cache `.ycc/artifacts/*/reviews/pr-N-review.md`
|
|
57
|
+
in the current checkout, then the main checkout; if missing, run Lookup
|
|
58
|
+
scoped to this repository, stopping at the first hit:
|
|
59
|
+
1. The PR itself: `gh pr view N --json headRefName,body`; take the issue key
|
|
60
|
+
from `headRefName` (Branch hint rules), else a `Closes|Fixes|Resolves <KEY>`
|
|
61
|
+
line in the body; verify the issue in Linear and look among its Documents
|
|
62
|
+
for a title ending `· pr-N-review`.
|
|
63
|
+
2. Documents titled `<slug> · pr-N-review` in the Projects of Lookup step 5
|
|
64
|
+
(`ARTIFACT_LINEAR_PROJECT`, else Projects carrying `ARTIFACT_LINEAR_LABEL`).
|
|
65
|
+
3. Ask for the Document (Lookup step 7); never search the whole workspace.
|
|
66
|
+
|
|
67
|
+
Load the hit into `--ensure --kind=review-pr-N --slug=<slug>` (slug from the
|
|
68
|
+
Document title prefix before `·`). `--dry-run` never writes: read a fetched
|
|
69
|
+
body from a temporary file outside the repository instead. Before using a
|
|
70
|
+
linear `pr-N` review, compare the head of its `**Branch**: <head> → <base>`
|
|
71
|
+
header with `gh pr view N --json headRefName --jq .headRefName`; on a
|
|
72
|
+
mismatch abort: `Error: review <path> is for branch <head>, not PR #N's <headRefName>.`
|
|
73
|
+
|
|
74
|
+
- Blank → latest `*-review.md` by mtime in the mode's review location (local:
|
|
75
|
+
`docs/prps/reviews/`; linear: `.ycc/artifacts/*/reviews/`), current checkout
|
|
76
|
+
then main checkout (parent of `git rev-parse --path-format=absolute --git-common-dir`);
|
|
77
|
+
prompt user to confirm.
|
|
78
|
+
|
|
79
|
+
Existing local reviews keep local mode (artifact-store.md > Review fixes).
|
|
80
|
+
When `STORE_FLAG` is empty and the printed `ARTIFACT_STORE_SOURCE=default`, set
|
|
81
|
+
`STORE_FLAG=--store=local` (and forward it) when the input is a `.md` path that
|
|
82
|
+
is not a linear review, digits `N` whose `docs/prps/reviews/pr-<N>-review.md`
|
|
83
|
+
exists (current checkout, then main checkout) and is newer by mtime than every
|
|
84
|
+
linear cache `.ycc/artifacts/*/reviews/pr-<N>-review.md` in those checkouts (no
|
|
85
|
+
cache counts as older), or blank input whose newest `*-review.md` across both
|
|
86
|
+
review locations lies under `docs/prps/reviews/`. Print one line:
|
|
87
|
+
`Using local review at <path>; pin with store: local in .plans-config`.
|
|
88
|
+
When linear mode comes from `--store=linear` or a config, a `.md` path that is
|
|
89
|
+
not a linear review aborts:
|
|
90
|
+
`A local review requires local mode; use --store=local.`
|
|
91
|
+
|
|
92
|
+
Record `REVIEW_FILE`; `REVIEW_SELECTOR`, the input to re-run with (`N` for
|
|
93
|
+
digits, else the resolved `.md` path; never a temporary copy); `REVIEW_ID`
|
|
94
|
+
(basename minus `-review.md`, else minus `.md`; `pr-<N>` for a `--dry-run`
|
|
95
|
+
temporary copy); and in linear mode `REVIEW_SLUG` (the `.ycc/artifacts/<slug>/`
|
|
96
|
+
component; the Document title prefix for a temporary copy).
|
|
97
|
+
Fix reports need a store review id (`pr-<N>`, `local-<YYYYMMDD-HHMMSS>`,
|
|
98
|
+
`quick-<YYYYMMDD-HHMMSS>`). Any other `REVIEW_ID` keeps the pre-store report
|
|
99
|
+
path in local mode (Phase 6); in linear mode abort here, before any write:
|
|
100
|
+
`Error: review id <REVIEW_ID> is not pr-<N>, local-<stamp> or quick-<stamp>; rename the review or use --store=local.`
|
|
44
101
|
|
|
45
102
|
Error paths:
|
|
46
103
|
|
|
@@ -134,7 +191,7 @@ If `DRY_RUN=true`, stop here. Print a reminder:
|
|
|
134
191
|
|
|
135
192
|
```
|
|
136
193
|
Dry run complete. To apply fixes, re-run without --dry-run:
|
|
137
|
-
/ycc:review-fix $
|
|
194
|
+
/ycc:review-fix ${STORE_FLAG} $REVIEW_SELECTOR [--parallel] [--severity <level>]
|
|
138
195
|
```
|
|
139
196
|
|
|
140
197
|
|
|
@@ -165,7 +222,11 @@ One-time parent setup only when forced and not yet ensured.
|
|
|
165
222
|
Status updates in place via `Edit` after each agent returns: Fixed on
|
|
166
223
|
`STATUS: Fixed`, Failed on `STATUS: Failed`. Track per-batch todos. In Path B/C,
|
|
167
224
|
between-batch validation failure stops and asks for the path-specific choices
|
|
168
|
-
in fixer-dispatch.md. Path A continues; no stop-and-ask gate.
|
|
225
|
+
in fixer-dispatch.md. Path A continues; no stop-and-ask gate. Linear mode: when
|
|
226
|
+
the review carries `linear.document` or `pending: true`, re-run Save for
|
|
227
|
+
Document `<REVIEW_SLUG> · <REVIEW_ID>-review` per artifact-store.md after the
|
|
228
|
+
last status edit (and before any stop); Conflict rules apply and offline sets
|
|
229
|
+
`pending: true`. A review kept local only (neither key) is not re-saved.
|
|
169
230
|
|
|
170
231
|
## Phase 5 — VERIFY
|
|
171
232
|
|
|
@@ -178,9 +239,24 @@ Read report template and worktree summary:
|
|
|
178
239
|
|
|
179
240
|
`{{package-root}}/skills/review-fix/references/fix-report.md`
|
|
180
241
|
|
|
181
|
-
|
|
182
|
-
checkout root
|
|
183
|
-
|
|
242
|
+
Resolve the report with kind `review-fixes-<REVIEW_ID>`, starting from the
|
|
243
|
+
active checkout root (`$PARENT_PATH` in worktree mode):
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
FIX_REPORT="$("{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --ensure --kind=review-fixes-<REVIEW_ID> --slug=<slug> <checkout>)"
|
|
247
|
+
mkdir -p "$(dirname "$FIX_REPORT")"
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Slug: `review` in local mode (unchanged path
|
|
251
|
+
`docs/prps/reviews/fixes/<source-name>-fixes.md`); `REVIEW_SLUG` in linear mode
|
|
252
|
+
(`.ycc/artifacts/<slug>/reviews/<REVIEW_ID>-fixes.md`, saved as Document
|
|
253
|
+
`<slug> · <REVIEW_ID>-fixes` with the review Document's parent; none → local
|
|
254
|
+
only). Local mode with a `REVIEW_ID` the resolver rejects (renamed or legacy
|
|
255
|
+
review): skip the resolver and keep the pre-store path,
|
|
256
|
+
`FIX_REPORT="$(git -C <checkout> rev-parse --show-toplevel)/docs/prps/reviews/fixes/<REVIEW_ID>-fixes.md"`,
|
|
257
|
+
creating its parent with `mkdir -p`. Local mode in worktree mode: stage and commit the report alongside fix
|
|
258
|
+
commits and push. Linear mode never commits the report (gitignored); fix
|
|
259
|
+
commits still push, staged by explicit path only. GitHub-only: detect forge first (see
|
|
184
260
|
`{{package-root}}/shared/references/forge-detection.md`); on
|
|
185
261
|
non-GitHub providers skip commit/push with notice
|
|
186
262
|
`PR posting is GitHub-only on provider <provider>; fixes applied locally — commit and push them yourself.` and `REPORT_COMMITTED: n/a`.
|
|
@@ -195,7 +271,11 @@ Start the output with this literal heading:
|
|
|
195
271
|
|
|
196
272
|
Report source path, report path, mode, eligible/fixed/failed/skipped/open
|
|
197
273
|
counts, updated statuses, validation results, next steps
|
|
198
|
-
(`/ycc:code-review <target>` re-review,
|
|
274
|
+
(`/ycc:code-review <target>` re-review, then commit the fixed files by name:
|
|
275
|
+
`/ycc:prp-commit <fixed files>`, never a stage-everything commit). Linear mode:
|
|
276
|
+
when the rule-only `.gitignore` check (artifact-store.md > Reviews) holds for
|
|
277
|
+
`<checkout>`, print
|
|
278
|
+
`Note: <checkout>/.gitignore gained the .ycc/artifacts/ rule from the artifact store; leave it out of PR commits.`
|
|
199
279
|
|
|
200
280
|
Print under `### Goal Signals (machine-readable — printed verbatim for /goal)`,
|
|
201
281
|
as the last lines, one `KEY: PASS|FAIL` per line (always include the value):
|
|
@@ -209,9 +289,11 @@ REPORT_COMMITTED: <PASS|FAIL|n/a>
|
|
|
209
289
|
```
|
|
210
290
|
|
|
211
291
|
PASS only when the criterion holds: plan respects same-file sequentialization;
|
|
212
|
-
every attempted finding's Status updated in the source artifact
|
|
213
|
-
|
|
214
|
-
|
|
292
|
+
every attempted finding's Status updated in the source artifact (linear mode:
|
|
293
|
+
and saved or marked `pending`); report written at `$FIX_REPORT` (local mode
|
|
294
|
+
under `docs/prps/reviews/fixes/`); Phase 5 completed (even if checks
|
|
295
|
+
failed); report committed and pushed (local-mode worktree runs; `n/a` in
|
|
296
|
+
`--no-worktree` and linear mode).
|
|
215
297
|
Also print an `Open remaining: <M - X - Y>` line.
|
|
216
298
|
|
|
217
299
|
## Edge cases
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
|
|
9
9
|
## Report location
|
|
10
10
|
|
|
11
|
-
Write the fix report to `$
|
|
11
|
+
Write the fix report to `$FIX_REPORT`, resolved in SKILL.md Phase 6 with kind `review-fixes-<REVIEW_ID>` from the active checkout root (its parent created there with `mkdir -p "$(dirname "$FIX_REPORT")"`).
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
13
|
+
- **Local mode** — unchanged: `$(git rev-parse --show-toplevel)/docs/prps/reviews/fixes/`. When in a worktree this resolves to the worktree top-level; otherwise to the main repo. A review whose id the resolver rejects (renamed or legacy name) keeps this path without the resolver: `<source-name>-fixes.md`.
|
|
14
|
+
- **Linear mode** — `.ycc/artifacts/<slug>/reviews/<REVIEW_ID>-fixes.md` (gitignored), saved per `{{package-root}}/shared/references/artifact-store.md` > Review and report skills > Review fixes as Document `<slug> · <REVIEW_ID>-fixes`, parented like the review Document (none → local only).
|
|
16
15
|
|
|
17
16
|
Derive the report filename from the source review:
|
|
18
17
|
|
|
19
|
-
| Source
|
|
20
|
-
|
|
|
21
|
-
| `docs/prps/reviews/pr-42-review.md`
|
|
22
|
-
| `docs/prps/reviews/local-20260408-143022-review.md`
|
|
18
|
+
| Source | Report (local mode) |
|
|
19
|
+
| -------------------------------------------------------- | -------------------------------------------------------- |
|
|
20
|
+
| `docs/prps/reviews/pr-42-review.md` | `docs/prps/reviews/fixes/pr-42-fixes.md` |
|
|
21
|
+
| `docs/prps/reviews/local-20260408-143022-review.md` | `docs/prps/reviews/fixes/local-20260408-143022-fixes.md` |
|
|
22
|
+
| `.ycc/artifacts/<slug>/reviews/pr-42-review.md` (linear) | `.ycc/artifacts/<slug>/reviews/pr-42-fixes.md` |
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Local mode only: after writing the fix report, stage and commit it to the PR branch alongside the fix commits. Linear mode never commits it (gitignored, `REPORT_COMMITTED: n/a`) and never stages a `.gitignore` change made by `--ensure`. Stage fix commits by explicit path (`git add -- <fixed files>`), never `git add -A`.
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
FIX_REPORT_REL="docs/prps/reviews/fixes/<name>-fixes.md"
|
|
@@ -92,7 +92,7 @@ git push
|
|
|
92
92
|
|
|
93
93
|
- Re-run `/ycc:code-review <same target>` to verify the remaining open findings and confirm fixes resolved the issues
|
|
94
94
|
- Address failed fixes manually using the Blocker + Recommendation notes above
|
|
95
|
-
-
|
|
95
|
+
- Commit the fixed files by name when satisfied (`/ycc:prp-commit <fixed files>`); leave any artifact-store `.gitignore` rule out of the commit
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
## Worktree summary (only when `WORKTREE_ACTIVE=true`)
|
|
@@ -115,5 +115,8 @@ WORKTREE_ACTIVE=true
|
|
|
115
115
|
3. **Advance** to the next severity batch. No merge step. No child worktree removal.
|
|
116
116
|
|
|
117
117
|
**Status updates**: Edit the `Status:` field in the review artifact file in place
|
|
118
|
-
(Open → Fixed / Failed) after each agent completes its finding.
|
|
119
|
-
in the active worktree at `$PARENT_PATH/docs/prps/reviews/pr-<N>-review.md`.
|
|
118
|
+
(Open → Fixed / Failed) after each agent completes its finding. In local mode the
|
|
119
|
+
artifact lives in the active worktree at `$PARENT_PATH/docs/prps/reviews/pr-<N>-review.md`.
|
|
120
|
+
In linear mode it is the resolved cache file (`$REVIEW_FILE`, under
|
|
121
|
+
`.ycc/artifacts/<slug>/reviews/`); edit it there and re-Save its Document per
|
|
122
|
+
SKILL.md Phase 4, never copying it into the worktree or committing it.
|
|
@@ -28,11 +28,13 @@ summary, no interactive checkpoint), regardless of `$ARGUMENTS`.
|
|
|
28
28
|
|
|
29
29
|
**Outputs**:
|
|
30
30
|
|
|
31
|
-
- `${
|
|
32
|
-
- `${
|
|
33
|
-
- `${
|
|
34
|
-
- `${
|
|
35
|
-
- `${
|
|
31
|
+
- `${research_dir}/research-architecture.md`
|
|
32
|
+
- `${research_dir}/research-patterns.md`
|
|
33
|
+
- `${research_dir}/research-integration.md`
|
|
34
|
+
- `${research_dir}/research-docs.md`
|
|
35
|
+
- `${shared_file}`
|
|
36
|
+
|
|
37
|
+
Canonical `plan-workflow` resolves these paths with the artifact-store `research-<lens>` and `shared` kinds. Local mode keeps today's `docs/plans/<feature>/` paths; linear mode resolves under `.ycc/artifacts/<feature>/`, places research under `research/`, and saves the research and shared documents to Linear.
|
|
36
38
|
|
|
37
39
|
After creating the shared context files and displaying the summary, **STOP COMPLETELY**.
|
|
38
40
|
|
|
@@ -47,7 +49,8 @@ After creating the shared context files and displaying the summary, **STOP COMPL
|
|
|
47
49
|
**Target**: `$ARGUMENTS`
|
|
48
50
|
|
|
49
51
|
- **--dry-run**: Show orchestration plan without creating files. Writes nothing.
|
|
50
|
-
- **feature-name**: Required.
|
|
52
|
+
- **feature-name**: Required. Feature slug passed to canonical `plan-workflow` for artifact-store resolution (kebab-case).
|
|
53
|
+
- **--store=local|linear**: Optional artifact-store override, forwarded to canonical `plan-workflow`. Linear is the default.
|
|
51
54
|
|
|
52
55
|
If any unsupported flag is present (see Flag policy above), abort with a usage error and STOP:
|
|
53
56
|
|
|
@@ -84,14 +87,14 @@ Build the **effective `$ARGUMENTS`** for canonical `plan-workflow`:
|
|
|
84
87
|
|
|
85
88
|
## Location
|
|
86
89
|
|
|
87
|
-
${
|
|
90
|
+
${shared_file}
|
|
88
91
|
|
|
89
92
|
## Research Files
|
|
90
93
|
|
|
91
|
-
- ${
|
|
92
|
-
- ${
|
|
93
|
-
- ${
|
|
94
|
-
- ${
|
|
94
|
+
- ${research_dir}/research-architecture.md
|
|
95
|
+
- ${research_dir}/research-patterns.md
|
|
96
|
+
- ${research_dir}/research-integration.md
|
|
97
|
+
- ${research_dir}/research-docs.md
|
|
95
98
|
|
|
96
99
|
## Next Step (User Triggered)
|
|
97
100
|
|
|
@@ -30,9 +30,9 @@ The non-negotiable invariants:
|
|
|
30
30
|
|
|
31
31
|
- **Accept ANY plan path.** Never assume `docs/prps/plans` or any fixed
|
|
32
32
|
location. The plan path is supplied by the caller and may live anywhere.
|
|
33
|
-
- **
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
- **Resolve `visual/` by store.** Local mode keeps the sibling
|
|
34
|
+
`<dirname of plan>/visual/`. Linear mode (default) writes under the resolved
|
|
35
|
+
feature cache's `visual/`, never beside a legacy or external source plan.
|
|
36
36
|
- **NEVER edit the plan file.** Read it; write only into the derived `visual/`
|
|
37
37
|
directory. The plan artifact stays byte-for-byte intact.
|
|
38
38
|
- **NEVER re-run research or dispatch.** Only consume the existing plan.
|
|
@@ -49,6 +49,7 @@ Parse `$ARGUMENTS`:
|
|
|
49
49
|
hosted egress (destination `plan.agent-native.com`). Without it, the skill
|
|
50
50
|
runs in **local-files** mode and no plan content is uploaded to hosted storage.
|
|
51
51
|
See **Egress & consent** below.
|
|
52
|
+
- **`--store=local|linear`** — parse and strip before selecting the plan path. Retain the exact override as `STORE_FLAG` (empty when absent), reject invalid/conflicting overrides, and forward `${STORE_FLAG}` to every resolver call.
|
|
52
53
|
|
|
53
54
|
## Mode selection (auto)
|
|
54
55
|
|
|
@@ -97,15 +98,32 @@ exact tag names, required fields, and prop shapes.
|
|
|
97
98
|
|
|
98
99
|
## Core workflow
|
|
99
100
|
|
|
100
|
-
1. **Read the source plan.** Read the
|
|
101
|
-
the output dir with the thin helper (it computes the `visual/` sibling per the
|
|
102
|
-
contract and never hardcodes a location). Invoke it directly, then capture its
|
|
103
|
-
stdout as `OUT`:
|
|
101
|
+
1. **Read the source plan.** Read the given path (read-only). Step 1: print the resolved store and read `ARTIFACT_STORE=` from stdout:
|
|
104
102
|
|
|
103
|
+
```bash
|
|
104
|
+
bash "{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --shell
|
|
105
105
|
```
|
|
106
|
-
|
|
106
|
+
|
|
107
|
+
In local mode, capture `OUT` from the unchanged sibling-directory helper:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
OUT="$(bash "{{package-root}}/skills/visual-plan/scripts/derive-visual-dir.sh" <plan> --mkdir)"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
In linear mode, identify the source feature slug from its cache directory or
|
|
114
|
+
its Linear Project identity; otherwise use artifact-store.md **Slugs**.
|
|
115
|
+
Step 2: apply the **Linear call gate** before any write or `--ensure`. Step 3: resolve the feature root after the gate:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
FEATURE_DIR="$(bash "{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --ensure --kind=feature-dir --slug=<slug>)"
|
|
119
|
+
OUT="$FEATURE_DIR/visual"
|
|
120
|
+
mkdir -p "$OUT"
|
|
107
121
|
```
|
|
108
122
|
|
|
123
|
+
Follow artifact-store.md **Size and diagrams** for visual files and links;
|
|
124
|
+
do not upload the visual bundle as a planning Document. Shell state does not
|
|
125
|
+
persist across tool calls: retain the resolved absolute `OUT`.
|
|
126
|
+
|
|
109
127
|
Gather the plan's exact text — do not invent source content.
|
|
110
128
|
|
|
111
129
|
2. **Resolve blocks by mode.** With `--share`, call `get-plan-blocks`. In the
|
|
@@ -13,7 +13,7 @@ file, and architecture changes become the same `data-model`, `api-endpoint`, `fi
|
|
|
13
13
|
and `diagram` blocks a forward plan would use, only now they summarize work that exists. A
|
|
14
14
|
reviewer scans the shape of the change before spending attention on the literal lines.
|
|
15
15
|
|
|
16
|
-
**Operational context:** Keep recap content local-only: write docs/prps/reviews/visual/ and preview through the localhost bridge; never upload code to hosted services. Accept a Git range, branch, or tracked working-tree diff; behavior is remote-agnostic.
|
|
16
|
+
**Operational context:** Keep recap content local-only: write docs/prps/reviews/visual/ and preview through the localhost bridge; never upload code to hosted services. Accept a Git range, branch, or tracked working-tree diff; behavior is remote-agnostic. This path is intentionally outside the artifact store: `--store` and linear mode never move or upload it.
|
|
17
17
|
|
|
18
18
|
## LOCAL-ONLY mandate — read this first
|
|
19
19
|
|