Skip to content

[community-bleeding-edge] Integrate safe community PRs through Batch 3#3142

Closed
thedotmack wants to merge 143 commits into
mainfrom
plan/community-bleeding-edge
Closed

[community-bleeding-edge] Integrate safe community PRs through Batch 3#3142
thedotmack wants to merge 143 commits into
mainfrom
plan/community-bleeding-edge

Conversation

@thedotmack

Copy link
Copy Markdown
Owner

Scope

This PR is the Community Bleeding Edge integration branch through Batch 3 only. It is not the full final bleeding-edge plan from #3139. Conflicting batches 4-9 remain to be handled separately after this checkpoint.

Plan issue: #3139
Branch SHA at PR open: a941ac7

Merged PRs

Batch 1: #3136, #3084, #3018, #2884.

Batch 2: #3112, #3108, #3099, #3095, #3061, #3055, #3006, #2998, #2945, #2944, #2890, #2889, #2887, #2830, #2775.

Batch 3: #3125, #3093, #3079, #3058, #3041, #3023, #3015, #3005, #2981, #2936, #2930, #2902, #2886, #2856, #2777, #2700, #2692, #2633, #2619, #2580.

Held or blocked

Remaining work

Batches 4-9 remain. This branch intentionally stops at the verified Batch 3 checkpoint so review can focus on the safe mergeable community PR set integrated so far.

Verification summary

Passed before opening this PR:

  • npm install --no-audit --no-fund: up to date.
  • npm run typecheck: passed.
  • npm run build: passed.
  • bun test: 2389 pass, 15 skip, 0 fail.
  • npm run test:context: 74 pass.
  • npm run test:search: 41 pass.
  • npm run test:server: 162 pass, 13 skip.
  • npm run test:sqlite: 63 pass.
  • npm run test:agents: 23 pass.
  • npm run test:infra: 200 pass.
  • npm run lint:hook-io: passed.
  • npm run lint:spawn-env: passed.
  • npm run check:postinstall-allowlist: passed, 26 plugin deps checked.
  • cd plugin && bun install --frozen-lockfile --ignore-scripts: no changes.
  • npm run smoke:clean-room: passed.
  • npm run e2e:server:docker: passed on final retry, run 1783236993-9289.

Docker notes:

  • First Docker attempt was blocked by another worktree holding fixed port 37877: Bind for :::37877 failed: port is already allocated.
  • Second retry reached phase 1 then exited 137 during key revocation.
  • Final retry passed phase 1, phase 2, and local-dev auth rejection inside Docker.

Safety checks

jaygaha and others added 30 commits May 20, 2026 15:18
Adds a reference section synthesising the 21-rule CLAUDE.md framework
that went viral on GitHub (82,000 stars). Source: two posts by
@0xDepressionn covering Andrej Karpathy's original 4 rules and the full
21-rule expansion across DEFAULTS, BEHAVIOR, and MEMORY + STACK.

Karpathy's 4 rules alone improved coding accuracy from 65% → 94%.
The full framework is estimated to save ~$975/week per developer in
repeated context, unauthorised changes, and forgotten decisions.
Address PR review: the consolidation dropped CorpusBuilder's
logger.warn on malformed JSON columns, making bad data invisible in
logs. Add an optional onParseError callback to the util so the
CorpusBuilder caller can keep its warn while DataRoutes stays
silent (it never logged in the first place).
Round-2 PR review:
- value.length === 0 missed whitespace-only strings, which fell into
  JSON.parse and triggered a spurious onParseError. Switch to trimming
  before the length check and JSON.parse so '   ' / '\n\t' return []
  silently.
- Add two tests pinning the contract:
  - onParseError is not called for valid JSON that parses to a
    non-array (objects, numbers, strings).
  - onParseError is not called for whitespace-only inputs.
…ives

- Remove unverified marketing stats (65%/94% accuracy, $975/week) sourced
  from ephemeral X posts; replace with neutral description of the method
- Add project override note to BEHAVIOR section clarifying that rules 9 and
  13 ("Ask first", "No acting alone") are superseded by the explicit Daily
  Maintenance autonomous instructions and global CLAUDE.md autonomy directives

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The old design-is was a triage gate, not a design skill: it explicitly
refused to design ("you do not write implementation code... you produce
scores, a verdict, and a /make-plan handoff prompt") and offloaded all
real work to other skills. Asking it to "conceive a better X" was
structurally impossible — it could only score the old thing and emit a
bracket-filled handoff template.

Rewrite (312 → 79 lines):

- Add a generative CONCEIVE mode that produces an actual design (reframe,
  metaphor, core surfaces sketched, voice, honesty guardrails, signature
  moments, minimum-vs-full), with the ten principles reframed as
  generative questions instead of a scoring rubric.
- Keep CRITIQUE mode but slim it to a principles-walk with evidence; make
  telemetry opt-in only when a verdict turns on an un-eyeball-able number.
- Drop the four mandatory telemetry subagents, the 0-3 scorecard machine
  (anchors, tie-breakers, thresholds), the five output-file ceremony, the
  three migration/cutover bracket templates, and the mandatory handoff.
- Preserve the asset: Rams' ten principles verbatim and the
  evidence-over-taste / judge-what-ships discipline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds tree-sitter-c-sharp (^0.23.5) as a bundled grammar with a
dedicated query covering classes, interfaces, structs, enums, records,
methods, constructors, properties, and using directives. Introduces a
`prop` capture mapped to the existing "property" symbol kind.

Verified against a production .NET monorepo: smart_search indexes
~1,600 symbols per service repo, smart_outline folds a 467-line service
class into its member skeleton, smart_unfold extracts exact member
bodies.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The concurrent SDK-subprocess ceiling was hardcoded at 10, capping batch
backfill throughput regardless of CLAUDE_MEM_MAX_CONCURRENT_AGENTS. Read it from
CLAUDE_MEM_TOTAL_PROCESS_HARD_CAP (default 10, non-positive/unparseable falls
back) so a high-throughput batch against a local model, where cloud rate limits
don't apply, can lift it.

The parse logic is extracted into an exported resolveTotalProcessHardCap() pure
function so it is unit-testable (the cap itself is a module-load-time const).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
thedotmack and others added 22 commits July 4, 2026 23:52
Community bleeding-edge batch 2 generated artifacts and integration fix.\n\nIncludes regenerated plugin bundles after merging #3112, #3108, #3099, #3095, #3061, #3055, #3006, #2998, #2945, #2944, #2890, #2889, #2887, #2830, and #2775.\n\nAdds plugin/sqlite to package.json files so the runtime modules from #3108 ship.\n\nHeld from batch 2 by safety review: #2710, #2531.\n\nVerification passed before commit:\n- npm install --no-audit --no-fund\n- npm run typecheck\n- npm run build\n- bun test\n- npm run lint:hook-io\n- npm run lint:spawn-env\n- npm run check:postinstall-allowlist\n- npm run test:agents\n- npm run test:infra\n- npm run test:sqlite\n- bun install --frozen-lockfile --ignore-scripts (plugin/)\n- focused Batch 2 regression bun test set\n- npm run smoke:clean-room\n- npm run e2e:server:docker
Integrates Amazon Kiro CLI hooks, installer, provider, docs, UI settings, and tests from PR #3125.

Safety adjustment: omitted the Kiro agentSpawn version-check hook so this integration does not add a new hidden hook-time dependency install path; Kiro runtime setup remains explicit through install/repair.

Author: Slawomir Pol <slawomirpol@btinternet.com>

PR: #3125
Integrates Codex CLI compression provider, installer/settings/UI wiring, provider status, marketplace runtime readiness checks, and tests from PR #3093.

Conflict resolution keeps both Kiro (#3125) and Codex providers wired through settings, status, and SessionRoutes.

Safety fix: quote Windows Codex --cd workdir paths with spaces before shell execution.

Author: Alex V. <119082209+Retengart@users.noreply.github.com>

PR: #3093
Integrates viewer header health tooltip and polling hook from PR #3079.

Author: Ryan Malia <ryanmalia@gmail.com>

PR: #3079
Integrates ambient settings env isolation coverage from PR #3058.

Author: Mattias Carlsson <19933050+crippledgeek@users.noreply.github.com>

PR: #3058
Integrates GET /api/stats ?project= scoping and route coverage from PR #3041.

Author: laihenyi <henyi@henyi.org>

PR: #3041
Integrates newest summary timeline placement fix and tests from PR #3023.

Author: Osamaali313 <86572800+Osamaali313@users.noreply.github.com>

PR: #3023
Integrates Tamil README translation and i18n navigation updates from PR #3015.

Author: Shanujan Suresh <207912128+shanujans@users.noreply.github.com>

PR: #3015
Integrates .claude-mem.json projectName/project_name override support from PR #3005.

Author: timoxd7 <timoxd7@gmx.de>

PR: #3005
Preserves PR #2936 by DRCOMPUTER60290.
Preserves PR #2856 by rodboev. Resolves project-name override conflict by keeping explicit .claude-mem.json projectName authoritative before worktree/submodule probing.
Preserves PR #2777 by destiny520537work-lab.
Preserves PR #2700 by thedotmack.
Preserves PR #2633 by YOMXXX. Resolves DataRoutes import conflict by preserving project stats constants and the shared parser import.
Preserves PR #2580 by jaygaha. Resolves README language-list conflict by keeping both Tamil and Nepali translations.
Regenerates plugin script bundles after Batch 3 community PR integrations.
@greptile-apps

greptile-apps Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR integrates the Batch 1-3 community changes. The main changes are:

  • Kiro CLI hook support, installer flows, MCP/skills registration, and a Kiro-backed provider.
  • Codex/Kiro provider and provider-status updates for CLI-authenticated compression paths.
  • Smart-explore parser/runtime hardening, including C# tree-sitter grammar support and tree-sitter CLI provisioning.
  • Worker startup resilience for stale or invalid port bindings.
  • First-run search welcome guidance, project-name override support, UI/settings updates, docs, and expanded tests.

Confidence Score: 5/5

This PR appears safe to merge.

No accepted bug findings remain in the reviewed changed paths. The major installer, provider, hook, parser, worker-spawn, and settings changes include targeted tests. The added C# tree-sitter dependency was checked against external package metadata.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced a finding-comment-proof for a posted P1 finding.
  • T-Rex ran the verification suite and captured results showing safety checks and focused tests completed, with one parser test failing to extract symbols and a direct runtime repro confirming no symbols were produced.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
package.json Updates packaged artifacts and adds C# tree-sitter grammar/runtime script allowlist.
src/cli/adapters/kiro.ts Adds Kiro hook payload normalization and raw-context output handling.
src/services/integrations/KiroCliInstaller.ts Adds Kiro CLI installation, hook merging, MCP/skills registration, observer agent creation, and uninstall/status paths.
src/services/worker/KiroProvider.ts Adds a Kiro CLI-backed compression provider with observer chat isolation and output cleanup.
src/npx-cli/install/setup-runtime.ts Adds tree-sitter-cli executable provisioning and install-current validation.
src/services/worker-spawner.ts Adds pre-spawn bind probing for stale or invalid worker port bindings.
src/services/worker/http/routes/SearchRoutes.ts Adds first-run credential guidance while exempting CLI-auth providers.
src/services/smart-file-read/parser.ts Extends smart file parsing with C# language detection, grammar resolution, and symbol queries.
src/supervisor/env-sanitizer.ts Preserves proxy environment variables for subprocesses.
src/utils/project-name.ts Adds project-name override support via .claude-mem.json.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Kiro as Kiro CLI hooks
participant Hook as worker-service.cjs hook kiro
participant Adapter as kiroAdapter
participant Handler as Hook handlers
participant Worker as claude-mem worker API
participant Provider as KiroProvider
participant CLI as kiro-cli chat

Kiro->>Hook: agentSpawn / userPromptSubmit / postToolUse / stop JSON
Hook->>Adapter: normalizeInput(raw payload + KIRO_SESSION_ID)
Adapter-->>Hook: normalized cwd, sessionId, prompt/tool fields
Hook->>Handler: execute normalized event
Handler->>Worker: init, observation, summarize, or context request
Worker-->>Handler: hook result / additional context
Handler-->>Hook: HookResult
Hook->>Adapter: formatOutput(result)
Adapter-->>Kiro: raw context for context events, empty output otherwise
Worker->>Provider: "compression/generation request when provider=kiro"
Provider->>CLI: spawn `kiro-cli chat --no-interactive --agent claude-mem-observer`
CLI-->>Provider: styled stdout
Provider-->>Worker: cleaned model text
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Kiro as Kiro CLI hooks
participant Hook as worker-service.cjs hook kiro
participant Adapter as kiroAdapter
participant Handler as Hook handlers
participant Worker as claude-mem worker API
participant Provider as KiroProvider
participant CLI as kiro-cli chat

Kiro->>Hook: agentSpawn / userPromptSubmit / postToolUse / stop JSON
Hook->>Adapter: normalizeInput(raw payload + KIRO_SESSION_ID)
Adapter-->>Hook: normalized cwd, sessionId, prompt/tool fields
Hook->>Handler: execute normalized event
Handler->>Worker: init, observation, summarize, or context request
Worker-->>Handler: hook result / additional context
Handler-->>Hook: HookResult
Hook->>Adapter: formatOutput(result)
Adapter-->>Kiro: raw context for context events, empty output otherwise
Worker->>Provider: "compression/generation request when provider=kiro"
Provider->>CLI: spawn `kiro-cli chat --no-interactive --agent claude-mem-observer`
CLI-->>Provider: styled stdout
Provider-->>Worker: cleaned model text
Loading

Comments Outside Diff (1)

  1. General comment

    P1 Smart file parser returns no TypeScript symbols under unwritable user cache regression scenario

    • Bug
      • The focused regression test tests/services/smart-file-read/parser.test.ts fails in this checkout. It sets XDG_CACHE_HOME=/dev/null/claude-mem-unwritable-cache and calls parseFile() on a TypeScript fixture containing an exported function and class. The parser returns parsed.symbols.map(...) === [] instead of ["smartExploreProbe", "ProbeClass"], and the class method child run is therefore also unavailable. A direct bun -e repro of the same parseFile() call produced the same empty symbol list.
    • Cause
      • The failure is anchored to src/services/smart-file-read/parser.ts's tree-sitter query path. runBatchQuery() catches tree-sitter execution failures and returns an empty match map, causing a symbol-less folded view. The changed cache handling intends to force a writable process-local cache via XDG_CACHE_HOME: getTreeSitterCacheDir(), but in this environment the TypeScript grammar query still produces no matches for the fixture.
    • Fix
      • Make the tree-sitter invocation robust for the unwritable-user-cache scenario and avoid silently degrading to empty symbols for installed grammars. Capture/log the underlying tree-sitter stderr during test/debugging, verify getTreeSitterBin() resolves the installed CLI and resolveGrammarPath('typescript') points to a valid grammar, and adjust the cache/env or grammar path handling so the TypeScript query returns function/class/method captures with XDG_CACHE_HOME originally unwritable.

    T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "fix(worker): suppress credential warning..." | Re-trigger Greptile

Comment thread src/services/worker/http/routes/SearchRoutes.ts Outdated
Address PR #3142 review feedback for Codex/Kiro CLI-auth providers by suppressing API credential warnings when those providers are selected. Includes the generated worker bundle update.
@thedotmack

Copy link
Copy Markdown
Owner Author

Babysit update after a20d1ac44:

  • Addressed the Greptile P1 for CLI-auth providers: CLAUDE_MEM_PROVIDER=codex, codex-cli, kiro, and kiro-cli no longer show the API credential warning on the no-memory welcome path.
  • Added targeted route coverage in tests/worker/http/routes/search-routes-welcome-hint.test.ts.
  • Regenerated plugin/scripts/worker-service.cjs with npm run build.
  • Rechecked the Greptile outside-diff parser note locally: bun test tests/services/smart-file-read/parser.test.ts passes (1 pass, 0 fail) under its unwritable cache test case, so I am treating that note as stale/not reproducible on this head unless CI or a reviewer provides a failing log for a20d1ac44.

@thedotmack

Copy link
Copy Markdown
Owner Author

Final babysit sweep for a20d1ac44:

  • GitHub checks are green on the latest head: typecheck · build · test · bundle-size, Windows build, clean-room dependency closure smoke, and server-runtime e2e (docker · pg + valkey) all pass. Mintlify is skipped.
  • Unresolved review threads: 0.
  • Direct parser repro for the Greptile outside-diff note passes locally with XDG_CACHE_HOME=/dev/null/claude-mem-unwritable-cache: parseFile() returns smartExploreProbe and ProbeClass with child method run.
  • Local focused checks also pass: bun test tests/worker/http/routes/search-routes-welcome-hint.test.ts, bun test tests/services/smart-file-read/parser.test.ts, npm run typecheck, and npm run build.

@thedotmack

Copy link
Copy Markdown
Owner Author

Promoted to long-lived branch community-edge; this is now a permanent release line, not a merge-to-main. See the Release Branches doc.

@thedotmack thedotmack closed this Jul 5, 2026
pull Bot pushed a commit to SMURF4096/claude-mem that referenced this pull request Jul 5, 2026
… branches

Document the three release lines (main=stable, core-dev, community-edge) with
flow direction, "which one should I use", and clone/run instructions for the
non-published lines. Wire into docs nav and README contributing section.

core-dev and community-edge are pushed to origin from the plan-PR heads
(thedotmack#3143, thedotmack#3142, now closed); main remains the only npm-published line.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit a1de8976747e4d117c97d81f197ceef87798776f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.