@codified/cli 0.3.5 → 0.3.7
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 +115 -0
- package/dist/commands/add.d.ts +3 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +163 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/bootstrap.d.ts.map +1 -0
- package/dist/commands/bootstrap.js +141 -0
- package/dist/commands/bootstrap.js.map +1 -0
- package/dist/commands/check.d.ts +3 -0
- package/dist/commands/check.d.ts.map +1 -0
- package/dist/commands/check.js +332 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/cleanup.d.ts +3 -0
- package/dist/commands/cleanup.d.ts.map +1 -0
- package/dist/commands/cleanup.js +166 -0
- package/dist/commands/cleanup.js.map +1 -0
- package/dist/commands/collect.d.ts +26 -0
- package/dist/commands/collect.d.ts.map +1 -0
- package/dist/commands/collect.js +269 -0
- package/dist/commands/collect.js.map +1 -0
- package/dist/commands/connect.d.ts +3 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +321 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/explain.d.ts +3 -0
- package/dist/commands/explain.d.ts.map +1 -0
- package/dist/commands/explain.js +527 -0
- package/dist/commands/explain.js.map +1 -0
- package/dist/commands/export.d.ts +3 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +59 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/gaps.d.ts +3 -0
- package/dist/commands/gaps.d.ts.map +1 -0
- package/dist/commands/gaps.js +315 -0
- package/dist/commands/gaps.js.map +1 -0
- package/dist/commands/graph.d.ts +3 -0
- package/dist/commands/graph.d.ts.map +1 -0
- package/dist/commands/graph.js +293 -0
- package/dist/commands/graph.js.map +1 -0
- package/dist/commands/import-cmd.d.ts +3 -0
- package/dist/commands/import-cmd.d.ts.map +1 -0
- package/dist/commands/import-cmd.js +199 -0
- package/dist/commands/import-cmd.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +215 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/project.d.ts +3 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +179 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/reset.d.ts +3 -0
- package/dist/commands/reset.d.ts.map +1 -0
- package/dist/commands/reset.js +157 -0
- package/dist/commands/reset.js.map +1 -0
- package/dist/commands/search.d.ts +3 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +183 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +205 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +242 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/timeline.d.ts +3 -0
- package/dist/commands/timeline.d.ts.map +1 -0
- package/dist/commands/timeline.js +424 -0
- package/dist/commands/timeline.js.map +1 -0
- package/dist/commands/triage.d.ts +3 -0
- package/dist/commands/triage.d.ts.map +1 -0
- package/dist/commands/triage.js +336 -0
- package/dist/commands/triage.js.map +1 -0
- package/dist/commands/up.d.ts +3 -0
- package/dist/commands/up.d.ts.map +1 -0
- package/dist/commands/up.js +312 -0
- package/dist/commands/up.js.map +1 -0
- package/dist/commands/watch.d.ts +3 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +224 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +636 -506
- package/dist/index.js.map +1 -0
- package/dist/lib/config.d.ts +52 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +142 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/docker.d.ts +23 -0
- package/dist/lib/docker.d.ts.map +1 -0
- package/dist/lib/docker.js +84 -0
- package/dist/lib/docker.js.map +1 -0
- package/dist/lib/migrate.d.ts +9 -0
- package/dist/lib/migrate.d.ts.map +1 -0
- package/dist/lib/migrate.js +97 -0
- package/dist/lib/migrate.js.map +1 -0
- package/dist/lib/paths.d.ts +9 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/paths.js +28 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/lib/prompt.d.ts +14 -0
- package/dist/lib/prompt.d.ts.map +1 -0
- package/dist/lib/prompt.js +87 -0
- package/dist/lib/prompt.js.map +1 -0
- package/package.json +4 -2
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Codify
|
|
2
|
+
|
|
3
|
+
**Living context graph for AI-native teams.**
|
|
4
|
+
|
|
5
|
+
Codify mines your project history into a structured graph that captures decisions, features, customer signals, code artifacts, and their relationships. It then gives Claude Code ambient access to that context via MCP, so your AI assistant understands not just what your code does but *why* it was built that way.
|
|
6
|
+
|
|
7
|
+
A built-in Gap Engine proactively detects missing context, stale assumptions, and untested decisions. Gaps get addressed automatically through graph mining and evidence collection.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- Node.js 22+
|
|
12
|
+
- Docker (for PostgreSQL, NATS, Redis)
|
|
13
|
+
- `ANTHROPIC_API_KEY` environment variable (for bootstrap, explain, and collect commands)
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g @codified/cli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quickstart
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cd your-project
|
|
25
|
+
codify up
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`codify up` runs three steps in sequence:
|
|
29
|
+
|
|
30
|
+
1. **init** -- Starts Docker services (PostgreSQL + AGE + pgvector, NATS, Redis), runs database migrations, and installs the MCP server config into Claude Code.
|
|
31
|
+
2. **bootstrap** -- Mines your git history with Claude, extracting decisions, features, and relationships into the context graph.
|
|
32
|
+
3. **start** -- Launches the MCP server on stdio. Claude Code connects automatically.
|
|
33
|
+
|
|
34
|
+
After this, open Claude Code in your project. It now has full context about your codebase.
|
|
35
|
+
|
|
36
|
+
## Commands
|
|
37
|
+
|
|
38
|
+
### Getting Started
|
|
39
|
+
|
|
40
|
+
| Command | Description |
|
|
41
|
+
|---------|-------------|
|
|
42
|
+
| `codify up` | One-command setup and start (init + bootstrap + start) |
|
|
43
|
+
| `codify init` | Set up infrastructure and configure project |
|
|
44
|
+
| `codify bootstrap` | Mine git history into the context graph |
|
|
45
|
+
| `codify start` | Start the MCP server for Claude Code |
|
|
46
|
+
|
|
47
|
+
### Working with Context
|
|
48
|
+
|
|
49
|
+
| Command | Description |
|
|
50
|
+
|---------|-------------|
|
|
51
|
+
| `codify explain <question>` | Ask Claude a question about your project |
|
|
52
|
+
| `codify search <query>` | Search the context graph by keyword |
|
|
53
|
+
| `codify add` | Record a decision, signal, or other context |
|
|
54
|
+
| `codify graph` | Visualize the context graph (Mermaid diagram) |
|
|
55
|
+
| `codify status` | Show project health dashboard |
|
|
56
|
+
|
|
57
|
+
### Gaps and Quality
|
|
58
|
+
|
|
59
|
+
| Command | Description |
|
|
60
|
+
|---------|-------------|
|
|
61
|
+
| `codify gaps` | Show gaps detected by the Gap Engine |
|
|
62
|
+
| `codify triage` | Interactively resolve gaps |
|
|
63
|
+
| `codify collect` | Mine the graph for evidence to fill gaps |
|
|
64
|
+
| `codify check <file>` | Check files for related context (CI-ready) |
|
|
65
|
+
|
|
66
|
+
### Projects and Maintenance
|
|
67
|
+
|
|
68
|
+
| Command | Description |
|
|
69
|
+
|---------|-------------|
|
|
70
|
+
| `codify project create/list/switch` | Manage multiple projects |
|
|
71
|
+
| `codify timeline` | Show what changed in the graph over time |
|
|
72
|
+
| `codify export` | Backup the graph to JSON |
|
|
73
|
+
| `codify import` | Restore the graph from a JSON backup |
|
|
74
|
+
| `codify watch` | Start continuous ingest polling |
|
|
75
|
+
| `codify connect` | Connect external data sources |
|
|
76
|
+
| `codify reset` | Reset the context graph (drop all data) |
|
|
77
|
+
|
|
78
|
+
Run `codify <command> --help` for detailed options on any command.
|
|
79
|
+
|
|
80
|
+
## MCP Integration
|
|
81
|
+
|
|
82
|
+
Codify auto-installs its MCP server config during `codify init`. Claude Code connects automatically -- no manual configuration required.
|
|
83
|
+
|
|
84
|
+
The MCP server exposes tools that Claude can call directly:
|
|
85
|
+
|
|
86
|
+
- **codify_get_context** -- Retrieve context nodes by type or ID
|
|
87
|
+
- **codify_search** -- Search the graph by keyword
|
|
88
|
+
- **codify_explain** -- Claude-powered narrative synthesis from graph data
|
|
89
|
+
- **codify_get_gaps** -- List detected context gaps
|
|
90
|
+
- **codify_resolve_gap** -- Mark a gap as resolved with evidence
|
|
91
|
+
- **codify_add_context** -- Add new context nodes to the graph
|
|
92
|
+
- **codify_get_decision_trail** -- Trace the reasoning chain behind a decision
|
|
93
|
+
- **codify_traverse** -- Walk the graph from any node
|
|
94
|
+
- **codify_status** -- Graph health and statistics
|
|
95
|
+
- **codify_collect** -- Mine evidence for open gaps
|
|
96
|
+
- **codify_get_context_package** -- Get a bundled context snapshot for a topic
|
|
97
|
+
|
|
98
|
+
## How It Works
|
|
99
|
+
|
|
100
|
+
Codify uses PostgreSQL as its single storage engine:
|
|
101
|
+
|
|
102
|
+
- **Apache AGE** for graph traversal (nodes, edges, relationships)
|
|
103
|
+
- **pgvector** for semantic search (embedding-based similarity)
|
|
104
|
+
- **NATS JetStream** for event-driven gap detection and metabolism
|
|
105
|
+
- **Redis** for caching
|
|
106
|
+
|
|
107
|
+
The context graph stores nodes (Decision, Feature, CustomerSignal, CodeArtifact, Gap, etc.) and typed edges representing their relationships. A Metabolism service continuously maintains graph health through freshness decay, contradiction detection, and deduplication.
|
|
108
|
+
|
|
109
|
+
## Links
|
|
110
|
+
|
|
111
|
+
- GitHub: [github.com/kurtxu88/codify](https://github.com/kurtxu88/codify)
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuMpC,eAAO,MAAM,UAAU,SAwBQ,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// codify add — record context into the graph from the terminal
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { loadProjectConfig } from "../lib/config.js";
|
|
5
|
+
// --- Color helpers (ANSI escape codes) ---
|
|
6
|
+
const RESET = "\x1b[0m";
|
|
7
|
+
const BOLD = "\x1b[1m";
|
|
8
|
+
const DIM = "\x1b[2m";
|
|
9
|
+
const CYAN = "\x1b[36m";
|
|
10
|
+
const GREEN = "\x1b[32m";
|
|
11
|
+
const YELLOW = "\x1b[33m";
|
|
12
|
+
const MAGENTA = "\x1b[35m";
|
|
13
|
+
const BLUE = "\x1b[34m";
|
|
14
|
+
function typeColor(type) {
|
|
15
|
+
const colors = {
|
|
16
|
+
Decision: "\x1b[33m", // yellow
|
|
17
|
+
Feature: "\x1b[32m", // green
|
|
18
|
+
Metric: "\x1b[36m", // cyan
|
|
19
|
+
CustomerSignal: "\x1b[35m", // magenta
|
|
20
|
+
CodeArtifact: "\x1b[34m", // blue
|
|
21
|
+
Discussion: "\x1b[37m", // white
|
|
22
|
+
};
|
|
23
|
+
return `${colors[type] ?? DIM}${type}${RESET}`;
|
|
24
|
+
}
|
|
25
|
+
const NODE_TYPES = {
|
|
26
|
+
decision: { type: "Decision", defaultStatus: "accepted" },
|
|
27
|
+
feature: { type: "Feature", defaultStatus: "active" },
|
|
28
|
+
signal: { type: "CustomerSignal", defaultStatus: "active" },
|
|
29
|
+
artifact: { type: "CodeArtifact", defaultStatus: "active" },
|
|
30
|
+
discussion: { type: "Discussion", defaultStatus: "active" },
|
|
31
|
+
metric: { type: "Metric", defaultStatus: "active" },
|
|
32
|
+
};
|
|
33
|
+
// --- Insert helper ---
|
|
34
|
+
async function insertNode(typeDef, title, opts) {
|
|
35
|
+
try {
|
|
36
|
+
await loadProjectConfig();
|
|
37
|
+
const { getPool, closePool } = await import("@codify/graph");
|
|
38
|
+
const pool = getPool();
|
|
39
|
+
try {
|
|
40
|
+
await pool.query("SELECT 1");
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
console.error(" ERROR: Cannot connect to PostgreSQL. Run 'codify init' first.\n");
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
const nodeId = randomUUID();
|
|
47
|
+
const tags = opts.tags ? opts.tags.split(",").map((t) => t.trim()).filter(Boolean) : [];
|
|
48
|
+
const properties = {
|
|
49
|
+
title,
|
|
50
|
+
status: typeDef.defaultStatus,
|
|
51
|
+
};
|
|
52
|
+
if (opts.description) {
|
|
53
|
+
properties.description = opts.description;
|
|
54
|
+
}
|
|
55
|
+
// Insert the node
|
|
56
|
+
await pool.query(`INSERT INTO nodes (id, type, layer, confidence, freshness, source_system, source_reference, source_agent_id, source_reliability, properties, tags)
|
|
57
|
+
VALUES ($1, $2, 'permanent', 0.8, 1.0, 'cli', 'codify-add', 'user', 0.8, $3, $4)`, [nodeId, typeDef.type, JSON.stringify(properties), tags]);
|
|
58
|
+
// If --link is provided, also create an edge
|
|
59
|
+
if (opts.link) {
|
|
60
|
+
const edgeType = opts.linkType ?? "relates_to";
|
|
61
|
+
const edgeId = randomUUID();
|
|
62
|
+
// Verify the target node exists
|
|
63
|
+
const targetResult = await pool.query("SELECT id FROM nodes WHERE id = $1", [opts.link]);
|
|
64
|
+
if (targetResult.rows.length === 0) {
|
|
65
|
+
console.warn(`\n ${YELLOW}WARNING:${RESET} Target node ${opts.link} not found. Edge was not created.\n`);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
await pool.query(`INSERT INTO edges (id, type, source_id, target_id, confidence, weight, evidence)
|
|
69
|
+
VALUES ($1, $2, $3, $4, 0.8, 0.5, $5)`, [edgeId, edgeType, nodeId, opts.link, `CLI link: ${title}`]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// Print success
|
|
73
|
+
console.log(`\n ${GREEN}${BOLD}Context recorded.${RESET}\n`);
|
|
74
|
+
console.log(` ${DIM}ID:${RESET} ${CYAN}${nodeId}${RESET}`);
|
|
75
|
+
console.log(` ${DIM}Type:${RESET} [${typeColor(typeDef.type)}]`);
|
|
76
|
+
console.log(` ${DIM}Title:${RESET} ${BOLD}${title}${RESET}`);
|
|
77
|
+
if (opts.description) {
|
|
78
|
+
console.log(` ${DIM}Desc:${RESET} ${opts.description}`);
|
|
79
|
+
}
|
|
80
|
+
if (tags.length > 0) {
|
|
81
|
+
console.log(` ${DIM}Tags:${RESET} ${tags.map((t) => `${MAGENTA}${t}${RESET}`).join(", ")}`);
|
|
82
|
+
}
|
|
83
|
+
if (opts.link) {
|
|
84
|
+
const edgeType = opts.linkType ?? "relates_to";
|
|
85
|
+
console.log(` ${DIM}Link:${RESET} ${BLUE}${edgeType}${RESET} -> ${opts.link}`);
|
|
86
|
+
}
|
|
87
|
+
console.log(` ${DIM}Layer:${RESET} permanent ${DIM}Confidence:${RESET} 0.80 ${DIM}Freshness:${RESET} 1.00`);
|
|
88
|
+
console.log("");
|
|
89
|
+
await closePool();
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
93
|
+
if (message.includes("ECONNREFUSED")) {
|
|
94
|
+
console.error("\n ERROR: Cannot connect to Codify services.");
|
|
95
|
+
console.error(" Run 'codify init' to start the infrastructure.\n");
|
|
96
|
+
}
|
|
97
|
+
else if (message.includes("violates foreign key constraint") && message.includes("edge_types")) {
|
|
98
|
+
const edgeType = opts.linkType ?? "relates_to";
|
|
99
|
+
console.error(`\n ERROR: Edge type "${edgeType}" is not registered.`);
|
|
100
|
+
console.error(" Use a valid edge type: relates_to, caused_by, informed_by, evidence_for, etc.\n");
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
console.error(`\n ERROR: ${message}\n`);
|
|
104
|
+
}
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// --- Build a subcommand for each node type ---
|
|
109
|
+
function makeSubcommand(name, alias, typeDef, description) {
|
|
110
|
+
const cmd = new Command(name)
|
|
111
|
+
.description(description)
|
|
112
|
+
.argument("<title>", "Short title for the context node")
|
|
113
|
+
.option("--description <text>", "Detailed description or reasoning")
|
|
114
|
+
.option("--tags <tags>", "Comma-separated tags (e.g., auth,api)")
|
|
115
|
+
.option("--link <nodeId>", "Link to an existing node by ID")
|
|
116
|
+
.option("--link-type <edgeType>", "Edge type for the link (default: relates_to)", "relates_to")
|
|
117
|
+
.action(async (title, cmdOpts) => {
|
|
118
|
+
await insertNode(typeDef, title, {
|
|
119
|
+
description: cmdOpts.description,
|
|
120
|
+
tags: cmdOpts.tags,
|
|
121
|
+
link: cmdOpts.link,
|
|
122
|
+
linkType: cmdOpts.linkType,
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
if (alias) {
|
|
126
|
+
cmd.alias(alias);
|
|
127
|
+
}
|
|
128
|
+
return cmd;
|
|
129
|
+
}
|
|
130
|
+
// --- Subcommands ---
|
|
131
|
+
const decisionSubcommand = makeSubcommand("decision", null, NODE_TYPES.decision, "Record a decision (e.g., 'Chose JWT for API auth')");
|
|
132
|
+
const featureSubcommand = makeSubcommand("feature", null, NODE_TYPES.feature, "Record a feature (e.g., 'User auth flow')");
|
|
133
|
+
const signalSubcommand = makeSubcommand("signal", "customer-signal", NODE_TYPES.signal, "Record a customer signal (e.g., '3 customers asked for dark mode')");
|
|
134
|
+
const artifactSubcommand = makeSubcommand("artifact", "code-artifact", NODE_TYPES.artifact, "Record a code artifact (e.g., 'src/middleware/auth.ts')");
|
|
135
|
+
const discussionSubcommand = makeSubcommand("discussion", null, NODE_TYPES.discussion, "Record a discussion (e.g., 'Team agreed on REST over GraphQL')");
|
|
136
|
+
const metricSubcommand = makeSubcommand("metric", null, NODE_TYPES.metric, "Record a metric (e.g., 'API response time under 200ms')");
|
|
137
|
+
// --- Main add command ---
|
|
138
|
+
export const addCommand = new Command("add")
|
|
139
|
+
.description("Add context to the graph")
|
|
140
|
+
.addHelpText("after", `
|
|
141
|
+
Node types:
|
|
142
|
+
decision Record a technical or product decision
|
|
143
|
+
feature Record a product feature
|
|
144
|
+
signal Record a customer signal (alias: customer-signal)
|
|
145
|
+
artifact Record a code artifact (alias: code-artifact)
|
|
146
|
+
discussion Record a team discussion
|
|
147
|
+
metric Record a tracked metric
|
|
148
|
+
|
|
149
|
+
Examples:
|
|
150
|
+
codify add decision "Chose JWT for API auth" --description "Stateless, scalable" --tags auth,api
|
|
151
|
+
codify add signal "3 customers asked for dark mode" --tags ux,feature-request
|
|
152
|
+
codify add feature "User auth flow" --description "Login/signup with JWT"
|
|
153
|
+
codify add artifact "src/middleware/auth.ts" --tags auth
|
|
154
|
+
codify add discussion "Team agreed on REST over GraphQL" --tags api
|
|
155
|
+
codify add metric "API response time under 200ms" --tags performance
|
|
156
|
+
`)
|
|
157
|
+
.addCommand(decisionSubcommand)
|
|
158
|
+
.addCommand(featureSubcommand)
|
|
159
|
+
.addCommand(signalSubcommand)
|
|
160
|
+
.addCommand(artifactSubcommand)
|
|
161
|
+
.addCommand(discussionSubcommand)
|
|
162
|
+
.addCommand(metricSubcommand);
|
|
163
|
+
//# sourceMappingURL=add.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAk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EF,MAAM,gBAAgB,GAAG,cAAc,CACrC,QAAQ,EAAE,iBAAiB,EAAE,UAAU,CAAC,MAAM,EAC9C,oEAAoE,CACrE,CAAC;AAEF,MAAM,kBAAkB,GAAG,cAAc,CACvC,UAAU,EAAE,eAAe,EAAE,UAAU,CAAC,QAAQ,EAChD,yDAAyD,CAC1D,CAAC;AAEF,MAAM,oBAAoB,GAAG,cAAc,CACzC,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,UAAU,EACzC,gEAAgE,CACjE,CAAC;AAEF,MAAM,gBAAgB,GAAG,cAAc,CACrC,QAAQ,EAAE,IAAI,EAAE,UAAU,CAAC,MAAM,EACjC,yDAAyD,CAC1D,CAAC;AAEF,2BAA2B;AAE3B,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;KACzC,WAAW,CAAC,0BAA0B,CAAC;KACvC,WAAW,CAAC,OAAO,EAAE;;;;;;;;;;;;;;;;CAgBvB,CAAC;KACC,UAAU,CAAC,kBAAkB,CAAC;KAC9B,UAAU,CAAC,iBAAiB,CAAC;KAC7B,UAAU,CAAC,gBAAgB,CAAC;KAC5B,UAAU,CAAC,kBAAkB,CAAC;KAC9B,UAAU,CAAC,oBAAoB,CAAC;KAChC,UAAU,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/commands/bootstrap.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,gBAAgB,SA+IzB,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// codify bootstrap — mine the current project's git history into the context graph
|
|
2
|
+
//
|
|
3
|
+
// Uses the ingest service: LocalGitConnector → GitMiner (Claude-powered) → StagingPipeline
|
|
4
|
+
// This is the proper pipeline — Claude interprets commit messages, PR descriptions,
|
|
5
|
+
// and review comments to extract Decision, Feature, CodeArtifact, Discussion, Person nodes.
|
|
6
|
+
import { Command } from "commander";
|
|
7
|
+
import { spawnSync } from "node:child_process";
|
|
8
|
+
import { loadProjectConfig } from "../lib/config.js";
|
|
9
|
+
import { confirm } from "../lib/prompt.js";
|
|
10
|
+
export const bootstrapCommand = new Command("bootstrap")
|
|
11
|
+
.description("Mine the current project's git history into the context graph")
|
|
12
|
+
.option("--limit <n>", "Maximum commits to process", "500")
|
|
13
|
+
.option("--skip-prs", "Skip GitHub PR fetching")
|
|
14
|
+
.option("--batch-size <n>", "Artifacts per miner batch", "10")
|
|
15
|
+
.option("--yes", "Skip confirmation prompt")
|
|
16
|
+
.action(async (opts) => {
|
|
17
|
+
try {
|
|
18
|
+
const cwd = process.cwd();
|
|
19
|
+
console.log("\n Codify Bootstrap — Mining Git History\n");
|
|
20
|
+
// Check we're in a git repo
|
|
21
|
+
const gitCheck = spawnSync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
22
|
+
cwd,
|
|
23
|
+
stdio: "pipe",
|
|
24
|
+
});
|
|
25
|
+
if (gitCheck.status !== 0) {
|
|
26
|
+
console.error(" ERROR: Not in a git repository. Run from a git project.\n");
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
// Cost estimate
|
|
30
|
+
const commitCountResult = spawnSync("git", ["rev-list", "--count", "HEAD"], {
|
|
31
|
+
cwd,
|
|
32
|
+
stdio: "pipe",
|
|
33
|
+
});
|
|
34
|
+
let commitCount = parseInt(commitCountResult.stdout?.toString().trim() ?? "0", 10);
|
|
35
|
+
const limit = parseInt(opts.limit, 10);
|
|
36
|
+
if (commitCount > limit)
|
|
37
|
+
commitCount = limit;
|
|
38
|
+
console.log(` Will process ${commitCount} commits (Claude API calls required).`);
|
|
39
|
+
if (!opts.yes) {
|
|
40
|
+
const proceed = await confirm(" Proceed?");
|
|
41
|
+
if (!proceed) {
|
|
42
|
+
console.log(" Aborted.\n");
|
|
43
|
+
process.exit(0);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
console.log("");
|
|
47
|
+
// Load project config (.codify/config.json → env vars)
|
|
48
|
+
await loadProjectConfig();
|
|
49
|
+
// Verify DB connection
|
|
50
|
+
const { getPool } = await import("@codify/graph");
|
|
51
|
+
const pool = getPool();
|
|
52
|
+
try {
|
|
53
|
+
await pool.query("SELECT 1");
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
console.error(" ERROR: Cannot connect to PostgreSQL. Run 'codify init' first.\n");
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
// Check for ANTHROPIC_API_KEY
|
|
60
|
+
if (!process.env.ANTHROPIC_API_KEY) {
|
|
61
|
+
console.error(" ERROR: ANTHROPIC_API_KEY not set. The miner needs Claude to extract context.\n");
|
|
62
|
+
console.error(" Set it in your environment or .codify/config.json.\n");
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
// Initialize the ingest service
|
|
66
|
+
console.log(" [1/3] Initializing ingest service...");
|
|
67
|
+
const { createIngestService } = await import("@codify/agents");
|
|
68
|
+
const batchSize = parseInt(opts.batchSize, 10);
|
|
69
|
+
const ingest = await createIngestService({
|
|
70
|
+
minerBatchSize: batchSize,
|
|
71
|
+
enableDedup: true,
|
|
72
|
+
autoPromoteThreshold: 0.7,
|
|
73
|
+
});
|
|
74
|
+
// Connect the local-git connector to this project
|
|
75
|
+
console.log(` OK Connecting to ${cwd}`);
|
|
76
|
+
await ingest.registry.connect("local-git", {
|
|
77
|
+
type: "local",
|
|
78
|
+
credentials: { repoPath: cwd, maxCommits: String(limit) },
|
|
79
|
+
});
|
|
80
|
+
// Run bootstrap (full sync through connector → miner → pipeline)
|
|
81
|
+
console.log("\n [2/3] Mining git history with Claude...");
|
|
82
|
+
console.log(" This uses AI to extract decisions, features, discussions,");
|
|
83
|
+
console.log(" and relationships from your commit and PR history.\n");
|
|
84
|
+
const totalBatches = Math.ceil(commitCount / batchSize);
|
|
85
|
+
console.log(` Processing ${commitCount} commits in ~${totalBatches} batch${totalBatches === 1 ? "" : "es"}\n`);
|
|
86
|
+
const startTime = Date.now();
|
|
87
|
+
const batchTimes = [];
|
|
88
|
+
let batchNum = 0;
|
|
89
|
+
// Progress callback — logs per-batch progress with ETA
|
|
90
|
+
const originalLog = console.log;
|
|
91
|
+
const batchPattern = /mined|batch|processing/i;
|
|
92
|
+
const patchedLog = (...args) => {
|
|
93
|
+
const msg = String(args[0] ?? "");
|
|
94
|
+
if (batchPattern.test(msg)) {
|
|
95
|
+
batchNum++;
|
|
96
|
+
const now = Date.now();
|
|
97
|
+
batchTimes.push(now);
|
|
98
|
+
if (batchNum >= 2 && batchNum < totalBatches) {
|
|
99
|
+
const elapsed = (now - startTime) / 1000;
|
|
100
|
+
const avgBatchSec = elapsed / batchNum;
|
|
101
|
+
const remaining = Math.round(avgBatchSec * (totalBatches - batchNum));
|
|
102
|
+
const mins = Math.floor(remaining / 60);
|
|
103
|
+
const secs = remaining % 60;
|
|
104
|
+
const eta = mins > 0 ? `${mins}m ${secs}s` : `${secs}s`;
|
|
105
|
+
originalLog(` Batch ${batchNum}/${totalBatches} (${Math.round((batchNum / totalBatches) * 100)}%) — ~${eta} remaining`);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
originalLog(...args);
|
|
110
|
+
};
|
|
111
|
+
console.log = patchedLog;
|
|
112
|
+
const result = await ingest.bootstrap.run("local-git");
|
|
113
|
+
console.log = originalLog;
|
|
114
|
+
const durationSec = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
115
|
+
// Summary
|
|
116
|
+
console.log(`\n Your context graph is live!\n`);
|
|
117
|
+
console.log(` ${result.totalArtifacts} artifacts mined in ${durationSec}s\n`);
|
|
118
|
+
console.log(` Nodes: ${result.pipeline.created.length} created, ${result.pipeline.merged.length} merged`);
|
|
119
|
+
if (result.pipeline.rejected.length > 0) {
|
|
120
|
+
console.log(` Skipped: ${result.pipeline.rejected.length}`);
|
|
121
|
+
}
|
|
122
|
+
console.log(`\n Run 'codify status' to see your graph.`);
|
|
123
|
+
console.log(` Claude Code now has full context about your project.\n`);
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
127
|
+
if (message.includes("ECONNREFUSED")) {
|
|
128
|
+
console.error("\n ERROR: Cannot connect to Codify services.");
|
|
129
|
+
console.error(" Run 'codify init' to start the infrastructure.\n");
|
|
130
|
+
}
|
|
131
|
+
else if (message.includes("ANTHROPIC_API_KEY")) {
|
|
132
|
+
console.error("\n ERROR: ANTHROPIC_API_KEY not set.");
|
|
133
|
+
console.error(" Export your API key: export ANTHROPIC_API_KEY=sk-...\n");
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
console.error(`\n ERROR: ${message}\n`);
|
|
137
|
+
}
|
|
138
|
+
process.exit(1);
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/commands/bootstrap.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,EAAE;AACF,2FAA2F;AAC3F,oFAAoF;AACpF,4FAA4F;AAE5F,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC;KACrD,WAAW,CAAC,+DAA+D,CAAC;KAC5E,MAAM,CAAC,aAAa,EAAE,4BAA4B,EAAE,KAAK,CAAC;KAC1D,MAAM,CAAC,YAAY,EAAE,yBAAyB,CAAC;KAC/C,MAAM,CAAC,kBAAkB,E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