@raquezha/norpiv 0.0.6 → 0.0.7

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  RPIV: a gated workflow for reliable AI coding agents.
4
4
 
5
+ RPIV is one implementation of the broader `nothing` Workflow Contract. The contract defines the generic shape for workflows such as RPIV and Research, focusing on 3 Real Modes (Chat, Research, RPIV) tracked by `.workflow/active.json`.
6
+
7
+ Standalone package usage still works: `@raquezha/norpiv` includes the RPIV skills, `distill`, and helper scripts needed for handoff. The local Research workflow lives separately under `packages/workflows/noresearch`. The platform-level contract lives in the source repo at <https://github.com/raquezha/nothing/blob/main/docs/workflow.md>.
8
+
5
9
  ## 🔁 The Lifecycle
6
10
 
7
11
  The RPIV engine splits task execution into separate, focused phases:
@@ -112,6 +116,8 @@ Obsidian note → /triage → RPIV (only when ready to commit)
112
116
 
113
117
  `distill` is the missing layer before RPIV. Use `pi --notes` to load it.
114
118
 
119
+ Research is a separate local workflow bundle in `packages/workflows/noresearch` and is loaded by the full `nothing` setup with `pi --research`.
120
+
115
121
  ## 🚀 Quick Start Example
116
122
 
117
123
  1. **Activate the RPIV Hat** from the full `nothing` setup:
package/frame/SKILL.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  name: frame
3
+ workflow: rpiv
4
+ workflowPhase: frame
3
5
  description: Define the task brief inside the active WORK.md. Use after /triage to convert issue data into a clear Problem or Proposal brief without creating separate PROBLEM.md or PRD.md files.
4
6
  ---
5
7
 
@@ -8,7 +10,7 @@ description: Define the task brief inside the active WORK.md. Use after /triage
8
10
  Turn raw task context into the stable "what/why" brief.
9
11
 
10
12
  ## Guardrails
11
- - READ: `.workflow/active_task.json`, `.workflow/tasks/[active_task]/WORK.md`, and `.reposcry/AI_CONTEXT.md` when present.
13
+ - READ: `.workflow/active.json` / `.workflow/active_task.json`, active `WORK.md`, and `.reposcry/AI_CONTEXT.md` when present.
12
14
  - WRITE: `WORK.md` -> `[BRIEF]` section and append to `[LOG]` only; optional `.reposcry/AI_CONTEXT.md` when RepoScry is installed.
13
15
  - NEVER: create `PROBLEM.md`, `PRD.md`, or extra planning files.
14
16
  - NEVER: overwrite `[PLAN]` or `[GRILL]`.
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  name: grill-with-docs
3
+ workflow: rpiv
4
+ workflowPhase: grill-with-docs
3
5
  description: Stress-test the active WORK.md brief against docs, code, and domain language. Use after /frame before planning to clarify assumptions and update durable docs only when decisions are stable.
4
6
  ---
5
7
 
@@ -8,7 +10,7 @@ description: Stress-test the active WORK.md brief against docs, code, and domain
8
10
  Challenge the brief before planning. This replaces passive ubiquitous-language collection with active clarification.
9
11
 
10
12
  ## Guardrails
11
- - READ: `.workflow/active_task.json`, active `WORK.md` `[BRIEF]`, `CONTEXT.md`, relevant `docs/agents/*`, and `.reposcry/AI_CONTEXT.md` when present.
13
+ - READ: `.workflow/active.json` / `.workflow/active_task.json`, active `WORK.md` `[BRIEF]`, `CONTEXT.md`, relevant `docs/agents/*`, and `.reposcry/AI_CONTEXT.md` when present.
12
14
  - WRITE: `WORK.md` -> append to `[GRILL]` and `[LOG]` only; durable docs only when a stable rule is confirmed.
13
15
  - NEVER: edit `[BRIEF]` silently; propose brief changes if contradictions are found.
14
16
  - NEVER: plan or implement during grilling.
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  name: implement
3
+ workflow: rpiv
4
+ workflowPhase: implement
3
5
  description: Implement the next approved vertical slice from the active WORK.md and prepare a Draft PR/MR. Use when the plan is approved and the user explicitly asks to implement.
4
6
  ---
5
7
 
@@ -8,7 +10,7 @@ description: Implement the next approved vertical slice from the active WORK.md
8
10
  Execute one functional vertical slice and hand it to the human for review.
9
11
 
10
12
  ## Guardrails
11
- - READ: `.workflow/active_task.json` then active `WORK.md` `[PLAN]`, `[BRIEF]`, and relevant `[LOG]` evidence.
13
+ - READ: `.workflow/active.json` / `.workflow/active_task.json` then active `WORK.md` `[PLAN]`, `[BRIEF]`, and relevant `[LOG]` evidence.
12
14
  - WRITE: code changes and `WORK.md` -> append to `[LOG]` only; optional `.reposcry/` cache refresh when RepoScry is installed.
13
15
  - NEVER: edit `[BRIEF]` or `[GRILL]`.
14
16
  - NEVER: implement without explicit user instruction.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raquezha/norpiv",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Bundled RPIV workflow skills for Pi, Claude, and Codex-style coding agents",
5
5
  "type": "commonjs",
6
6
  "bin": {
package/plan/SKILL.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  name: plan
3
+ workflow: rpiv
4
+ workflowPhase: plan
3
5
  description: Create or revise vertical implementation slices in the active WORK.md. Use after /grill-with-docs to produce a concise, reviewable plan for implementation.
4
6
  ---
5
7
 
@@ -8,7 +10,7 @@ description: Create or revise vertical implementation slices in the active WORK.
8
10
  Map the "how" into tracer-bullet vertical slices.
9
11
 
10
12
  ## Guardrails
11
- - READ: `.workflow/active_task.json` then active `WORK.md` `[BRIEF]` and `[GRILL]`.
13
+ - READ: `.workflow/active.json` / `.workflow/active_task.json` then active `WORK.md` `[BRIEF]` and `[GRILL]`.
12
14
  - WRITE: `WORK.md` -> `[PLAN]` and append to `[LOG]` only.
13
15
  - NEVER: implement code during planning.
14
16
  - NEVER: create standalone `PLAN.md`.
@@ -120,13 +120,13 @@ PY
120
120
 
121
121
  write_active_pointer() {
122
122
  mkdir -p ".workflow"
123
- python3 - ".workflow/active_task.json" "$TASK_FOLDER" "$SOURCE" "$ID" "$TASK_DIR" "$BRANCH_NAME" <<'PY'
123
+ python3 - ".workflow/active_task.json" ".workflow/active.json" "$TASK_FOLDER" "$SOURCE" "$ID" "$TASK_DIR" "$WORK_MD" "$BRANCH_NAME" "$ISO_NOW" <<'PY'
124
124
  import json
125
125
  import sys
126
126
  from pathlib import Path
127
127
 
128
- path, active_task, source, raw_id, task_path, branch = sys.argv[1:]
129
- data = {
128
+ active_task_path, active_workflow_path, active_task, source, raw_id, task_path, state_file, branch, now = sys.argv[1:]
129
+ legacy_data = {
130
130
  "active_task": active_task,
131
131
  "source": source,
132
132
  "id": raw_id,
@@ -135,7 +135,22 @@ data = {
135
135
  "path": task_path,
136
136
  "branch": branch,
137
137
  }
138
- Path(path).write_text(json.dumps(data, indent=2) + "\n")
138
+ workflow_data = {
139
+ "workflow": "rpiv",
140
+ "id": active_task,
141
+ "taskId": active_task,
142
+ "source": source,
143
+ "sourceId": raw_id,
144
+ "stateFile": state_file,
145
+ "taskPath": task_path,
146
+ "path": task_path,
147
+ "branch": branch,
148
+ "startedAt": now,
149
+ "updatedAt": now,
150
+ "compatPointer": ".workflow/active_task.json",
151
+ }
152
+ Path(active_task_path).write_text(json.dumps(legacy_data, indent=2) + "\n")
153
+ Path(active_workflow_path).write_text(json.dumps(workflow_data, indent=2) + "\n")
139
154
  PY
140
155
  }
141
156
 
package/sync/SKILL.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  name: sync
3
+ workflow: rpiv
4
+ workflowPhase: sync
3
5
  description: Synchronizes local RPIV task state (WORK.md) to external trackers (Jira, GitHub, GitLab). Use this to publish progress, update implementation status, and maintain a durable audit trail between local development and remote project management tools.
4
6
  ---
5
7
 
@@ -8,7 +10,7 @@ description: Synchronizes local RPIV task state (WORK.md) to external trackers (
8
10
  Maintains consistency between local `.workflow` state and the remote source of truth using a single Pi-owned living status comment per task.
9
11
 
10
12
  ## Guardrails
11
- - **Pre-flight**: Always read `.workflow/active_task.json` and the active `WORK.md` before executing.
13
+ - **Pre-flight**: Always read `.workflow/active.json` / `.workflow/active_task.json` and the active `WORK.md` before executing.
12
14
  - **Privacy**: NEVER sync secrets, environment variables, or private notes not intended for stakeholders.
13
15
  - **Integrity**: Do not modify `[BRIEF]` or `[GRILL]` sections.
14
16
  - **Idempotency**: If the remote Pi status already reflects the current local state, do not post or update.
@@ -44,7 +46,7 @@ Do **not** use latest-comment ownership as the primary decision. Latest-comment-
44
46
  ## Workflow
45
47
 
46
48
  ### 1. Discovery & State Loading
47
- - Identify the platform and ID from `.workflow/active_task.json`.
49
+ - Identify the platform and ID from `.workflow/active.json` or compatibility `.workflow/active_task.json`.
48
50
  - Extract **Slices** from `[PLAN]`, **Status** from `[LOG]`, and **Artifacts** such as PR/MR links, commit hashes, and verification output.
49
51
 
50
52
  ### 2. Payload Preparation
package/triage/SKILL.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  name: triage
3
+ workflow: rpiv
4
+ workflowPhase: triage
3
5
  description: "Ingest or resume a tracked/local task in the RPIV workspace. Use when starting or returning to jira:, github:, gitlab:, or local: work and you need canonical WORK.md state without duplicating the scaffold."
4
6
  ---
5
7
 
@@ -8,10 +10,10 @@ description: "Ingest or resume a tracked/local task in the RPIV workspace. Use w
8
10
  Start RPIV by creating, resuming, or explicitly reopening a task workspace.
9
11
 
10
12
  ## Guardrails
11
- - READ: user argument, `.workflow/active_task.json` if present, target `metadata.json`, and target `WORK.md` if resuming.
12
- - WRITE: `.workflow/tasks/[source-id]/WORK.md`, `.workflow/tasks/[source-id]/metadata.json`, `.workflow/active_task.json`; optional `.reposcry/` cache files only if RepoScry is installed.
13
+ - READ: user argument, `.workflow/active.json` / `.workflow/active_task.json` if present, target `metadata.json`, and target `WORK.md` if resuming.
14
+ - WRITE: `.workflow/tasks/[source-id]/WORK.md`, `.workflow/tasks/[source-id]/metadata.json`, `.workflow/active.json`, `.workflow/active_task.json`; optional `.reposcry/` cache files only if RepoScry is installed.
13
15
  - On **create**, initialize required guarded sections only if absent: `[BRIEF]`, `[GRILL]`, `[PLAN]`, `[LOG]`, `[META]`.
14
- - On **resume**, only update `.workflow/active_task.json`, metadata timestamps/state as needed, and `[META]`, then append one concise `[LOG]` entry.
16
+ - On **resume**, only update `.workflow/active.json`, `.workflow/active_task.json`, metadata timestamps/state as needed, and `[META]`, then append one concise `[LOG]` entry.
15
17
  - NEVER: duplicate guarded sections.
16
18
  - NEVER: overwrite existing `[BRIEF]`, `[GRILL]`, or `[PLAN]` during triage.
17
19
  - NEVER: create `PROBLEM.md`, `PRD.md`, `PLAN.md`, or `EVIDENCE.md`.
package/verify/SKILL.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  name: verify
3
+ workflow: rpiv
4
+ workflowPhase: verify
3
5
  description: Verify the active slice or task against WORK.md, quality gates, and review readiness. Use after implementation or manual changes to decide whether work is ready for sync, review, or post-merge-prune.
4
6
  ---
5
7
 
@@ -8,7 +10,7 @@ description: Verify the active slice or task against WORK.md, quality gates, and
8
10
  The final gate for a slice or task. Verify truth before reporting progress.
9
11
 
10
12
  ## Guardrails
11
- - READ: `.workflow/active_task.json`, active `WORK.md` `[BRIEF]`, `[PLAN]`, and `[LOG]`.
13
+ - READ: `.workflow/active.json` / `.workflow/active_task.json`, active `WORK.md` `[BRIEF]`, `[PLAN]`, and `[LOG]`.
12
14
  - WRITE: `WORK.md` -> `[PLAN]` checkboxes and append to `[LOG]` only.
13
15
  - NEVER: add `Signed-off-by`; tell the human to sign if needed.
14
16
  - NEVER: transition tracker state if verification fails.
@@ -1,55 +0,0 @@
1
- ---
2
- name: post-merge-prune
3
- description: "Post-merge branch cleanup only. Use after a PR/MR is merged and the local feature branch is stale: prune remote refs and delete local branches already merged into the target branch."
4
- ---
5
-
6
- # Skill: post-merge-prune
7
-
8
- > [!IMPORTANT]
9
- > **LLM INSTRUCTION**: This skill is a deliberate post-merge deletion tool. If the user invokes `post-merge-prune`, they want stale local branches removed after merge into the intended target branch. Do not offer a menu of options. Do not ask "Dry run or Execute?". Proceed directly.
10
-
11
- Use this skill after a PR/MR has been merged into its intended branch, typically `main`, to remove stale remote-tracking refs and delete the matching local branches because the work is done.
12
-
13
- ## Goal
14
- - Switch to the intended target branch (`main` by default).
15
- - Prune deleted remote branches.
16
- - Delete local branches that are already merged into the target branch.
17
- - Optionally remove matching workflow task folders.
18
-
19
- ## Workflow
20
-
21
- ### Step 1: Go to the target branch
22
- - `git checkout main` (or the intended merge target)
23
- - If the tree is dirty, stash first.
24
-
25
- ### Step 2: Prune remote-tracking refs
26
- - `git remote update origin --prune`
27
- - This removes local refs for remote branches that were deleted after merge.
28
-
29
- ### Step 3: Delete merged local branches
30
- Iterate through local branches and delete the ones already merged into the target branch:
31
- - Use `git branch -d <branch>` for normal merges.
32
- - If `-d` refuses but `git log main..[branch]` is empty, the branch was squash-merged; use `git branch -D <branch>`.
33
- - Never delete the active target branch.
34
-
35
- ### Step 4: Optional workflow cleanup
36
- If a deleted branch has a matching `.workflow/tasks/*` folder, remove it.
37
- If `.workflow/active_task.json` points to a deleted task, clear it.
38
-
39
- ### Step 5: Verify
40
- - `git branch -a` should no longer show deleted refs.
41
- - `git branch --merged main` should only show branches you intend to keep.
42
- - `.workflow/tasks/` should not contain deleted tasks.
43
-
44
- ## Guardrails
45
- - **RESOLUTION OVER REPORTING**: If merge status is unclear, check `git branch --merged main` or `git log main..branch` and resolve it.
46
- - **NO DRY RUNS BY DEFAULT**: Execute the cleanup unless the user explicitly asks for a preview.
47
- - **SMART DELETE**: If a branch is squash-merged, delete it with `git branch -D` after confirming there are no unique commits left.
48
- - **ACTIVE BRANCH PROTECTION**: Do not delete the current branch.
49
- - **UNMERGED WORK**: If a branch has unique commits and no remote, ask once before force-deleting.
50
-
51
- ## Output Contract
52
- Return a concise report:
53
- - **Cleaned**: deleted branches / task folders
54
- - **Kept**: branches still in use
55
- - **Working Branch**: the branch left checked out (should be `main`)