xindex 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/package.json +1 -2
- package/CLAUDE.md +0 -55
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xindex",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "Local semantic code search — index codebase, search by meaning or keywords",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "xindex.ts",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"test.npx": "docker run --rm -it -w /tmp node:22 bash -c 'npm i -g xindex && xindex-index tsx-0 && xindex-search streamx map | grep \"await mapper\" && which xindex | grep bin/xindex' ",
|
|
26
26
|
"console": "docker run --rm -it -v \"$PWD:/app\" -w /app node:22 bash"
|
|
27
27
|
},
|
|
28
|
-
"private": false,
|
|
29
28
|
"engines": {
|
|
30
29
|
"node": ">=22"
|
|
31
30
|
},
|
package/CLAUDE.md
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
## Shorthand
|
|
4
|
-
|
|
5
|
-
- **NxM** — N parts × M sub-parts, title + 1 sentence each. Include text diagrams when M ≥ 3. E.g., `3x3` = 3 parts × 3 sub-parts
|
|
6
|
-
- **NxMxD** — same as NxM but D sentences per sub-part. E.g., `3x3x2` = 3×3 with 2 sentences each
|
|
7
|
-
- **Nxx** — N parts, title + 1 sentence each (no sub-parts). E.g., `3xx`
|
|
8
|
-
- **unpack** — 3-5 parts × 3-5 sub-parts with text diagrams
|
|
9
|
-
- **Text diagrams** — ASCII flows, hierarchies, tables. Keep minimal.
|
|
10
|
-
- **research/search/ground** — search the Internet using DuckDuckGo MCP
|
|
11
|
-
- **plan dev / go / dev / implement** — start implementation → triggers Pre-implementation check
|
|
12
|
-
- **check types / test compilation** — run `yarn test.compilation` to validate TypeScript compilation without relying on `tsconfig.json`
|
|
13
|
-
- **recover** — find most recent `task.*.md` in `.ai/task/` (by date+mtime, exclude `*.log.md`/`*.report.md`), summarize state and next steps
|
|
14
|
-
- **pull details / expand / flesh out** — enrich task with full detail while preserving shape (see Detail expansion)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Task Management
|
|
18
|
-
|
|
19
|
-
- **Location**: `.ai/task/`. Naming: `task.<yyyy-mm-dd>-<slug>.md` (date = creation date, slug includes roadmap number when applicable)
|
|
20
|
-
- **Structure**: Context (why + links) → Goal → Diagram → Steps (NxM plan). Default: text diagram + 3x3 plan; scale up only if complexity demands it
|
|
21
|
-
- **Diagram ↔ Steps consistency**: must always reflect each other. Update both in the same pass. Inconsistency = bug.
|
|
22
|
-
- **Task kickoff**: user provides notes → create task file + log → notes into Context → draft Goal + structure → ask 3–5 clarifying questions (`[MUST]` = blocker, `[SHOULD]` = design risk) → iterate until MUSTs resolved, SHOULDs answered or defaulted → finalize with diagram + steps
|
|
23
|
-
- **Pre-implementation**: reread task → identify gaps → research (parallel agents for independent questions) → verify diagram ↔ steps → ask user if changes are significant → identify parallel tracks → start
|
|
24
|
-
- **Post-implementation**: recheck task vs actual code. Mark completed steps, note deviations, sync diagram. Drift = bug.
|
|
25
|
-
- **Logs**: `task.<...slug>.log.md` alongside task. Format: `### <date>` + bullets. Log decisions, blockers, outcomes, deviations — sufficient to reconstruct context. Parallel agents get own logs: `task.<...slug>.track-<name>.log.md`; merge outcomes back to main log.
|
|
26
|
-
- **Log splitting**: at ~500+ lines, split into `task.<...slug>.1.log.md`, `*.2.log.md`, etc. Original becomes index. Use bash `sed -n` for extraction.
|
|
27
|
-
- **Reports**: `task.<...slug>.report.md` — consolidates research findings after completion
|
|
28
|
-
- **Section splitting**: large `.md` files → `*.1.*`, `*.2.*` parts. Original becomes index with bullet summaries.
|
|
29
|
-
- **Detail expansion**: reread task → research every step (files, APIs, deps) → expand with concrete details (paths, functions, tables, exact changes) → preserve NxM shape → no info loss → update diagram → keep balanced detail density
|
|
30
|
-
- **Context recovery**: when chat compacts, reread active task's log to recover direction
|
|
31
|
-
- **Completed tasks**: move done tasks (+ their logs, maps, reports) to `.ai/task/done/`. Use xindex search for discovery instead of manual index documents.
|
|
32
|
-
|
|
33
|
-
## Code Patterns
|
|
34
|
-
|
|
35
|
-
- **HOF component** — factory function that returns a configured function instance. Export only the factory (`DoThing`) and type (`IDoThing`). Callers construct their own instance — no default export.
|
|
36
|
-
```ts
|
|
37
|
-
export type IDoThing = (a: string, b: number) => Promise<string>;
|
|
38
|
-
export function DoThing(config: Config): IDoThing {
|
|
39
|
-
return async function doThing(a, b) { ... }
|
|
40
|
-
}
|
|
41
|
-
// caller: const doThing = DoThing({dep1, dep2});
|
|
42
|
-
```
|
|
43
|
-
- **HOF dependencies** — when a factory depends on other components, pass them as a destructured object: `DoThing({embed, index}: {embed: IEmbed, index: LocalIndex})`. This makes dependencies explicit and order-independent.
|
|
44
|
-
- **Tagged union** — use `IType<{type: string, ...}>` from `componets/IType.ts` for discriminated unions. Each variant gets a `type` literal, the union is `|`-joined.
|
|
45
|
-
```ts
|
|
46
|
-
export type IFileEvent =
|
|
47
|
-
| IType<{ type: "index", path: string }>
|
|
48
|
-
| IType<{ type: "remove", path: string }>;
|
|
49
|
-
```
|
|
50
|
-
- **Logger** — never use `console.log`/`console.error` directly in components or apps. Use `ILogger` from `componets/logger.ts`. Create at the `run.*` entry point level: `Logger(console.log)` for CLI apps, `Logger(console.error)` for MCP (stdout is the protocol channel). Inject as a dependency where needed.
|
|
51
|
-
|
|
52
|
-
## Git Rules
|
|
53
|
-
|
|
54
|
-
- **No Co-Authored-By** — never add `Co-Authored-By` lines to commit messages
|
|
55
|
-
- **No tool-origin footers** — never add lines like `Made-with: Cursor`, `Generated with …`, or similar branding/attribution footers to commit messages, PR descriptions, or docs unless the user explicitly asks
|