@raquezha/norpiv 0.2.1 → 0.3.8

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
@@ -51,7 +51,7 @@ Rules:
51
51
  - **Refine Preserves Intent**: `/refine` should preserve product-authored text, append acceptance criteria instead of rewriting it, and only assign or link child work when ownership/dependency signals are clear.
52
52
  - **Canonical Pointer**: `.workflow/active.json` is the active RPIV pointer. Legacy `active_task.json` is compatibility-only during migration.
53
53
  - **Normalized Intake**: `/triage` writes a small local projection into `WORK.md`; tracker snapshots live in `metadata.json`, not raw CLI dumps.
54
- - **Evidence Classification & Gate**: `/frame` classifies task evidence requirements into `UI-sensitive`, `Formula-sensitive`, or `Backend-safe`, and records evidence status as `present`, `missing`, or `n/a`. Direct Zeplin screen links (`https://zpl.io/<id>`) or Figma frame URLs (`node-id`) are required for UI-sensitive work; attachments, generic links, and parent ticket links do not mark evidence `present`. For `UI-sensitive` work, `/plan` automatically consumes NoDesign preflight (`nodesign preflight`) to verify design evidence status, save task evidence to `.workflow/tasks/<task-id>/evidence/`, and distinguish missing provider access from missing design truth. Human waivers (`waived: <reason>`) unblock planning while preserving waiver audit records. Missing evidence causes `/plan` to flag dependent slices as `[BLOCKED]` and `/implement` to refuse code execution until unblocked or explicitly overridden. Backend-safe work uses status `n/a`.
54
+ - **Evidence Classification & Gate**: `/frame` classifies task evidence requirements into `UI-sensitive`, `Formula-sensitive`, or `Backend-safe`, and records evidence status as `present`, `missing`, or `n/a`. Direct Zeplin screen links (`https://zpl.io/<id>`) or Figma frame URLs (`node-id`) are required for UI-sensitive work; attachments, generic links, and parent ticket links do not mark evidence `present`. For `UI-sensitive` work, `/plan` automatically consumes NoDesign preflight (`nodesign preflight`, falling back to `npx --yes @raquezha/nodesign`) to verify design evidence status, save task evidence to `.workflow/tasks/<task-id>/evidence/`, and distinguish missing provider access from missing design truth. Human waivers (`waived: <reason>`) unblock planning while preserving waiver audit records. Missing evidence causes `/plan` to flag dependent slices as `[BLOCKED]` and `/implement` to refuse code execution until unblocked or explicitly overridden. Backend-safe work uses status `n/a`.
55
55
 
56
56
  ## 📦 Install as a skill bundle
57
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raquezha/norpiv",
3
- "version": "0.2.1",
3
+ "version": "0.3.8",
4
4
  "description": "Bundled RPIV workflow skills for Pi, Claude, and Codex-style coding agents",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -49,5 +49,8 @@
49
49
  "post-merge-prune",
50
50
  "distill"
51
51
  ]
52
+ },
53
+ "dependencies": {
54
+ "@raquezha/nodesign": "^0.1.1"
52
55
  }
53
56
  }
package/plan/SKILL.md CHANGED
@@ -16,7 +16,7 @@ Map the "how" into tracer-bullet vertical slices.
16
16
  - NEVER: create standalone `PLAN.md`.
17
17
  - NEVER: ask whether to plan if the user invoked `/plan`; produce the plan.
18
18
  - EVIDENCE BLOCKING GATE: If task evidence status is `missing` for `UI-sensitive` or `Formula-sensitive` work, `/plan` MUST flag dependent slices as `[BLOCKED: missing UI/formula evidence]` and preserve blocked status instead of marking slices ready for implementation.
19
- - AUTOMATIC NODESIGN PREFLIGHT: For `UI-sensitive` work, `/plan` MUST automatically consume or run NoDesign preflight (`nodesign preflight --json --path . --task <source>:<id>`) without requiring manual preflight CLI execution.
19
+ - AUTOMATIC NODESIGN PREFLIGHT: For `UI-sensitive` work, `/plan` MUST automatically consume or run NoDesign preflight (`nodesign preflight --json --path . --task <source>:<id>`; fallback `npx --yes @raquezha/nodesign preflight --json --path . --task <source>:<id>` if `nodesign` is not on PATH) without requiring manual preflight CLI execution.
20
20
  - EVIDENCEMAPPING: Map NoDesign preflight evidence status to RPIV evidence status: `ready` -> `present`, `missing` or `ambiguous` -> `missing`.
21
21
  - PROVIDER FAULT ISOLATION: Distinguish provider auth/access failures (`AUTH_REQUIRED`, `AUTH_REJECTED`, `ACCESS_DENIED`, `RATE_LIMITED`, `API_UNAVAILABLE`) from missing design evidence truth (`DESIGN_NOT_FOUND`, missing direct `node-id` / screen URL). Surface missing credentials or API access cleanly without treating provider auth errors as product specification failure.
22
22
  - CREDENTIAL SAFETY: Never request or pass NoDesign API tokens through model context; resolve credentials from OS keychain, environment variables, or `~/.pi-secrets/.env`.
@@ -25,7 +25,7 @@ Map the "how" into tracer-bullet vertical slices.
25
25
 
26
26
  ## Workflow
27
27
  1. Read the brief and grill decisions.
28
- 2. **Automatic NoDesign Preflight (UI-sensitive)**: If evidence category is `UI-sensitive`, invoke or consume `nodesign preflight --json --path . --task <source>:<id>`. Map `ready` status to `present`, and `missing` or `ambiguous` to `missing`. If credentials or provider access are missing (`AUTH_REQUIRED`, `ACCESS_DENIED`), surface the provider issue explicitly instead of mistaking it for a missing product design URL.
28
+ 2. **Automatic NoDesign Preflight (UI-sensitive)**: If evidence category is `UI-sensitive`, invoke or consume `nodesign preflight --json --path . --task <source>:<id>` (or `npx --yes @raquezha/nodesign preflight --json --path . --task <source>:<id>` when the binary is unavailable). Map `ready` status to `present`, and `missing` or `ambiguous` to `missing`. If credentials or provider access are missing (`AUTH_REQUIRED`, `ACCESS_DENIED`), surface the provider issue explicitly instead of mistaking it for a missing product design URL.
29
29
  3. **Branch Check**: Verify the current git branch. Planning on `main` is safe and encouraged. If you are on an unrelated feature branch, warn the human that the plan is being made on a stale or mismatched context.
30
30
  3. Draft thin vertical slices that are independently verifiable.
31
31
  4. Mark each slice:
@@ -6,18 +6,11 @@ SAFE_PWD=$(pwd | sed 's/\//-/g' | sed 's/^-/--/')
6
6
  TARGET_DIR="$HOME/.pi/agent/sessions/${SAFE_PWD}--"
7
7
 
8
8
  if [ -d "$TARGET_DIR" ]; then
9
- LATEST_FILE=$(ls -t "$TARGET_DIR" | head -n 1 2>/dev/null)
10
- if [ -n "$LATEST_FILE" ]; then
11
- PROVIDER=$(cat "$TARGET_DIR/$LATEST_FILE" | grep -o '"provider":"[^"]*"' | tail -n 1 | cut -d'"' -f4)
12
- MODEL=$(cat "$TARGET_DIR/$LATEST_FILE" | grep -o '"model":"[^"]*"' | tail -n 1 | cut -d'"' -f4)
13
-
14
- if [ -n "$MODEL" ]; then
15
- # If provider exists, prefix it, otherwise just return model
16
- if [ -n "$PROVIDER" ]; then
17
- echo "$PROVIDER:$MODEL"
18
- else
19
- echo "UnknownProvider:$MODEL"
20
- fi
9
+ LATEST_FILE=$(find "$TARGET_DIR" -maxdepth 1 -type f -exec stat -f "%m %N" {} + 2>/dev/null | sort -rn | head -n 1 | cut -d' ' -f2-)
10
+ if [ -n "$LATEST_FILE" ] && [ -f "$LATEST_FILE" ]; then
11
+ MODEL_INFO=$(jq -r 'select(.provider != null or .message.provider != null) | "\(.provider // .message.provider):\(.modelId // .model // .message.model)"' "$LATEST_FILE" 2>/dev/null | tail -n 1)
12
+ if [ -n "$MODEL_INFO" ] && [ "$MODEL_INFO" != "null:null" ]; then
13
+ echo "$MODEL_INFO"
21
14
  exit 0
22
15
  fi
23
16
  fi
@@ -44,7 +44,7 @@ ISO_NOW=$(LC_TIME=C date -u +"%Y-%m-%dT%H:%M:%SZ")
44
44
  # Sanitize local ID if generic (case-insensitive check)
45
45
  ID_LOWER=$(echo "$ID" | tr '[:upper:]' '[:lower:]')
46
46
  if [[ "$SOURCE" == "local" && "$ID_LOWER" =~ ^(problem|task|issue|work|todo)$ ]]; then
47
- ID=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9]/-/g')
47
+ ID="${BRANCH_NAME//[^a-zA-Z0-9]/-}"
48
48
  echo "Generic local ID detected. Falling back to branch-derived name '$ID'..."
49
49
  fi
50
50