@arcbridge/core 0.1.0
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 +21 -0
- package/README.md +68 -0
- package/dist/index.d.ts +991 -0
- package/dist/index.js +6670 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
- package/wasm/tree-sitter-c_sharp.wasm +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Achim Kuehn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @arcbridge/core
|
|
2
|
+
|
|
3
|
+
Core library for ArcBridge — schemas, database, generators, TypeScript indexer, drift detection, and sync utilities.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @arcbridge/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What's Inside
|
|
12
|
+
|
|
13
|
+
- **Schemas** — Zod schemas for config, building blocks, quality scenarios, phases, tasks, ADRs, and agent roles
|
|
14
|
+
- **Database** — SQLite (better-sqlite3) with WAL mode, schema migrations, and an in-memory option for testing
|
|
15
|
+
- **Generators** — Create arc42 docs, phase plans, agent roles, and platform configs from a project template
|
|
16
|
+
- **Indexer** — TypeScript Compiler API-based symbol extraction, dependency graphs, React component analysis, and Next.js route mapping
|
|
17
|
+
- **Drift Detection** — Compare architecture docs against indexed code to find undocumented modules, missing modules, dependency violations, unlinked tests, and stale ADRs
|
|
18
|
+
- **Sync** — Task status inference from code state, YAML write-back, and git sync point management
|
|
19
|
+
- **Testing** — Run linked tests for quality scenarios and update pass/fail status
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import {
|
|
25
|
+
generateConfig,
|
|
26
|
+
generateArc42,
|
|
27
|
+
generatePlan,
|
|
28
|
+
generateDatabase,
|
|
29
|
+
indexProject,
|
|
30
|
+
detectDrift,
|
|
31
|
+
refreshFromDocs,
|
|
32
|
+
} from "@arcbridge/core";
|
|
33
|
+
|
|
34
|
+
// Initialize a project
|
|
35
|
+
const input = {
|
|
36
|
+
name: "my-app",
|
|
37
|
+
template: "nextjs-app-router",
|
|
38
|
+
features: ["auth", "api"],
|
|
39
|
+
quality_priorities: ["security", "performance"],
|
|
40
|
+
platforms: ["claude"],
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
generateConfig(targetDir, input);
|
|
44
|
+
generateArc42(targetDir, input);
|
|
45
|
+
generatePlan(targetDir, input);
|
|
46
|
+
const { db } = generateDatabase(targetDir, input);
|
|
47
|
+
|
|
48
|
+
// Index TypeScript symbols
|
|
49
|
+
const result = indexProject(db, { projectRoot: targetDir });
|
|
50
|
+
// result.symbolsIndexed, result.filesProcessed, etc.
|
|
51
|
+
|
|
52
|
+
// Detect architecture drift
|
|
53
|
+
const entries = detectDrift(db);
|
|
54
|
+
// entries: DriftEntry[] with kind, severity, description
|
|
55
|
+
|
|
56
|
+
// Rebuild DB from YAML/markdown (preserves statuses)
|
|
57
|
+
const warnings = refreshFromDocs(db, targetDir);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Project Templates
|
|
61
|
+
|
|
62
|
+
- `nextjs-app-router` — Next.js App Router with auth, API routes, and server/client boundaries
|
|
63
|
+
- `react-vite` — Vite + React SPA with routing and state management
|
|
64
|
+
- `api-service` — Express/Fastify API with auth, validation, and database layers
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
[MIT](../../LICENSE)
|