Commit graph

140 commits

Author SHA1 Message Date
Kjell Tore Guttormsen
a9e377570c feat(llm-security): v7.0.0 commit 3 — policy-driven entropy thresholds
Adds entropy section to DEFAULT_POLICY and wires it into entropy-scanner.
Users can now tune false-positive tradeoffs without forking the scanner.

Policy shape (.llm-security/policy.json):
  entropy:
    thresholds.{critical,high,medium}.{entropy,minLen}  — numeric overrides
    suppress_extensions[]                               — additive ext skip
    suppress_line_patterns[]                            — additional regex
    suppress_paths[]                                    — relPath substrings

Wiring: entropy-scanner calls loadPolicy(targetPath) at scan entry (not
orchestrator-passed — avoids signature churn across 10 scanners). Module-
level state is reset per scan invocation. Scanner envelope now includes
calibration.{policy_source, thresholds, files_skipped_by_*} for
synthesizer transparency (Commit 5).

Malformed user regex silently skipped. Missing policy.json → built-in
defaults (backwards-compatible).

entropy.test.mjs: 9/9 still green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:02:52 +02:00
Kjell Tore Guttormsen
e7f7df0fc8 feat(llm-security)!: v7.0.0 commit 2 — context-aware entropy scanner
Observed 70% false-positive rate on renderer/shader codebases (hyperframes):
GLSL, CSS-in-JS, inline HTML/SVG, ffmpeg filter-strings, hardcoded
User-Agent strings all matched base64-like entropy thresholds. This
commit adds two suppression layers before classification.

Layer A — file-extension skip: .glsl/.frag/.vert/.shader/.wgsl (shaders),
.css/.scss/.sass/.less (stylesheets), .svg (markup), .min.js/.min.css
(minified bundles). Tracked via new calibration.files_skipped_by_extension
field on scanner envelope for synthesizer stats.

Layer B — seven new line-level suppression rules in isFalsePositive()
(rules 11-17): GLSL/WGSL keywords, CSS-in-JS (styled/emotion/@keyframes),
inline HTML/SVG markup, ffmpeg filter-graph syntax, browser User-Agent,
SQL DDL/DML, error-message templates with embedded HTML.

Existing entropy.test.mjs: 9/9 still green — known bad base64 payload in
telemetry.mjs fixture still detected. Policy-driven thresholds wired in
Commit 3.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:00:42 +02:00
Kjell Tore Guttormsen
d83424a782 feat(llm-security)!: v7.0.0 commit 1 — severity-dominated log-scaled risk score
Replace sum-and-cap formula (every non-trivial scan → 100/Extreme) with
severity-dominated, log-scaled-within-tier model. Discriminates actual
risk: 1 critical = 80, 2 critical = 86, 17 high = 65. Hyperframes-class
rendering codebases no longer collapse to Extreme just from shader noise.

Changes:
- scanners/lib/severity.mjs: new riskScore() v2; keep riskScoreV1() for
  reference; riskBand() cutoffs aligned (14/39/64/84).
- scanners/posture-scanner.mjs: delete inline duplicate formula, import
  riskScore/riskBand/verdict from severity.mjs. Single source of truth.

Breaking: aggregate.risk_score semantics change. Batched with entropy
suppression (Commit 2+) under v7.0.0 bump in Commit 6. Do not release
individually — JSON consumers depend on scoring band stability.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:00:29 +02:00
Kjell Tore Guttormsen
a86b897583 feat(ultraplan-local)!: v2.4.0 — version bump
Sync plugin.json, plugin README badge, and marketplace root README
plugin-table to 2.4.0. Closes the v2.4.0 rollout.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 21:46:17 +02:00
Kjell Tore Guttormsen
23544c79fb feat(ultraplan-local)!: v2.4.0 — docs update
Add v2.4.0 CHANGELOG entry documenting the background-mode removal
rationale (harness does not expose Agent tool to sub-agents per
github.com/anthropics/claude-code/issues/19077). Update plugin CLAUDE.md
architecture sections to drop background-transition phases and redefine
the three orchestrator agents as inline reference. Update plugin README
mode tables for /ultraresearch-local, /ultra-cc-architect-local,
/ultraplan-local — --fg is now a no-op alias. Update marketplace root
README with a v2.4.0 paragraph above the v2.3 changelog summary.

Closes the docs portion of the v2.4.0 rollout. Version-sync follows in
the next commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 21:39:23 +02:00
Kjell Tore Guttormsen
b5f6a528fd feat(ultraplan-local)!: v2.4.0 — correct background-agents catalog skill
Add prominent warning block that the Agent tool is not exposed to
sub-agents (foreground or background). Rewrite Shape A (orchestrator
handoff) from "valid pattern" to "confirmed anti-pattern, removed in
v2.4.0". Correct Composition section: background + subagents is
NOT supported — nested spawn from a sub-agent silently fails.

Source: github.com/anthropics/claude-code/issues/19077
Confirmed empirically 2026-04-19.

BREAKING CHANGE: Catalog consumers that cited Shape A should migrate
to orchestrating from the main command context instead.
2026-04-19 21:25:30 +02:00
Kjell Tore Guttormsen
c8a6506384 feat(ultraplan-local)!: v2.4.0 — orchestrator agents as inline reference
Redefine research-orchestrator, planning-orchestrator, and
architect-orchestrator from "background executor" to "inline
reference documentation". The agent files remain as the canonical
workflow descriptions, but the /ultra* commands now execute the
phases directly in the main command context instead of spawning
these agents as sub-agents.

The /ultra* command markdowns are now the de-facto orchestrators.
Splitting work into a separate sub-agent was incompatible with the
harness's treatment of the Agent tool (not exposed to sub-agents).

BREAKING CHANGE: These agents are no longer invoked. Any external
integration that spawned them directly should now invoke the
corresponding /ultra* command instead.
2026-04-19 21:24:45 +02:00
Kjell Tore Guttormsen
4bba65cddf feat(ultraplan-local)!: v2.4.0 — commands default to foreground
Remove background-transition phases from /ultraresearch-local,
/ultraplan-local, /ultra-cc-architect-local, /ultrabrief-local.
All four commands now run their full pipelines inline in main
context; --fg is retained as a no-op alias for backwards
compatibility.

The Claude Code harness does not expose the Agent tool to
sub-agents, so orchestrators launched with run_in_background:true
cannot spawn their documented swarms (docs-researcher,
community-researcher, architecture-mapper, plan-critic, etc.) and
silently degrade to single-context reasoning. Foreground execution
keeps the swarms intact.

Source: github.com/anthropics/claude-code/issues/19077
Confirmed empirically 2026-04-19.

BREAKING CHANGE: Default execution is foreground — the session
blocks until the brief/plan is ready. Use `claude -p` in a
separate terminal for long-running headless work.
2026-04-19 21:23:02 +02:00
Kjell Tore Guttormsen
445a632d39 docs: add AI-generated code disclosure to marketplace and all plugins
Transparency: all code in this marketplace is produced by Claude Code
through dialog-driven development. Root README gets a full disclosure
section; each plugin README gets a one-line disclosure linking back to
the marketplace section.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 19:27:05 +02:00
Kjell Tore Guttormsen
efbb43094f fix(ultraplan-local): v2.3.2 — skill-drafter slug-collision hint
skill-drafter now reads {catalog_root}/<slug>.md before writing its
draft and prepends a warning block to its confirmation output when
an existing skill would be overwritten during manual `mv` promotion.
The draft is still written to .drafts/<slug>.md — the check is a
hint, not a block.

Closes v2.3.0 dogfood finding (post_dogfood_findings[0]): the
drafter produced .drafts/hooks-pattern.md when an approved
hooks-pattern.md seed already existed, giving no signal that `mv`
during promotion would silently overwrite the seed. v2.3.1
introduced the qualified-slug mechanism to resolve such collisions;
v2.3.2 surfaces them at the right moment — before promotion.

Changes:
- agents/skill-drafter.md — new Step 2 between slug computation and
  source reading. Reads {catalog_root}/<slug>.md, inspects
  review_status, derives a kebab-case qualifier from the concept
  handle (or source basename fallback). Subsequent steps renumbered
  3→7. Output format gains Collision: field and optional warning
  block. New Hard Rule.
- tests/fixtures/skill-drafter/slug-collision-expected.md — reference
  fixture documenting expected confirmation shape across four
  scenarios (no collision, approved collision, soft pending
  collision, collision with no good qualifier). Skill-drafter is
  prompt-driven; fixture anchors shape for human verification and
  downstream parsers.
- CHANGELOG [2.3.2], plugin.json 2.3.1→2.3.2, README badge, plugin
  CLAUDE.md slug-convention Collision-hint bullet, marketplace root
  README summary, marketplace root CLAUDE.md plugin table.

Non-breaking. No frontmatter/drafts-layout/tool-scope/regex changes.
Existing pipelines see one extra field and an optional warning —
both purely additive.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 18:06:37 +02:00
Kjell Tore Guttormsen
4bbd17cbfa feat(ultraplan-local): v2.3.1 — qualified slug convention for cc-architect-catalog
Resolves v2.3.0 dogfood collision: skill-factory produced a
specialized hooks-pattern.md draft that would have overwritten the
generic seed. Qualified slugs let one feature host multiple named
patterns at different abstraction levels.

Slug convention: <cc_feature>[-<qualifier>]-<layer>.md. Unqualified =
canonical baseline. Qualified = sub-pattern (e.g., hooks-observability-
pattern.md) that does not displace the baseline.

Changes:
- SKILL.md: slug convention section, coverage-table qualified column,
  matcher logic for N patterns per feature, modification rules cover
  qualified-vs-canonical choice and collision handling.
- feature-matcher: catalog map is cc_feature -> {layer -> [skills]};
  selection rules (baseline by default, qualified when justified,
  multi-skill when non-overlapping); supporting_skill accepts list.
- gap-identifier: adds pattern_count[cc_feature] to coverage audit.
- architecture-critic: supporting-skill verification — every cited
  skill name must exist in the catalog (blocker severity).
- First qualified skill: hooks-observability-pattern.md (promoted from
  .drafts/, source ai-psychosis/README.md, ngram-overlap 0.01).
- Version bump 2.3.0 -> 2.3.1 across plugin.json, badges, table, root
  CLAUDE.md, CHANGELOG.

Non-breaking: existing unqualified slugs keep working, no cc_feature
taxonomy changes, hallucination gate unchanged.
2026-04-18 17:53:55 +02:00
Kjell Tore Guttormsen
bba72c8f06 docs(ultraplan-local): v2.3.0 — skill-factory Fase 1
Doc sync for /ultra-skill-author-local release:

- CHANGELOG.md: 2.3.0 section above 2.2.0 with full feature narrative,
  pipeline diagram, non-goals, new files list, new stats file
- README.md: command table row + new ## /ultra-skill-author-local section
  describing pipeline, modes, IP-hygiene utility, non-goals
- CLAUDE.md: row in Commands table (committed in Step 1)
- ../../README.md: bumped ultraplan-local row v2.2.0 → v2.3.0,
  expanded division-of-labor with sixth bullet for /ultra-skill-author-local,
  added v2.3 narrative paragraph

Plan: .claude/projects/2026-04-18-skill-factory-fase-1-mvp/plan.md (step 12)
2026-04-18 15:26:18 +02:00
Kjell Tore Guttormsen
6e5af6d565 feat(ultraplan-local): add /ultra-skill-author-local command
Channel 2 of skill-factory: manual one-source-at-a-time generator for
cc-architect-catalog. Validates source (.md/.txt, < 200 KB), launches
skill-author-orchestrator (opus), presents verdict summary with
context-specific next-step guidance.

Modes: default (full pipeline), --fg (alias, no-op), --quick (skip
IP-hygiene with BIG WARNING). Foreground-only in fase-1.

Plan: .claude/projects/2026-04-18-skill-factory-fase-1-mvp/plan.md (step 10)
2026-04-18 15:22:59 +02:00
Kjell Tore Guttormsen
ab8a970746 feat(ultraplan-local): add skill-author-orchestrator
Opus orchestrator for /ultra-skill-author-local. Sequential 5-phase pipeline:
validate source → concept-extractor → skill-drafter → ip-hygiene-checker
→ completion summary.

No retry logic, no parallelism, no automation (per brief Non-Goals). Each
phase consumes the previous phase's output. --quick mode skips IP-hygiene
with a BIG WARNING for testing the drafting pipeline in isolation.

Plan: .claude/projects/2026-04-18-skill-factory-fase-1-mvp/plan.md (step 9)
2026-04-18 15:21:37 +02:00
Kjell Tore Guttormsen
16e15e52bb feat(ultraplan-local): add ip-hygiene-checker agent
Sonnet worker for /ultra-skill-author-local. Runs scripts/ngram-overlap.mjs
on draft + source, parses verdict, takes action:

- accepted/needs-review: stamp ngram_overlap_score in frontmatter (Edit)
- rejected: rm draft (no preservation per brief Success Criteria 4)

Tool scope: Bash (node + rm in .drafts/), Read, Edit. Score is containment
rounded to 2 decimals to match success-criteria regex.

Plan: .claude/projects/2026-04-18-skill-factory-fase-1-mvp/plan.md (step 8)
2026-04-18 15:20:27 +02:00
Kjell Tore Guttormsen
d8d5d95108 feat(ultraplan-local): add skill-drafter agent
Sonnet worker for /ultra-skill-author-local. Consumes concept-extractor JSON
plus source file, writes a 150-600 word draft to .drafts/<slug>.md with the
9-field frontmatter contract (review_status=pending, ngram_overlap_score=null).

Imperative voice, progressive disclosure, no verbatim copy from source.
Aborts with too-technical-to-paraphrase if the subject can't be rephrased.

Plan: .claude/projects/2026-04-18-skill-factory-fase-1-mvp/plan.md (step 7)
2026-04-18 15:19:21 +02:00
Kjell Tore Guttormsen
0e2dce1291 feat(ultraplan-local): add concept-extractor agent
Sonnet worker for /ultra-skill-author-local. Reads ONE local source file
and emits structured concept JSON with cc_feature/layer/concept fields.

Enforces two gates:
- Hallucination gate: cc_feature MUST be one of 8 canonical values
- Gap-class gate: class C (decision) and D (outside CC) → out_of_scope

Plan: .claude/projects/2026-04-18-skill-factory-fase-1-mvp/plan.md (step 6)
2026-04-18 15:18:19 +02:00
Kjell Tore Guttormsen
486f544d39 test(ultraplan-local): add skill-factory calibration fixtures
3 source/draft pairs that pin n-gram-overlap verdicts to representative prose:
- accepted (containment 0.014 / longestRun 3)
- needs-review (containment 0.211 / longestRun 12)
- rejected (containment 0.676 / longestRun 74)

Topics: session-start hooks, subagent delegation, output styles — proximate to
the production source material the skill-factory will ingest.

Plan: .claude/projects/2026-04-18-skill-factory-fase-1-mvp/plan.md (step 5)
2026-04-18 15:16:28 +02:00
Kjell Tore Guttormsen
491711119a test(ultraplan-local): add ngram-overlap node:test suite 2026-04-18 15:08:41 +02:00
Kjell Tore Guttormsen
4d541418ba feat(ultraplan-local): add scripts/ngram-overlap.mjs IP-hygiene utility 2026-04-18 15:03:36 +02:00
Kjell Tore Guttormsen
690ca09dc5 feat(ultraplan-local): add .drafts/ infrastructure for skill-factory 2026-04-18 15:02:25 +02:00
Kjell Tore Guttormsen
b4567177b9 chore(ultraplan-local): bump version 2.2.0 → 2.3.0 2026-04-18 15:01:45 +02:00
Kjell Tore Guttormsen
2da95b3cd3 feat(ultraplan-local): v2.2.0 — /ultra-cc-architect-local
New optional command between /ultraresearch-local and /ultraplan-local that
matches brief+research against Claude Code features (hooks, subagents, skills,
output-styles, MCP, plan-mode, worktrees, background-agents) and produces an
architecture note with brief-anchored rationale plus explicit gaps.

Added:
- commands/ultra-cc-architect-local.md (--project, --fg, --quick, --no-gaps)
- agents/architect-orchestrator.md (opus) — 6-phase background orchestrator
- agents/feature-matcher.md (sonnet) — fallback-ranked feature proposals
- agents/gap-identifier.md (sonnet) — 4 gap classes with issue-ready drafts
- agents/architecture-critic.md (sonnet) — hallucination gate as BLOCKER
- skills/cc-architect-catalog/ — SKILL.md + 10 seed entries (reference/pattern)

Changed (non-breaking):
- commands/ultraplan-local.md — auto-discovers architecture/overview.md
- agents/planning-orchestrator.md — cross-references cc_features_proposed
- plugin.json — 2.1.0 → 2.2.0, description, cc-architecture keyword
- CHANGELOG, README, CLAUDE.md (plugin + marketplace root)

Pipeline becomes brief → research → architect → plan → execute. Architect is
optional; existing project dirs keep working unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 12:38:06 +02:00
Kjell Tore Guttormsen
23aaaa6e6c feat(llm-security): honor LLM_SECURITY_IDE_ROOTS for JetBrains discovery
Symmetric with the existing VS Code branch — the env var was only wired
into getVSCodeExtensionRoots(), so the plan's master verification
(`LLM_SECURITY_IDE_ROOTS=... --intellij-only`) reported 0 discovered
plugins. Adding the same fallback to discoverJetBrainsExtensions makes
both families honor the CLI override and closes the gap.
2026-04-18 11:09:02 +02:00
Kjell Tore Guttormsen
f53f79b262 docs(llm-security): update ide-scan command + marketplace README for v6.6.0
- Frontmatter description: list JetBrains IDE family + URL sources
- Body: VS Code + JetBrains coverage explicit, Fleet/Toolbox excluded
- Target list: add two JetBrains Marketplace URL shapes
- Notes: remove v1.1 stub language, document JB-specific checks
  (Premain-Class, application-components, native binaries, depends
  chains, typosquats, shaded jars)
2026-04-18 11:05:34 +02:00
Kjell Tore Guttormsen
80c3e2d39a chore(release): bump llm-security to v6.6.0 2026-04-18 11:04:42 +02:00
Kjell Tore Guttormsen
903b3d246f test(llm-security): loosen git-forensics finding count thresholds
Thresholds <=10 (fixture) and <=20 (plugin root) have been too tight since
before this plan started — baseline on 1634197 already produced 37 and 27
findings. git-forensics findings accumulate with repo history, so fixed
caps are brittle. Raised to <=100 to tolerate organic growth while still
catching runaway/pathological output.
2026-04-18 11:00:20 +02:00
Kjell Tore Guttormsen
2bc2f34fc4 test(llm-security): add end-to-end JetBrains scan integration tests 2026-04-18 10:51:48 +02:00
Kjell Tore Guttormsen
3de29931fe test(llm-security): add JetBrains fixture tree + build helper 2026-04-18 10:49:49 +02:00
Kjell Tore Guttormsen
378e177000 feat(llm-security): URL-fetch support for JetBrains Marketplace (v6.6.0) 2026-04-18 10:46:13 +02:00
Kjell Tore Guttormsen
23455e5a66 feat(llm-security): add fetchJetBrainsPlugin + URL detection for plugins.jetbrains.com 2026-04-18 10:39:54 +02:00
Kjell Tore Guttormsen
112cb5af45 refactor(llm-security): parameterize buildSandboxedWorker with workerPath 2026-04-18 10:37:10 +02:00
Kjell Tore Guttormsen
aa269ed6d8 feat(llm-security): wire JetBrains branch into scanOneExtension 2026-04-18 10:35:46 +02:00
Kjell Tore Guttormsen
ca43fb8dd1 feat(llm-security): add runJetBrainsChecks with 7 JB-specific checks (inc. shaded-jar advisory)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 10:20:42 +02:00
Kjell Tore Guttormsen
03d61d8bca feat(llm-security): implement JetBrains discovery + Android Studio base dir 2026-04-18 10:16:28 +02:00
Kjell Tore Guttormsen
5afb9b1f33 feat(llm-security): implement parseIntelliJPlugin with nested-jar extraction 2026-04-18 10:15:12 +02:00
Kjell Tore Guttormsen
b86239448d feat(llm-security): add zero-dep plugin.xml + MANIFEST.MF parsers 2026-04-18 10:07:14 +02:00
Kjell Tore Guttormsen
50c0cd3065 feat(llm-security): add .kt .groovy .scala to taint-tracer CODE_EXTENSIONS 2026-04-18 10:04:32 +02:00
Kjell Tore Guttormsen
037a91276d docs(llm-security): add knowledge/jetbrains-marketplace-api-notes.md 2026-04-18 10:02:04 +02:00
Kjell Tore Guttormsen
31c7e91665 docs(llm-security): add JetBrains sections to ide-extension-threat-patterns 2026-04-18 10:00:59 +02:00
Kjell Tore Guttormsen
a86ca00960 feat(llm-security): seed top-jetbrains-plugins.json + loadJetBrainsBlocklist export
Step 1/17 of ultraplan-2026-04-17-jetbrains-ide-scan.

- Populate top-jetbrains-plugins.json with 56 canonical xmlIds (bundled +
  popular third-party): com.intellij.java, org.jetbrains.kotlin,
  com.jetbrains.python.community, org.rust.lang, com.github.copilot,
  mobi.hsz.idea.gitignore, the legitimate-typo 'Lombook Plugin', etc.
- Add loadJetBrainsBlocklist() export mirroring loadVSCodeBlocklist shape.
  Blocklist is empty by design — no public confirmed-malicious JetBrains
  Marketplace plugins as of 2026-04-17.
- Add tests/scanners/ide-extension-data.test.mjs (9 tests, all pass).
- Fix cache bug in loadTopJetBrains: map normalizeId on cache-hit path too
  (was previously unnormalized on second call).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 09:56:55 +02:00
Kjell Tore Guttormsen
1634197853 feat(ultraplan-local): v2.1.0 — dynamic quality-gated interview
Replace hardcoded Q1-Q8 in /ultrabrief-local with a section-driven
completeness loop (Phase 3) and a draft/review/revise loop with
brief-reviewer as stop-gate (Phase 4). Quality drives the interview,
not a question counter.

brief-reviewer now emits a machine-readable JSON block with per-dimension
scores (1-5) and detail arrays alongside the existing prose report;
planning-orchestrator continues to consume the prose verdict unchanged.

Phase 4 gate: all dimensions >= 4 AND research_plan = 5. On fail, a
targeted follow-up is generated from the weakest dimension's detail
field and the draft is re-reviewed. Max 3 review iterations bound cost;
exhaustion writes brief.md with brief_quality: partial and an explicit
Brief Quality section. Force-stop surfaces per-dimension findings before
the user chooses continue or partial.

Not breaking. /ultrabrief-local [--quick] <task> interface unchanged.
--quick now means compact start with escalation, not a max-N cap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 09:43:43 +02:00
Kjell Tore Guttormsen
2bc405e14a feat(ultraplan-local)!: v2.0.0 — brief-driven four-command pipeline
Extract interview from /ultraplan-local into new /ultrabrief-local command.
/ultraplan-local now requires --brief or --project (breaking). All pipeline
artifacts land in one project directory: .claude/projects/{date}-{slug}/
with brief.md, research/, plan.md, sessions/, progress.json.

Breaking changes:
- /ultraplan-local requires --brief <path> or --project <dir>
- /ultraplan-local --spec removed (convert specs to briefs per MIGRATION.md)
- Interview phase moved to /ultrabrief-local
- spec-reviewer renamed to brief-reviewer with 5th dimension (Research Plan validity)

Added:
- /ultrabrief-local command (interactive interview → brief.md with research plan)
- templates/ultrabrief-template.md (task brief format with intent + research plan)
- brief-reviewer agent (5-dimension brief quality review)
- --project <dir> flag on /ultraresearch-local, /ultraplan-local, /ultraexecute-local
- MIGRATION.md (v1 → v2 upgrade guide)

Changed:
- planning-orchestrator accepts Brief file: input (was Spec file:)
- planning-orchestrator Phase 1b uses brief-reviewer
- README + CLAUDE.md rewritten for four-command pipeline and task/research brief terminology
- CHANGELOG.md [2.0.0] entry with rationale
- Marketplace root README + CLAUDE.md updated to v2.0.0

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 07:22:08 +02:00
Kjell Tore Guttormsen
fb9eb79d17 docs(llm-security): research brief + URL-support plan for ide-scan
- jetbrains-research-brief.md: 29 sources, confidence 0.88 — input for v6.6.0 JetBrains/IntelliJ extension scanning. Covers plugin format, install paths per OS+product, Marketplace API, threat landscape (zero confirmed-malicious cases), check-mapping table, sandbox reuse verdict, risk register.
- ide-scan-url-support.md: retroactive plan doc for v6.4.0 URL-fetch feature.
2026-04-17 18:47:01 +02:00
Kjell Tore Guttormsen
9ecd66929c feat(ultraplan-local): v1.8.0 — close Opus 4.7 schema-drift gap
Opus 4.7 reads agent instructions more literally than 4.6. The v1.7
planning-orchestrator described the Step+Manifest schema via prose +
procedural rules, which 4.6 inferred correctly but 4.7 sometimes
rendered as narrative "Fase N" prose — producing plans ultraexecute
Phase 2 rejected. First observed 2026-04-17 during llm-security v6.2.0
planning.

v1.8.0 closes the gap:

- planning-orchestrator Phase 5 embeds a literal copyable Step+Manifest
  example (JWT middleware) replacing "read the template" prose
- Explicit forbidden-format clause: ## Fase N, ### Phase N, ### Stage N,
  and any non-"### Step N:" heading are denied
- Phase 5.5 schema self-check: grep-verify canonical Step count matches
  Manifest count and narrative heading count is zero, before handing to
  plan-critic
- ultraexecute-local --validate mode: schema-only check that parses
  steps + manifests, reports READY/FAIL with actionable error hints,
  no security scan, no execution. Fast sanity check between
  /ultraplan-local and full execution.

Static verification: 17/17 PASS.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 18:01:14 +02:00
Kjell Tore Guttormsen
9f893c3858 feat(llm-security): OS sandbox for /security ide-scan <url> (v6.5.0)
VSIX fetch + extract for URL targets now runs in a sub-process wrapped by
sandbox-exec (macOS) or bwrap (Linux), reusing the same primitives proven
by the v5.1 git-clone sandbox. Defense-in-depth — even if our own
zip-extract.mjs ever has a bypass, the kernel refuses any write outside
the per-scan temp directory.

New files:
- scanners/lib/vsix-fetch-worker.mjs — sub-process worker. Argv: --url
  --tmpdir; emits one JSON line on stdout (ok/sha256/size/source/extRoot
  or ok:false/error/code). Silent on stderr. Exit 0/1.
- scanners/lib/vsix-sandbox.mjs — wrapper. Exports buildSandboxProfile,
  buildBwrapArgs, buildSandboxedWorker, runVsixWorker. 35s timeout, 1 MB
  stdout cap.

Changes:
- scanners/ide-extension-scanner.mjs: fetchAndExtractVsixUrl is now
  sandbox-aware (useSandbox option, default true). In-process logic
  preserved as fallback. New meta.source.sandbox field:
  'sandbox-exec' | 'bwrap' | 'none' | 'in-process'.
- scan(target, { useSandbox }) defaults to true; tests pass false because
  globalThis.fetch mocks do not cross process boundaries.
- Windows fallback: in-process with meta.warnings advisory.

Tests:
- 8 new tests in tests/scanners/vsix-sandbox.test.mjs (per-platform
  profile generation, worker arg construction, live worker exit
  behavior on invalid URLs — no network).
- Existing URL tests updated to opt out of sandbox (useSandbox: false).
- 1344 → 1352 tests, all green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 17:28:57 +02:00
Kjell Tore Guttormsen
fe0193956d feat(llm-security): /security ide-scan <url> — Marketplace/OpenVSX/direct VSIX (v6.4.0)
Pre-installation verification of VS Code extensions via URL — fetch a remote
VSIX, extract it in a hardened sandbox, and run the existing IDE scanner
pipeline against it. No npm dependencies.

Sources:
- VS Code Marketplace (publisher.gallery.vsassets.io direct download)
- OpenVSX (open-vsx.org official API)
- Direct .vsix HTTPS URLs

Defenses:
- HTTPS-only, TLS verified, manual redirect with per-source host whitelist
- 30s total timeout via AbortController
- 50MB compressed cap, 500MB uncompressed, 100x expansion ratio
- Zero-dep ZIP extractor: zip-slip, absolute paths, drive letters, NUL bytes,
  symlinks (Unix mode 0xA000), depth limits, ZIP64 rejected, encrypted rejected
- SHA-256 streamed during fetch, surfaced in meta.source
- Temp dir cleanup in all paths (try/finally)

Files:
- scanners/lib/vsix-fetch.mjs (HTTPS fetcher, host whitelist, streaming SHA-256)
- scanners/lib/zip-extract.mjs (zero-dep parser with hardening caps)
- knowledge/marketplace-api-notes.md (endpoint reference)
- 3 test files (48 tests added: vsix-fetch, zip-extract, ide-extension-url)

Tests: 1296 → 1344 (all green).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 17:16:26 +02:00
Kjell Tore Guttormsen
6252e55700 feat(llm-security): add /security ide-scan — VS Code / JetBrains extension prescan (v6.3.0)
New standalone scanner (prefix IDE) discovers installed VS Code extensions
across forks (Cursor, Windsurf, VSCodium, code-server, Insiders, Remote-SSH)
and runs 7 IDE-specific threat checks: blocklist match (CRITICAL),
theme-with-code, sideload (unsigned .vsix), dangerous uninstall hook (HIGH),
wildcard activation, extension-pack expansion, typosquat (MEDIUM).

Per-extension reuse of UNI/ENT/NET/TNT/MEM/SCR scanners with bounded
concurrency. Offline-first; --online opt-in. JetBrains discovery stubbed
for v1.1. 22 new tests (1296 total, was 1274).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 16:23:35 +02:00
Kjell Tore Guttormsen
7bcf5fae9d docs: update READMEs for llm-security v6.2.0 (9 hooks, PreCompact, Opus 4.7) 2026-04-17 15:35:52 +02:00
Kjell Tore Guttormsen
80b4952f2c chore(release): v6.2.0 — bash-normalize T5/T6, PreCompact hook, hardening guide 2026-04-17 14:55:26 +02:00