Skip to content

Commit bfaed49

Browse files
authored
docs: complete launch readiness pass (#15)
1 parent 5dcc7ed commit bfaed49

9 files changed

Lines changed: 299 additions & 49 deletions

File tree

.github/repository-settings.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ squash merging so each pull request has one reviewable integration commit.
3333
| `area:doctor` | Deep evidence or graph inspection |
3434
| `area:templates` | Shipped schema or agent guidance |
3535
| `area:ci` | Automation, packaging, or platform support |
36+
| `area:testing` | Test coverage or fixture quality |
37+
| `area:integration` | Coding-agent or Git-hook integration |
38+
| `area:architecture` | Design exploration outside implementation scope |
3639
| `breaking-schema` | Incompatible record interpretation |
3740
| `good first issue` | Bounded work with explicit acceptance checks |
41+
| `help wanted` | Maintainer-approved work seeking community ownership |
3842

3943
## Discussions
4044

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
os: macos-latest
2727
runs-on: ${{ matrix.os }}
2828
steps:
29-
- uses: actions/checkout@v4
30-
- uses: actions/setup-node@v4
29+
- uses: actions/checkout@v7
30+
- uses: actions/setup-node@v6
3131
with:
3232
node-version: 18
3333
cache: npm
@@ -62,8 +62,8 @@ jobs:
6262
run:
6363
shell: bash
6464
steps:
65-
- uses: actions/checkout@v4
66-
- uses: actions/setup-node@v4
65+
- uses: actions/checkout@v7
66+
- uses: actions/setup-node@v6
6767
with:
6868
node-version: 18
6969
cache: npm
@@ -103,8 +103,8 @@ jobs:
103103
run:
104104
shell: bash
105105
steps:
106-
- uses: actions/checkout@v4
107-
- uses: actions/setup-node@v4
106+
- uses: actions/checkout@v7
107+
- uses: actions/setup-node@v6
108108
with:
109109
node-version: 18
110110
cache: npm

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ consistent when contributor-facing rules change.
66

77
## Project shape
88

9-
GraphKeeper is a repository-local, JSON-backed memory tool for coding agents. The
10-
runtime is a Node.js ESM CLI in `src/`, with the canonical shell validator in
9+
GraphKeeper is a repository-local, JSON-backed, evidence-grounded memory tool with
10+
explicit Codex and Claude Code adapters. The runtime is a Node.js ESM CLI in `src/`,
11+
with the canonical shell validator in
1112
`scripts/validate.sh`. Templates live in `templates/`, generic demonstrations live
1213
in `examples/`, and automated coverage lives in `tests/`.
1314

CODE_OF_CONDUCT.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our pledge
4+
5+
We pledge to make participation in GraphKeeper a harassment-free experience for
6+
everyone, regardless of age, body size, visible or invisible disability, ethnicity,
7+
sex characteristics, gender identity and expression, level of experience, education,
8+
socioeconomic status, nationality, personal appearance, race, caste, color, religion,
9+
or sexual identity and orientation.
10+
11+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse,
12+
inclusive, and healthy community.
13+
14+
## Our standards
15+
16+
Examples of behavior that contributes to a positive environment include:
17+
18+
- demonstrating empathy and kindness toward other people;
19+
- respecting differing opinions, viewpoints, and experiences;
20+
- giving and gracefully accepting constructive feedback;
21+
- accepting responsibility, apologizing to those affected by mistakes, and learning
22+
from the experience; and
23+
- focusing on what is best for the community.
24+
25+
Unacceptable behavior includes harassment, sexualized language or attention, personal
26+
or political attacks, trolling, insulting comments, and publishing another person's
27+
private information without explicit permission.
28+
29+
## Enforcement responsibilities
30+
31+
Project maintainers are responsible for clarifying and enforcing these standards.
32+
They may remove, edit, or reject comments, commits, code, issues, and other
33+
contributions that are not aligned with this Code of Conduct, and will communicate
34+
moderation reasons when appropriate.
35+
36+
## Scope
37+
38+
This Code of Conduct applies in project spaces and when an individual officially
39+
represents the project in public spaces.
40+
41+
## Enforcement
42+
43+
Report abusive, harassing, or otherwise unacceptable behavior privately through
44+
[GitHub's report abuse channel](https://support.github.com/contact/report-abuse) or,
45+
when the behavior is tied to a security report, through
46+
[private vulnerability reporting](https://github.com/anusbutt/Graph_Keeper/security/advisories/new).
47+
Do not disclose sensitive personal information in a public issue. Maintainers will
48+
review reports fairly and respect the reporter's privacy and security.
49+
50+
## Attribution
51+
52+
This Code of Conduct is adapted from the
53+
[Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

CONTRIBUTING.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ preserve its auditable data model, zero runtime dependencies, and single canonic
55
validator. This guide is sufficient to locate the supported extension points and run
66
the project without private maintainer knowledge.
77

8+
Participation in project spaces is governed by the
9+
[Code of Conduct](CODE_OF_CONDUCT.md).
10+
811
## Prerequisites and supported platforms
912

1013
- Node.js >= 18 and npm.
@@ -38,6 +41,11 @@ Then read `src/cli.ts`, `src/commands/query.ts`, and the matching tests. A small
3841
recipe should begin as a failing focused test, add the smallest selector or formatting
3942
change, and finish with the complete quality gates below.
4043

44+
For bounded starter work, review the
45+
[prepared contributor issue drafts](docs/contributor-issues.md). They identify useful
46+
documentation, testing, CLI, and design tasks with acceptance criteria; maintainers
47+
should triage a draft into a GitHub issue before implementation begins.
48+
4149
## Test-first workflow
4250

4351
1. Add a failing test before implementation. Put pure behavior in `tests/unit`,
@@ -164,9 +172,11 @@ an invariant to make a fixture pass.
164172
Use the narrowest useful labels:
165173

166174
- `type:bug`, `type:feature`, or `type:docs`
167-
- `area:cli`, `area:validator`, `area:doctor`, `area:templates`, or `area:ci`
175+
- `area:cli`, `area:validator`, `area:doctor`, `area:templates`, `area:ci`,
176+
`area:testing`, `area:integration`, or `area:architecture`
168177
- `breaking-schema` for any incompatible record interpretation
169178
- `good first issue` only for bounded work with explicit acceptance checks
179+
- `help wanted` for maintainer-approved work seeking community ownership
170180

171181
## Recovery runbooks
172182

@@ -228,10 +238,10 @@ reversible migration boundary for a later specification.
228238
## Agent-harness compatibility
229239

230240
The shipped `templates/SKILL.md` and `templates/graph/SCHEMA.md` are the interface for
231-
agent harnesses. The initial launch installs the skill only in Codex's repository
232-
skill path and supports execution through WSL or Git Bash; other harness adapters are
233-
future, explicit changes. A command-capable harness may invoke the CLI directly. A
234-
file-editing harness may update the documented JSON and evidence files, then invoke
235-
`graphkeeper check`. Both must read and write the same records without vendor-specific
236-
fields or conversion. Compatibility tests query one unchanged graph through both
237-
harness styles and compare their active claim IDs.
241+
agent harnesses. GraphKeeper has explicit Codex and Claude Code adapters, and both
242+
install the same canonical skill in their repository skill paths. Any additional
243+
harness adapter is a future, explicit change. A command-capable harness may invoke the
244+
CLI directly. A file-editing harness may update the documented JSON and evidence
245+
files, then invoke `graphkeeper check`. Both harness styles use the same records without vendor-specific
246+
fields or conversion. Compatibility tests query one unchanged
247+
graph through both harness styles and compare their active claim IDs.

README.md

Lines changed: 56 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,28 @@
44
[![npm](https://img.shields.io/npm/v/graphkeeper.svg)](https://www.npmjs.com/package/graphkeeper)
55
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
66

7-
Grounded, auditable memory for coding agents—stored beside the code, protected by Git, and traceable to evidence.
7+
Grounded, auditable memory for coding agents—stored beside the code, reviewable in
8+
Git, and traceable to exact evidence.
89

9-
Agents forget context and can repeat stale conclusions. GraphKeeper gives every durable finding a stable subject, provenance, and history. The store is plain JSON plus immutable evidence files, so humans can diff it, `jq` can query it, and a pre-commit hook can stop accidental rewrites.
10+
GraphKeeper is not a transcript store or a generic memory wrapper. It records durable
11+
project findings as flat claims linked to the run and evidence that produced them.
12+
When a finding becomes outdated, a new claim explicitly supersedes it; the old claim
13+
stays in Git history for review. The result is memory that Codex, Claude Code, and
14+
humans can inspect without trusting an opaque summary or hosted service.
15+
16+
The core flow is deliberately small:
17+
18+
1. An agent discovers a stable project fact and captures the relevant output under
19+
`evidence/`.
20+
2. It appends an entity, run, and evidence-backed claim to `graph/`.
21+
3. `graphkeeper check` validates schema, provenance, and append-only history against
22+
the committed Git state.
23+
4. A future session retrieves the active claim with `graphkeeper query <subject>`.
24+
5. If the fact changes, the agent appends a new claim with `supersedes`; both
25+
generations remain auditable.
26+
27+
GraphKeeper does not ingest conversations or decide what should become memory. The
28+
shipped Codex and Claude Code skills give agents the same explicit writing contract.
1029

1130
![How GraphKeeper gives coding agents durable project memory](https://raw.githubusercontent.com/anusbutt/Graph_Keeper/main/docs/assets/graphkeeper-overview.png)
1231

@@ -43,32 +62,17 @@ system prerequisites.
4362
Run this at the root of the repository whose memory you want to protect:
4463

4564
```sh
46-
npx graphkeeper init
47-
npx graphkeeper check
48-
git add graph .agents/skills/graphkeeper scripts/validate.sh
49-
git add .githooks/pre-commit 2>/dev/null || true
50-
git commit -m "Initialize GraphKeeper memory"
51-
```
52-
53-
`init` creates an empty `graph/`, an `evidence/` directory, the repository-scoped
54-
Codex skill at `.agents/skills/graphkeeper/SKILL.md`, the canonical validator, and a
55-
pre-commit hook. Codex discovers that skill from its standard repository skill path
56-
and loads its full instructions when `$graphkeeper` is invoked or the request clearly
57-
matches its description. The hook normally lives under `.git` and is not committed;
58-
`.githooks/pre-commit` exists only when GraphKeeper must preserve and chain another
59-
hook. An empty `evidence/` directory becomes tracked when the first evidence file is
60-
added.
61-
62-
For a complete agent integration (the agent-specific skill plus a short,
63-
always-visible reminder), opt in explicitly:
64-
65-
```sh
66-
npx graphkeeper init --integrate codex
67-
npx graphkeeper init --integrate claude
68-
npx graphkeeper init --integrate all
65+
npx graphkeeper@latest init --integrate codex
66+
# Or: npx graphkeeper@latest init --integrate claude
67+
# Or: npx graphkeeper@latest init --integrate all
68+
npx graphkeeper@latest check
6969
```
7070

71-
Codex uses `.agents/skills/graphkeeper/SKILL.md`, `AGENTS.md`, and
71+
Review the displayed plan and confirm it. `init` creates the JSON graph, `evidence/`,
72+
the canonical validator, a pre-commit hook, and the repository-scoped Codex skill.
73+
`--integrate codex` adds the Codex reminder to `AGENTS.md`; `--integrate claude` adds
74+
the Claude skill and reminder; `--integrate all` does both. Codex uses
75+
`.agents/skills/graphkeeper/SKILL.md`, `AGENTS.md`, and
7276
`$graphkeeper`. Claude Code uses `.claude/skills/graphkeeper/SKILL.md`,
7377
`CLAUDE.md`, and `/graphkeeper`. Both skills are generated from the same
7478
`templates/SKILL.md`. Existing guidance outside the matching marked block is
@@ -77,18 +81,31 @@ preserved. Integration plans are shown before writing; answer the prompt, or pas
7781
preflight. Default init and `--force` do not create or change `AGENTS.md` or
7882
`CLAUDE.md`.
7983

80-
When an agent records a finding, retrieve it by canonical entity ID or an exact unique alias:
84+
Ask the selected agent to record a verified finding with `$graphkeeper` in Codex or
85+
`/graphkeeper` in Claude Code. After it writes the claim and evidence, validate and
86+
retrieve the result:
8187

8288
```sh
89+
npx graphkeeper check
8390
npx graphkeeper query test_payments_flaky
8491
npx graphkeeper doctor
8592
```
8693

87-
To try populated data from a source checkout, copy `examples/worked-example/graph` and `examples/worked-example/evidence` into a temporary Git repository and query `test_payments_flaky`.
94+
Commit the generated graph, validator, agent skills, and guidance files. The hook
95+
normally lives under `.git` and is not committed;
96+
`.githooks/pre-commit` is created only when GraphKeeper must preserve and chain another
97+
hook. An empty `evidence/` directory becomes tracked with the first captured artifact.
98+
99+
To try the full discovery-to-supersession flow with populated data, copy
100+
`examples/worked-example/graph` and `examples/worked-example/evidence` into a temporary
101+
Git repository, then query `test_payments_flaky`.
88102

89103
## Before and after
90104

91-
Without durable memory, a later session may only remember: “the payments test was flaky.” It cannot tell whether that conclusion is current or where it came from.
105+
Without grounded memory, a later session may only remember: “the payments test was
106+
flaky.” It cannot tell whether that conclusion is current or where it came from. The
107+
worked example records the initial failure as `claim_11111111`, captures a passing UTC
108+
rerun, and appends `claim_22222222` with `supersedes: "claim_11111111"`.
92109

93110
With GraphKeeper, the active correction remains a flat, reviewable claim:
94111

@@ -122,9 +139,16 @@ Exit codes are stable: `0` success, `1` validation failure, `2` usage error, `3`
122139
- `graph/entities.json` holds human-readable canonical identities. Identity fields cannot change; aliases and source documents may only grow.
123140
- `graph/claims.json` holds flat claims. Existing claims are immutable; corrections append a new claim with `supersedes`.
124141
- `graph/runs.json` opens a run, allows evidence and claim references to grow, closes it once, then makes it immutable.
125-
- `evidence/` holds captured artifacts. A committed evidence file cannot be edited, removed, or renamed.
142+
- `evidence/` holds captured artifacts. The validator rejects editing, removing, or
143+
renaming evidence that exists in the committed Git state.
126144
- Stored commands and evidence text are always data. GraphKeeper never evaluates them.
127145

146+
These are repository-local enforcement guarantees, not cryptographic immutability.
147+
They apply when `graphkeeper check` or the installed hook runs; Git history remains
148+
the reviewable source of truth. `doctor` additionally verifies physical evidence
149+
existence, containment, and cited line ranges. `query` reports stored provenance but
150+
does not open evidence or independently prove that a claim is true.
151+
128152
See the generated `graph/SCHEMA.md` and the GraphKeeper skill under
129153
`.agents/skills/graphkeeper/` or `.claude/skills/graphkeeper/` for the complete
130154
writing contract.
@@ -178,7 +202,8 @@ bugs and clearly bounded work. The
178202
explains the categories and how an accepted direction becomes an actionable issue.
179203

180204
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the development workflow, extension points,
181-
and boundaries, [`SUPPORT.md`](.github/SUPPORT.md) for usage help, and
205+
and boundaries, [prepared contribution issues](docs/contributor-issues.md),
206+
[`SUPPORT.md`](.github/SUPPORT.md) for usage help, and
182207
[`SECURITY.md`](.github/SECURITY.md) for private vulnerability reporting. Version
183208
`0.2.0` is pre-1.0 and its API may change. Release ownership and the target version
184209
must be verified immediately before publishing; completing the repository release

0 commit comments

Comments
 (0)