Port upstream skill scripts into v2.4.1: deterministic workflow steps run as Node scripts beside each SKILL.md (specs, pathfinder, feedback payload, commit message, review scope, agent files, handoff path) with tests, the prompt limit rises to 20,000 chars, upstream review fixes are folded in (linked agent files never overwrite AGENTS.md, review stops with no base, paste-safe commit commands, Pathfinder number high-water mark and dry runs), and web console workspace folders are remembered per project and spec, with Finalize forgetting an archived spec's list

AI Assisted
This commit is contained in:
jparkerweb committed 2026-10-04 12:17:05 -07:00
1 parent 5cbc6edce2
commit 7d54941b75
243 files changed
+23698 -1607

No files matched your search

+1 -1
View File
@@ -226,7 +226,7 @@ Output: `.plan2code-metrics/proposals/<timestamp>-diagnosis.md`
Sends the diagnosis plus current prompt file contents to an AI model. The AI proposes surgical `old_text -> new_text` edits, each validated against:
- The `old_text` actually exists in the target file
- The edited file stays under the 11,500 character limit
- The edited file stays under the 20,000 character limit
Output: `.plan2code-metrics/proposals/prop-<timestamp>.json`
+1 -1
View File
@@ -11,7 +11,7 @@ import chalk from 'chalk';
import type { PromptEdit, PromptProposal } from './types.js';
import { validateEdit } from './improver.js';
const CHAR_LIMIT = 11_500;
const CHAR_LIMIT = 20_000;
// ── Diff display ──────────────────────────────────────────────────────────────
+3 -3
View File
@@ -69,12 +69,12 @@ describe('validateEdit', () => {
expect(result.warnings.some(w => /appears.*times/i.test(w))).toBe(true);
});
it('errors when edit would exceed 11,500 char limit', () => {
const bigText = 'x'.repeat(12_000);
it('errors when edit would exceed 20,000 char limit', () => {
const bigText = 'x'.repeat(21_000);
const edit = makeEdit({ new_text: bigText });
const result = validateEdit(edit, PROMPT_CONTENTS);
expect(result.valid).toBe(false);
expect(result.errors.some(e => /exceed.*11.?500/i.test(e))).toBe(true);
expect(result.errors.some(e => /exceed.*20.?000/i.test(e))).toBe(true);
});
it('warns when reported char counts diverge from actual (>10 chars off)', () => {
+1 -1
View File
@@ -9,7 +9,7 @@ import path from 'path';
import type { PromptEdit, PromptProposal } from './types.js';
import { invokeLLM, type AgentType } from './invoke-llm.js';
const CHAR_LIMIT = 11_500;
const CHAR_LIMIT = 20_000;
const IMPROVE_PROMPT_PATH = new URL('../src/prompts/improve.md', import.meta.url).pathname
.replace(/^\/([A-Za-z]:)/, '$1'); // Fix Windows path
+2 -2
View File
@@ -26,7 +26,7 @@ The following diagnosis was produced by the analysis step:
## Hard Constraints — ALL must be satisfied:
1. **Char limit:** Each target file MUST stay under 11,500 characters after your edit is applied. This is enforced by code — edits that violate it will be automatically rejected.
1. **Char limit:** Each target file MUST stay under 20,000 characters after your edit is applied. This is enforced by code — edits that violate it will be automatically rejected.
2. **Maximum 5 edits per cycle.** Focus on the highest-impact changes only.
3. **Each edit must cite a specific metric** in its `expected_metric_impact` field (e.g., "avg_task_completion_rate", "avg_blocker_count").
4. **`old_text` must be verbatim** from the file. Copy-paste exactly — include surrounding whitespace/newlines as they appear. Edits with mismatched old_text will be automatically rejected.
@@ -85,7 +85,7 @@ Set `char_count_before`, `char_count_after`, and `char_count_delta` to your best
A table with columns: File | Before | Projected After | Delta | Limit | Status (✓/✗)
Verify that NO file exceeds 11,500 characters after your proposed edits.
Verify that NO file exceeds 20,000 characters after your proposed edits.
---