-
Notifications
You must be signed in to change notification settings - Fork 1
PRD: First-class, time-travel-safe semantics; Neo4j proto; Docker naming #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4d05418
8562cc9
7508421
dad6be3
88e8c1b
04c8afd
ea02228
6ca4b49
39cb5f4
4c84b60
81adae8
779194e
ffe21d3
0809c7b
28f3ebb
f69d701
16c1922
ecc76a7
10801d4
349653a
0e90288
3dbd0ec
1b97c61
bd00cc8
a14ed71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| * | ||
| !Dockerfile |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,12 +1,31 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FROM ubuntu:22.04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LABEL com.gitmind.project="git-mind" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| org.opencontainers.image.title="git-mind-ci" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ENV DEBIAN_FRONTEND=noninteractive | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ENV TZ=UTC | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN apt-get update && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apt-get install -y wget gnupg lsb-release python3-pip pkg-config software-properties-common && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apt-get install -y --no-install-recommends wget gnupg lsb-release python3-pip pkg-config software-properties-common ca-certificates && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wget -O - https://apt.llvm.org/llvm.sh | bash -s -- 20 && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apt-get install -y clang-20 clang-tidy-20 cppcheck libsodium-dev git ninja-build && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apt-get update && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apt-get install -y --no-install-recommends clang-20 clang-tidy-20 cppcheck \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| libsodium-dev libgit2-dev git ninja-build pkg-config build-essential cmake ca-certificates && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ln -sf /usr/bin/clang-tidy-20 /usr/local/bin/clang-tidy && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ln -sf /usr/bin/clang++-20 /usr/local/bin/clang++ && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ln -sf /usr/bin/clang-20 /usr/local/bin/clang && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip3 install meson ninja | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip3 install --no-cache-dir meson ninja && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Install CRoaring from apt if available, otherwise build from source | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apt-get update && (apt-get install -y --no-install-recommends libroaring-dev || true) && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ! pkg-config --exists roaring; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Building CRoaring from source..." && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /tmp/croaring && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git clone --depth 1 https://github.com/RoaringBitmap/CRoaring.git /tmp/croaring && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmake -S /tmp/croaring -B /tmp/croaring/build -DCMAKE_BUILD_TYPE=Release -DENABLE_POPCNT=ON -DENABLE_AVX=OFF -DENABLE_NEON=ON && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmake --build /tmp/croaring/build -j"$(nproc)" && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmake --install /tmp/croaring/build && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /tmp/croaring && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "/usr/local/lib" > /etc/ld.so.conf.d/croaring.conf && ldconfig; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+18
to
+30
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Make CRoaring path reproducible. Pin CRoaring to a tag to stabilize headers/ABI; also ensure git is present before clone (it is), and prefer -DBUILD_SHARED_LIBS=ON/OFF explicitly for predictable linkage. - git clone --depth 1 https://github.com/RoaringBitmap/CRoaring.git /tmp/croaring && \
+ git clone --branch v2.3.1 --depth 1 https://github.com/RoaringBitmap/CRoaring.git /tmp/croaring && \
cmake -S /tmp/croaring -B /tmp/croaring/build -DCMAKE_BUILD_TYPE=Release -DENABLE_POPCNT=ON -DENABLE_AVX=OFF -DENABLE_NEON=ON && \📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WORKDIR /workspace | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||
| # Reduce Docker build context size when building images from repo root | ||||||
| .git | ||||||
| build | ||||||
| build-* | ||||||
| build_* | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Trim trailing space (MD009) and prefer directory suffixes Minor polish to keep diffs clean and linters quiet. -build_*
+build_*📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| compile_commands.json | ||||||
| ci_logs.zip | ||||||
| *.o | ||||||
| *.a | ||||||
| *.so | ||||||
| *.dylib | ||||||
| *.obj | ||||||
| *.exe | ||||||
| *.log | ||||||
| *.tmp | ||||||
| __pycache__/ | ||||||
| *.pyc | ||||||
| node_modules/ | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,88 @@ | ||||||||||||||||||||||||||||||||||||||||||
| # Repository Guidelines | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ## Project Structure & Module Organization | ||||||||||||||||||||||||||||||||||||||||||
| - `core/` — C23 library: `include/` (public headers), `src/` (impl), `tests/` (unit). Add new code here. | ||||||||||||||||||||||||||||||||||||||||||
| - `include/` — Umbrella API (`gitmind.h`) and namespaced headers under `include/gitmind/`. | ||||||||||||||||||||||||||||||||||||||||||
| - `src/` — Legacy code under migration. Avoid adding new modules here. | ||||||||||||||||||||||||||||||||||||||||||
| - `apps/` — Future CLI/hooks/apps. Until announced, prefer `core/` additions. | ||||||||||||||||||||||||||||||||||||||||||
| - `tests/` — E2E/integration/legacy tests and fixtures. | ||||||||||||||||||||||||||||||||||||||||||
| - `tools/`, `quality/`, `.githooks/` — Dev tooling (clang-tidy, formatting, gauntlet, secret scanning). | ||||||||||||||||||||||||||||||||||||||||||
| - `docs/` — Architecture, dev setup, and operational notes. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3
to
+11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Fix markdown spacing (MD022/MD032). Headings need blank lines before lists. Apply across sections. -## Project Structure & Module Organization
-- `core/` — C23 library: `include/` (public headers), `src/` (impl), `tests/` (unit). Add new code here.
+## Project Structure & Module Organization
+
+- `core/` — C23 library: `include/` (public headers), `src/` (impl), `tests/` (unit). Add new code here.
@@
-## Build, Test, and Development Commands
-- Configure + build: `meson setup build && ninja -C build`
+## Build, Test, and Development Commands
+
+- Configure + build: `meson setup build && ninja -C build`
@@
-## Coding Style & Naming Conventions
-- Language: C23 with warnings-as-errors; no VLAs or shadowing; explicit prototypes.
+## Coding Style & Naming Conventions
+
+- Language: C23 with warnings-as-errors; no VLAs or shadowing; explicit prototypes.📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.17.2)8-8: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 9-9: Lists should be surrounded by blank lines (MD032, blanks-around-lists) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| ## Build, Test, and Development Commands | ||||||||||||||||||||||||||||||||||||||||||
| - Configure + build: `meson setup build && ninja -C build` | ||||||||||||||||||||||||||||||||||||||||||
| - Run unit tests: `ninja -C build test` (or `meson test -C build`) | ||||||||||||||||||||||||||||||||||||||||||
| - Make shims: `make`, `make test`, `make clean` | ||||||||||||||||||||||||||||||||||||||||||
| - Lint (CI parity): `./tools/docker-clang-tidy.sh` → produces `clang-tidy-report.txt` | ||||||||||||||||||||||||||||||||||||||||||
| - Strict multi-compiler build: `./tools/gauntlet/run-gauntlet.sh` (recommended before PRs) | ||||||||||||||||||||||||||||||||||||||||||
| - Enable hooks: `pre-commit install` (clang-format + detect-secrets) | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ## Coding Style & Naming Conventions | ||||||||||||||||||||||||||||||||||||||||||
| - Language: C23 with warnings-as-errors; no VLAs or shadowing; explicit prototypes. | ||||||||||||||||||||||||||||||||||||||||||
| - Formatting: `.clang-format` (LLVM-based, 4 spaces, 80 cols, pointer alignment right). Pre-commit runs `clang-format`. | ||||||||||||||||||||||||||||||||||||||||||
| - Naming: functions/vars `lower_snake_case` (prefix `gm_`), macros `UPPER_SNAKE`, types end in `_t`, header guards `GITMIND_*`. | ||||||||||||||||||||||||||||||||||||||||||
| - Includes: prefer specific headers; order/regroup per `.clang-format`. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ## Testing Guidelines | ||||||||||||||||||||||||||||||||||||||||||
| - Unit tests live in `core/tests/unit/` as `test_<module>.c`. Keep deterministic and isolated. | ||||||||||||||||||||||||||||||||||||||||||
| - Meson wires test backends as needed—just build and run tests via Meson/Ninja. | ||||||||||||||||||||||||||||||||||||||||||
| - E2E/integration under `tests/` for CLI/flow checks. Keep fixtures minimal. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ## Commit & Pull Request Guidelines | ||||||||||||||||||||||||||||||||||||||||||
| - Conventional commits: `type(scope): description` (e.g., `fix(core/cbor): handle null keys`). Reference issues (`Fixes #123`). | ||||||||||||||||||||||||||||||||||||||||||
| - PRs must describe changes, link issues, include a short test plan, pass CI, and introduce no new clang-tidy warnings (`./tools/docker-clang-tidy.sh`). Update docs when applicable. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+26
to
+34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) More markdown spacing fixes. Continue adding blank lines before lists to satisfy MD022/MD032. -## Testing Guidelines
-- Unit tests live in `core/tests/unit/` as `test_<module>.c`. Keep deterministic and isolated.
+## Testing Guidelines
+
+- Unit tests live in `core/tests/unit/` as `test_<module>.c`. Keep deterministic and isolated.
@@
-## Commit & Pull Request Guidelines
-- Conventional commits: `type(scope): description` (e.g., `fix(core/cbor): handle null keys`). Reference issues (`Fixes #123`).
+## Commit & Pull Request Guidelines
+
+- Conventional commits: `type(scope): description` (e.g., `fix(core/cbor): handle null keys`). Reference issues (`Fixes #123`).📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.17.2)29-29: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 30-30: Lists should be surrounded by blank lines (MD032, blanks-around-lists) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| ## Security & Configuration | ||||||||||||||||||||||||||||||||||||||||||
| - Do not commit secrets. Pre-commit runs `detect-secrets` with `.secrets.baseline`. | ||||||||||||||||||||||||||||||||||||||||||
| - Use `.env.example` as a template; never check in real credentials. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ## Agent-Specific Notes | ||||||||||||||||||||||||||||||||||||||||||
| - Make minimal, focused diffs; avoid drive-by refactors. Match existing patterns in `core/` and headers under `include/`. | ||||||||||||||||||||||||||||||||||||||||||
| - Run build, tests, and lint locally before proposing changes. Keep changes zero-warnings and formatted. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ## Working Knowledge (for agents) | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+35
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Finalize spacing and fix examples. Add spacing and correct the Cypher property assignment in the example: started_at=datetime(). -## Security & Configuration
-- Do not commit secrets. Pre-commit runs `detect-secrets` with `.secrets.baseline`.
+## Security & Configuration
+
+- Do not commit secrets. Pre-commit runs `detect-secrets` with `.secrets.baseline`.
@@
-## Agent-Specific Notes
-- Make minimal, focused diffs; avoid drive-by refactors. Match existing patterns in `core/` and headers under `include/`.
+## Agent-Specific Notes
+
+- Make minimal, focused diffs; avoid drive-by refactors. Match existing patterns in `core/` and headers under `include/`.
@@
- - Start task: `echo '{"statements":[{"statement":"MERGE (t:Task:GM {id:$id}) ON CREATE SET t.title=$title, t.status=\"in_progress\", t.started_at:datetime(), t.repo=\"git-mind\" ON MATCH SET t.status=\"in_progress\", t.repo=\"git-mind\"","parameters":{"id":"gm-docker-namespacing","title":"Docker image names + cleanup"}}]}' | bash scripts/neo4j-curl.sh`
+ - Start task: `echo '{"statements":[{"statement":"MERGE (t:Task:GM {id:$id}) ON CREATE SET t.title=$title, t.status=\"in_progress\", t.started_at=datetime(), t.repo=\"git-mind\" ON MATCH SET t.status=\"in_progress\", t.repo=\"git-mind\"","parameters":{"id":"gm-docker-namespacing","title":"Docker image names + cleanup"}}]}' | bash scripts/neo4j-curl.sh`📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.17.2)39-39: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 40-40: Lists should be surrounded by blank lines (MD032, blanks-around-lists) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| - Journal-first graph: Edges are CBOR commits under `refs/gitmind/edges/<branch>`; cache lives in `refs/gitmind/cache/<branch>` and is rebuildable (never merged). | ||||||||||||||||||||||||||||||||||||||||||
| - Semantics as names: Store `type_name` and `lane_name` as UTF-8 strings on edges; do not collapse into a generic/custom type. Derive 64-bit IDs from names (NFC + stable hash) only for cache/filters. | ||||||||||||||||||||||||||||||||||||||||||
| - Time-travel correctness: All semantics (and optional advice) are in-history; queries evaluate against the chosen commit and branch. | ||||||||||||||||||||||||||||||||||||||||||
| - Merge/conflict model: Append-only journal; edge ULIDs form an OR-Set; “Semantics Advice” (optional) merges with hybrid CRDT (LWW scalars, OR-Set collections). | ||||||||||||||||||||||||||||||||||||||||||
| - Link vs code authors: Edge attribution `author` is the link creator (from `git config` unless provided); code authorship at the chosen commit is recorded separately (per-file last commit author/time) when using Neo4j upsert tooling. | ||||||||||||||||||||||||||||||||||||||||||
| - Docker hygiene: Images are namespaced/labeled (`gitmind/ci:clang-20`, `gitmind/gauntlet:<compiler>`; label `com.gitmind.project=git-mind`). Use `make docker-clean` to reclaim space safely. | ||||||||||||||||||||||||||||||||||||||||||
| - CI/Tidy nuance: Local builds and tests pass. Clang-tidy in Docker depends on CRoaring headers in the CI image; add a source build step for deterministic results on aarch64 if CI flags it. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ## Neo4j Codex Log (Memory Graph) | ||||||||||||||||||||||||||||||||||||||||||
| - Purpose: record tasks, touched files, and relationships to enable impact/risk queries for this repo. | ||||||||||||||||||||||||||||||||||||||||||
| - Project tagging: all nodes carry label `:GM` and `repo:'git-mind'`. | ||||||||||||||||||||||||||||||||||||||||||
| - Setup env: | ||||||||||||||||||||||||||||||||||||||||||
| - `export NEO4J_HTTP_URL=http://localhost:7474` | ||||||||||||||||||||||||||||||||||||||||||
| - `export NEO4J_USER=neo4j` | ||||||||||||||||||||||||||||||||||||||||||
| - `export NEO4J_PASSWORD=password123` (use real local creds; don’t commit) | ||||||||||||||||||||||||||||||||||||||||||
| - One‑time constraints (HTTP): | ||||||||||||||||||||||||||||||||||||||||||
| - Use `scripts/neo4j-constraints.json` which creates GM-scoped constraints (Task:GM.id unique, File:GM.path unique, repo existence). | ||||||||||||||||||||||||||||||||||||||||||
| - Helper script: `scripts/neo4j-curl.sh` | ||||||||||||||||||||||||||||||||||||||||||
| - Pipe JSON or use `-f payload.json`. Posts to `NEO4J_HTTP_URL/db/neo4j/tx/commit` with basic auth. | ||||||||||||||||||||||||||||||||||||||||||
| - Quick start examples: | ||||||||||||||||||||||||||||||||||||||||||
| - Start task: `echo '{"statements":[{"statement":"MERGE (t:Task:GM {id:$id}) ON CREATE SET t.title=$title, t.status=\"in_progress\", t.started_at:datetime(), t.repo=\"git-mind\" ON MATCH SET t.status=\"in_progress\", t.repo=\"git-mind\"","parameters":{"id":"gm-docker-namespacing","title":"Docker image names + cleanup"}}]}' | bash scripts/neo4j-curl.sh` | ||||||||||||||||||||||||||||||||||||||||||
| - Link touched file: `echo '{"statements":[{"statement":"MERGE (t:Task:GM {id:$id}) MERGE (f:File:GM {path:$p}) ON CREATE SET f.repo=\"git-mind\" ON MATCH SET f.repo=\"git-mind\" MERGE (t)-[:TOUCHES]->(f)","parameters":{"id":"gm-docker-namespacing","p":"tools/docker-clean.sh"}}]}' | bash scripts/neo4j-curl.sh` | ||||||||||||||||||||||||||||||||||||||||||
| - Record dependency: `echo '{"statements":[{"statement":"MERGE (a:File:GM {path:$a}) ON CREATE SET a.repo=\"git-mind\" ON MATCH SET a.repo=\"git-mind\" MERGE (b:File:GM {path:$b}) ON CREATE SET b.repo=\"git-mind\" ON MATCH SET b.repo=\"git-mind\" MERGE (a)-[:DEPENDS_ON]->(b)","parameters":{"a":"tools/docker-clang-tidy.sh","b":".ci/Dockerfile"}}]}' | bash scripts/neo4j-curl.sh` | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ### Ready-to-run payloads in this repo | ||||||||||||||||||||||||||||||||||||||||||
| - Initialize constraints (once): `bash scripts/neo4j-curl.sh -f scripts/neo4j-constraints.json` | ||||||||||||||||||||||||||||||||||||||||||
| - Log this task (files touched): `bash scripts/neo4j-curl.sh -f scripts/neo4j-task-gm-docker-neo4j-2025-09-12.json` | ||||||||||||||||||||||||||||||||||||||||||
| - Verify touched files for a task: `scripts/neo4j-show-task.sh gm-docker-namespacing-neo4j-2025-09-12` | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ## Neo4j Proto Edge Schema (git-mind semantics) | ||||||||||||||||||||||||||||||||||||||||||
| - Relationship: `(a:File:GM {repo:'git-mind'})-[:EDGE {ulid, type, lane, confidence, ts, commit, src_path, tgt_path, src_sha, tgt_sha, author, source_type, session_id, repo:'git-mind'}]->(b:File:GM {repo:'git-mind'})` | ||||||||||||||||||||||||||||||||||||||||||
| - Properties map 1:1 to libgitmind edge fields (ulid, attribution, lane, SHAs, etc.). | ||||||||||||||||||||||||||||||||||||||||||
| - Upsert example (script): | ||||||||||||||||||||||||||||||||||||||||||
| - `scripts/gm-neo4j-upsert-edge.sh --commit HEAD --src core/src/io/io.c --tgt core/include/gitmind/io/io.h --type IMPLEMENTS --lane verified --author user@local --source human --confidence 90` | ||||||||||||||||||||||||||||||||||||||||||
| - Export edges to JSON/NDJSON: | ||||||||||||||||||||||||||||||||||||||||||
| - `scripts/neo4j-export-edges.sh` (uses jq if available) | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ### Importer plan (proto → journal) | ||||||||||||||||||||||||||||||||||||||||||
| - Extract edges: `scripts/neo4j-export-edges.sh > edges.json` | ||||||||||||||||||||||||||||||||||||||||||
| - For each edge row: | ||||||||||||||||||||||||||||||||||||||||||
| - Resolve paths to blob OIDs at `edge.commit` (already present as `src_sha`/`tgt_sha`) | ||||||||||||||||||||||||||||||||||||||||||
| - Write journal entry under `refs/gitmind/edges/<lane>` with full properties (ulid, attribution, type) | ||||||||||||||||||||||||||||||||||||||||||
| - Rebuild cache: `gm_cache_rebuild()` (Meson test harness covers core APIs) | ||||||||||||||||||||||||||||||||||||||||||
| - Validate parity: compare fanout/fanin against Neo4j MATCH results on the same commit. | ||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,6 +16,8 @@ For workflows that apply to ALL contributors (human and AI): | |||||
| - __NEVER__ alter, disable, or otherwise circumvent git hooks or tests | ||||||
| - __NEVER__ use `git add -A`, __ALWAYS__ stage changes intentionally | ||||||
|
|
||||||
| > [!DANGER] __NEVER__ use `NOLINT` to suppress clang tidy warnings. __ALWAYS__ fix them problem in your code. Suppressions lead to real bugs. Static analysis is part of the CI gate. Silencing it violates the repo’s “no warnings” contract and kills developer trust. No excuses, push clean builds. End of story. | ||||||
|
|
||||||
|
Comment on lines
+19
to
+20
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix grammar and hyphenation in warning block Public-facing docs should be crisp. Also use “clang-tidy” consistently. -> [!DANGER] __NEVER__ use `NOLINT` to suppress clang tidy warnings. __ALWAYS__ fix them problem in your code. Suppressions lead to real bugs. Static analysis is part of the CI gate. Silencing it violates the repo’s “no warnings” contract and kills developer trust. No excuses, push clean builds. End of story.
+> [!DANGER] __NEVER__ use `NOLINT` to suppress clang-tidy warnings. __ALWAYS__ fix the problem in your code. Suppressions lead to real bugs. Static analysis is part of the CI gate. Silencing it violates the repo’s “no warnings” contract and kills developer trust. No excuses—push clean builds. End of story.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| ## ENCOURAGED ACTIONS | ||||||
|
|
||||||
| - __USE SEQUENTIAL THINKING__ if you’re planning, doing __RECON__, or find yourself thrashing on an issue | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Tighten apt layers and pin external installer trust.
📝 Committable suggestion
🤖 Prompt for AI Agents