@yandy-r/ycc-opencode 6.1.1 → 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
|
@@ -17,8 +17,6 @@
|
|
|
17
17
|
# See resolve-plans-dir.sh for configuration options.
|
|
18
18
|
|
|
19
19
|
set -uo pipefail
|
|
20
|
-
|
|
21
|
-
PLAN_FILE="${1:-}"
|
|
22
20
|
ERRORS=0
|
|
23
21
|
WARNINGS=0
|
|
24
22
|
|
|
@@ -26,9 +24,11 @@ WARNINGS=0
|
|
|
26
24
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
|
27
25
|
SHARED_DIR="${SCRIPT_DIR}/../../../shared/scripts"
|
|
28
26
|
|
|
29
|
-
if [[ -f "${SHARED_DIR}/resolve-
|
|
30
|
-
# shellcheck source=../../../shared/scripts/resolve-
|
|
31
|
-
source "${SHARED_DIR}/resolve-
|
|
27
|
+
if [[ -f "${SHARED_DIR}/resolve-artifact-store.sh" ]]; then
|
|
28
|
+
# shellcheck source=../../../shared/scripts/resolve-artifact-store.sh
|
|
29
|
+
source "${SHARED_DIR}/resolve-artifact-store.sh"
|
|
30
|
+
# shellcheck source=../../../shared/scripts/artifact-body.sh
|
|
31
|
+
source "${SHARED_DIR}/artifact-body.sh"
|
|
32
32
|
fi
|
|
33
33
|
|
|
34
34
|
if [[ -f "${SHARED_DIR}/validate-file-paths.sh" ]]; then
|
|
@@ -56,16 +56,44 @@ success() {
|
|
|
56
56
|
echo -e "${GREEN}✓${NC} $1"
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
PLAN_FILE=""
|
|
60
|
+
STORE_FLAG=""
|
|
61
|
+
while [[ $# -gt 0 ]]; do
|
|
62
|
+
case "$1" in
|
|
63
|
+
--store=*)
|
|
64
|
+
STORE_FLAG="$1"
|
|
65
|
+
;;
|
|
66
|
+
*)
|
|
67
|
+
if [[ -z "$PLAN_FILE" ]]; then
|
|
68
|
+
PLAN_FILE="$1"
|
|
69
|
+
else
|
|
70
|
+
echo "Usage: validate-prp-plan.sh <plan-file> [--store=linear|local]" >&2
|
|
71
|
+
exit 1
|
|
72
|
+
fi
|
|
73
|
+
;;
|
|
74
|
+
esac
|
|
75
|
+
shift
|
|
76
|
+
done
|
|
77
|
+
|
|
78
|
+
if [[ -n "$STORE_FLAG" ]]; then
|
|
79
|
+
# shellcheck disable=SC2086
|
|
80
|
+
resolve_artifact_store "$PWD" "$STORE_FLAG" || {
|
|
81
|
+
echo "ERROR: invalid ${STORE_FLAG#--}" >&2
|
|
82
|
+
exit 1
|
|
83
|
+
}
|
|
84
|
+
fi
|
|
85
|
+
|
|
59
86
|
if [[ -z "$PLAN_FILE" ]]; then
|
|
60
|
-
echo "Usage: validate-prp-plan.sh <plan-file>"
|
|
87
|
+
echo "Usage: validate-prp-plan.sh <plan-file> [--store=linear|local]"
|
|
61
88
|
echo ""
|
|
62
89
|
echo "Validates the structure and content of a PRP plan artifact."
|
|
63
90
|
exit 1
|
|
64
91
|
fi
|
|
65
92
|
|
|
66
|
-
# Resolve relative paths against PLANS_ROOT
|
|
67
|
-
|
|
68
|
-
|
|
93
|
+
# Resolve relative paths against the active artifact root: PLANS_ROOT in local
|
|
94
|
+
# mode, ARTIFACT_ROOT in linear mode.
|
|
95
|
+
if [[ "$PLAN_FILE" != /* && -n "${ARTIFACT_ROOT:-${PLANS_ROOT:-}}" ]]; then
|
|
96
|
+
PLAN_FILE="${ARTIFACT_ROOT:-$PLANS_ROOT}/${PLAN_FILE}"
|
|
69
97
|
fi
|
|
70
98
|
|
|
71
99
|
if [[ ! -f "$PLAN_FILE" ]]; then
|
|
@@ -81,18 +109,14 @@ fi
|
|
|
81
109
|
|
|
82
110
|
echo "Validating PRP plan: $PLAN_FILE"
|
|
83
111
|
echo ""
|
|
84
|
-
|
|
85
|
-
#
|
|
86
|
-
CONTENT=$(
|
|
112
|
+
# Read file content minus any leading frontmatter block (linear-mode identity
|
|
113
|
+
# metadata is not body; see _shared/references/artifact-store.md, Frontmatter).
|
|
114
|
+
CONTENT=$(artifact_body "$PLAN_FILE")
|
|
87
115
|
|
|
88
116
|
# --- Title check ---
|
|
89
117
|
echo "Checking document structure..."
|
|
90
|
-
#
|
|
91
|
-
if
|
|
92
|
-
NR > 5 { exit found ? 0 : 1 }
|
|
93
|
-
/^# / { found = 1; exit 0 }
|
|
94
|
-
END { exit found ? 0 : 1 }
|
|
95
|
-
' "$PLAN_FILE"; then
|
|
118
|
+
# Match against the body only: the H1 must sit in its first five lines.
|
|
119
|
+
if grep -q "^# " <<<"$(head -n 5 <<<"$CONTENT")"; then
|
|
96
120
|
success "Title present"
|
|
97
121
|
else
|
|
98
122
|
error "Missing title (# heading)"
|
package/skills/prp-pr/SKILL.md
CHANGED
|
@@ -7,6 +7,8 @@ description: Creates GitHub PRs from already-committed branches without commit o
|
|
|
7
7
|
|
|
8
8
|
# Create Pull Request
|
|
9
9
|
|
|
10
|
+
> **OpenCode V2 compatibility:** `--team` is unsupported. If it is supplied, abort before setup or dispatch and ask the caller to rerun without it. This target uses native standalone `subagent` calls only.
|
|
11
|
+
|
|
10
12
|
> Adapted from PRPs-agentic-eng by Wirasm. Part of the PRP workflow series.
|
|
11
13
|
|
|
12
14
|
**Input**: `$ARGUMENTS` — optional, may contain a base branch name and/or flags (e.g., `--draft`).
|
|
@@ -110,7 +112,18 @@ Check for related PRP artifacts:
|
|
|
110
112
|
- `docs/prps/plans/` — Plans that were executed (including the `completed/` subfolder)
|
|
111
113
|
- `docs/prps/prds/` — Related PRDs
|
|
112
114
|
|
|
113
|
-
Reference these in the PR body if they exist.
|
|
115
|
+
Reference these in the PR body if they exist. When the resolved store is `linear` (`bash "{{package-root}}/shared/scripts/resolve-artifact-store.sh" --shell`, reading `ARTIFACT_STORE=`; default `linear`), list the Linear Project and plan Document URLs from the artifact cache identity instead of `docs/prps` paths, per artifact-store.md **PR linking**.
|
|
116
|
+
|
|
117
|
+
### Linear Issue Links
|
|
118
|
+
|
|
119
|
+
Link issues in the Related Issues section per `{{package-root}}/shared/references/artifact-store.md` **PR linking** (collection, verification, `Closes` vs `Refs`, skip message):
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
bash "{{package-root}}/shared/scripts/collect-linear-keys.sh" --base "origin/<base>"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- Also add the `linear.issue` from the cached plan's frontmatter as a `closes` candidate: use the cache path known in the session, else `.ycc/artifacts/<slug>/{parallel-plan,prp-plan}.md` where `<slug>` is the branch name without a leading `feat/`. Check the current checkout, then the main checkout (parent of `git rev-parse --path-format=absolute --git-common-dir`), per the contract's step 1.
|
|
126
|
+
- Emit `Closes <KEY>` for `closes` keys and `Refs <KEY>` for `refs`-only keys, plus `Closes #<n>` for linked GitHub issues, without duplicating lines already in the body or template.
|
|
114
127
|
|
|
115
128
|
---
|
|
116
129
|
|
package/skills/prp-prd/SKILL.md
CHANGED
|
@@ -8,10 +8,12 @@ description: Develops problem-first PRDs through interactive discovery. Use when
|
|
|
8
8
|
|
|
9
9
|
> Adapted from PRPs-agentic-eng by Wirasm. Part of the PRP workflow series.
|
|
10
10
|
|
|
11
|
-
**Operational context:** Run Foundation, Market Grounding, Vision, Technical Feasibility, Decisions, and Generate gates; write the hypothesis-driven product spec to
|
|
11
|
+
**Operational context:** Run Foundation, Market Grounding, Vision, Technical Feasibility, Decisions, and Generate gates; write the hypothesis-driven product spec to the resolved `prd` artifact path.
|
|
12
12
|
|
|
13
13
|
**Input**: `$ARGUMENTS`
|
|
14
14
|
|
|
15
|
+
Before interpreting input, parse and strip `--store=local|linear`; retain the exact override as `STORE_FLAG` (empty when absent). Reject other `--store=` values and conflicting overrides. Pass `${STORE_FLAG}` to every resolver call; only the remaining text is the product idea.
|
|
16
|
+
|
|
15
17
|
**Questions:** class `clarify` (every interview gate); headless (no question tool or chat turn): print the open questions, write nothing, stop. See `{{package-root}}/shared/references/question-policy.md`.
|
|
16
18
|
|
|
17
19
|
---
|
|
@@ -155,13 +157,23 @@ Ask final clarifying questions:
|
|
|
155
157
|
|
|
156
158
|
## Phase 7: GENERATE — Write PRD
|
|
157
159
|
|
|
158
|
-
|
|
160
|
+
Derive `<slug>` from the kebab-case product/feature name. Resolve in three separate steps:
|
|
159
161
|
|
|
160
|
-
|
|
162
|
+
1. Print the mode and read `ARTIFACT_STORE=` from stdout:
|
|
161
163
|
|
|
162
|
-
```bash
|
|
163
|
-
|
|
164
|
-
```
|
|
164
|
+
```bash
|
|
165
|
+
bash "{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --shell
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
2. In linear mode only, apply the **Linear call gate** in `{{package-root}}/shared/references/artifact-store.md` before any write or `--ensure`.
|
|
169
|
+
3. Resolve the destination once writing is permitted:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
OUT="$(bash "{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --ensure --kind=prd --slug=<slug>)"
|
|
173
|
+
mkdir -p "$(dirname "$OUT")"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Before writing in linear mode, follow artifact-store.md **Planning skills**: when `linear.document` identity is missing, run Lookup steps 3–6, Load any hit and preserve its identity, then replace through Conflict and Save. Write `$OUT`. Local mode keeps `docs/prps/prds/<slug>.prd.md` under the current checkout's git toplevel without identity frontmatter. Retain the printed mode and absolute path across tool calls.
|
|
165
177
|
|
|
166
178
|
### PRD Template
|
|
167
179
|
|
|
@@ -332,7 +344,7 @@ After generating, report:
|
|
|
332
344
|
```markdown
|
|
333
345
|
## PRD Created
|
|
334
346
|
|
|
335
|
-
**File**: `
|
|
347
|
+
**File**: `{resolved absolute OUT path}`
|
|
336
348
|
|
|
337
349
|
### Summary
|
|
338
350
|
|
|
@@ -366,7 +378,7 @@ After generating, report:
|
|
|
366
378
|
|
|
367
379
|
### To Start Implementation
|
|
368
380
|
|
|
369
|
-
Run: `/ycc:prp-plan
|
|
381
|
+
Run: `/ycc:prp-plan {resolved absolute OUT path}`
|
|
370
382
|
|
|
371
383
|
This will automatically select the next pending phase and create an implementation plan.
|
|
372
384
|
```
|
|
@@ -409,7 +421,7 @@ This will automatically select the next pending phase and create an implementati
|
|
|
409
421
|
|
|
|
410
422
|
v
|
|
411
423
|
+---------------------------------------------------------+
|
|
412
|
-
| GENERATE: Write PRD to
|
|
424
|
+
| GENERATE: Write PRD to resolved artifact path |
|
|
413
425
|
+---------------------------------------------------------+
|
|
414
426
|
```
|
|
415
427
|
|
package/skills/prp-spec/SKILL.md
CHANGED
|
@@ -8,7 +8,7 @@ description: Writes lightweight single-pass PRP feature specs. Use when specifyi
|
|
|
8
8
|
# PRP Spec
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
**Operational context:** Write
|
|
11
|
+
**Operational context:** Write the resolved `spec` artifact with problem, requirements, technical approach, integration points, and risks; accept free-form input or ask clarifying questions. --ground adds codebase/market research through prp-researcher. Use prp-prd for problem discovery and feature-research for heavyweight multi-agent research.
|
|
12
12
|
|
|
13
13
|
> Part of the PRP workflow series. Parallel entry point alongside `prp-prd` — both feed directly into `prp-plan`.
|
|
14
14
|
|
|
@@ -20,14 +20,14 @@ description: Writes lightweight single-pass PRP feature specs. Use when specifyi
|
|
|
20
20
|
|
|
21
21
|
## Key Distinctions
|
|
22
22
|
|
|
23
|
-
| This skill (`prp-spec`) | NOT this (`feature-research`)
|
|
24
|
-
| ----------------------------- |
|
|
25
|
-
| Single-pass spec generation | 7-agent parallel research team
|
|
26
|
-
| `
|
|
27
|
-
| 1 output file | 8 output files (7 research + spec)
|
|
28
|
-
| Optional researcher dispatch | Always deploys full team
|
|
29
|
-
| Technical approach included | Full technical specifications
|
|
30
|
-
| 1 GATE wait for clarification | Runs without GATEs
|
|
23
|
+
| This skill (`prp-spec`) | NOT this (`feature-research`) | NOT this (`prp-prd`) |
|
|
24
|
+
| ----------------------------- | ----------------------------------- | ------------------------------- |
|
|
25
|
+
| Single-pass spec generation | 7-agent parallel research team | Interactive PRD with hypothesis |
|
|
26
|
+
| `spec` artifact | `feature-spec` + research artifacts | `prd` artifact |
|
|
27
|
+
| 1 output file | 8 output files (7 research + spec) | 1 output file |
|
|
28
|
+
| Optional researcher dispatch | Always deploys full team | Always dispatches researcher |
|
|
29
|
+
| Technical approach included | Full technical specifications | Problem-first, solution-light |
|
|
30
|
+
| 1 GATE wait for clarification | Runs without GATEs | 6 GATE waits through phases |
|
|
31
31
|
|
|
32
32
|
**Pipeline model** — `prp-spec` and `prp-prd` are parallel entry points into `prp-plan`, not sequential steps:
|
|
33
33
|
|
|
@@ -63,7 +63,7 @@ Extract flags from `$ARGUMENTS`:
|
|
|
63
63
|
| ---------- | -------------------------------------------------------------------------------------------- |
|
|
64
64
|
| `--ground` | Dispatch `prp-researcher` in dual mode for codebase + market grounding before generating |
|
|
65
65
|
|
|
66
|
-
Strip
|
|
66
|
+
Strip `--ground`, set `GROUND_MODE=true|false`. Parse and strip `--store=local|linear`, retaining the exact override as `STORE_FLAG` (empty when absent); reject other values or conflicting overrides. Forward `${STORE_FLAG}` to every resolver call. Only the remaining text is the feature description or file path.
|
|
67
67
|
|
|
68
68
|
### Input Detection
|
|
69
69
|
|
|
@@ -133,13 +133,23 @@ Instruct the researcher to return the compact discovery table format (codebase)
|
|
|
133
133
|
|
|
134
134
|
## Phase 3 — GENERATE
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
Derive `<slug>` from the kebab-case feature name. Resolve in three separate steps:
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
1. Print the mode and read `ARTIFACT_STORE=` from stdout:
|
|
139
139
|
|
|
140
|
-
```bash
|
|
141
|
-
|
|
142
|
-
```
|
|
140
|
+
```bash
|
|
141
|
+
bash "{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --shell
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
2. In linear mode only, apply the **Linear call gate** in `{{package-root}}/shared/references/artifact-store.md` before any write or `--ensure`.
|
|
145
|
+
3. Resolve the destination once writing is permitted:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
OUT="$(bash "{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --ensure --kind=spec --slug=<slug>)"
|
|
149
|
+
mkdir -p "$(dirname "$OUT")"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Before writing in linear mode, follow artifact-store.md **Planning skills**: when `linear.document` identity is missing, run Lookup steps 3–6, Load any hit and preserve its identity, then replace through Conflict and Save. Write `$OUT`. Local mode keeps `docs/prps/specs/<slug>.spec.md` under the current checkout's git toplevel without identity frontmatter. Retain the printed mode and absolute path across tool calls.
|
|
143
153
|
|
|
144
154
|
### Spec Template
|
|
145
155
|
|
|
@@ -225,7 +235,7 @@ Report to the user:
|
|
|
225
235
|
```markdown
|
|
226
236
|
## Spec Created
|
|
227
237
|
|
|
228
|
-
**File**: `
|
|
238
|
+
**File**: `{resolved absolute OUT path}`
|
|
229
239
|
|
|
230
240
|
### Summary
|
|
231
241
|
|
|
@@ -238,7 +248,7 @@ Report to the user:
|
|
|
238
248
|
### Next Steps
|
|
239
249
|
|
|
240
250
|
- Review and refine the spec
|
|
241
|
-
- Run `/ycc:prp-plan
|
|
251
|
+
- Run `/ycc:prp-plan {resolved absolute OUT path}` to create an implementation plan
|
|
242
252
|
- If the problem needs deeper discovery, run `/ycc:prp-prd` instead — it feeds into `prp-plan` directly
|
|
243
253
|
```
|
|
244
254
|
|
|
@@ -247,7 +257,7 @@ Report to the user:
|
|
|
247
257
|
## Anti-patterns — Do NOT Do These
|
|
248
258
|
|
|
249
259
|
|
|
250
|
-
2. **Do NOT
|
|
260
|
+
2. **Do NOT choose a competing output tree**: Always resolve kind `spec` through the artifact helper, regardless of the user's current working directory. It is distinct from the `feature-spec` artifact produced by `feature-research`.
|
|
251
261
|
|
|
252
262
|
3. **Do NOT write implementation details**: The spec captures WHAT and WHY, not HOW. Implementation steps, file paths, and code snippets belong in the plan produced by `prp-plan`.
|
|
253
263
|
|
|
@@ -263,9 +273,9 @@ Report to the user:
|
|
|
263
273
|
|
|
264
274
|
- **Entry point**: Parallel to `/ycc:prp-prd` — use `prp-spec` when the problem is clear, `prp-prd` when it needs interactive discovery. Both feed directly into `prp-plan`.
|
|
265
275
|
- **Input**: Accepts free-form descriptions or starts with clarifying questions. Can be invoked standalone.
|
|
266
|
-
- **Downstream**: Specs feed into `/ycc:prp-plan` for implementation planning.
|
|
276
|
+
- **Downstream**: Specs feed into `/ycc:prp-plan` for implementation planning. Pass the actual resolved path and identify it as a PRP spec (linear mode names it `spec.md`; local mode uses `.spec.md`).
|
|
267
277
|
- **Grounding**: Optionally dispatches `prp-researcher` in dual mode for codebase + market discovery.
|
|
268
|
-
- **Heavyweight alternative**: For multi-agent research across many domains, use `/ycc:feature-research` instead (
|
|
278
|
+
- **Heavyweight alternative**: For multi-agent research across many domains, use `/ycc:feature-research` instead (produces `feature-spec` and research artifacts).
|
|
269
279
|
|
|
270
280
|
## Success Criteria
|
|
271
281
|
|
|
@@ -10,9 +10,10 @@ description: Applies inline Quick Review findings without review artifacts. Use
|
|
|
10
10
|
Apply fixes from an inline Quick Review findings block without writing or
|
|
11
11
|
updating a review artifact.
|
|
12
12
|
|
|
13
|
-
**Core rule**: This skill is artifact-free. It MUST NOT create files
|
|
14
|
-
`docs/prps/reviews/`
|
|
15
|
-
update any review markdown
|
|
13
|
+
**Core rule**: This skill is artifact-free. It MUST NOT create review files in
|
|
14
|
+
any store (local `docs/prps/reviews/` or linear `.ycc/artifacts/*/reviews/`) —
|
|
15
|
+
that would lose the audit contract — it MUST NOT update any review markdown
|
|
16
|
+
file, and it makes no Linear calls. If the
|
|
16
17
|
user wants an auditable artifact, route them to `/ycc:review-fix` with a saved
|
|
17
18
|
review file instead.
|
|
18
19
|
|
|
@@ -240,7 +241,8 @@ so the user can decide whether to save a formal review artifact or fix manually.
|
|
|
240
241
|
## Relationship to review-fix
|
|
241
242
|
|
|
242
243
|
- `/ycc:quick-fix` is for ephemeral, inline quick-review findings.
|
|
243
|
-
- `/ycc:review-fix` is for artifacts
|
|
244
|
+
- `/ycc:review-fix` is for saved review artifacts (local `docs/prps/reviews/`
|
|
245
|
+
or the linear artifact-store cache and Document).
|
|
244
246
|
- Do not teach `/ycc:review-fix` to parse inline quick-review payloads; keeping
|
|
245
247
|
the workflows separate preserves the audit trail contract for artifact-backed
|
|
246
248
|
reviews.
|
|
@@ -11,13 +11,14 @@ description: Reviews uncommitted changes inline without saving by default. Use w
|
|
|
11
11
|
|
|
12
12
|
Interactive low-friction review of uncommitted changes. Output is **inline**. The default fix path is artifact-free.
|
|
13
13
|
|
|
14
|
-
**Operational context:** "Apply fixes" delegates inline findings to /ycc:quick-fix without an artifact; "Save to file" saves
|
|
14
|
+
**Operational context:** "Apply fixes" delegates inline findings to /ycc:quick-fix without an artifact; "Save to file" saves a review artifact through the artifact store (local mode: docs/prps/reviews/); "Write file and apply fixes" saves an artifact and delegates to /review-fix. Writes require confirmation unless a documented scripted action selects them.
|
|
15
15
|
|
|
16
16
|
**Input**: `$ARGUMENTS`
|
|
17
17
|
|
|
18
18
|
**Core rule**: "Apply fixes" must not write a review artifact. It hands the
|
|
19
19
|
inline findings directly to `/ycc:quick-fix`. Only "Save to file" and
|
|
20
|
-
"Write file and apply fixes" write `
|
|
20
|
+
"Write file and apply fixes" write the `quick-*-review.md` artifact (kind
|
|
21
|
+
`review-quick-<TIMESTAMP>`; local mode `docs/prps/reviews/quick-*.md`).
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
|
@@ -33,10 +34,12 @@ Extract flags from `$ARGUMENTS`:
|
|
|
33
34
|
| `--write-and-apply` | Skip the confirmation prompt, write the review artifact, then hand off to `/ycc:review-fix`. Mutually exclusive with `--yes` and `--save`. |
|
|
34
35
|
| `--severity <level>` | Forwarded to `/ycc:quick-fix` or `/ycc:review-fix` during hand-off. Valid: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`. Default: `HIGH`. Ignored on "Save to file" / "Discard". |
|
|
35
36
|
| `--no-worktree` | Accepted as a **no-op**. Quick mode never creates a worktree. Emit a note: `--no-worktree has no effect in quick mode.` |
|
|
37
|
+
| `--store=<mode>` | Artifact store override, `local` or `linear`. Forwarded to `/ycc:review-fix` on "Write file and apply fixes". |
|
|
36
38
|
|
|
37
39
|
Strip these from `$ARGUMENTS` and set `PARALLEL_MODE`, ``,
|
|
38
40
|
`AUTO_YES`, `AUTO_SAVE`, `AUTO_WRITE_AND_APPLY`, and `MIN_SEVERITY` (default
|
|
39
|
-
`HIGH`).
|
|
41
|
+
`HIGH`). Keep `--store=local|linear` verbatim as `STORE_FLAG` (empty when
|
|
42
|
+
absent). The remaining text MUST be empty; if not, abort with:
|
|
40
43
|
|
|
41
44
|
```
|
|
42
45
|
Error: /ycc:quick-review takes no positional argument (only flags).
|
|
@@ -148,7 +151,7 @@ options:
|
|
|
148
151
|
- label: "Apply fixes"
|
|
149
152
|
description: "Hand findings directly to /quick-fix. No review file is written. (recommended)"
|
|
150
153
|
- label: "Save to file"
|
|
151
|
-
description: "Write
|
|
154
|
+
description: "Write the quick-<timestamp>-review.md artifact (local mode: docs/prps/reviews/) and stop."
|
|
152
155
|
- label: "Discard"
|
|
153
156
|
description: "Write nothing, exit"
|
|
154
157
|
```
|
|
@@ -162,9 +165,9 @@ options:
|
|
|
162
165
|
- label: "Apply fixes"
|
|
163
166
|
description: "Hand findings directly to /quick-fix. No review file is written."
|
|
164
167
|
- label: "Write file and apply fixes"
|
|
165
|
-
description: "Write
|
|
168
|
+
description: "Write the quick-<timestamp>-review.md artifact, then use /ycc:review-fix for an audit trail. (recommended)"
|
|
166
169
|
- label: "Save to file"
|
|
167
|
-
description: "Write
|
|
170
|
+
description: "Write the quick-<timestamp>-review.md artifact (local mode: docs/prps/reviews/) and stop."
|
|
168
171
|
- label: "Discard"
|
|
169
172
|
description: "Write nothing, exit"
|
|
170
173
|
```
|
|
@@ -188,8 +191,10 @@ Reply synonyms (case-insensitive):
|
|
|
188
191
|
## Phase 5 — HAND-OFF
|
|
189
192
|
|
|
190
193
|
Branch on the user's selection (or auto-confirm flag). If `PARALLEL_MODE=true`
|
|
191
|
-
(Path B was used), remove the `
|
|
192
|
-
|
|
194
|
+
(Path B was used), remove the scratch directory with `rm -rf <SCRATCH_DIR>`,
|
|
195
|
+
passing its literal absolute path (the allowed `rm` forms cover only
|
|
196
|
+
`/tmp/ycc-quick-review.*` and `*/docs/prps/reviews/.review-scratch/quick-*`),
|
|
197
|
+
before exiting — **regardless of which branch below is
|
|
193
198
|
taken**, including "Discard" and "Apply fixes".
|
|
194
199
|
|
|
195
200
|
### Selection: "Discard"
|
|
@@ -217,30 +222,59 @@ Exit.
|
|
|
217
222
|
|
|
218
223
|
### Selection: "Save to file"
|
|
219
224
|
|
|
220
|
-
Write the artifact
|
|
221
|
-
block:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
Write the artifact through the artifact store using the Phase 3 content plus
|
|
226
|
+
the canonical header block:
|
|
227
|
+
|
|
228
|
+
1. Reuse the Path B/C `TIMESTAMP` if set; otherwise
|
|
229
|
+
`TIMESTAMP=$(date +%Y%m%d-%H%M%S)`.
|
|
230
|
+
2. Print the mode; read `ARTIFACT_STORE=` from stdout:
|
|
231
|
+
`"{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --shell`
|
|
232
|
+
3. Slug: local mode uses `review` (validated only; the path ignores it).
|
|
233
|
+
Linear mode applies the **Linear call gate** from
|
|
234
|
+
`{{package-root}}/shared/references/artifact-store.md`, then
|
|
235
|
+
takes the slug from its Slugs rules 2-5 (no feature name).
|
|
236
|
+
4. Resolve and create the destination:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
REVIEW_FILE="$("{{package-root}}/shared/scripts/resolve-artifact-store.sh" ${STORE_FLAG} --ensure --kind=review-quick-${TIMESTAMP} --slug=<slug>)"
|
|
240
|
+
mkdir -p "$(dirname "$REVIEW_FILE")"
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Local mode: unchanged path `docs/prps/reviews/quick-${TIMESTAMP}-review.md`
|
|
244
|
+
under the current checkout's toplevel, no identity frontmatter, no Linear
|
|
245
|
+
calls. Linear mode: `.ycc/artifacts/<slug>/reviews/quick-${TIMESTAMP}-review.md`
|
|
246
|
+
(gitignored). When the rule-only `.gitignore` check (artifact-store.md >
|
|
247
|
+
Reviews) holds, print
|
|
248
|
+
`Note: .gitignore gained the .ycc/artifacts/ rule from the artifact store; leave it out of PR commits.`
|
|
249
|
+
|
|
250
|
+
`DISPLAY_FILE` is the printed form: local mode
|
|
251
|
+
`docs/prps/reviews/quick-${TIMESTAMP}-review.md` (toplevel-relative, as
|
|
252
|
+
before); linear mode the absolute `$REVIEW_FILE`.
|
|
228
253
|
|
|
229
254
|
Write the same artifact content that was printed in Phase 3, but set
|
|
230
255
|
`**Decision**: COMMENT` in the header (since a review was produced but no
|
|
231
256
|
GitHub decision is being posted).
|
|
232
257
|
|
|
258
|
+
Linear mode: follow artifact-store.md > Review and report skills > Reviews
|
|
259
|
+
(Lookup/Load identity, then Save) for Document `<slug> · quick-<TIMESTAMP>-review`.
|
|
260
|
+
Parent: the verified `ARTIFACT_LINEAR_HINT` issue, else the feature Project,
|
|
261
|
+
else none: keep the file local only and print
|
|
262
|
+
`Review kept local: no Linear issue or Project.`
|
|
263
|
+
|
|
233
264
|
Print:
|
|
234
265
|
|
|
235
266
|
```
|
|
236
|
-
Quick review written to:
|
|
267
|
+
Quick review written to: <DISPLAY_FILE>
|
|
237
268
|
Findings: [C] {critical_count} [H] {high_count} [M] {medium_count} [L] {low_count}
|
|
238
269
|
|
|
239
270
|
Next steps:
|
|
240
|
-
/ycc:review-fix
|
|
241
|
-
/ycc:review-fix
|
|
271
|
+
/ycc:review-fix <DISPLAY_FILE> # apply fixes {recommended_single if 1-2 Open findings}
|
|
272
|
+
/ycc:review-fix <DISPLAY_FILE> --parallel # fan out fixes {recommended_parallel if 3+ Open across 2+ files}
|
|
242
273
|
```
|
|
243
274
|
|
|
275
|
+
`<DISPLAY_FILE>` is defined in step 4; in linear mode also print the
|
|
276
|
+
Document URL when saved.
|
|
277
|
+
|
|
244
278
|
Annotate ONE command with `# <- recommended`:
|
|
245
279
|
|
|
246
280
|
- 1-2 Open findings -> recommend the single-pass form.
|
|
@@ -256,15 +290,15 @@ Step 1 — write the artifact to disk exactly as in "Save to file".
|
|
|
256
290
|
Step 2 — invoke the `review-fix` skill inline via the `Skill` tool:
|
|
257
291
|
|
|
258
292
|
- `skill`: `"review-fix"`
|
|
259
|
-
- `args`: `"<REVIEW_FILE> [--parallel] [--severity <level>]"`
|
|
293
|
+
- `args`: `"<REVIEW_FILE> [--parallel] [--severity <level>] [--store=<mode>]"`
|
|
260
294
|
|
|
261
295
|
Forward `--parallel` if `PARALLEL_MODE=true`. Forward `--severity <level>` when
|
|
262
|
-
`MIN_SEVERITY != HIGH`.
|
|
296
|
+
`MIN_SEVERITY != HIGH`. Forward `STORE_FLAG` when set.
|
|
263
297
|
|
|
264
298
|
Step 3 — after the Skill call returns, print:
|
|
265
299
|
|
|
266
300
|
```
|
|
267
|
-
Fixes complete. Review artifact updated in place:
|
|
301
|
+
Fixes complete. Review artifact updated in place: <DISPLAY_FILE>
|
|
268
302
|
```
|
|
269
303
|
|
|
270
304
|
Step 4 — exit.
|
|
@@ -277,10 +311,12 @@ fix phase has its own execution decision.
|
|
|
277
311
|
## Important Notes
|
|
278
312
|
|
|
279
313
|
- **Apply fixes is artifact-free**: direct apply routes to `/ycc:quick-fix`
|
|
280
|
-
without writing `
|
|
314
|
+
without writing a `quick-*-review.md` artifact.
|
|
281
315
|
- **Scratch is the one ephemeral exception**: when Path B (`--parallel`) is
|
|
282
316
|
used, the calling skill persists each valid inline return to its scratch copy
|
|
283
|
-
at
|
|
317
|
+
at `$SCRATCH_DIR/<reviewer-name>.md` (local mode:
|
|
318
|
+
`docs/prps/reviews/.review-scratch/quick-<TIMESTAMP>/`; linear mode: a
|
|
319
|
+
`mktemp -d` directory outside the repository; never pushed)
|
|
284
320
|
during the `subagent` dispatch in Phase 2. It is always deleted at the end of
|
|
285
321
|
Phase 5 before the skill returns control to the user — including on
|
|
286
322
|
"Discard" and "Apply fixes" — so the "no file written" guarantee still
|
|
@@ -303,4 +339,5 @@ fix phase has its own execution decision.
|
|
|
303
339
|
- `/ycc:code-review --quick` delegates to this skill.
|
|
304
340
|
- `/ycc:quick-fix` consumes inline findings for artifact-free fixing.
|
|
305
341
|
- `/ycc:review-fix` consumes written artifacts only.
|
|
306
|
-
-
|
|
342
|
+
- Commit the fixes afterward by explicit path: `/ycc:prp-commit <fixed files>`,
|
|
343
|
+
never a stage-everything commit.
|
|
@@ -315,7 +315,7 @@ detect_ci() {
|
|
|
315
315
|
[[ -z "$file" ]] && continue
|
|
316
316
|
scan="$(scan_workflow "$file")"
|
|
317
317
|
branches="${branches}$(printf '%s\n' "$scan" | sed -n 's/^B //p')"$'\n'
|
|
318
|
-
if [[ -z "$publish" ]] &&
|
|
318
|
+
if [[ -z "$publish" ]] && grep -qE '^(T|R)$' <<<"$scan"; then
|
|
319
319
|
publish="${file#"${ROOT}"/}"
|
|
320
320
|
fi
|
|
321
321
|
done < <(workflow_files)
|
|
@@ -389,10 +389,16 @@ detect_sync_merges() {
|
|
|
389
389
|
|
|
390
390
|
detect_linear_refs() {
|
|
391
391
|
local base="$1" key_re='(^|[^A-Za-z0-9])[A-Z]{2,}-[0-9]+' deny_re='(CVE|UTF|ISO|RFC|SHA|PEP)-[0-9]'
|
|
392
|
-
|
|
392
|
+
# Capture each stage and match with here-strings, not a pipeline ending in
|
|
393
|
+
# `grep -q`: under pipefail the early-exiting reader SIGPIPEs the writer on
|
|
394
|
+
# repos with many refs and a present key reads as absent (YAN-1587).
|
|
395
|
+
local names filtered
|
|
396
|
+
names="$({
|
|
393
397
|
g log -n "$RECENT_COMMITS" --format='%s' "$base" 2>/dev/null
|
|
394
398
|
g for-each-ref --format='%(refname:short)' refs/heads refs/remotes
|
|
395
|
-
}
|
|
399
|
+
} || true)"
|
|
400
|
+
filtered="$(grep -Ev "$deny_re" <<<"$names" || true)"
|
|
401
|
+
if grep -Eq "$key_re" <<<"$filtered"; then
|
|
396
402
|
echo 1
|
|
397
403
|
else
|
|
398
404
|
echo 0
|
|
@@ -21,7 +21,6 @@ SCRIPT_NAME="$(basename "${BASH_SOURCE[0]}")"
|
|
|
21
21
|
# plugin-root install path; fall back to the source-tree relative path.
|
|
22
22
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
|
23
23
|
FORGE_LIB="${SCRIPT_DIR}/../../../shared/scripts/lib/forge.sh"
|
|
24
|
-
[[ -f "$FORGE_LIB" ]] || FORGE_LIB="${SCRIPT_DIR}/../../../shared/scripts/lib/forge.sh"
|
|
25
24
|
# shellcheck source=/dev/null
|
|
26
25
|
source "$FORGE_LIB"
|
|
27
26
|
|
|
@@ -219,8 +218,12 @@ if [[ "${PROVIDER}" == "github" ]]; then
|
|
|
219
218
|
fi
|
|
220
219
|
else
|
|
221
220
|
# tea has no per-tag "view"; list releases as JSON and match the tag_name.
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
# Capture the list first and match with a here-string, not
|
|
222
|
+
# `tea ... | grep -q`: under pipefail the early-exiting grep SIGPIPEs tea
|
|
223
|
+
# on a large release list and an existing release reads as absent
|
|
224
|
+
# (YAN-1587).
|
|
225
|
+
TEA_RELEASES="$(tea release list --output json 2>/dev/null || true)"
|
|
226
|
+
if grep -qE "\"tag_name\"[[:space:]]*:[[:space:]]*\"${TAG}\"" <<<"${TEA_RELEASES}"; then
|
|
224
227
|
RELEASE_EXISTS=1
|
|
225
228
|
fi
|
|
226
229
|
fi
|