From ca029396cd272b5d4b4ecf47be69edc2ac9bc8e0 Mon Sep 17 00:00:00 2001 From: Aryam Goyal Date: Sun, 9 Aug 2026 12:46:01 +0530 Subject: [PATCH 01/10] Fix unreleased diagnostics and redesign discovery surfaces --- README.md | 22 ++- .../app/_components/interactive-map-stage.tsx | 4 +- apps/web/app/_components/product-map.tsx | 4 +- apps/web/app/_lib/site-data.ts | 3 + apps/web/app/changelog/page.tsx | 2 +- apps/web/app/demo.tsx | 10 +- apps/web/app/demo/page.tsx | 12 +- apps/web/app/docs/page.tsx | 14 +- apps/web/app/evidence/page.tsx | 2 +- apps/web/app/get-started/page.tsx | 27 ++- apps/web/app/globals.css | 122 +++++++++++- apps/web/app/page.tsx | 181 +++++++----------- apps/web/app/product/page.tsx | 2 +- docs/assets/fixmap-cli-demo.svg | 7 +- .../reports/declines-fabricated-identifier.md | 1 + examples/reports/declines-unmatched-terms.md | 1 + examples/reports/declines-vague-task.md | 1 + packages/action/dist/index.mjs | 121 ++++++++++-- packages/cli/src/agent-setup.ts | 95 +++++++++ packages/cli/src/cli-runner.ts | 152 ++++++++++++++- packages/cli/test/cli-runner.test.ts | 63 +++++- packages/core/src/exclude.ts | 14 +- packages/core/src/plan.ts | 54 ++++-- packages/core/src/repo-scan.ts | 76 +++++++- packages/core/src/types.ts | 3 + packages/core/test/exclude.test.ts | 15 +- packages/core/test/repo-scan.test.ts | 67 ++++++- 27 files changed, 861 insertions(+), 214 deletions(-) create mode 100644 packages/cli/src/agent-setup.ts diff --git a/README.md b/README.md index a3a7668..a8c7897 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,14 @@ For a one-off trial: npx -y @aryam/fixmap@latest plan --issue https://github.com/chalk/chalk/issues/624 ``` +Install a discoverable `/fixmap` command for Claude Code, Cursor, GitHub Copilot, and Agent Skills: + +```bash +fixmap setup +``` + +Type `/fixmap` with no task to see the full feature menu, or run `fixmap features` in a terminal. Use `fixmap setup --agent ` to install one integration, and `--force` only after reviewing an existing customized command. + FixMap fetches a public task, infers its repository, scans a temporary isolated checkout, and removes it when the report is complete. Local repository analysis never uploads source. ## Everyday workflow @@ -61,6 +69,12 @@ Verify the completed diff against the saved plan: fixmap verify --report plan.json --diff main...HEAD ``` +Validate a saved report before another tool consumes it: + +```bash +fixmap validate plan.json +``` + Use `--working-tree` for staged and unstaged tracked edits, `--include-untracked` when new files should count as changes, `--exclude` or `.fixmapignore` to focus the map, and `--no-cache` to force a fresh scan. Run `fixmap --help` for the complete command reference. ## Complete feature catalog @@ -71,7 +85,7 @@ Use `--working-tree` for staged and unstaged tracked edits, `--include-untracked - Normalizes supported browser and GitHub API issue URLs, including `www`, query strings, and fragments, while rejecting credentials, lookalike hosts, ports, and unsafe encoded paths. - Scans the current checkout, another local path, a `file://` URL, or an isolated checkout of a public GitHub repository. - Maps `--diff `, `--base`/`--head`, or the current `--working-tree`; untracked changes remain opt-in with `--include-untracked`. -- Reuses repository scans only when the repository root, commit, status, and binary diff are identical. `cache-hit` reports reuse, `--no-cache` bypasses it, and `FIXMAP_CACHE_DIR` moves the OS cache. +- Reuses repository scans only when the repository root, commit, status, and binary diff are identical. `cache-hit` reports reuse and scan age, entries expire after seven days, `--no-cache` reports a fresh bypass, and `FIXMAP_CACHE_DIR` moves the OS cache. - Detects npm, pnpm, Yarn, and Bun projects and reads the scripts declared by each workspace package. ### Plan and ranking @@ -82,19 +96,21 @@ Use `--working-tree` for staged and unstaged tracked edits, `--include-untracked - Routes reachable test commands from real package scripts and pairs them with the nearest related test files. - Reports six bounded risk areas: authentication, billing, automation, data, public API, and dependencies. - Explains task grounding, ranking shape, unresolved or partially matched identifiers, exclusions, scan limits, unread content, skipped submodules, empty diffs, and Git failures. -- Supports `--limit`, repeatable `--exclude`, and ordered `.fixmapignore` patterns with negation. +- Supports `--limit`, repeatable `--exclude`, and ordered `.fixmapignore` patterns with negation. Root-leading patterns are repository-relative, pasted absolute paths inside the repository are normalized, and patterns that match nothing produce a warning. - Produces Markdown for people or versioned JSON for tools, writes to `--output`, and gives one grounded next action. -### Explain, Compare, Verify, and Doctor +### Explain, Compare, Verify, Validate, and Doctor - **Explain** tells you whether a path ranked, fell below the cutoff, was excluded, resolves through a submodule, or was never scanned—and uses the same task and diff evidence as Plan. - **Compare** shows files that entered, left, moved, or changed confidence after the task was refined, plus changes in task grounding. - **Verify** compares a saved JSON plan with a diff or working tree and flags generated edits, unmapped changes, an untouched leading file, source changes without tests, newly reached risk areas, and plan/repository mismatches. +- **Validate** checks any saved JSON report with the structural compatibility validator shared by Compare, Verify, the Action, and MCP. - **Doctor** prints the running version and executable path and diagnoses project, global, PATH, and npm-exec version shadows. - `FIXMAP_PROGRESS` controls remote clone/scan progress, and `FIXMAP_VERBOSE_USAGE` restores full usage text after argument errors. ### Agent and automation interfaces +- `fixmap setup` installs `/fixmap` discovery for Claude Code, Cursor, GitHub Copilot prompt files, and the open Agent Skills layout; the no-argument command lists every FixMap workflow before making changes. - The MCP server exposes `fixmap_plan`, `fixmap_explain`, `fixmap_compare`, `fixmap_verify`, and `fixmap_doctor` over local stdio and is published in the official MCP Registry. - The GitHub Action runs Plan or Verify on pull requests, writes a full job summary, and creates or updates one bounded FixMap comment instead of posting duplicates. - The Action accepts explicit task input or pull-request context, uses the same report validator as the CLI and MCP server, and fails clearly when a requested diff cannot be resolved. diff --git a/apps/web/app/_components/interactive-map-stage.tsx b/apps/web/app/_components/interactive-map-stage.tsx index 25740ff..def8bf8 100644 --- a/apps/web/app/_components/interactive-map-stage.tsx +++ b/apps/web/app/_components/interactive-map-stage.tsx @@ -143,7 +143,7 @@ export function InteractiveMapStage() { }; return ( -
+
FixMap
-
+
{stageMeta.map((stage, index) => { const isReady = readyCount > index; return ( diff --git a/apps/web/app/_components/product-map.tsx b/apps/web/app/_components/product-map.tsx index 28157ee..390cbaf 100644 --- a/apps/web/app/_components/product-map.tsx +++ b/apps/web/app/_components/product-map.tsx @@ -25,7 +25,7 @@ const outputs = [ export function ProductMap({ compact = false }: { compact?: boolean }) { return ( -
+
1
@@ -45,7 +45,7 @@ export function ProductMap({ compact = false }: { compact?: boolean }) {
-

{title}

+

{title}

{items.map((item, index) =>

{index + 1}{item}

)}
diff --git a/apps/web/app/_lib/site-data.ts b/apps/web/app/_lib/site-data.ts index 4ec4766..a5cabec 100644 --- a/apps/web/app/_lib/site-data.ts +++ b/apps/web/app/_lib/site-data.ts @@ -95,5 +95,8 @@ export const commands = { localTask: "fixmap plan --issue \"password reset emails fail\"", diff: "fixmap plan --diff main...HEAD", verify: "fixmap verify --report plan.json --diff main...HEAD", + validate: "fixmap validate plan.json", + setup: "fixmap setup", + features: "fixmap features", mcp: "fixmap mcp" }; diff --git a/apps/web/app/changelog/page.tsx b/apps/web/app/changelog/page.tsx index 9f6b126..08725db 100644 --- a/apps/web/app/changelog/page.tsx +++ b/apps/web/app/changelog/page.tsx @@ -242,7 +242,7 @@ export default function ChangelogPage() {

Product changelog

-

Every improvement.
Plainly recorded.

+

Every improvement.{" "}
Plainly recorded.

New features, important fixes, and the evidence behind each recent FixMap release.

Current package: v{siteStats.version} diff --git a/apps/web/app/demo.tsx b/apps/web/app/demo.tsx index 52ad303..ce81050 100644 --- a/apps/web/app/demo.tsx +++ b/apps/web/app/demo.tsx @@ -135,7 +135,7 @@ export function Demo() {