paqad-ai 1.65.0 → 1.66.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # paqad-ai
2
2
 
3
+ ## 1.66.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 87c8153: Wire the idle planning skills into the enforced stage contract (#359): four fully-built-but-never-invoked planning helpers now run when relevant, and only when relevant.
8
+
9
+ - The enforced feature-development **planning stage** gains three lane-gated instruction blocks, sourced from one shared set of constants so the default policy object and the rendered `feature-development.yaml` cannot drift: an all-lanes reuse reflex (consult the Existing surface + `index query`, follow the solution-architect Reuse / Extend / Build-new procedure), a graduated/full block that runs `diff-minimizer` before the plan compiles and `existing-doc-checker` before any new doc, and a graduated/full multi-module block that runs `cross-module-impact-scanner`.
10
+ - **Lane honesty:** a fast-lane change pays exactly one sentence; no skill procedure loads for it. A new `reusePlanningInstructions(lane, { multiModule })` assembler is the single source of that lane-gating logic.
11
+ - The #357 plan schema now accepts an optional per-step `classification` (`ac-satisfying` | `necessary-setup` | `scaffolding` | `over-build`) so a diff-minimizer verdict can ride in the compiled `plan.json`; a plan without it stays valid.
12
+ - No new hook and no new runtime gate — the skills feed fields the schema already checks, and the wired-vs-sidelined map in the onboarded-project overview is updated to keep it honest.
13
+
3
14
  ## 1.65.0
4
15
 
5
16
  ### Minor Changes
package/dist/cli/index.js CHANGED
@@ -8154,6 +8154,16 @@ var init_paths2 = __esm({
8154
8154
  import { existsSync as existsSync15, readFileSync as readFileSync14 } from "fs";
8155
8155
  import { join as join30 } from "path";
8156
8156
  import YAML6 from "yaml";
8157
+ function reusePlanningInstructions(lane, options = {}) {
8158
+ const instructions = [REUSE_PLANNING_INSTRUCTION];
8159
+ if (lane === "graduated" || lane === "full") {
8160
+ instructions.push(DIFF_MINIMIZER_PLANNING_INSTRUCTION);
8161
+ if (options.multiModule === true) {
8162
+ instructions.push(CROSS_MODULE_IMPACT_PLANNING_INSTRUCTION);
8163
+ }
8164
+ }
8165
+ return instructions;
8166
+ }
8157
8167
  function featureDevelopmentPolicyPath(projectRoot) {
8158
8168
  return join30(projectRoot, PATHS.WORKFLOWS_DIR, "feature-development.yaml");
8159
8169
  }
@@ -8194,7 +8204,11 @@ function defaultFeatureDevelopmentPolicy() {
8194
8204
  instructions: [
8195
8205
  "Review the canonical module and instruction docs before planning the change.",
8196
8206
  "Keep planning scoped to the requested feature and the current repository state.",
8197
- "Rules-as-scripts (issue #89): invoke rule-script-reconciler at planning entry. RS-* drift (rules edited without script regen, manual map edits, failing fixtures) surfaces via the Decision Pause Contract. Resolve per escalation.rule_scripts_stale before planning continues."
8207
+ "Rules-as-scripts (issue #89): invoke rule-script-reconciler at planning entry. RS-* drift (rules edited without script regen, manual map edits, failing fixtures) surfaces via the Decision Pause Contract. Resolve per escalation.rule_scripts_stale before planning continues.",
8208
+ // Issue #359 — the reuse-first block (all lanes) + the graduated/full skill blocks.
8209
+ // The full+multiModule call materialises every lane-gated line; the inline lane
8210
+ // conditions in each string keep a fast-lane read to the first sentence only.
8211
+ ...reusePlanningInstructions("full", { multiModule: true })
8198
8212
  ],
8199
8213
  required_inputs: ["active request", "canonical docs"],
8200
8214
  strictness: {
@@ -8580,6 +8594,9 @@ stages:
8580
8594
  - Review the canonical module and instruction docs before planning the change.
8581
8595
  - Keep planning scoped to the requested feature and the current repository state.
8582
8596
  - "Rules-as-scripts (issue #89): invoke rule-script-reconciler at planning entry. RS-* drift (rules edited without script regen, manual map edits, failing fixtures) surfaces via the Decision Pause Contract. Resolve per escalation.rule_scripts_stale before planning continues."
8597
+ - "${REUSE_PLANNING_INSTRUCTION}"
8598
+ - "${DIFF_MINIMIZER_PLANNING_INSTRUCTION}"
8599
+ - "${CROSS_MODULE_IMPACT_PLANNING_INSTRUCTION}"
8583
8600
  required_inputs:
8584
8601
  - active request
8585
8602
  - canonical docs
@@ -8704,7 +8721,7 @@ stages:
8704
8721
  - CI gate result
8705
8722
  `;
8706
8723
  }
8707
- var STAGE_ORDER, REQUIRED_TRUE_STRICTNESS, SPEC_REVIEW_ENFORCEMENT_INSTRUCTION;
8724
+ var STAGE_ORDER, REQUIRED_TRUE_STRICTNESS, SPEC_REVIEW_ENFORCEMENT_INSTRUCTION, REUSE_PLANNING_INSTRUCTION, DIFF_MINIMIZER_PLANNING_INSTRUCTION, CROSS_MODULE_IMPACT_PLANNING_INSTRUCTION;
8708
8725
  var init_feature_development_policy = __esm({
8709
8726
  "src/pipeline/feature-development-policy.ts"() {
8710
8727
  "use strict";
@@ -8730,6 +8747,9 @@ var init_feature_development_policy = __esm({
8730
8747
  documentation_sync: { require_canonical_sync: true }
8731
8748
  };
8732
8749
  SPEC_REVIEW_ENFORCEMENT_INSTRUCTION = "Spec-review enforcement (issue #401): SCRIPT-ENFORCED. `paqad-ai spec freeze` runs the spec-quality review itself and refuses to freeze while a critical defect is open, so never run `compliance review` by hand to satisfy the clause above. Major and minor findings never block. The defect summary is folded into the bundle's specification.json and no .paqad/compliance/<slug>/spec-review.json is written by this workflow. Author the spec markdown inside the project: a path resolving outside the project root is rejected.";
8750
+ REUSE_PLANNING_INSTRUCTION = "Reuse before you build: consult the Existing surface section (and `npx paqad-ai index query <name>`) for existing helpers; follow the solution-architect procedure \u2014 Reuse / Extend / Build-new, and record a rejection rationale for every Build-new.";
8751
+ DIFF_MINIMIZER_PLANNING_INSTRUCTION = "On graduated and full lanes: run the diff-minimizer skill over the implementation sequence before compiling the plan; drop steps it classifies over-build or record why they stay. Run existing-doc-checker before creating any new doc or registry artifact.";
8752
+ CROSS_MODULE_IMPACT_PLANNING_INSTRUCTION = "On graduated and full lanes touching more than one module: run cross-module-impact-scanner; surface breaking / silent-shift rows as Decision Packets (existing categories).";
8733
8753
  }
8734
8754
  });
8735
8755
 
@@ -30092,7 +30112,13 @@ var PLAN_SCHEMA = {
30092
30112
  properties: {
30093
30113
  id: { type: "string", minLength: 1 },
30094
30114
  description: { type: "string", minLength: 1 },
30095
- module: { type: "string", minLength: 1 }
30115
+ module: { type: "string", minLength: 1 },
30116
+ // Issue #359 — the diff-minimizer verdict for the step. Optional and additive so a
30117
+ // plan.json compiled before this change stays valid (INV-3); when present it must
30118
+ // be one of the skill's four classifications.
30119
+ classification: {
30120
+ enum: ["ac-satisfying", "necessary-setup", "scaffolding", "over-build"]
30121
+ }
30096
30122
  }
30097
30123
  }
30098
30124
  },
@@ -32812,7 +32838,7 @@ init_cancelled_error();
32812
32838
  init_events();
32813
32839
 
32814
32840
  // src/index.ts
32815
- var VERSION = "1.65.0";
32841
+ var VERSION = "1.66.0";
32816
32842
 
32817
32843
  // src/cli/commands/audit.ts
32818
32844
  init_esm_shims();