Commit graph

93 commits

Author SHA1 Message Date
b97251bda3 feat(ultraplan-local): mirror Phase 2.6 hardenings in headless-launch-template
Bring the launch template (used by /ultraplan-local --decompose) into
contract-parity with the Phase 2.6 wave executor hardenings shipped in the
previous commit:

- GIT_OPTIONAL_LOCKS=0 exported once at the top
- MAX_TURNS / MAX_BUDGET_USD env-overridable (default 50 / 5)
- Absolute SHARED_CONTEXT_FILE built from brief + architecture
- SAFETY_PREAMBLE prepended to every per-session prompt (GH #36071 +
  GH #52272 clarifications)
- Per-child --max-turns + --max-budget-usd + --append-system-prompt-file
- push-before-cleanup before merge AND in the cleanup_worktrees trap
- Three new template rules (16, 17, 18, 19) document the contract for
  session-decomposer

Pin in tests/lib/doc-consistency.test.mjs locks all required substrings
against future regressions.
2026-05-04 07:51:50 +02:00
41a0c913fa feat(ultraplan-local): harden Phase 2.6 wave executor (11 sub-changes for plugin-in-monorepo + gitignored-state topology)
Phase 2.6 + Hard Rules + Phase 2.4 hardenings against the topology that
blocked S6 / S7 self-execution:

Phase 2.6 (multi-session orchestration):
  - NEW Step 2a-pre: build absolute SHARED_CONTEXT_FILE (brief + architecture)
    once per wave; introduce ULTRAEXECUTE_MAX_TURNS / ULTRAEXECUTE_MAX_BUDGET_USD
    overrides for long runs.
  - Step 2a: prefix every git worktree command with GIT_OPTIONAL_LOCKS=0
    (research/02 R2; GH #47721).
  - NEW Step 2a': copy gitignored project artifacts (brief.md, plan.md,
    research/) into each freshly-created worktree using PROJECT_SOURCE +
    PROJECT_REL so plugin-in-monorepo + gitignored-state topology works
    (brief Constraint 2).
  - Step 2b: prepend two safety preambles to every per-session prompt:
      (a) defense-in-depth headless-mode warning citing GH #36071
      (b) malware-reminder conditional clarification per GH #52272
    Honor `cwd:` field from Execution Strategy via SESSION_CWD; default
    is worktree root (backward-compatible). Add per-child --max-turns,
    --max-budget-usd, --append-system-prompt-file (research/06 R3+R4).
  - Step 2e: push branch BEFORE merge (research/02 R3 — converts
    unrecoverable branch loss into recoverable remote state).
  - Step 2f: prefix all worktree-remove / branch -d / worktree prune with
    GIT_OPTIONAL_LOCKS=0.
  - Step 4 cleanup: same GIT_OPTIONAL_LOCKS=0 treatment.

Hard Rules:
  - Hard Rule 15: extend exception to permit ~/.claude/projects/*/memory/
    writes when manifest declares memory_write: true (brief Constraint 3
    Option A — narrow opt-in for memory file edits).
  - Hard Rule 19 (new): push-before-cleanup formalized as a rule.

Phase 2.4: advisory hooks-fire precheck for CC version >= v2.1.117
  (research/04 D4 + R5; research/06 R1).

Test: tests/hooks/worktree-guard.test.mjs (6 tests) verifies the
pre-bash-executor and pre-write-executor hooks accept routine worktree
cleanup (Hard Rule 12) while still blocking the dangerous patterns
introduced by parallel orchestration.
2026-05-04 07:49:45 +02:00
272638aec1 feat(ultraplan-local): parallelize Phase 9 review with inline dedup
Strengthen single-message reinforcement for plan-critic + scope-guardian
parallel dispatch in commands/ultraplan-local.md Phase 9 and mirror in
agents/planning-orchestrator.md Phase 6. Reviewers now write structured JSON
to /tmp/{plan-critic,scope-guardian}-out.json which is merged via the
lib/review/plan-review-dedup.mjs CLI shim from S8.

The merged set lets us revise the plan once for duplicate findings instead
of twice. Source: research/05 R1 + R2.

Pin in tests/lib/doc-consistency.test.mjs locks both files against
single-message + dedup-helper regressions.
2026-05-04 07:43:50 +02:00
84eae1fad7 feat(ultraplan-local): seal Opus-4.7 schema-drift defense in Phase 8
Inline STEP_HEADING_REGEX, FORBIDDEN_HEADING_REGEX, the canonical step+manifest
example, and the post-write plan-validator self-check directly into Phase 8 of
commands/ultraplan-local.md. This eliminates the dependency on Opus 4.7
implicitly loading agents/planning-orchestrator.md — the format contract now
travels with the command file itself.

Source: research/04 D5 + plan-v2 Step 7. Pin in tests/lib/doc-consistency.test.mjs
locks the substrings so future edits cannot silently regress the seal.
2026-05-04 07:41:48 +02:00
bbe7971d01 feat(ultraplan-local): add stats event-emit for autonomy lifecycle events
Step 6 of plan-v2 (ultra-pipeline-speedup).

lib/stats/event-emit.mjs (NEW)
  Atomic JSONL append to ${CLAUDE_PLUGIN_DATA}/ultraexecute-stats.jsonl.
  Every record carries:
    ts          : ISO-8601 timestamp (REQUIRED per SC4)
    event       : caller-supplied name
    known_event : true for { brief-approved, main-merge-gate, user_input },
                  false for everything else (still emitted — audit-complete)
    payload     : caller object (defaults to {})

  Stats failures NEVER block workflow: missing CLAUDE_PLUGIN_DATA, missing
  dir, mkdir failure, append failure → all return { written: false, reason }
  without throwing.

  CLI shim:
    node lib/stats/event-emit.mjs --event NAME [--payload JSON]
  Always exits 0 (telemetry is best-effort).

Tests: 12 (record-build + ISO-8601 ts + known/unknown distinction + silent
skip + dir-on-demand + CLI shim happy-path + bad-payload tolerance +
concurrent-append smoke).

[skip-docs]
2026-05-04 06:31:52 +02:00
bed14eae4a feat(ultraplan-local): add plan-review-dedup helper for Phase 9 finding dedup
Step 5 of plan-v2 (ultra-pipeline-speedup).

lib/review/plan-review-dedup.mjs (NEW)
  Two-pass dedup:
    1. Exact match  — identical computeFindingId(file:line:rule_key) → merge.
    2. Jaccard ≥ 0.7 on text-token sets → merge near-duplicates.
  Provenance preserved in surviving finding's raised_by[] (which agents
  raised it). Reuses lib/parsers/jaccard.mjs + lib/parsers/finding-id.mjs.

  CLI shim:
    node lib/review/plan-review-dedup.mjs \
         --plan-critic /tmp/x.json --scope-guardian /tmp/y.json
  Missing inputs tolerated (single-agent review still works).

Tests: 10 (tokenize + threshold + 6 dedup-logic cases + 2 CLI shim).

[skip-docs]
2026-05-04 06:30:28 +02:00
645f01625b feat(ultraplan-local): add autonomy-gate state machine + manifest schema extensions for skip_commit_check + memory_write
Step 4 of plan-v2 (ultra-pipeline-speedup).

lib/util/autonomy-gate.mjs (NEW)
  5-state machine {idle, gates_on, auto_running, paused_for_gate, completed}
  honoring the --gates flag intent. Re-entry to completed is idempotent.
  Includes CLI shim:
    node lib/util/autonomy-gate.mjs --state X --event Y [--gates true|false]
  → JSON: { ok, next_state | error }, exit 0 on success / 1 on invalid.

lib/parsers/manifest-yaml.mjs (EXTENDED)
  OPTIONAL_KEYS list adds skip_commit_check and memory_write — both boolean,
  default false when absent, MANIFEST_OPTIONAL_TYPE when non-boolean.
  Existing REQUIRED_KEYS contract untouched; existing 9 manifest tests
  still pass.

Tests: 19 (autonomy-gate) + 8 (manifest-schema-extensions) = 27 new.

[skip-docs]
2026-05-04 06:28:47 +02:00
b1e161116a test(ultraplan-local): pin agent frontmatter contract (model + tools)
Pin the contract from plan-v2 Steps 1-3: every agents/*.md must declare
model: (opus|sonnet|haiku) AND (tools: or disallowedTools:). Orchestrators
(planning/research/review) must be opus and include the Agent tool;
non-orchestrators must not include Agent (no recursive swarming).

23 agents in scope; 5 pinning tests.

[skip-docs]
2026-05-04 06:26:08 +02:00
e6503adae8 chore(ultraplan-local): gitignore project dirs at plugin level [skip-docs]
Marketplace-root .gitignore already covers plugins/*/.claude/, but
plugin-local coverage is load-bearing for fork-and-own (forks of just
the plugin won't carry the marketplace .gitignore).
2026-05-04 02:30:36 +02:00
490d4eddc6 docs: introduce GOVERNANCE.md and unify fork-and-own blurb
Establish a single governance document at marketplace root and copy
it into each of the 9 plugins so every plugin folder remains 100%
self-contained. Replace the inconsistent provocative blurb across
all READMEs with a uniform fork-and-own paragraph that links to
the local GOVERNANCE.md.

[skip-docs]

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 14:57:00 +02:00
Kjell Tore Guttormsen
1dad53a1e4 docs(ultraplan-local): document /ultracontinue in README + CLAUDE
- README: version badge 3.2.0 → 3.3.0, "Six commands" intro, /ultracontinue row in command table, full /ultracontinue-local section with modes + schema v1 + /ultraplan-end-session helper + typical flow.
- CLAUDE.md: extend validators list (atomic-write util, session-state-validator), bump test count 109 → 185, "7 pipeline handovers" line, Continue paragraph in Architecture, .session-state.local.json + Continue stats in State, Session-state entry in Terminology.

Step 11 of /ultracontinue v3.3.0.
2026-05-01 21:01:34 +02:00
Kjell Tore Guttormsen
d893a46e41 chore(ultraplan-local): bump v3.3.0 + changelog for /ultracontinue [skip-docs]
v3.3.0 ships /ultracontinue-local (zero-friction multi-session resumption),
/ultraplan-end-session-local helper, session-state-validator + atomic-write
util, and Handover 7 (.session-state.local.json contract). Non-breaking.
185 tests green (163 baseline + 22 new).

Step 10 of /ultracontinue v3.3.0. README/CLAUDE updates land in Step 11.
2026-05-01 20:59:23 +02:00
Kjell Tore Guttormsen
2690ab501f feat(ultraplan-local): add /ultraplan-end-session helper for informal multi-session flows [skip-docs]
Tiny helper command for ad-hoc multi-session flows that don't run through
/ultraexecute-local. Writes .session-state.local.json so /ultracontinue
can resume in a fresh chat. Required args (next-brief-path, next-label) —
no inline prompt, headless-safe. Validates via session-state-validator
and prints the same 3-line narration that /ultracontinue Phase 3 uses
(SC-8 cross-project consistency).

Step 9 of /ultracontinue v3.3.0. README/CLAUDE updates land in Step 11.
2026-05-01 20:58:46 +02:00
Kjell Tore Guttormsen
5688512898 docs(ultraplan-local): add Handover 7 + doc-consistency pins for /ultracontinue
Adds Handover 7 (.session-state.local.json) section to HANDOVER-CONTRACTS.md
documenting the multi-session-resume contract:
- Producers: ultraexecute Phase 8/2.55/4 + helper command + future
  graceful-handoff v2.2 + pre-compact-flush refresh
- Consumer: /ultracontinue (read-only)
- Schema v1: schema_version, project, next_session_brief_path,
  next_session_label, status (5-value enum), updated_at
- Forward-compat: unknown top-level keys silently tolerated (drift-WARN)
- Path: .claude/projects/<project>/.session-state.local.json (gitignored)
- Failure modes mapped to validator error codes

Also updates the validator → handover map and Versioning + Stability
tables to include Handover 7.

Extends tests/lib/doc-consistency.test.mjs with three new pins:
1. HANDOVER-CONTRACTS.md contains Handover 7 section
2. session-state-validator.mjs exposes the standard CLI shim
3. CLAUDE.md mentions /ultracontinue-local

Adds the /ultracontinue-local row to the plugin CLAUDE.md commands table —
minimum viable to keep the existing 'CLAUDE.md commands table mentions
every commands/*.md file' iteration test green. Step 11 (Session 2b) will
expand to full README + CLAUDE.md narrative documentation.

Test suite: 182 → 185 (3 new doc-consistency pins, zero regressions).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 20:53:47 +02:00
Kjell Tore Guttormsen
af67362c68 feat(ultraplan-local): pre-compact-flush refreshes session-state.local.json [skip-docs]
Extends the PreCompact hook with a sibling block that refreshes
.session-state.local.json's updated_at when status is in_progress or
partial. Per-project: runs after the existing progress.json mutation,
inside the same loop iteration.

Design:
- Only refreshes existing state files; creation is the writer's job
  (ultraexecute Phase 8 / 2.55 / 4 + future helper command).
- Monotonic guard: only updated_at is touched. project, status,
  next_session_brief_path, next_session_label remain owned by the writer.
- Skips status in {completed, failed, stopped} — the latter two are
  operator-action-required and silently bumping updated_at would mask
  alert state.
- Always exit 0; never blocks compaction.

[skip-docs] rationale: README + CLAUDE.md updates land in Step 11.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 20:51:42 +02:00
Kjell Tore Guttormsen
e4a11daa68 feat(ultraplan-local): write session-state from ultraexecute session-end paths [skip-docs]
Three insertions in commands/ultraexecute-local.md so every session-end
path produces or refreshes .session-state.local.json (Handover 7):

- Phase 2.55 (Check 1, line ~376): write status=stopped on dirty-tree
  pre-flight stop before parallel session-spawn
- Phase 4 (line ~773): write status=stopped when entry condition fails
- Phase 8 (line ~1151): canonical convergence — every completed/failed/
  stopped/partial run refreshes the state file using atomicWriteJson +
  validator verification

Phase 2.3 (validate exit) and Phase 5 (dry-run) intentionally skip the
write — neither path is resumable. Validator errors warn but never block
the run; progress.json remains authoritative.

[skip-docs] rationale: README + CLAUDE.md updates land in Step 11.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 20:50:28 +02:00
Kjell Tore Guttormsen
43cdc0b968 feat(ultraplan-local): add /ultracontinue command for multi-session resumption [skip-docs]
Reads .claude/projects/<project>/.session-state.local.json (Handover 7),
narrates a 3-line summary, and immediately begins executing the next
session — no interactive confirmation, headless-safe.

Phases:
- 0: --help (self-documenting per brief NFR)
- 1: resolve project dir (auto-discover via node -e enumeration)
- 2: validate via session-state-validator
- 3: narrate (project / next_session_label / brief path)
- 4: read brief and begin
- 5: stats

[skip-docs] rationale: README + CLAUDE.md updates land in Step 11 (Session
2b) per plan structure. Step 8 (docs:) updates HANDOVER-CONTRACTS.md and
the doc-consistency test pin in the same session.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 20:49:01 +02:00
Kjell Tore Guttormsen
819fd47ce0 feat(ultraplan-local): add session-state-validator + tests for /ultracontinue
Validator at lib/validators/session-state-validator.mjs:
- validateSessionStateObject(parsed, opts) — pure object validation
- validateSessionStateContent(jsonText, opts) — wraps JSON parse + validation
- validateSessionState(filePath, opts) — file-mode with existsSync guard
- CLI shim with --json output (errors→stderr, result→stdout, exit 0/1/2)
- Schema v1: schema_version, project, next_session_brief_path,
  next_session_label, status, updated_at
- Error codes: SESSION_STATE_PARSE_ERROR, SESSION_STATE_NOT_FOUND,
  SESSION_STATE_MISSING_FIELD, SESSION_STATE_INVALID_STATUS,
  SESSION_STATE_NOT_RESUMABLE (warning), SESSION_STATE_SCHEMA_MISMATCH,
  SESSION_STATE_INVALID_TIMESTAMP, SESSION_STATE_INVALID_PATH
- Forward-compat hard requirement: unknown top-level keys ignored —
  protects future graceful-handoff v2.2 dual-writes

Tests at tests/validators/session-state-validator.test.mjs — 15 subtests:
- happy path + 5 missing-field tests
- invalid status, completed warns NOT_RESUMABLE, schema mismatch, bad
  timestamp, malformed JSON, missing file
- fixture load (SC-1) + malformed fixture (SC-3)
- forward-compat: unknown keys ignored silently

167 → 182 tests, 0 fail.

Step 4 of /ultracontinue v3.3.0. Closes Session 1 of the execution
strategy (foundation: gitignore + util + fixtures + validator+tests).
2026-05-01 20:23:09 +02:00
Kjell Tore Guttormsen
12eae8c678 test(ultraplan-local): add session-state fixtures
Two fixtures for session-state-validator (Step 4):
- valid-in-progress.json — well-formed schema-v1 object
- malformed.json — truncated JSON for negative tests

Step 3 of /ultracontinue v3.3.0.
2026-05-01 20:21:50 +02:00
Kjell Tore Guttormsen
655c8d46f8 refactor(ultraplan-local): extract atomicWriteJson to lib/util
Three changes in one commit:

1. NEW lib/util/atomic-write.mjs — exports atomicWriteJson(path, obj),
   the canonical tmp+rename pattern. Reused by pre-compact-flush.mjs and
   (in subsequent steps) by the new session-state writer.

2. NEW tests/lib/atomic-write.test.mjs — 4 unit tests covering
   round-trip, no-orphan-tmp, overwrite-atomic, pretty-print formatting.

3. REFACTOR hooks/scripts/pre-compact-flush.mjs — replace the inline
   atomicWrite() with the imported atomicWriteJson(). Also fixes a
   pre-existing syntax error (leading whitespace + stray --resume token
   outside the comment block) that silently broke the hook from v3.1.0
   onward — PreCompact runtime is fail-open and swallowed the error.
   File reformatted with standard zero-indent JS.

163 → 167 tests, 0 fail.

Step 2 of /ultracontinue v3.3.0 (project 2026-05-01-ultracontinue).
2026-05-01 20:21:15 +02:00
Kjell Tore Guttormsen
bdddf52873 chore(ultraplan-local): gitignore *.local.json for session-state files
Brief assumed *.local.* covered .session-state.local.json — only *.local.md
existed. Adding *.local.json before any state file can be created.

Step 1 of /ultracontinue v3.3.0 (project 2026-05-01-ultracontinue).
2026-05-01 20:18:22 +02:00
Kjell Tore Guttormsen
881c2bc10a chore(ultraplan-local): bump v3.2.0 + changelog for ultrareview-local
Plugin manifest + package.json + README badge bumped 3.1.0 → 3.2.0.
Description updated from "Four-command" → "Five-command (brief, research,
plan, execute, review)" to reflect /ultrareview-local addition.

CHANGELOG entry summarises the ultrareview-local v1.0 work: new command,
4 new agents, Handover 6 contract, ~43 new tests, 5 lib modules, and the
3 v1.1 open questions (5-tier severity migration, real-LLM determinism
measurement, SC2 end-to-end test).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 17:24:59 +02:00
Kjell Tore Guttormsen
ea715b65de test(ultraplan-local): add SC3(b) source_findings structural test
Synthetic plan.md fixture with source_findings: block-style YAML list of 3
40-char hex IDs in frontmatter, plus minimal plan structure (Title +
Implementation Plan + 1 Step + Manifest). 3 tests verify:

1. plan-validator accepts a plan with source_findings (additive optional field)
2. frontmatter parser extracts source_findings as array of strings
3. each ID matches the 40-char lowercase hex format from finding-id.mjs

Closes the SC3(b) gap flagged by adversarial review (scope-guardian Gap 2).
LLM-level behavior (planner emitting source_findings) remains non-testable
without live invocation; this covers the structural contract.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 17:23:30 +02:00
Kjell Tore Guttormsen
b69fdea883 test(ultraplan-local): add review determinism integration test
3 integration tests using the run-A/run-B fixtures:
- Jaccard(A, B) ≥ 0.70 (SC4 brief threshold)
- IDs match 40-char hex shape (lib/parsers/finding-id.mjs format)
- no duplicate IDs within a single run

Tests the Jaccard PIPELINE; real-LLM determinism deferred to v1.1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 17:21:42 +02:00
Kjell Tore Guttormsen
5aa37941ed test(ultraplan-local): add synthetic ultrareview determinism fixtures
review-run-A.md (5 findings) and review-run-B.md (6 findings, A ⊂ B) form a
known-Jaccard fixture pair: |A ∩ B| = 5, |A ∪ B| = 6, Jaccard = 5/6 = 0.833,
above the SC4 threshold of 0.70. IDs are real 40-char SHA1s computed via
lib/parsers/finding-id.mjs from realistic (file, line, rule_key) triplets.

Both fixtures pass review-validator --strict (frontmatter + body sections +
findings shape). Real-LLM determinism measurement deferred to v1.1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 17:21:02 +02:00
Kjell Tore Guttormsen
09e7fb9364 test(ultraplan-local): extend doc-consistency with 4 ultrareview pins
Modify "all four pipeline commands" → "all five" (adds /ultrareview-local).
Add 3 new pins: Handover 6 section in HANDOVER-CONTRACTS.md,
review-validator CLI shim, rule-catalogue 12-key size invariant.

11/11 doc-consistency tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 17:18:51 +02:00
Kjell Tore Guttormsen
90d45a5be4 docs(ultraplan-local): document ultrareview-local in plugin + marketplace README
Plugin README: add /ultrareview-local to command tables, division-of-labor,
quick start, and example workflows. New /ultrareview-local section with
modes, output format, triage gate, and Handover 6 feedback loop. Bump
agent count 19 → 23 and command count 4 → 5 in architecture diagram.

Marketplace root README: bump ultraplan-local version 3.1.0 → 3.2.0,
update tagline to "Five-command (brief, research, plan, execute, review)
universal pipeline", add /ultrareview-local bullet, add v3.2.0 narrative
paragraph, bump plugin-card counts (5 commands · 5 hooks · 23 agents).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 17:18:16 +02:00
Kjell Tore Guttormsen
9fea88421d docs(ultraplan-local): add Handover 6 (review → plan) to HANDOVER-CONTRACTS
Closes the iteration loop: review.md → plan via source_findings audit trail.
Adds versioning row, validator-map entry, full Handover 6 section, and
stability summary row mirroring the shape of Handovers 1-5.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 17:13:31 +02:00
Kjell Tore Guttormsen
367877bb45 docs(ultraplan-local): wire ultrareview-local + 4 agents into plugin CLAUDE.md 2026-05-01 17:00:09 +02:00
Kjell Tore Guttormsen
7dc643ec52 feat(ultraplan-local): teach ultraplan-local to consume type:ultrareview 2026-05-01 16:58:32 +02:00
Kjell Tore Guttormsen
b4e58e3fc2 feat(ultraplan-local): add commands/ultrareview-local.md 2026-05-01 16:56:47 +02:00
Kjell Tore Guttormsen
74eb41fa35 feat(ultraplan-local): add agents/review-coordinator.md 2026-05-01 16:54:54 +02:00
Kjell Tore Guttormsen
b9150d4927 feat(ultraplan-local): add agents/code-correctness-reviewer.md 2026-05-01 16:53:27 +02:00
Kjell Tore Guttormsen
33969540af feat(ultraplan-local): add agents/brief-conformance-reviewer.md 2026-05-01 16:52:19 +02:00
Kjell Tore Guttormsen
29ee34113f feat(ultraplan-local): add agents/review-orchestrator.md 2026-05-01 16:50:51 +02:00
Kjell Tore Guttormsen
1d4ade4191 feat(ultraplan-local): add /ultrareview-local to session-title COMMANDS map 2026-05-01 16:43:32 +02:00
Kjell Tore Guttormsen
ebeae010c1 feat(ultraplan-local): extend project-discovery with review.md 2026-05-01 16:43:08 +02:00
Kjell Tore Guttormsen
535dce87dc feat(ultraplan-local): add ultrareview to arg-parser FLAG_SCHEMA 2026-05-01 16:42:01 +02:00
Kjell Tore Guttormsen
1c22452e81 feat(ultraplan-local): extend brief-validator to accept type:ultrareview 2026-05-01 13:31:39 +02:00
Kjell Tore Guttormsen
f6e61e92cd feat(ultraplan-local): add lib/validators/review-validator.mjs 2026-05-01 13:30:43 +02:00
Kjell Tore Guttormsen
e0bf75e17a feat(ultraplan-local): add templates/ultrareview-template.md 2026-05-01 13:29:52 +02:00
Kjell Tore Guttormsen
cf56fbbe27 feat(ultraplan-local): add lib/parsers/jaccard.mjs 2026-05-01 13:28:44 +02:00
Kjell Tore Guttormsen
38b801f534 feat(ultraplan-local): add lib/parsers/finding-id.mjs (stable SHA1) 2026-05-01 13:28:05 +02:00
Kjell Tore Guttormsen
e4b23dc735 feat(ultraplan-local): add lib/review/rule-catalogue.mjs (12 rule keys) 2026-05-01 13:27:29 +02:00
Kjell Tore Guttormsen
b3a91176ab revert(ultraplan-local): untrack ultracontinue-brief + design-notes (local-only)
These were committed in b37b938 by mistake — KTG's convention is that
planning docs in plugins/ultraplan-local/docs/ are local working files
and never pushed to the public marketplace.

- git rm --cached on both files (kept on disk, just untracked)
- .gitignore extended with explicit entries for the two filenames

Existing tracked docs in plugins/ultraplan-local/docs/ predate this rule
and are left alone (separate decision).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 10:07:51 +02:00
Kjell Tore Guttormsen
b37b9383e9 docs(ultraplan-local): /ultracontinue design brief + companion design notes
Adds two sibling files in plugins/ultraplan-local/docs/ that together
specify a new /ultracontinue command for zero-friction multi-session
resumption — drafted from design dialogue at the end of the config-audit
v5.0.0 release session (5 sessions, ~10 manual NEXT-SESSION-PROMPT
context-handovers — friction this work removes).

ultracontinue-brief.md (159 lines):
- Follows the /ultrabrief-local template (frontmatter brief_version: 2.0)
  so /ultraplan-local can consume it directly
- Defines per-project state-file convention .claude/projects/<project>/
  .session-state.local.json as the contract; /ultracontinue is read-only,
  multiple writers may update
- 10 falsifiable success criteria including cross-project consistency,
  no-new-deps, validator + helper command, docs sweep across plugin
  README + CLAUDE.md + marketplace root README
- 3 research topics: ultraexecute end-of-session integration depth,
  graceful-handoff alignment (no hard dep), Claude Code slash-command
  conventions for read+execute commands
- Explicit non-goals: not replacing /ultraexecute-local --resume, not
  replacing graceful-handoff, not auto-orchestrating N sessions
- Open questions and assumptions flagged for plan-critic / scope-guardian

ultracontinue-design-notes.md (117 lines):
- Captures the dialogue rationale that shaped the brief, so the
  implementing session has full context without needing to read this
  conversation's transcript
- Origin (config-audit v5 release pain point), key design insight
  ("state-fil ER kontrakten, ikke verktøyet"), 6 design decisions with
  alternatives considered, anti-patterns from KTG auto-memory to respect,
  recommended reading order, expected scope (1-2 execution sessions)

No code changes. Brief is ready for /ultraplan-local --brief
plugins/ultraplan-local/docs/ultracontinue-brief.md (light path) or
/ultraresearch-local for full research path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 10:05:44 +02:00
Kjell Tore Guttormsen
5df8e8888e docs(ultraplan-local): trim README — outcomes section + remove duplication
Add "What you get" with Solo / Team / Virksomhet profiles + honest
"What it doesn't solve" list. Lets adoption decisions land before
command details.

Cuts (deduplication and historical noise):
- Architecture file-tree (~50 lines) → terse top-level layout +
  pointer to CONTRIBUTING.md. Original was stale (missing lib/,
  wrong hook-count, wrong plugin.json version note)
- "How it compares" matrix (~17 lines) — sales-coded comparison
  vs cloud tools, doesn't help adoption decisions
- Per-command "How it works" 8-step prose (~50 lines across 4
  commands) → 2-3 sentence summaries
- Exploration / Review / Research agent tables (~40 lines) →
  one-liner pointers to agents/ directory (already self-documenting)
- v1.x and v2.x migration sections (~30 lines) → pointer to
  CHANGELOG.md / MIGRATION.md
- v3.0.0, v2.4.0 historical callouts (~9 lines) — CHANGELOG owns
  these
- Cost profile bullet-list (~13 lines) → one paragraph

Net: 770 → 609 lines (-21%). Tests green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 06:44:44 +02:00
Kjell Tore Guttormsen
1486368a2b chore(release): ultraplan-local v3.1.0
Quality program release. Spor 0+1+2+3 all delivered.

- 109 zero-dep tests gate fork-readiness
- 5 validators wired into 4 commands as CLI shims
- HANDOVER-CONTRACTS.md: single source of truth for 5 pipeline handovers
- PreCompact-hook (P0) closes progress.json drift; --resume now works
- Semantic plan-critic catches paraphrased deferred decisions
- examples/01-add-verbose-flag/: hand-calibrated end-to-end pipeline demo
- 4 hooks total (pre-bash, pre-write, session-title, post-bash-stats, pre-compact-flush)
- SECURITY.md + Extending-the-plugin docs

CC v2.1.x feature adoption: F8 (MCP_CONNECTION_NONBLOCKING),
F9 (sessionTitle), F3 (duration_ms), F12 (disableSkillShellExecution).
F2 (hook 'if'-field) deferred — universal protection wins.

Pre-flight verification:
- npm test → 109 pass
- plan-validator --strict templates/plan-template.md → READY
- plan-validator --strict tests/fixtures/plan-fase-narrative.md → FAIL (expected)
- grep smallCodebase|mediumCodebase|largeCodebase → 0 hits

Version bumped: package.json, plugin.json, README badge, root README,
root CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 06:31:42 +02:00
Kjell Tore Guttormsen
9ecd225018 feat(ultraplan-local): Spor 3 — semantic plan-critic, examples, CC features, security docs
- agents/plan-critic.md: rule #7 split into literal blockers (TBD/TODO/FIXME)
  + semantic rubric with 8 deferred-decision tests; calibrated against the
  5-phrase corpus from the v3.1.0 quality brief
- hooks/hooks.json: rebuilt from corrupted state; valid JSON, registers
  PreToolUse(Bash,Write), UserPromptSubmit, PostToolUse(Bash), PreCompact
- hooks/scripts/session-title.mjs: NEW — sets ultra:<cmd>:<slug> session
  title for ultra commands (CC v2.1.94+)
- hooks/scripts/post-bash-stats.mjs: NEW — appends duration_ms per Bash
  call to ultraexecute-stats.jsonl (CC v2.1.97+)
- SECURITY.md: NEW — Forgejo private-issue reporting, supported = current
  minor only, scope = 4 hooks + denylist, hardening recommendations
- docs/architect-bridge-test.md: NEW — manual smoke checklist for the
  ultraplan ↔ ultra-cc-architect bridge
- examples/01-add-verbose-flag/: NEW — calibrated end-to-end (brief +
  research + plan + progress.json) for fork-er onramp; all four artifacts
  pass their validators
- README.md: + Extending the plugin, + Headless multi-session tuning
  (MCP_CONNECTION_NONBLOCKING), + Session titles, + Per-step timing,
  + disableSkillShellExecution recommendation
- CLAUDE.md: documents session-title.mjs and post-bash-stats.mjs
- root README.md: v3.1.0 entry expanded with Spor 2+3 deliverables

CC features adopted: F8, F9, F12 implemented; F3 implemented as Bash
PostToolUse logger; F2 (hook 'if'-field scoping) deferred — universal
protection beats reduced-scope protection for blocked commands.

Tests: 109/109 green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 06:28:44 +02:00
Kjell Tore Guttormsen
cc38155fa6 feat(ultraplan-local): Spor 2 — HANDOVER-CONTRACTS.md + PreCompact-hook (P0 progress.json drift fix)
Reconciles divergence after parallel-session race: includes both Spor 1 wiring (validators inn i 4 commands + 1 agent) og Spor 2 (HANDOVER-CONTRACTS.md + PreCompact-hook).

Spor 1 wiring (re-applied etter rebase):
- /ultrabrief-local Phase 4g — brief-validator post-write
- /ultraplan-local Phase 1 — brief-validator --soft + research-validator --dir + architecture-discovery
- planning-orchestrator Phase 5.5 — plan-validator --strict erstatter 3 grep -cE-kall
- /ultraexecute-local Phase 2.3 (--validate) — plan-validator + progress-validator
- YAML-parser-utvidelse: list-of-dicts (must_contain), støtter v1.7 template-format

Spor 2 NEW:
- docs/HANDOVER-CONTRACTS.md (~310 linjer) — single source of truth for de 5 pipeline-handover-formatene m/ faste sub-headinger (Producer / Consumer / Path / Frontmatter schema / Body invariants / Validation strategy / Versioning / Failure modes)
- hooks/scripts/pre-compact-flush.mjs (NY) — fikser dokumentert P0 i docs/ultraexecute-v2-observations-from-config-audit-v4.md:
  * Fyrer på PreCompact-event (CC v2.1.105+)
  * Lokaliserer progress.json under .claude/projects/*/
  * Sammenligner stored current_step mot git log {session_start_sha}..HEAD
  * Atomisk write (tmp + rename), monoton — current_step kan aldri reduseres
  * Aldri blokkerer compaction (exit 0)
- hooks/hooks.json registrerer PreCompact-hooken

Resultat: /ultraexecute-local --resume virker nå etter context compaction selv ved skill-driven execution.

Docs:
- README.md (plugin): "Quality infrastructure", "Handover contracts", "PreCompact resume integrity"
- CLAUDE.md (plugin): peker til HANDOVER-CONTRACTS.md + dokumenterer pre-compact-flush
- README.md (marketplace root): bullet-liste over Spor 2-deliverables (resolved merge-konflikt fra parallell-sesjon)

Tester: 109 grønn (ingen regresjon).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 06:07:01 +02:00