@digital-lake/lognexus 1.0.0-alpha.0 → 1.0.0-alpha.1

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.
Files changed (48) hide show
  1. package/README.md +56 -65
  2. package/dist/cli.js +68 -89
  3. package/dist/cli.js.map +1 -1
  4. package/dist/doctor.d.ts +10 -0
  5. package/dist/doctor.d.ts.map +1 -0
  6. package/dist/doctor.js +109 -0
  7. package/dist/doctor.js.map +1 -0
  8. package/dist/index.d.ts +3 -7
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +3 -7
  11. package/dist/index.js.map +1 -1
  12. package/dist/scaffold.d.ts +6 -0
  13. package/dist/scaffold.d.ts.map +1 -0
  14. package/dist/scaffold.js +33 -0
  15. package/dist/scaffold.js.map +1 -0
  16. package/dist/status.d.ts +9 -0
  17. package/dist/status.d.ts.map +1 -0
  18. package/dist/status.js +52 -0
  19. package/dist/status.js.map +1 -0
  20. package/package.json +7 -4
  21. package/dist/config/loadConfig.d.ts +0 -36
  22. package/dist/config/loadConfig.d.ts.map +0 -1
  23. package/dist/config/loadConfig.js +0 -65
  24. package/dist/config/loadConfig.js.map +0 -1
  25. package/dist/providers/deepseek.d.ts +0 -10
  26. package/dist/providers/deepseek.d.ts.map +0 -1
  27. package/dist/providers/deepseek.js +0 -13
  28. package/dist/providers/deepseek.js.map +0 -1
  29. package/dist/providers/factory.d.ts +0 -4
  30. package/dist/providers/factory.d.ts.map +0 -1
  31. package/dist/providers/factory.js +0 -23
  32. package/dist/providers/factory.js.map +0 -1
  33. package/dist/providers/gemini.d.ts +0 -17
  34. package/dist/providers/gemini.d.ts.map +0 -1
  35. package/dist/providers/gemini.js +0 -105
  36. package/dist/providers/gemini.js.map +0 -1
  37. package/dist/providers/openaiCompatible.d.ts +0 -17
  38. package/dist/providers/openaiCompatible.d.ts.map +0 -1
  39. package/dist/providers/openaiCompatible.js +0 -100
  40. package/dist/providers/openaiCompatible.js.map +0 -1
  41. package/dist/providers/types.d.ts +0 -35
  42. package/dist/providers/types.d.ts.map +0 -1
  43. package/dist/providers/types.js +0 -2
  44. package/dist/providers/types.js.map +0 -1
  45. package/dist/routing/tierRouter.d.ts +0 -11
  46. package/dist/routing/tierRouter.d.ts.map +0 -1
  47. package/dist/routing/tierRouter.js +0 -42
  48. package/dist/routing/tierRouter.js.map +0 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  # LogNexus
6
6
 
7
7
  <p align="center">
8
- <strong>The Git-Powered Memory Nexus for AI Agents</strong>
8
+ <strong>The Universal, Git-Powered Context & Rules Framework for Native AI Agents</strong>
9
9
  </p>
10
10
 
11
11
  <p align="center">
@@ -19,9 +19,11 @@
19
19
 
20
20
  ## What is LogNexus?
21
21
 
22
- As AI coding agents take on multi-step engineering tasks, they suffer from a fundamental failure mode: **cognitive amnesia**. Between conversation resets, context compactations, model handoffs, and unexpected bugs, the *why* behind design decisions, discarded alternatives, and technical discoveries vanishes.
22
+ As AI coding agents take on complex engineering tasks across different IDEs, they suffer from a fundamental failure mode: **cognitive amnesia**. Between conversation resets, context compactations, model handoffs, and unexpected bugs, the *why* behind design decisions, discarded alternatives, and technical discoveries vanishes.
23
23
 
24
- **LogNexus transforms Git and GitHub into a persistent, traceable knowledge graph.** It turns every brainstorm into an issue, every issue into a scoped branch, every commit into an annotated milestone, and every Pull Request into an auditable timeline of the entire development journey.
24
+ **LogNexus transforms Git and GitHub into a persistent, traceable knowledge graph.** It is a **100% generic, model-agnostic and editor-agnostic framework** that operates directly inside your native AI development environments:
25
+ - **Clients:** Claude Code, Cursor, Codex, Google Antigravity, Kimi Code, VS Code, Zed.
26
+ - **Models:** Anthropic Claude (Opus, Sonnet, Haiku), OpenAI (o3, o1, GPT-4o), Google Gemini (2.5/3.8 Pro & Flash), DeepSeek (R1, V3, Chat).
25
27
 
26
28
  ```
27
29
  Issues (Why & Goals) ──▶ Branches (Task Scopes) ──▶ Commits (Context & Diffs) ──▶ PR (Timeline & Review)
@@ -29,26 +31,24 @@ Issues (Why & Goals) ──▶ Branches (Task Scopes) ──▶ Commits (Context
29
31
  └─────────────────────── Git-Backed Knowledge Graph ──────────────────────────────┘
30
32
  ```
31
33
 
34
+ > **Framework, Not an API Proxy:** LogNexus never intercepts network calls or wraps vendor APIs. Your models remain inside their native IDEs with full access to editor buffers, interactive diff viewers, terminals, MCP servers, and local tools.
35
+
32
36
  ---
33
37
 
34
38
  ## Key Features
35
39
 
36
- - **Dual-Layer Architecture:**
37
- - **Skill Layer (Markdown):** Drop-in compatibility with **Claude Code**, **Cursor**, **Codex**, **Antigravity**, and **Gemini CLI**.
38
- - **Runtime Layer (TypeScript):** Lightweight, zero-heavy-dependency runtime with native `fetch` and a flexible **Strategy/Factory** pattern.
39
- - **Native Multi-Model Routing:**
40
- - Route planning, PR synthesis, and cross-review to high-reasoning tiers (**Gemini / Claude Opus / DeepSeek Reasoner**).
41
- - Ingest massive codebases using long-context windows (**Gemini** with 1M tokens).
42
- - Delegate closed-contract implementation tasks to cost-effective execution engines (**DeepSeek Chat** at marginal cost).
43
- - **Cross-Model Review Gates:** Enforce non-negotiable review separation (`Authored-by:` vs `Reviewed-by:`). No model merges its own code without independent verification.
40
+ - **Universal Multi-Model Support:** Native cognitive guidelines and prompt specifications for **Anthropic Claude**, **OpenAI**, **Google Gemini**, and **DeepSeek**.
41
+ - **Universal Client Compatibility:** Drop-in support for **Claude Code**, **Cursor**, **Codex**, **Google Antigravity**, and **Kimi Code / VS Code**.
42
+ - **Cross-Model Review Gates:** Non-negotiable review separation (`Authored-by:` vs `Reviewed-by:`). No model merges its own code without independent verification from another model family or version.
44
43
  - **Contract-First Subtasks:** Tasks are bounded by strict decision budgets, file allowlists, and stop conditions (`feat(#42/T1)`).
45
44
  - **Hidden Metadata Envelopes:** HTML comments preserve machine-parseable state (`<!-- lognexus: kind: state ... -->`) without cluttering human-readable markdown.
45
+ - **Scaffolding & Health CLI (`@digital-lake/lognexus`):** Lightweight scaffolding utility (`npx @digital-lake/lognexus init`) and environment health checking (`doctor`).
46
46
 
47
47
  ---
48
48
 
49
- ## Why Multi-Model Routing?
49
+ ## Model-Tier Routing Matrix
50
50
 
51
- Empirical benchmarks and community data demonstrate that routing specialized agent tasks to provider tiers according to context, reasoning, and execution profiles drastically reduces operating costs while improving quality.
51
+ LogNexus organizes development phases into three cognitive tiers. You can assign any model or native client to any tier according to your team's workflow and cost preferences:
52
52
 
53
53
  <p align="center">
54
54
  <img src="docs/assets/multimodel-routing-costs.png" alt="Multi-Model Routing Cost and Performance Analysis" width="85%">
@@ -56,21 +56,26 @@ Empirical benchmarks and community data demonstrate that routing specialized age
56
56
 
57
57
  ### Operational Tiers
58
58
 
59
- | Tier | Default Provider / Model | Primary Role |
60
- |---|---|---|
61
- | **tier-1 (Reasoning)** | Gemini Pro/Flash (High) · DeepSeek Reasoner · Claude Opus | Architectural design, brainstorm synthesis, PR timelines, and cross-model review gates. |
62
- | **tier-2 (Context)** | Gemini (1M Context Window) | Rapid codebase exploration, large context loading, discovery triage, and documentation. |
63
- | **tier-3 (Execution)** | DeepSeek Chat | Routine implementation under closed delegation contracts, subtask commits, and timeline logging. |
64
-
65
- ---
59
+ | Tier | Cognitive Role | Anthropic Claude | OpenAI | Google Gemini | DeepSeek | Primary Activities |
60
+ |---|---|---|---|---|---|---|
61
+ | **tier-1 (Reasoning)** | Deep synthesis, architectural design, narrative review | Claude Opus 3.7 / 4.x | o3, o1, GPT-5 | Gemini 2.5 / 3.8 Pro | DeepSeek R1 | Brainstorming-to-issue planning, PR journey timeline synthesis, cross-model review sign-offs. |
62
+ | **tier-2 (Context & Triage)** | Long context ingestion, discovery triage, structured mapping | Claude Sonnet | GPT-4.1, GPT-4o | Gemini Flash / Pro (1M context) | DeepSeek V3 | Large codebase exploration, discovery classification, knowledge retrieval. |
63
+ | **tier-3 (Execution)** | Surgical implementation, template filling, fast execution | Claude Haiku | GPT-4o-mini | Gemini Flash | DeepSeek Chat (V3) | Subtask commits (`feat(#N/Tk)`), atomic code changes under closed contracts, timeline logging. |
66
64
 
67
- ## Architecture & Competitive Positioning
65
+ ### Example Deployment Setups
68
66
 
69
- LogNexus advances agentic development workflows beyond passive markdown instructions into an active, verifiable development platform.
67
+ LogNexus adapts to your existing toolstack. Configure your advisory preferences in `.lognexus/routing.md`:
70
68
 
71
- <p align="center">
72
- <img src="docs/assets/competitive-gap-map.png" alt="Competitive Gap Map and Roadmap" width="85%">
73
- </p>
69
+ ```
70
+ ┌────────────────────────────────────────────────────────────────────────────────────────┐
71
+ │ POPULAR DEPLOYMENT SETUPS │
72
+ ├────────────────────────────────────────────────────────────────────────────────────────┤
73
+ │ Setup A (Anthropic Pure): Claude Opus (t1) + Claude Sonnet (t2) + Claude Haiku (t3) │
74
+ │ Setup B (Google + DeepSeek): Gemini Pro (t1/t2) in Antigravity + DeepSeek Chat in Kimi │
75
+ │ Setup C (OpenAI + DeepSeek): OpenAI o3 (t1) in Cursor + DeepSeek Chat (t3) for code │
76
+ │ Setup D (Claude + OpenAI): Claude Opus (t1) for design + GPT-4o-mini (t3) for tasks │
77
+ └────────────────────────────────────────────────────────────────────────────────────────┘
78
+ ```
74
79
 
75
80
  ---
76
81
 
@@ -110,58 +115,43 @@ An independent model inspects the PR diff, verifies task contracts, and signs of
110
115
 
111
116
  ---
112
117
 
113
- ## Installation
118
+ ## Installation & Setup
114
119
 
115
- ### As a Claude Code Plugin
116
- ```bash
117
- # From repository
118
- claude plugin add digital-lake-ai/lognexus
120
+ ### 1. Scaffold Rules in Your Repository
121
+ Initialize `.lognexus/` rules, templates, and routing configuration with the CLI:
119
122
 
120
- # Or link locally
121
- claude plugin add ./path/to/lognexus
122
- ```
123
-
124
- ### Via Agent Skills (Antigravity / Cursor / Codex)
125
123
  ```bash
126
- npx -y skills add digital-lake-ai/lognexus
124
+ npx @digital-lake/lognexus init
127
125
  ```
128
126
 
129
- ### Via Global CLI
127
+ Verify your environment anytime:
130
128
  ```bash
131
- npm install -g @digital-lake/lognexus
132
- lognexus doctor
129
+ npx @digital-lake/lognexus doctor
133
130
  ```
134
131
 
135
- ---
136
-
137
- ## Configuration
138
-
139
- Configure your active provider in `.lognexus/config.json` or through environment variables:
140
-
132
+ Inspect active branch and tier advisory:
141
133
  ```bash
142
- # Provider selection
143
- export LOGNEXUS_PROVIDER=gemini # 'gemini' or 'deepseek'
144
-
145
- # Google Gemini
146
- export GEMINI_API_KEY="your-api-key"
147
- export GEMINI_MODEL="gemini-3.8-flash"
148
-
149
- # DeepSeek
150
- export DEEPSEEK_API_KEY="your-api-key"
151
- export DEEPSEEK_BASE_URL="https://api.deepseek.com"
152
- export DEEPSEEK_MODEL="deepseek-chat"
134
+ npx @digital-lake/lognexus status
153
135
  ```
154
136
 
155
- Verify your environment anytime:
156
- ```bash
157
- lognexus doctor
158
- ```
137
+ ### 2. Install Rules in Your Agent Environment
138
+
139
+ - **Claude Code:**
140
+ ```bash
141
+ claude plugin add digital-lake-ai/lognexus
142
+ ```
143
+ - **Cursor / Codex / Agent Skills:**
144
+ ```bash
145
+ npx skills add digital-lake-ai/lognexus
146
+ ```
147
+ - **Google Antigravity:** Active automatically via `skills/lognexus/SKILL.md` or workspace skills.
148
+ - **Kimi Code / VS Code:** Active via `.lognexus/` workspace instructions and prompts.
159
149
 
160
150
  ---
161
151
 
162
152
  ## Disambiguation
163
153
 
164
- **LogNexus** by Digital Lake is an open-source development orchestrator and Git memory system for AI agents. It is not affiliated with academic research papers on industrial log compression (e.g. ISSTA 2026).
154
+ **LogNexus** by Digital Lake is an open-source development framework and Git memory system for AI agents. It is not affiliated with academic research papers on industrial log compression (e.g. ISSTA 2026).
165
155
 
166
156
  ---
167
157
 
@@ -169,10 +159,11 @@ lognexus doctor
169
159
 
170
160
  LogNexus is an independent hard fork and continuation of [`shiplog`](https://github.com/devallibus/shiplog), originally created by **devallibus** under the MIT License.
171
161
 
172
- We extend our deep gratitude to **devallibus** for pioneering the concept of Git-as-knowledge-graph for AI development. LogNexus builds upon that foundation by introducing:
173
- - Multi-model routing with native **Google Gemini** and **DeepSeek** provider strategies.
174
- - A standalone TypeScript runtime and automated verification CLI.
175
- - Resilient backwards-compatibility for existing `.shiplog` envelopes and workflows.
162
+ We extend our deep gratitude to **devallibus** for pioneering the concept of Git-as-knowledge-graph for AI development. LogNexus builds upon that foundation by:
163
+ - Expanding the model ecosystem to provide first-class native support for **Google Gemini** and **DeepSeek** alongside **Claude** and **OpenAI**.
164
+ - Formalizing the multi-model tier routing taxonomy and closed delegation contracts.
165
+ - Introducing the repository scaffolding CLI (`@digital-lake/lognexus`).
166
+ - Providing seamless backwards-compatibility for existing `.shiplog` envelopes and workflows.
176
167
 
177
168
  Additional inspirations and patterns are derived from [OrchestKit](https://github.com/yonatangross/orchestkit) and [Superpowers](https://github.com/obra/superpowers). Detailed license texts are preserved in the [`LICENSES/`](LICENSES/) directory and in [`NOTICE.md`](NOTICE.md).
178
169
 
package/dist/cli.js CHANGED
@@ -1,112 +1,91 @@
1
1
  #!/usr/bin/env node
2
- import { execSync } from "node:child_process";
3
- import { loadConfig } from "./config/loadConfig.js";
4
- import { createProvider } from "./providers/factory.js";
5
- import { resolveTier } from "./routing/tierRouter.js";
2
+ import { runDiagnostics } from "./doctor.js";
3
+ import { initProject } from "./scaffold.js";
4
+ import { getProjectStatus } from "./status.js";
6
5
  function printHeader() {
7
- console.log("\n🔷 LogNexus CLI v1.0.0-alpha.0 — Digital Lake\n");
6
+ console.log("\n🔷 LogNexus CLI — Digital Lake");
7
+ console.log(" The Git-Powered Context & Rules Framework for Native AI Agents\n");
8
8
  }
9
- function redactKey(key) {
10
- if (!key)
11
- return "❌ (not set)";
12
- if (key.length <= 8)
13
- return "•••••••• (set)";
14
- return `${key.slice(0, 4)}••••${key.slice(-4)}`;
9
+ function printUsage() {
10
+ printHeader();
11
+ console.log(`Usage:
12
+ lognexus <command> [options]
13
+
14
+ Commands:
15
+ init Scaffold .lognexus/ configuration and rules in current repository
16
+ doctor Check Git, GitHub CLI authentication, and repository rules health
17
+ status Inspect current branch, active issue, and recommended tier
18
+ help Display this help message
19
+
20
+ Examples:
21
+ npx @digital-lake/lognexus init
22
+ npx @digital-lake/lognexus doctor
23
+ npx @digital-lake/lognexus status
24
+ `);
15
25
  }
16
- async function runDoctor(args) {
26
+ async function handleInit() {
17
27
  printHeader();
18
- console.log("Running diagnostics...\n");
19
- const live = args.includes("--live");
20
- // 1. Git Check
21
- try {
22
- const gitVer = execSync("git --version", { encoding: "utf-8" }).trim();
23
- const isRepo = execSync("git rev-parse --is-inside-work-tree", {
24
- encoding: "utf-8",
25
- stdio: ["pipe", "pipe", "ignore"],
26
- }).trim();
27
- console.log(`[PASS] Git: ${gitVer} (inside git repository: ${isRepo})`);
28
- }
29
- catch {
30
- console.log("[FAIL] Git: Git command failed or not in a git repository");
31
- }
32
- // 2. GitHub CLI Check
33
- try {
34
- const ghVer = execSync("gh --version", { encoding: "utf-8" }).split("\n")[0];
35
- console.log(`[PASS] GitHub CLI: ${ghVer}`);
36
- }
37
- catch {
38
- console.log("[WARN] GitHub CLI: 'gh' not found in PATH or not installed");
39
- }
40
- // 3. Load Configuration
41
- const config = loadConfig();
42
- console.log(`\n[INFO] Active Provider Strategy: ${config.provider.toUpperCase()}`);
43
- console.log(` - Gemini Key: ${redactKey(config.gemini.apiKey)}`);
44
- console.log(` - Gemini Model: ${config.gemini.model}`);
45
- console.log(` - DeepSeek Key: ${redactKey(config.deepseek.apiKey)}`);
46
- console.log(` - DeepSeek Model: ${config.deepseek.model}`);
47
- // 4. Live Provider Connectivity Check (Optional)
48
- if (live) {
49
- console.log("\nTesting live API connectivity...");
50
- if (config.gemini.apiKey) {
51
- const gemini = createProvider("gemini", config);
52
- const health = await gemini.healthCheck();
53
- console.log(` - Gemini Live: ${health.ok ? "✅ PASS" : "❌ FAIL"} — ${health.message}`);
54
- }
55
- if (config.deepseek.apiKey) {
56
- const deepseek = createProvider("deepseek", config);
57
- const health = await deepseek.healthCheck();
58
- console.log(` - DeepSeek Live: ${health.ok ? "✅ PASS" : "❌ FAIL"} — ${health.message}`);
28
+ console.log("Initializing LogNexus in current repository...\n");
29
+ const res = initProject();
30
+ if (res.created.length > 0) {
31
+ console.log("Created files:");
32
+ for (const f of res.created) {
33
+ console.log(` [+] ${f}`);
59
34
  }
60
35
  }
61
- else {
62
- console.log("\nTip: Pass --live to verify API keys with real connectivity checks.");
36
+ if (res.skipped.length > 0) {
37
+ console.log("Existing files (skipped):");
38
+ for (const f of res.skipped) {
39
+ console.log(` [.] ${f}`);
40
+ }
63
41
  }
64
- console.log("\nDiagnostic complete.\n");
42
+ console.log("\nNext Steps:");
43
+ console.log(" • Claude Code / Cursor / Codex / Antigravity / Kimi: use /lognexus plan");
44
+ console.log(" • Configure model tiers in .lognexus/routing.md");
45
+ console.log(" • Verify environment anytime with: npx @digital-lake/lognexus doctor\n");
65
46
  }
66
- function runRoute(args) {
67
- const tierArg = args[0];
68
- if (!tierArg || !["tier-1", "tier-2", "tier-3"].includes(tierArg)) {
69
- console.error("Usage: lognexus route <tier-1 | tier-2 | tier-3>");
70
- process.exit(1);
47
+ async function handleDoctor() {
48
+ printHeader();
49
+ console.log("Running diagnostics...\n");
50
+ const checks = runDiagnostics();
51
+ for (const c of checks) {
52
+ const tag = c.status === "pass" ? "[PASS]" : c.status === "warn" ? "[WARN]" : "[FAIL]";
53
+ console.log(`${tag} ${c.name}: ${c.message}`);
71
54
  }
72
- const tier = tierArg;
73
- const config = loadConfig();
74
- const assignment = resolveTier(tier, config);
75
- console.log(`\n🔷 LogNexus Tier Route: [${assignment.tier}]`);
76
- console.log(`Provider: ${assignment.provider.id}`);
77
- console.log(`Model: ${assignment.model}`);
78
- console.log(`Purpose: ${assignment.description}\n`);
55
+ console.log("\nDiagnostic complete.\n");
79
56
  }
80
- function runHelp() {
57
+ async function handleStatus() {
81
58
  printHeader();
82
- console.log("Usage: lognexus <command> [options]\n");
83
- console.log("Commands:");
84
- console.log(" doctor [--live] Run environment and credentials diagnostic");
85
- console.log(" route <tier> Resolve assigned model/provider for a tier (tier-1, tier-2, tier-3)");
86
- console.log(" config Display sanitized configuration");
87
- console.log(" help Show this help message\n");
59
+ const st = getProjectStatus();
60
+ console.log(`Git Repository: ${st.isInsideGit ? "Yes" : "No"}`);
61
+ console.log(`Current Branch: ${st.branch}`);
62
+ console.log(`Active Issue: ${st.activeIssue ?? "(none — on base branch)"}`);
63
+ console.log(`Rules Routing Mode: ${st.routingMode}`);
64
+ console.log(`Recommended Tier: ${st.recommendedTier}\n`);
88
65
  }
89
66
  async function main() {
90
- const command = process.argv[2] || "help";
91
- const args = process.argv.slice(3);
67
+ const args = process.argv.slice(2);
68
+ const command = args[0]?.toLowerCase();
92
69
  switch (command) {
70
+ case "init":
71
+ await handleInit();
72
+ break;
93
73
  case "doctor":
94
- await runDoctor(args);
74
+ await handleDoctor();
95
75
  break;
96
- case "route":
97
- runRoute(args);
76
+ case "status":
77
+ await handleStatus();
98
78
  break;
99
- case "config":
100
- printHeader();
101
- console.log(JSON.stringify({
102
- ...loadConfig(),
103
- gemini: { ...loadConfig().gemini, apiKey: redactKey(loadConfig().gemini.apiKey) },
104
- deepseek: { ...loadConfig().deepseek, apiKey: redactKey(loadConfig().deepseek.apiKey) },
105
- }, null, 2));
79
+ case "help":
80
+ case "--help":
81
+ case "-h":
82
+ case undefined:
83
+ printUsage();
106
84
  break;
107
85
  default:
108
- runHelp();
109
- break;
86
+ console.error(`Unknown command: ${command}\n`);
87
+ printUsage();
88
+ process.exit(1);
110
89
  }
111
90
  }
112
91
  main().catch((err) => {
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAsB,WAAW,EAA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AAG,CAAC,uBAAuB,EAAE,CAAC,eAAe,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;IAEvC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,MAAM;YACT,MAAM,UAAU,EAAE,CAAC;YACnB,MAAM;QACR,KAAK,QAAQ;YACX,MAAM,YAAY,EAAE,CAAC;YACrB,MAAM;QACR,KAAK,QAAQ;YACX,MAAM,YAAY,EAAE,CAAC;YACrB,MAAM;QACR,KAAK,MAAM,CAAC;QACZ,KAAK,QAAQ,CAAC;QACd,KAAK,IAAI,CAAC;QACV,KAAK,SAAS;YACZ,UAAU,EAAE,CAAC;YACb,MAAM;QACR;YACE,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,IAAI,CAAC,CAAC;YAC/C,UAAU,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ export interface DiagnosticCheck {
2
+ name: string;
3
+ status: "pass" | "warn" | "fail";
4
+ message: string;
5
+ }
6
+ export declare function checkGit(targetDir?: string): DiagnosticCheck;
7
+ export declare function checkGitHubCli(): DiagnosticCheck;
8
+ export declare function checkRulesConfig(targetDir?: string): DiagnosticCheck;
9
+ export declare function runDiagnostics(targetDir?: string): DiagnosticCheck[];
10
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,SAAS,GAAE,MAAsB,GAAG,eAAe,CAsC3E;AAED,wBAAgB,cAAc,IAAI,eAAe,CA2BhD;AAED,wBAAgB,gBAAgB,CAAC,SAAS,GAAE,MAAsB,GAAG,eAAe,CAsCnF;AAED,wBAAgB,cAAc,CAAC,SAAS,GAAE,MAAsB,GAAG,eAAe,EAAE,CAEnF"}
package/dist/doctor.js ADDED
@@ -0,0 +1,109 @@
1
+ import { execSync } from "node:child_process";
2
+ import { existsSync, readFileSync } from "node:fs";
3
+ import { join } from "node:path";
4
+ export function checkGit(targetDir = process.cwd()) {
5
+ try {
6
+ const version = execSync("git --version", {
7
+ encoding: "utf8",
8
+ stdio: ["pipe", "pipe", "pipe"],
9
+ }).trim();
10
+ let insideRepo = false;
11
+ try {
12
+ const isInside = execSync("git rev-parse --is-inside-work-tree", {
13
+ cwd: targetDir,
14
+ encoding: "utf8",
15
+ stdio: ["pipe", "pipe", "pipe"],
16
+ }).trim();
17
+ insideRepo = isInside === "true";
18
+ }
19
+ catch {
20
+ insideRepo = false;
21
+ }
22
+ if (!insideRepo) {
23
+ return {
24
+ name: "Git Repository",
25
+ status: "warn",
26
+ message: `${version} (current directory is not a Git repository)`,
27
+ };
28
+ }
29
+ return {
30
+ name: "Git",
31
+ status: "pass",
32
+ message: `${version} (inside Git repository)`,
33
+ };
34
+ }
35
+ catch {
36
+ return {
37
+ name: "Git",
38
+ status: "fail",
39
+ message: "Git is not installed or not available in PATH",
40
+ };
41
+ }
42
+ }
43
+ export function checkGitHubCli() {
44
+ try {
45
+ const version = execSync("gh --version", { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] })
46
+ .split("\n")[0]
47
+ .trim();
48
+ try {
49
+ execSync("gh auth status", { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] });
50
+ return {
51
+ name: "GitHub CLI",
52
+ status: "pass",
53
+ message: `${version} (authenticated)`,
54
+ };
55
+ }
56
+ catch {
57
+ return {
58
+ name: "GitHub CLI",
59
+ status: "warn",
60
+ message: `${version} (installed, but not authenticated — run 'gh auth login')`,
61
+ };
62
+ }
63
+ }
64
+ catch {
65
+ return {
66
+ name: "GitHub CLI",
67
+ status: "warn",
68
+ message: "GitHub CLI (gh) not found in PATH — required for issue & PR automation",
69
+ };
70
+ }
71
+ }
72
+ export function checkRulesConfig(targetDir = process.cwd()) {
73
+ const lognexusDir = join(targetDir, ".lognexus");
74
+ const shiplogDir = join(targetDir, ".shiplog");
75
+ if (existsSync(lognexusDir)) {
76
+ const routingFile = join(lognexusDir, "routing.md");
77
+ if (existsSync(routingFile)) {
78
+ const content = readFileSync(routingFile, "utf8");
79
+ const match = content.match(/routing:\s*(confirm|warn|off)/i);
80
+ const mode = match ? match[1].toLowerCase() : "unknown";
81
+ return {
82
+ name: "LogNexus Rules",
83
+ status: "pass",
84
+ message: `Found .lognexus/ (routing mode: ${mode})`,
85
+ };
86
+ }
87
+ return {
88
+ name: "LogNexus Rules",
89
+ status: "warn",
90
+ message: "Found .lognexus/ directory, but routing.md is missing (run 'lognexus init')",
91
+ };
92
+ }
93
+ if (existsSync(shiplogDir)) {
94
+ return {
95
+ name: "LogNexus Rules",
96
+ status: "warn",
97
+ message: "Found legacy .shiplog/ directory — consider migrating to .lognexus/ (see docs/MIGRATING_FROM_SHIPLOG.md)",
98
+ };
99
+ }
100
+ return {
101
+ name: "LogNexus Rules",
102
+ status: "warn",
103
+ message: "No .lognexus/ directory found in current project (run 'npx @digital-lake/lognexus init')",
104
+ };
105
+ }
106
+ export function runDiagnostics(targetDir = process.cwd()) {
107
+ return [checkGit(targetDir), checkGitHubCli(), checkRulesConfig(target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C;QACpD,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC5B,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;YAClD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;YAC9D,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,OAAO;gBACL,IAAI,EAAE,gBAAgB;gBACtB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,mCAAmC,IAAI,GAAG;aACpD,CAAC;QACJ,CAAC;QACD,OAAO;YACL,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,6EAA6E;SACvF,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC3B,OAAO;YACL,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,MAAM;YACd,OAAO,EACL,0GAA0G;SAC7G,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,MAAM;QACd,OAAO,EACL,0FAA0F;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,SAAS,GAAW,OAAO,CAAC,GAAG,EAAE;IAC9D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9E,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- export * from "./config/loadConfig.js";
2
- export * from "./providers/deepseek.js";
3
- export * from "./providers/factory.js";
4
- export * from "./providers/gemini.js";
5
- export * from "./providers/openaiCompatible.js";
6
- export * from "./providers/types.js";
7
- export * from "./routing/tierRouter.js";
1
+ export { checkGit, checkGitHubCli, checkRulesConfig, runDiagnostics } from "./doctor.js";
2
+ export { initProject } from "./scaffold.js";
3
+ export { getProjectStatus } from "./status.js";
8
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,4 @@
1
- export * from "./config/loadConfig.js";
2
- export * from "./providers/deepseek.js";
3
- export * from "./providers/factory.js";
4
- export * from "./providers/gemini.js";
5
- export * from "./providers/openaiCompatible.js";
6
- export * from "./providers/types.js";
7
- export * from "./routing/tierRouter.js";
1
+ export { checkGit, checkGitHubCli, checkRulesConfig, runDiagnostics } from "./doctor.js";
2
+ export { initProject } from "./scaffold.js";
3
+ export { getProjectStatus } from "./status.js";
8
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,6 @@
1
+ export interface InitResult {
2
+ created: string[];
3
+ skipped: string[];
4
+ }
5
+ export declare function initProject(targetDir?: string): InitResult;
6
+ //# sourceMappingURL=scaffold.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../src/scaffold.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,SAAS,GAAE,MAAsB,GAAG,UAAU,CA8BzE"}
@@ -0,0 +1,33 @@
1
+ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ export function initProject(targetDir = process.cwd()) {
4
+ const result = { created: [], skipped: [] };
5
+ const lognexusDir = join(targetDir, ".lognexus");
6
+ if (!existsSync(lognexusDir)) {
7
+ mkdirSync(lognexusDir, { recursive: true });
8
+ result.created.push(".lognexus/");
9
+ }
10
+ else {
11
+ result.skipped.push(".lognexus/");
12
+ }
13
+ const routingPath = join(lognexusDir, "routing.md");
14
+ if (!existsSync(routingPath)) {
15
+ const routingContent = `# Model-Tier Routing Configuration
16
+
17
+ # Modes: confirm (pause and prompt) | warn (banner only) | off (silent)
18
+ routing: confirm
19
+
20
+ # Operational Tier Taxonomy (Advisory across Claude, OpenAI, Gemini, DeepSeek)
21
+ # tier-1 (Reasoning / Arch / Review): Claude Opus, OpenAI o3/GPT, Gemini Pro, DeepSeek R1
22
+ # tier-2 (Context / Triage / Discovery): Claude Sonnet, GPT-4.1, Gemini Flash/Pro (1M), DeepSeek V3
23
+ # tier-3 (Scoped Execution / Commits): Claude Haiku, GPT-4o-mini, DeepSeek Chat (V3), Gemini Flash
24
+ `;
25
+ writeFileSync(routingPath, routingContent, "utf8");
26
+ result.created.push(".lognexus/routing.md");
27
+ }
28
+ else {
29
+ result.skipped.push(".lognexus/routing.md");
30
+ }
31
+ return result;
32
+ }
33
+ //# sourceMappingURL=scaffold.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../src/scaffold.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOjC,MAAM,UAAU,WAAW,CAAC,SAAS,GAAW,OAAO,CAAC,GAAG,EAAE;IAC3D,MAAM,MAAM,GAAe,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACxD,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAEjD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IACpD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,MAAM,cAAc,GAAG;;;;;;;;;CAS1B,CAAC;QACE,aAAa,CAAC,WAAW,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;QACnD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAC9C,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}