Commit Graph
561 Commits
Author SHA1 Message Date
ZebangChengandGitHub 5c1e35f90b Merge pull request #387 from tirth8205/fix/phase7-cleanup-mv-trash
fix(skill): use mv-to-trash + delayed purge for Phase 7 cleanup (#301)
2026-06-06 18:47:00 +08:00
ZebangChengandGitHub 3281fd15e0 Merge pull request #346 from tirth8205/perf/understand-pipeline
perf(understand): parallelise file I/O in compute-batches + extract-import-map (#76)
2026-06-06 16:25:49 +08:00
Tirth KananiandClaude Opus 4.7 b3da919223 fix(skill): use mv-to-trash + delayed purge for Phase 7 cleanup (#301)
Phase 7's `rm -rf` of the just-created `intermediate/` and `tmp/` dirs
trips destructive-action gates on hardened hosts (e.g. freshness-window
checks that flag deleting paths created moments earlier). Move them into
a timestamped `.trash-<epoch>/` instead; Phase 0 reclaims the space once
the trash is older than 7 days, well past any freshness window. Behavior
on normal hosts is unchanged — disk usage is identical after the next
run's purge.

Closes #301

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-05 16:56:42 +01:00
Tirth KananiandClaude Opus 4.7 1f8d165f86 fix(extract-import-map): preserve deterministic stderr order across concurrent loaders
Addresses the regression flagged by ZebangCheng on #346: under the
parallelised `buildResolutionContext`, `loadTsConfigs` /
`loadGoModules` / `loadPhpAutoloads` ran concurrently but each wrote
warnings to stderr inline as it iterated read results, so a fixture
with both a malformed `tsconfig.json` and a malformed `composer.json`
could emit `composer, tsconfig` instead of the pre-PR `tsconfig,
composer` depending on I/O timing.

Each loader now buffers its warnings into a returned array and the
caller drains them in canonical order (tsconfig → go → php) after
`Promise.all`, restoring byte-identical stderr output. Added a
regression test that fixtures both malformed configs and asserts the
tsconfig warning precedes the composer warning in stderr.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-05 16:19:31 +01:00
Yuxiang LinandGitHub 7a3b7511b2 Merge pull request #378 from BozhengLong/feat/understand-language-auto-detection
feat(understand): auto-detect conversation language on first run
2026-06-04 13:46:14 +08:00
Bozheng LongandClaude Opus 4.8 55d0ab2336 docs: design + implementation plan for language auto-detection
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 21:19:52 +08:00
Bozheng LongandClaude Opus 4.8 92e76190aa feat(understand): auto-detect conversation language on first run
When /understand runs with no --language flag and no stored outputLanguage,
step 3.6 now infers the conversation language and — only when it is non-English
— confirms once before generating, then persists the choice to config.json.
English conversations keep the exact same silent `en` path; --language flag and
stored config still take priority. README documents the behavior; version
bumped 2.7.5 -> 2.7.6 across all five manifests (user-visible behavior change).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 21:19:52 +08:00
ZebangChengandGitHub 025b884935 Merge pull request #350 from tirth8205/chore/repo-hygiene
chore(repo): community templates, CoC, SECURITY, package metadata, CI on main (#248, #249, #251, #252).
2026-06-02 17:49:02 +08:00
ZebangChengandGitHub f65013e689 Merge pull request #343 from xiazl1993/chore/cleanup-gitignore-patterns
chore: clean up duplicate gitignore patterns
2026-06-02 17:47:24 +08:00
Yuxiang LinandGitHub e5dded6215 Merge pull request #332 from ZebangCheng/fix/phase7-preserve-scan-result
fix(skill): preserve scan-result.json across Phase 7 cleanup for incremental runs (#293)
2026-06-01 17:53:12 +08:00
Tirth Kanani aef940fcde chore(repo): add issue/PR templates, SECURITY.md, CoC, package metadata; widen CI triggers
Closes a cluster of community-profile gaps (#248, #249, #251, #252) in one
PR rather than four micro-PRs that all touch the same surface area.

### Templates (#251, #252)

- .github/ISSUE_TEMPLATE/bug_report.yml — required fields for repro
  (plugin version, platform, OS, project language, file count); the four
  pieces of context that are missing from ~every current bug report.
- .github/ISSUE_TEMPLATE/feature_request.yml — leads with the *problem*
  rather than the proposed solution, which keeps maintainer review focused
  on whether to solve, not just how.
- .github/ISSUE_TEMPLATE/question.yml — separate from bug to keep the
  bug queue triagable.
- .github/ISSUE_TEMPLATE/config.yml — disables blank issues and routes
  general discussion to README + Discussions.
- .github/PULL_REQUEST_TEMPLATE.md — includes the version-bump checklist
  that CLAUDE.md says must stay in sync across 5 manifests; otherwise
  every contributor learns this rule by getting their PR bounced.

### Community files

- CODE_OF_CONDUCT.md — short, project-specific document that names the
  expectations and reporting path. Not a verbatim Contributor Covenant
  to keep it readable.
- SECURITY.md — describes the project's local-only threat model
  explicitly so reporters know what's in / out of scope before they
  spend time on a writeup. Points at GitHub private vulnerability
  reporting as the primary channel.

### CI (#249)

- ci.yml now also runs on pushes to main, not only PRs. Without this,
  a direct push to main (which happens when maintainers merge a PR
  branch locally) doesn't trigger CI, so a regression can land green-
  looking and stay broken for days.
- Added a concurrency group that cancels stale runs for the same ref.
  Saves runner minutes and keeps the per-ref status meaningful.
- Used `github.ref` (a controlled value), not user-controlled input,
  so no script-injection surface.

### package.json (#248)

- Added description, license, repository, bugs, homepage, keywords —
  the standard set for npm package discoverability and so GitHub's
  community-profile check shows the project at 100%.
2026-05-31 21:29:13 +01:00
Tirth KananiandClaude Opus 4.7 eea73b656d perf(understand): parallelise file I/O in compute-batches + extract-import-map (#76)
The /understand pipeline reads every code file twice during analysis:
once in compute-batches (`extractExports` for the cross-batch neighbour
map) and once again in extract-import-map (per-language config loaders).
Both sites used sequential `readFileSync` loops, so on the iOS repo in
issue #226 (~15k files) the disk-read time was effectively serialised
behind a single libuv thread while the rest of the pool sat idle.

## Changes

- `extractExports` now batches files into `IO_PARALLELISM = 64` slices
  and issues all `readFile` calls in each slice through `Promise.all`,
  letting libuv's worker-thread pool overlap disk reads. The
  tree-sitter parse stays on the main thread because `web-tree-sitter`
  is single-threaded WASM — pipelining the I/O while parses run is
  where the wall-time savings come from.
- `loadTsConfigs`, `loadGoModules`, `loadPhpAutoloads` and
  `buildResolutionContext` switch to async / `Promise.all` for the
  same reason. `buildResolutionContext` also runs the three loader
  passes concurrently (`Promise.all([...])`) since they're independent.
- A small `readFilesParallel(paths)` helper is added at the top of
  `extract-import-map.mjs` so the three loaders share the same
  error-preserving shape.

## Why behavior stays identical

- Each loader collects its candidate paths in `files[]` order *before*
  issuing reads, then iterates `reads` in the same order to emit
  warnings + populate output maps. So stderr order and the final map
  contents are byte-identical to the previous sequential loops.
- `extractExports` collects per-file errors in-place in the
  `Promise.all` callbacks and emits warnings during the post-read
  serial loop, again in chunk order — so warning text and order match
  the previous implementation.
- Tree-sitter parsing is unchanged: parses still run serially on the
  main thread, just with reads pipelined alongside.

## What's NOT in this PR

- `buildFingerprintStore` and `analyzeChanges` in `core/fingerprint.ts`
  have the same sequential pattern. They're left alone here because
  they're part of the public `@understand-anything/core` API; making
  them async would be a breaking change worth its own discussion.
  Internal-only `.mjs` scripts are safe to refactor without API churn.
- No change to scan-project: most of its sync I/O is `statSync`
  (metadata, not content) plus a handful of small `.gitignore` /
  `.understandignore` reads. The parallelism win is marginal there.

## Verification

- `pnpm lint` clean
- `pnpm --filter @understand-anything/core build` clean
- `pnpm --filter @understand-anything/skill build` clean
- `pnpm test`: 196/196 — including
  `test_compute_batches.test.mjs` (19 tests) and
  `test_extract_import_map.test.mjs` (40 tests), which exercise both
  changed pipelines end-to-end with fixture projects. No output
  diff vs main.

Refs #76

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-31 20:25:39 +01:00
summer d2d4d23156 chore: clean up duplicate gitignore patterns 2026-05-31 23:14:38 +08:00
Zebang Cheng 928b997c57 fix(skill): preserve scan-result.json across Phase 7 cleanup for incremental runs (#293) 2026-05-29 15:33:31 +00:00
ZebangChengandGitHub 26edf61856 Merge pull request #235 from ZebangCheng/feat/add-trae-platform
feat(install): add Trae (ByteDance AI IDE) platform support (#229)
2026-05-26 13:09:57 +08:00
ZebangChengandGitHub d40d6b6204 Merge pull request #227 from ZebangCheng/fix/tsconfig-path-leading-dot-slash
fix(extract-import-map): normalize tsconfig path-alias candidates with leading "./" (#214)
2026-05-26 13:09:25 +08:00
Yuxiang LinandGitHub 1a16e4de61 Merge pull request #208 from evanclan/docs/cursor-manual-install-i18n
docs(readme): add Cursor manual install fallback to 7 translated READMEs
2026-05-26 08:03:39 +08:00
Yuxiang LinandGitHub 44d1d59028 Merge pull request #231 from atlas-architect/fix/scan-project-non-ascii-paths
fix(scan-project): preserve non-ASCII path bytes via `git ls-files -z`
2026-05-26 08:02:54 +08:00
Adam HerringandClaude Opus 4.7 b4d856d3b8 fix(scan-project): preserve non-ASCII path bytes via git ls-files -z
`enumerateViaGit` ran `git ls-files -co --exclude-standard` (newline-separated
output) and then `split('\n').map(trim)` on the result. Without `-z`,
`git ls-files` C-escapes any byte outside the locale's "safe" set and wraps
the path in double quotes — for example, a directory named `30. 🏗️ docs/`
comes back as `"30. \360\237\217\227\357\270\217 docs/"`. Downstream
consumers then can't round-trip those octal-quoted strings to real disk
paths, so every file under such directories is silently dropped from the
scan.

This is particularly biting on Windows (where the issue surfaces even with
UTF-8 locale settings) and for any project that uses emoji, accented
characters, or CJK codepoints in directory names — which is increasingly
common in design/spec/journal trees.

The fix is to use `-z` (NUL-terminated output), the same approach git
itself documents for downstream consumers (e.g. `xargs -0`). NUL-separated
chunks are raw bytes, so every codepoint round-trips back to its real disk
path on every platform. Split on `\0` instead of `\n`; drop the now-
unnecessary `.trim()`.

Verified on a real project with emoji-prefixed directory names:

  bare `git ls-files`:
    "30. \360\237\217\227\357\270\217\360\237\247\231\342\200\215..."

  `git ls-files -z`:
    30. 🏗️🧙‍♂️🔮 BD-CCSP/01. Demo's/DEMO--...

Discovered during a multi-agent scan of an Atlas Intelligence spoke repo;
~33 design-intent files in `30. 🏗️ BD-{app}/` directories were silently
dropped per scan. Full report: atlas-intelligence-io/fleet-feedback#491.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 11:09:20 -07:00
Zebang Cheng b4b599e214 feat(install): add Trae (ByteDance AI IDE) platform support (#229) 2026-05-25 15:45:48 +00:00
Zebang Cheng d9ae3c290c fix(extract-import-map): normalize tsconfig path-alias candidates with leading "./" (#214) 2026-05-25 14:02:01 +00:00
Evan Alferez 47e9001634 docs(readme): add Cursor manual install fallback to 7 translated READMEs (#172)
PR #199 documented the community-reported Cursor Settings → Plugins
workaround in README.md only; the seven READMEs/* locale files still
said auto-discovery always works. Mirror that fallback here so non-English
readers hit the same fix without hunting issue #172.
2026-05-25 09:20:33 +09:00
Yuxiang LinandGitHub 470cc01dc5 Merge pull request #200 from AsimRaza10/fix/agent-model-omit-inherit
fix(agents): omit `model: inherit` so non-Claude tools don't see a bad model id
2026-05-24 21:12:57 +08:00
Yuxiang LinandGitHub a8a115dc36 docs(readme): note Cursor manual install fallback when auto-discovery fails (#199)
Several users have reported that cloning the repo and opening it in Cursor
doesn't always trigger auto-discovery of the .cursor-plugin manifest. Add
the community-reported workaround (Cursor Settings → Plugins, paste repo
URL) to the Cursor section so it isn't only discoverable from issue
threads.

Closes #172
2026-05-24 20:23:10 +08:00
Yuxiang LinandGitHub a59a573a1d Merge pull request #204 from Lum1104/feat/semantic-batching-and-output-chunking
fix(#159): semantic batching + bundled importMap + Phase 1 speedup
2026-05-24 20:12:14 +08:00
Asim Raza 0566ea8b6b fix(agents): omit model: inherit so non-Claude tools don't see a bad model id
`model: inherit` is a Claude Code-specific keyword that means "use the
parent session's model." Other tools that read the same agent frontmatter
(opencode, codex, etc.) don't understand it and instead try to use
`inherit` as a literal model id, which the configured provider rejects.

Reproduction (from #167): opencode + deepseek runs `/understand`, the
project-scanner subagent dispatches with `model: inherit`, deepseek
returns `ProviderModelNotFoundError`, and the pipeline halts on every
subagent dispatch.

With the field omitted, each platform falls back to its own configured
default:
- Claude Code: user's default subagent model
- opencode / codex / etc.: globally configured model

Note for Claude Code Opus users: subagents will no longer auto-inherit
the Opus session model. If you want the previous behavior, set your
default subagent model globally — that single setting now controls all
nine agents.

Closes #167
2026-05-24 10:50:26 +05:00
Asim Raza 0db7b3c795 docs(readme): note Cursor manual install fallback when auto-discovery fails
Several users have reported that cloning the repo and opening it in Cursor
doesn't always trigger auto-discovery of the .cursor-plugin manifest. Add
the community-reported workaround (Cursor Settings → Plugins, paste repo
URL) to the Cursor section so it isn't only discoverable from issue
threads.

Closes #172
2026-05-24 10:43:18 +05:00
Yuxiang LinandGitHub 42d70c3f9c Merge pull request #186 from AsimRaza10/fix/tailwind-source-detection
fix(dashboard): explicit @source for Tailwind v4 (fixes #179)
2026-05-24 10:10:58 +08:00
Yuxiang LinandGitHub be458664c1 Merge pull request #187 from devangpratap/fix/progress-reporting
fix(ux): add progress reporting to /understand pipeline
2026-05-24 09:58:52 +08:00
Lum1104 dbba0703a9 docs(readme): document incremental updates, subdir scoping, and tree-sitter+LLM split
Add to all 8 READMEs (English + 7 translations):
- "Keep learning" section gets inline commands for incremental re-runs, the --auto-update post-commit hook, and scoping /understand to a subdirectory for huge monorepos
- "Under the Hood" gets a new "Tree-sitter + LLM hybrid" subsection explaining the deterministic-vs-semantic split that powers the pipeline
2026-05-24 09:34:54 +08:00
devangpratap 31ae12b65c fix(ux): add progress reporting to /understand pipeline
Adds phase status lines, batch progress with total count, and phase
completion confirmations to the skill definition. Users now see
[Phase N/7] headers and Batch X/N during analysis instead of
unnumbered batch lines with no context.

Fixes #182
2026-05-23 14:18:26 -04:00
Asim Raza 96c412bcc1 fix(dashboard): add explicit @source for Tailwind v4 detection
Tailwind v4's default source detection walks the nearest .git and
collects tracked files via git ls-files. When the dashboard sources
sit inside a gitignored subtree of an ancestor repo (e.g. the default
marketplace install path ~/.claude/plugins/cache/, which is ignored by
~/.claude/.gitignore), detection returns 0 files and the Oxide engine
skips all utility generation — the dashboard renders unstyled.

Adding explicit @source directives is the supported Tailwind v4 escape
hatch and is a no-op for installs where automatic detection works.

Verified: built CSS bundle jumps from ~9 KB to ~55 KB and utility
classes (.flex, .grid, .absolute, .w-full, .h-full) are present.

Fixes #179
2026-05-23 18:23:17 +05:00
Yuxiang LinandGitHub 35699dd82b Merge pull request #171 from Derrick-xn/docs/update-skill-graph-reference
docs(skills): update graph structure references
2026-05-23 16:10:55 +08:00
Yuxiang LinandGitHub 58f66be006 Merge pull request #177 from vedrao/fix/security-astro-vite-cve-bumps
chore(deps): bump astro to 6.3.7 and dashboard vite to 6.4.2 for security fixes
2026-05-23 16:05:54 +08:00
Ved PrakashandLum1104 4ef12f39a6 chore(dependencies): update astro and vite versions in package.json and pnpm-lock.yaml
Bumps astro to version 6.3.7 and vite to version 6.4.2 across relevant package files to ensure compatibility and access to the latest features.
2026-05-23 15:58:37 +08:00
Yuxiang LinandGitHub 4bd6f78dff Merge pull request #161 from okwn/contrib/understand-anything/eslint-tooling
chore: add ESLint tooling with TypeScript support
2026-05-23 15:47:52 +08:00
Lum1104 a1261b4883 chore(lint): switch to recommended baseline, fix errors, wire into CI
- typescript-eslint preset: strict -> recommended for a usable first-pass
  baseline (per PR discussion); ratchet up in a follow-up.
- Drop the projectService/parserOptions block. Neither `recommended` nor
  `strict` is type-aware, so it was unused; removing it also avoids the
  pnpm-workspace tsconfig-resolution failure mode flagged in review.
- Add Node + browser globals via the `globals` package so .mjs scripts and
  the dashboard stop hitting `no-undef`.
- Expand ignores: built bundles (**/public/**), Astro generated (.astro/),
  and .private/ (eval scratch). Cuts 2400+ errors in vendored output.
- Allow `_`-prefixed unused vars/args/caught errors; skip irregular
  whitespace inside comments (json-parser intentionally embeds ZWSP-escaped
  block-comment examples in JSDoc).
- Fix the residual 13 genuine errors: drop dead imports/vars, replace
  two `as any[]` in schema.ts with `Array<Record<string, unknown>>`,
  drop unused destructure in change-classifier, drop unused catch binding
  in extract-structure.mjs.
- Add EOF newline to eslint.config.mjs.
- Refresh pnpm-lock.yaml.
- Add `pnpm lint` step to .github/workflows/ci.yml so the tooling
  actually enforces something.

pnpm lint now exits 0 locally; 33+13 test files / 1445 tests still pass.
2026-05-23 15:26:39 +08:00
Yuxiang LinandGitHub f51727526d Merge pull request #175 from zichen0116/fix/wrong-github-url-in-footer
fix: correct GitHub URL in onboarding guide footer
2026-05-22 22:06:27 +08:00
Ubuntu 11c5123d61 fix: correct GitHub URL in onboarding guide footer
The generated onboarding markdown linked to a nonexistent repository
(anthropics/understand-anything) instead of the actual project URL
(Lum1104/Understand-Anything).
2026-05-22 20:23:21 +08:00
初晨 a30c226bf4 docs(skills): update graph structure references 2026-05-22 12:08:44 +08:00
Yuxiang LinandGitHub 17eed78876 Merge pull request #170 from Lum1104/feat/trendshift-badge
feat(readme,homepage): add Trendshift trending badge
2026-05-22 08:28:45 +08:00
Lum1104 33728f04a6 feat(readme,homepage): add Trendshift badge
Adds the Trendshift trending-repository badge just below the tagline on the
English README and all 7 localized variants, and to the homepage hero between
the action row and the Enterprise pill.
2026-05-22 08:27:43 +08:00
Yuxiang LinandGitHub ea4d17b484 Merge pull request #164 from Lum1104/feat/community-video
feat(readme,homepage): add Community section with Better Stack walkthrough video
2026-05-21 20:01:23 +08:00
Lum1104 db94d066a8 feat(readme,homepage): add Community section featuring Better Stack walkthrough video
Adds a Community section near the end of README (English + 7 localized
variants) and a CommunityVideo component on the homepage embedding the
YouTube walkthrough by Better Stack. Section invites future video / blog /
tutorial contributions to be featured here.
2026-05-21 19:57:09 +08:00
Yuxiang LinandGitHub 300056e789 Merge pull request #163 from Lum1104/fix/extract-structure-symlink-isCli
fix(skills/understand): extract-structure isCli silently no-ops via symlinked SKILL_DIR
2026-05-21 19:40:01 +08:00
Lum1104 d14d6f8f96 chore(release): bump version to 2.7.4 2026-05-21 19:36:17 +08:00
Lum1104 8a78c94fc6 fix(skills/understand): canonicalize isCli paths so symlinked SKILL_DIR runs main()
import.meta.url resolves through symlinks but pathToFileURL(process.argv[1])
preserves them, so extract-structure.mjs silently exited 0 without writing
output when invoked via the plugin's symlinked install path — the documented
Claude Code / Copilot CLI layout. Compare both sides via realpathSync and add
a post-write existence assertion plus caller-side guidance in the agent.

Closes #162
2026-05-21 19:36:14 +08:00
okwn 1bbfe99c64 chore: add ESLint tooling with TypeScript support
The repository has a pnpm lint script running 'eslint .' but ESLint
and typescript-eslint were not listed in devDependencies.

Added:
- eslint (^9.0.0)
- @eslint/js (^9.0.0)
- typescript-eslint (^8.0.0)

Added eslint.config.mjs with flat config (ESLint 9+) using
typescript-eslint strict rules. Ignores node_modules, dist, build,
and framework-specific output directories.
2026-05-21 09:15:15 +00:00
Yuxiang LinandGitHub 58411ac1f7 Merge pull request #155 from nieao/feat/onboarding-overlay
feat(dashboard): first-visit onboarding overlay
2026-05-21 11:09:34 +08:00
Lum1104 9dfcce73a5 refactor(onboarding): theme tokens, lifted state, a11y
- Replace hardcoded hex with var(--color-*) and CJK font stacks with
  var(--font-sans) / var(--font-heading) so the overlay tracks the theme
  picker and uses the project's typography (DM Serif Display).
- Lift dismiss/visibility state to Dashboard (shouldShowOnboarding +
  showOnboarding useState + dismissOnboarding callback). Gate the
  Suspense mount with a boolean so the lazy chunk is only fetched on
  first visit, matching the PathFinderModal / KeyboardShortcutsHelp
  mount pattern.
- Add capture-phase Escape handler (stopPropagation prevents the global
  shortcut chain from also firing) and role="dialog" / aria-modal /
  aria-labelledby on the card for screen readers.
2026-05-21 11:07:02 +08:00