@juicesharp/rpiv-pi 2.4.0 → 2.5.1
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 +6 -6
- package/docs/architecture.md +3 -3
- package/docs/skills.md +3 -1
- package/docs/workflows.md +8 -2
- package/extensions/rpiv-core/built-in-workflows.ts +277 -243
- package/extensions/rpiv-core/built-ins/index.ts +27 -0
- package/extensions/rpiv-core/built-ins/markdown-fence.ts +108 -0
- package/extensions/rpiv-core/built-ins/shared.ts +153 -0
- package/extensions/rpiv-core/lane-console.ts +9 -1
- package/extensions/rpiv-core/lane-list.ts +43 -6
- package/extensions/rpiv-core/lane-progress.ts +49 -4
- package/extensions/rpiv-core/pipeline-pointer.ts +1 -1
- package/extensions/rpiv-core/run-lane-registry.ts +46 -21
- package/package.json +3 -3
- package/skills/quick-plan/SKILL.md +165 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quick-plan
|
|
3
|
+
description: "Produce a single unsliced, consistently-phased implementation plan for a small, well-understood task and write it directly to .rpiv/artifacts/plans/ with status: ready — one non-interactive pass, no slice decomposition, no in-skill review (the workflow's grade and validate stages are the gates). Dispatched by the ship preset's plan stage; also usable standalone for a small task whose research is done or whose shape is obvious. Prefer blueprint for multi-component features needing slice-by-slice micro-checkpoints, and plan when turning an existing design artifact into phases."
|
|
4
|
+
argument-hint: "[research artifact path or feature description]"
|
|
5
|
+
shell-timeout: 10
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
contract:
|
|
8
|
+
produces:
|
|
9
|
+
kind: produces
|
|
10
|
+
meta:
|
|
11
|
+
artifactKind: plan
|
|
12
|
+
data:
|
|
13
|
+
type: object
|
|
14
|
+
required: [phases, phase_count]
|
|
15
|
+
properties:
|
|
16
|
+
status:
|
|
17
|
+
enum: [ready]
|
|
18
|
+
phase_count:
|
|
19
|
+
type: integer
|
|
20
|
+
minimum: 1
|
|
21
|
+
maximum: 32
|
|
22
|
+
phases:
|
|
23
|
+
type: array
|
|
24
|
+
minItems: 1
|
|
25
|
+
maxItems: 32
|
|
26
|
+
items:
|
|
27
|
+
type: object
|
|
28
|
+
required: [n, title]
|
|
29
|
+
properties:
|
|
30
|
+
n: { type: integer, minimum: 1 }
|
|
31
|
+
title: { type: string }
|
|
32
|
+
consumes:
|
|
33
|
+
meta:
|
|
34
|
+
artifactKind: [research]
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# Quick Plan
|
|
38
|
+
|
|
39
|
+
You produce a **single, unsliced, consistently-phased** implementation plan for a small, well-understood task and write it directly to `.rpiv/artifacts/plans/` with `status: ready`. One non-interactive pass — no slice decomposition, no skeleton-then-fill, no in-skill review. The workflow's `grade` and `validate` stages (or your own review, standalone) are the gates; this skill only emits the artifact those gates parse.
|
|
40
|
+
|
|
41
|
+
The expected shape is **one phase** (the small-task default). Add a phase only when the task genuinely splits into independently-verifiable units that share no file. This is the trimmed mimic of `blueprint`'s artifact shape minus every step that exists to produce _confidence in_ the artifact.
|
|
42
|
+
|
|
43
|
+
## Input
|
|
44
|
+
|
|
45
|
+
`$ARGUMENTS` — one of four shapes (the skill is sound however the caller wires it):
|
|
46
|
+
|
|
47
|
+
- **Flags (workflow dispatch)** — `--research <path> --goal <path>`. Read BOTH files FULLY (no limit/offset). The research doc is the grounding; the goal file is the verbatim brief — every ask it names is either implemented by a phase or deferred under `## Out of Scope`.
|
|
48
|
+
- **Research artifact path** — a `.md` path under `.rpiv/artifacts/research/`. Read it FULLY (no limit/offset); it is the grounding for the plan.
|
|
49
|
+
- **Injected research** — when dispatched by a workflow `reads: ["research"]` stage, the research doc is already in context; treat `$ARGUMENTS` as the task description / goal.
|
|
50
|
+
- **Free-text** (standalone small task) — `$ARGUMENTS` is the task description; research is done or the shape is obvious.
|
|
51
|
+
|
|
52
|
+
If `$ARGUMENTS` is empty AND no research doc is in context, print an error and stop — there is nothing to plan from.
|
|
53
|
+
|
|
54
|
+
## Metadata
|
|
55
|
+
|
|
56
|
+
```!
|
|
57
|
+
node "${SKILL_DIR}/../_shared/now.mjs"
|
|
58
|
+
echo
|
|
59
|
+
node "${SKILL_DIR}/../_shared/git-context.mjs"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Copy values verbatim. `<iso>` is the first tab-separated field (use as `date:`); `<slug>` is the second.
|
|
63
|
+
|
|
64
|
+
## Flow
|
|
65
|
+
|
|
66
|
+
1. Input → 2. Optional single targeted research → 3. Write plan (`status: ready`)
|
|
67
|
+
|
|
68
|
+
## Steps
|
|
69
|
+
|
|
70
|
+
### Step 1: Read the input
|
|
71
|
+
|
|
72
|
+
- If a research artifact path was given, read it FULLY. Extract the task, the Code References (`file:line`), the Integration Points, and any Open Questions already resolved.
|
|
73
|
+
- If a `--goal` file was given, read it FULLY and enumerate every ask it names; each is either implemented by a phase or deferred under `## Out of Scope` with a reason (when the research narrowed the brief, its rationale is the deferral reason).
|
|
74
|
+
- Read the key source files the research points at — the anchors the plan will cite — so the phase's code blocks and `file:line` references are real and current.
|
|
75
|
+
- Determine the goal (the `--goal` brief, the task description, or the research's stated goal).
|
|
76
|
+
|
|
77
|
+
### Step 2: Optional single targeted research (at most ONE dispatch)
|
|
78
|
+
|
|
79
|
+
You may dispatch **at most one** `codebase-pattern-finder` agent to find the implementation pattern to model the code after — only if the research did not already surface one. **Never parallel, never `run_in_background`**: a background completion cannot re-drive this session, so the skill would end its turn before writing the plan and the stage would fail with no artifact.
|
|
80
|
+
|
|
81
|
+
Spawn the agent using the Agent tool:
|
|
82
|
+
|
|
83
|
+
- subagent_type: `codebase-pattern-finder`
|
|
84
|
+
- Prompt: "Find the implementation pattern I should model after for {task}. Single pass."
|
|
85
|
+
|
|
86
|
+
If the research already gave you the pattern (Code References + Integration Points), **skip this step entirely** — most small, well-understood tasks need no dispatch.
|
|
87
|
+
|
|
88
|
+
### Step 3: Write the plan (`status: ready`)
|
|
89
|
+
|
|
90
|
+
Write the plan **in one pass** to `.rpiv/artifacts/plans/<slug>_<description>.md` (`<slug>` from the Metadata block; `<description>` is a brief kebab-case summary). Set frontmatter `status: ready` directly — there is no `in-progress`/`in-review` transition. **Do not author a `risks:` frontmatter array** (see Important Notes).
|
|
91
|
+
|
|
92
|
+
The artifact MUST be **consistently phased**: frontmatter `phases:` array length == number of `## Phase N:` headings == scalar `phase_count`. Any drift and `planPhaseRecords` halts the workflow at plan time. Single phase is the default.
|
|
93
|
+
|
|
94
|
+
Use this template (single-phase shown; replicate the `## Phase N:` block per phase only when genuinely multi-phase):
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
---
|
|
98
|
+
date: {<iso> from Metadata block}
|
|
99
|
+
author: {`author:` from Metadata block}
|
|
100
|
+
commit: {Current commit hash}
|
|
101
|
+
branch: {Current branch name}
|
|
102
|
+
repository: {`repo:` from Metadata block}
|
|
103
|
+
topic: "{task name}"
|
|
104
|
+
tags: [plan]
|
|
105
|
+
status: ready
|
|
106
|
+
phase_count: 1
|
|
107
|
+
phases:
|
|
108
|
+
- { n: 1, title: {Phase 1 title}, files: [{every repo-root-relative path Phase 1 creates/edits}], depends_on: [] }
|
|
109
|
+
last_updated: {same <iso> as date:}
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
# {Task Name} Implementation Plan
|
|
113
|
+
|
|
114
|
+
## Overview
|
|
115
|
+
|
|
116
|
+
{1-3 sentences: what this plan implements and why.}
|
|
117
|
+
|
|
118
|
+
## Out of Scope
|
|
119
|
+
|
|
120
|
+
{One line per goal ask this plan does not implement — "- {ask} — deferred: {reason}". Omit the section when every named ask is covered.}
|
|
121
|
+
|
|
122
|
+
## Phase 1: {Descriptive Title}
|
|
123
|
+
|
|
124
|
+
### Overview
|
|
125
|
+
{One sentence: what this phase delivers.}
|
|
126
|
+
|
|
127
|
+
### Changes Required:
|
|
128
|
+
|
|
129
|
+
#### 1. {repo-root-relative/path/to/file.ext}
|
|
130
|
+
**File**: `repo-root-relative/path/to/file.ext`
|
|
131
|
+
**Changes**: {NEW | MODIFY} — {one-line summary}
|
|
132
|
+
|
|
133
|
+
```{language}
|
|
134
|
+
// Copy-pasteable code — the full function/section to add, or the exact edit,
|
|
135
|
+
// grounded in the current tree. implement applies this without guessing.
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Success Criteria:
|
|
139
|
+
|
|
140
|
+
#### Automated Verification:
|
|
141
|
+
- [ ] {One self-contained command that exits 0 when the criterion holds, write-scoped to THIS phase's `files:` set — e.g. `npm run check:files -- <this phase's paths>`}
|
|
142
|
+
- [ ] {Read-only whole-tree check — e.g. `npx tsc --noEmit -p tsconfig.base.json`}
|
|
143
|
+
- [ ] {Phase-scoped test — e.g. `npx vitest run <this phase's test path>`}
|
|
144
|
+
|
|
145
|
+
#### Manual Verification:
|
|
146
|
+
- [ ] {Human check — UI, real-conditions behavior, edge case}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Populate each `phases[].files:` from that phase's `#### N.` / `**File**:` paths — every repo-root-relative path the phase creates or edits — or the plan-time coverage floor (`planCitationCheck`) flags a gap. Make every `#### Automated Verification:` command write-scoped to its own phase's `files:` set; phases may run concurrently under implement, so an unscoped command that rewrites the wider tree corrupts a sibling phase's edit.
|
|
150
|
+
|
|
151
|
+
Populate `## Out of Scope` from the Step 1 goal-ask enumeration: one one-line deferral with a reason per goal ask no phase implements.
|
|
152
|
+
|
|
153
|
+
Then print the path and a one-line summary: `quick-plan written: {N} phase(s), {M} files`.
|
|
154
|
+
|
|
155
|
+
## Important Notes
|
|
156
|
+
|
|
157
|
+
- **Consistently phased, always.** `phases:` length == `## Phase N:` heading count == scalar `phase_count`. A half-phased plan throws at plan time. Single phase is the small-task default — only split when units are independently verifiable and share no file.
|
|
158
|
+
- **No `risks:` frontmatter — this is the correctness lightening.** The `grade` skill's `correctness` risk-flag adjudication (the heaviest correctness sub-check, with its mechanics-evidence and verify-at-implement duties) fires **only** when the artifact carries `risks:`. With none declared, `risk_rulings` is omitted and adjudication auto-skips — the grade runs the cheap spot-check path. Do NOT invent a `"correctness-simplified"` dimension (grade does not recognize it and would deadlock the gate); the lightening is realized by the plan's shape, not by a new dimension.
|
|
159
|
+
- **One Write, `status: ready` directly.** No skeleton-then-fill, no progressive `Edit`, no 3-state status machine. The artifact is gated externally (the workflow's `grade` + `validate`, or your own review standalone).
|
|
160
|
+
- **At most ONE `codebase-pattern-finder` dispatch.** Never parallel, never `run_in_background` — a background completion cannot re-drive this session and the stage fails with no artifact. Skip the dispatch when research already surfaced the pattern.
|
|
161
|
+
- **Non-interactive.** No `ask_user_question` checkpoint. A checkpoint without blueprint's dimension sweep is pure latency on a fast-path preset whose output is immediately grade-gated. Resolve ambiguity from the research and the real code; if a genuine fork can't be settled, make the most defensible call and let the grade panel catch it.
|
|
162
|
+
- **Defer explicitly, never silently.** Every goal ask no phase implements gets a one-line `## Out of Scope` deferral with a reason — the completeness gate blocks on a named ask that is neither addressed nor deferred.
|
|
163
|
+
- **Ground every citation.** Every `file:line` in prose or code comments uses a repo-root-relative path and is verifiable at the current revision — the plan passes the deterministic `plan-cite-check` floor.
|
|
164
|
+
- **NEVER edit source files.** This skill produces a plan document, not implementation. Source editing is `implement`'s job.
|
|
165
|
+
- **Drops blueprint's ceremony by design:** multi-slice decomposition, skeleton-then-fill, the per-slice `slice-verifier` loop, the dual post-finalization review (`artifact-code-reviewer` + `artifact-coverage-reviewer`), the 6-dimension sweep, and parallel research are all absent here — the workflow's own gates own that confidence.
|