@digital-lake/lognexus 0.0.0-stage → 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.
- package/LICENSE +22 -0
- package/NOTICE.md +27 -0
- package/README.md +175 -2
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +95 -0
- package/dist/cli.js.map +1 -0
- package/dist/doctor.d.ts +10 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +109 -0
- package/dist/doctor.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/scaffold.d.ts +6 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +33 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/status.d.ts +9 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +52 -0
- package/dist/status.js.map +1 -0
- package/package.json +67 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 devallibus
|
|
4
|
+
Copyright (c) 2026 Digital Lake and LogNexus contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/NOTICE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Open Source Notice
|
|
2
|
+
|
|
3
|
+
## LogNexus
|
|
4
|
+
Copyright (c) 2026 Digital Lake and LogNexus contributors.
|
|
5
|
+
|
|
6
|
+
LogNexus is an independent hard fork and continuation of the `shiplog` project created by devallibus.
|
|
7
|
+
- **Original Project:** [devallibus/shiplog](https://github.com/devallibus/shiplog)
|
|
8
|
+
- **Original Author:** devallibus
|
|
9
|
+
- **License:** MIT License (Copyright (c) 2026 devallibus)
|
|
10
|
+
|
|
11
|
+
All enhancements, multi-model routing integration (Gemini & DeepSeek), and runtime architecture additions developed under LogNexus are maintained by Digital Lake and released under the MIT License.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Third-Party Components & Attributions
|
|
16
|
+
|
|
17
|
+
Portions of the commit, brainstorm, and PR workflows in LogNexus incorporate ideas and patterns from:
|
|
18
|
+
|
|
19
|
+
1. **OrchestKit**
|
|
20
|
+
- Repository: `https://github.com/yonatangross/orchestkit`
|
|
21
|
+
- Copyright (c) 2025 Yonatan Gross
|
|
22
|
+
- License: MIT (see `LICENSES/orchestkit-MIT.txt`)
|
|
23
|
+
|
|
24
|
+
2. **Superpowers**
|
|
25
|
+
- Repository: `https://github.com/obra/superpowers`
|
|
26
|
+
- Copyright (c) 2025 Jesse Vincent
|
|
27
|
+
- License: MIT (see `LICENSES/superpowers-MIT.txt`)
|
package/README.md
CHANGED
|
@@ -1,3 +1,176 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/assets/logo.png" alt="LogNexus Logo" width="360">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
# LogNexus
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>The Universal, Git-Powered Context & Rules Framework for Native AI Agents</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://github.com/digital-lake-ai/lognexus/actions"><img src="https://img.shields.io/github/actions/workflow/status/digital-lake-ai/lognexus/ci.yml?branch=main&label=CI" alt="CI Status"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/@digital-lake/lognexus"><img src="https://img.shields.io/npm/v/@digital-lake/lognexus.svg?color=blue" alt="npm version"></a>
|
|
14
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT"></a>
|
|
15
|
+
<a href="https://github.com/digital-lake-ai/lognexus"><img src="https://img.shields.io/badge/org-Digital%20Lake-indigo.svg" alt="Digital Lake"></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## What is LogNexus?
|
|
21
|
+
|
|
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
|
+
|
|
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).
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Issues (Why & Goals) ──▶ Branches (Task Scopes) ──▶ Commits (Context & Diffs) ──▶ PR (Timeline & Review)
|
|
30
|
+
▲ │
|
|
31
|
+
└─────────────────────── Git-Backed Knowledge Graph ──────────────────────────────┘
|
|
32
|
+
```
|
|
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
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Key Features
|
|
39
|
+
|
|
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.
|
|
43
|
+
- **Contract-First Subtasks:** Tasks are bounded by strict decision budgets, file allowlists, and stop conditions (`feat(#42/T1)`).
|
|
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
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Model-Tier Routing Matrix
|
|
50
|
+
|
|
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
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<img src="docs/assets/multimodel-routing-costs.png" alt="Multi-Model Routing Cost and Performance Analysis" width="85%">
|
|
55
|
+
</p>
|
|
56
|
+
|
|
57
|
+
### Operational Tiers
|
|
58
|
+
|
|
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. |
|
|
64
|
+
|
|
65
|
+
### Example Deployment Setups
|
|
66
|
+
|
|
67
|
+
LogNexus adapts to your existing toolstack. Configure your advisory preferences in `.lognexus/routing.md`:
|
|
68
|
+
|
|
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
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Quickstart & Golden Path
|
|
83
|
+
|
|
84
|
+
LogNexus coordinates the full issue-to-merge lifecycle through intuitive slash commands:
|
|
85
|
+
|
|
86
|
+
### 1. Capture the Plan
|
|
87
|
+
```bash
|
|
88
|
+
/lognexus plan
|
|
89
|
+
```
|
|
90
|
+
Transforms an exploratory brainstorm into a structured GitHub Issue with discrete subtasks (`T1..Tn`), verification criteria, and tier tags.
|
|
91
|
+
|
|
92
|
+
### 2. Start Work on a Clean Branch
|
|
93
|
+
```bash
|
|
94
|
+
/lognexus start <issue-number>
|
|
95
|
+
```
|
|
96
|
+
Creates an ID-prefixed branch (`issue/<id>-<slug>`) from the default branch tip and logs a signed `[lognexus/session-start]` note.
|
|
97
|
+
|
|
98
|
+
### 3. Commit with Traceability
|
|
99
|
+
```bash
|
|
100
|
+
/lognexus commit
|
|
101
|
+
```
|
|
102
|
+
Stages changes and generates structured, task-scoped commits (`feat(#42/T1): ...`) paired with an issue progress update.
|
|
103
|
+
|
|
104
|
+
### 4. Synthesize the Pull Request
|
|
105
|
+
```bash
|
|
106
|
+
/lognexus pr
|
|
107
|
+
```
|
|
108
|
+
Compiles all commits, discoveries, discarded alternatives, and verification steps into a comprehensive Journey Timeline inside the PR description.
|
|
109
|
+
|
|
110
|
+
### 5. Cross-Model Review & Gate Verification
|
|
111
|
+
```bash
|
|
112
|
+
/lognexus review
|
|
113
|
+
```
|
|
114
|
+
An independent model inspects the PR diff, verifies task contracts, and signs off (`Reviewed-by: <model>`) before merge.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Installation & Setup
|
|
119
|
+
|
|
120
|
+
### 1. Scaffold Rules in Your Repository
|
|
121
|
+
Initialize `.lognexus/` rules, templates, and routing configuration with the CLI:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npx @digital-lake/lognexus init
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Verify your environment anytime:
|
|
128
|
+
```bash
|
|
129
|
+
npx @digital-lake/lognexus doctor
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Inspect active branch and tier advisory:
|
|
133
|
+
```bash
|
|
134
|
+
npx @digital-lake/lognexus status
|
|
135
|
+
```
|
|
136
|
+
|
|
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.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Disambiguation
|
|
153
|
+
|
|
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).
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Based on & Acknowledgments
|
|
159
|
+
|
|
160
|
+
LogNexus is an independent hard fork and continuation of [`shiplog`](https://github.com/devallibus/shiplog), originally created by **devallibus** under the MIT License.
|
|
161
|
+
|
|
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.
|
|
167
|
+
|
|
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).
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## License
|
|
173
|
+
|
|
174
|
+
LogNexus is released under the [MIT License](LICENSE).
|
|
175
|
+
Copyright (c) 2026 devallibus
|
|
176
|
+
Copyright (c) 2026 Digital Lake and LogNexus contributors.
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { runDiagnostics } from "./doctor.js";
|
|
3
|
+
import { initProject } from "./scaffold.js";
|
|
4
|
+
import { getProjectStatus } from "./status.js";
|
|
5
|
+
function printHeader() {
|
|
6
|
+
console.log("\n🔷 LogNexus CLI — Digital Lake");
|
|
7
|
+
console.log(" The Git-Powered Context & Rules Framework for Native AI Agents\n");
|
|
8
|
+
}
|
|
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
|
+
`);
|
|
25
|
+
}
|
|
26
|
+
async function handleInit() {
|
|
27
|
+
printHeader();
|
|
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}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (res.skipped.length > 0) {
|
|
37
|
+
console.log("Existing files (skipped):");
|
|
38
|
+
for (const f of res.skipped) {
|
|
39
|
+
console.log(` [.] ${f}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
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");
|
|
46
|
+
}
|
|
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}`);
|
|
54
|
+
}
|
|
55
|
+
console.log("\nDiagnostic complete.\n");
|
|
56
|
+
}
|
|
57
|
+
async function handleStatus() {
|
|
58
|
+
printHeader();
|
|
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`);
|
|
65
|
+
}
|
|
66
|
+
async function main() {
|
|
67
|
+
const args = process.argv.slice(2);
|
|
68
|
+
const command = args[0]?.toLowerCase();
|
|
69
|
+
switch (command) {
|
|
70
|
+
case "init":
|
|
71
|
+
await handleInit();
|
|
72
|
+
break;
|
|
73
|
+
case "doctor":
|
|
74
|
+
await handleDoctor();
|
|
75
|
+
break;
|
|
76
|
+
case "status":
|
|
77
|
+
await handleStatus();
|
|
78
|
+
break;
|
|
79
|
+
case "help":
|
|
80
|
+
case "--help":
|
|
81
|
+
case "-h":
|
|
82
|
+
case undefined:
|
|
83
|
+
printUsage();
|
|
84
|
+
break;
|
|
85
|
+
default:
|
|
86
|
+
console.error(`Unknown command: ${command}\n`);
|
|
87
|
+
printUsage();
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
main().catch((err) => {
|
|
92
|
+
console.error("Fatal error:", err);
|
|
93
|
+
process.exit(1);
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,SAAS,WAAW;IAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IAChD,OAAO,CAAC,GAAG,CAAC,qEAAqE,CAAC,CAAC;AACrF,CAAC;AAED,SAAS,UAAU;IACjB,WAAW,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;CAab,CAAC,CAAC;AACH,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,WAAW,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;IAChE,MAAM,GAA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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"}
|
package/dist/doctor.d.ts
ADDED
|
@@ -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(targetDir)];
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQjC,MAAM,UAAU,QAAQ,CAAC,SAAS,GAAW,OAAO,CAAC,GAAG,EAAE;IACxD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,QAAQ,CAAC,eAAe,EAAE;YACxC,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAChC,CAAC,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,QAAQ,CAAC,qCAAqC,EAAE;gBAC/D,GAAG,EAAE,SAAS;gBACd,QAAQ,EAAE,MAAM;gBAChB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;aAChC,CAAC,CAAC,IAAI,EAAE,CAAC;YACV,UAAU,GAAG,QAAQ,KAAK,MAAM,CAAC;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,UAAU,GAAG,KAAK,CAAC;QACrB,CAAC;QAED,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;gBACL,IAAI,EAAE,gB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C,CAAC;AAC9E,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
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 @@
|
|
|
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"}
|
package/dist/scaffold.js
ADDED
|
@@ -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"}
|
package/dist/status.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ProjectStatus {
|
|
2
|
+
branch: string;
|
|
3
|
+
isInsideGit: boolean;
|
|
4
|
+
activeIssue: string | null;
|
|
5
|
+
routingMode: string;
|
|
6
|
+
recommendedTier: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function getProjectStatus(targetDir?: string): ProjectStatus;
|
|
9
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,SAAS,GAAE,MAAsB,GAAG,aAAa,CAoDjF"}
|
package/dist/status.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
2
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
export function getProjectStatus(targetDir = process.cwd()) {
|
|
5
|
+
let isInsideGit = false;
|
|
6
|
+
let branch = "detached";
|
|
7
|
+
try {
|
|
8
|
+
const inside = execSync("git rev-parse --is-inside-work-tree", {
|
|
9
|
+
cwd: targetDir,
|
|
10
|
+
encoding: "utf8",
|
|
11
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
12
|
+
}).trim();
|
|
13
|
+
isInsideGit = inside === "true";
|
|
14
|
+
if (isInsideGit) {
|
|
15
|
+
branch =
|
|
16
|
+
execSync("git branch --show-current", {
|
|
17
|
+
cwd: targetDir,
|
|
18
|
+
encoding: "utf8",
|
|
19
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
20
|
+
}).trim() || "detached";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
isInsideGit = false;
|
|
25
|
+
}
|
|
26
|
+
let activeIssue = null;
|
|
27
|
+
const match = branch.match(/issue\/(\d+)/i);
|
|
28
|
+
if (match) {
|
|
29
|
+
activeIssue = `#${match[1]}`;
|
|
30
|
+
}
|
|
31
|
+
let routingMode = "not configured";
|
|
32
|
+
const routingFile = join(targetDir, ".lognexus", "routing.md");
|
|
33
|
+
if (existsSync(routingFile)) {
|
|
34
|
+
const content = readFileSync(routingFile, "utf8");
|
|
35
|
+
const m = content.match(/routing:\s*(confirm|warn|off)/i);
|
|
36
|
+
if (m)
|
|
37
|
+
routingMode = m[1].toLowerCase();
|
|
38
|
+
}
|
|
39
|
+
let recommendedTier = "tier-1 (Reasoning / Planning: Claude Opus, OpenAI o3, Gemini Pro, DeepSeek R1)";
|
|
40
|
+
if (activeIssue) {
|
|
41
|
+
recommendedTier =
|
|
42
|
+
"tier-3 (Scoped Execution: Claude Haiku, GPT-4o-mini, DeepSeek Chat, Gemini Flash)";
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
branch,
|
|
46
|
+
isInsideGit,
|
|
47
|
+
activeIssue,
|
|
48
|
+
routingMode,
|
|
49
|
+
recommendedTier,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUjC,MAAM,UAAU,gBAAgB,CAAC,SAAS,GAAW,OAAO,CAAC,GAAG,EAAE;IAChE,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,MAAM,GAAG,UAAU,CAAC;IAExB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,QAAQ,CAAC,qCAAqC,EAAE;YAC7D,GAAG,EAAE,SAAS;YACd,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAChC,CAAC,CAAC,IAAI,EAAE,CAAC;QACV,WAAW,GAAG,MAAM,KAAK,MAAM,CAAC;QAEhC,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM;gBACJ,QAAQ,CAAC,2BAA2B,EAAE;oBACpC,GAAG,EAAE,SAAS;oBACd,QAAQ,EAAE,MAAM;oBAChB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;iBAChC,CAAC,CAAC,IAAI,EAAE,IAAI,UAAU,CAAC;QAC5B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,WAAW,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,WAAW,GAAkB,IAAI,CAAC;IACtC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,KAAK,EAAE,CAAC;QACV,WAAW,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,CAAC;IAED,IAAI,WAAW,GAAG,gBAAgB,CAAC;IACnC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;IAC/D,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5B,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAClD,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC1D,IAAI,CAAC;YAAE,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1C,CAAC;IAED,IAAI,eAAe,GACjB,gFAAgF,CAAC;IACnF,IAAI,WAAW,EAAE,CAAC;QAChB,eAAe;YACb,mFAAmF,CAAC;IACxF,CAAC;IAED,OAAO;QACL,MAAM;QACN,WAAW;QACX,WAAW;QACX,WAAW;QACX,eAAe;KAChB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-lake/lognexus",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
|
+
"description": "The Universal, Git-powered context & rules framework for native AI agents (Claude, OpenAI, Gemini, DeepSeek). Scaffolding CLI and repository governance.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"lognexus": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"lint": "biome check .",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"prepublishOnly": "npm run build && npm run test"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"git",
|
|
19
|
+
"ai",
|
|
20
|
+
"agents",
|
|
21
|
+
"claude",
|
|
22
|
+
"openai",
|
|
23
|
+
"gemini",
|
|
24
|
+
"deepseek",
|
|
25
|
+
"cursor",
|
|
26
|
+
"antigravity",
|
|
27
|
+
"orchestrator",
|
|
28
|
+
"memory",
|
|
29
|
+
"traceability",
|
|
30
|
+
"knowledge-graph"
|
|
31
|
+
],
|
|
32
|
+
"author": {
|
|
33
|
+
"name": "Digital Lake",
|
|
34
|
+
"url": "https://github.com/digital-lake-ai"
|
|
35
|
+
},
|
|
36
|
+
"contributors": [
|
|
37
|
+
{
|
|
38
|
+
"name": "devallibus",
|
|
39
|
+
"url": "https://github.com/devallibus"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/digital-lake-ai/lognexus.git"
|
|
45
|
+
},
|
|
46
|
+
"homepage": "https://github.com/digital-lake-ai/lognexus#readme",
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/digital-lake-ai/lognexus/issues"
|
|
49
|
+
},
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"files": [
|
|
52
|
+
"dist",
|
|
53
|
+
"README.md",
|
|
54
|
+
"LICENSE",
|
|
55
|
+
"NOTICE.md"
|
|
56
|
+
],
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=20.0.0"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"zod": "^4.6.7"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@biomejs/biome": "^2.6.2",
|
|
65
|
+
"@types/node": "^26.6.5",
|
|
66
|
+
"typescript": "^7.0.2",
|
|
67
|
+
"vitest": "^5.0.5"
|
|
68
|
+
}
|
|
69
|
+
}
|