@rryando/arcs 3.7.0 → 3.9.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/README.md +181 -246
- package/dist/cli/arcs-orchestrate-caveman.d.ts +1 -1
- package/dist/cli/arcs-orchestrate-caveman.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate-caveman.js +1 -1
- package/dist/cli/arcs-orchestrate.d.ts +1 -1
- package/dist/cli/arcs-orchestrate.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate.js +43 -40
- package/dist/cli/arcs-orchestrate.js.map +1 -1
- package/dist/cli/commands/knowledge.js +64 -5
- package/dist/cli/commands/knowledge.js.map +1 -1
- package/dist/cli/commands/utility.d.ts.map +1 -1
- package/dist/cli/commands/utility.js +12 -0
- package/dist/cli/commands/utility.js.map +1 -1
- package/dist/cli/instructions.d.ts.map +1 -1
- package/dist/cli/instructions.js +0 -3
- package/dist/cli/instructions.js.map +1 -1
- package/dist/cli/md-renderer.d.ts.map +1 -1
- package/dist/cli/md-renderer.js +5 -0
- package/dist/cli/md-renderer.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +8 -12
- package/dist/cli/setup.js.map +1 -1
- package/dist/utils/knowledge-templates.d.ts +51 -0
- package/dist/utils/knowledge-templates.d.ts.map +1 -0
- package/dist/utils/knowledge-templates.js +209 -0
- package/dist/utils/knowledge-templates.js.map +1 -0
- package/opencode/arcs/bundle-runtime.json +15 -7
- package/opencode/arcs/manifest.json +0 -64
- package/opencode/arcs/prompts/arcs-docs.txt +8 -8
- package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +44 -41
- package/opencode/arcs/prompts/arcs-orchestrate.txt +43 -40
- package/opencode/arcs/prompts/code-reviewer.txt +44 -5
- package/opencode/arcs/prompts/devil-advocate.txt +12 -9
- package/opencode/arcs/prompts/docs-researcher.txt +9 -8
- package/opencode/arcs/prompts/graph-explorer.txt +15 -16
- package/opencode/arcs/prompts/oncall-ops.txt +8 -11
- package/opencode/arcs/prompts/software-engineer.txt +7 -5
- package/opencode/arcs/prompts/tech-architect.txt +55 -20
- package/opencode/arcs/skills/brainstorming/SKILL.md +1 -0
- package/opencode/arcs/skills/brainstorming/spec-document-reviewer-prompt.md +7 -1
- package/opencode/arcs/skills/deep-pr-review/SKILL.md +5 -3
- package/opencode/arcs/skills/deep-pr-review/codegraph-diff.md +3 -5
- package/opencode/arcs/skills/deep-pr-review/review-template.md +1 -1
- package/opencode/arcs/skills/enriching-codegraph-proposals/SKILL.md +1 -1
- package/opencode/arcs/skills/executing-plans/SKILL.md +155 -1
- package/opencode/arcs/skills/{subagent-driven-development → executing-plans}/code-quality-reviewer-prompt.md +4 -1
- package/opencode/arcs/skills/{subagent-driven-development → executing-plans}/implementer-prompt.md +4 -0
- package/opencode/arcs/skills/{subagent-driven-development → executing-plans}/spec-reviewer-prompt.md +6 -0
- package/opencode/arcs/skills/init-project/SKILL.md +21 -19
- package/opencode/arcs/skills/requesting-code-review/SKILL.md +1 -1
- package/opencode/arcs/skills/requesting-code-review/code-reviewer.md +1 -1
- package/opencode/arcs/skills/systematic-debugging/SKILL.md +8 -21
- package/opencode/arcs/skills/test-driven-development/SKILL.md +1 -1
- package/opencode/arcs/skills/writing-knowledge/SKILL.md +74 -0
- package/opencode/arcs/skills/writing-plans/SKILL.md +2 -3
- package/opencode/arcs/skills/writing-plans/plan-document-reviewer-prompt.md +8 -2
- package/package.json +4 -1
- package/scripts/build-opencode-bundle.mjs +10 -37
- package/scripts/deploy-claudecode-bundle.mjs +0 -16
- package/scripts/lint-bundle.mjs +31 -29
- package/skills/explore-dag.md +3 -3
- package/skills/init-project.md +7 -8
- package/skills/orchestrate.md +1 -1
- package/templates/knowledge.md.tmpl +2 -2
- package/dist/utils/graphify-knowledge.d.ts +0 -22
- package/dist/utils/graphify-knowledge.d.ts.map +0 -1
- package/dist/utils/graphify-knowledge.js +0 -47
- package/dist/utils/graphify-knowledge.js.map +0 -1
- package/dist/utils/graphify.d.ts +0 -104
- package/dist/utils/graphify.d.ts.map +0 -1
- package/dist/utils/graphify.js +0 -439
- package/dist/utils/graphify.js.map +0 -1
- package/opencode/arcs/prompts/qa-analyst.txt +0 -86
- package/opencode/arcs/prompts/system-architect.txt +0 -94
- package/opencode/arcs/skills/subagent-driven-development/SKILL.md +0 -185
package/scripts/lint-bundle.mjs
CHANGED
|
@@ -21,34 +21,6 @@ const bundleRoot = process.env.BUNDLE_LINT_BUNDLE_ROOT
|
|
|
21
21
|
? resolve(repoRoot, process.env.BUNDLE_LINT_BUNDLE_ROOT)
|
|
22
22
|
: defaultBundleRoot;
|
|
23
23
|
|
|
24
|
-
// Preserved files that are repo-authored, not sourced from manifest.
|
|
25
|
-
const preservedFiles = new Set([
|
|
26
|
-
"manifest.json",
|
|
27
|
-
"bundle-runtime.json",
|
|
28
|
-
".opencode/plugins/arcs.js",
|
|
29
|
-
"skills/loop/SKILL.md",
|
|
30
|
-
"skills/caveman-commit/SKILL.md",
|
|
31
|
-
"skills/init-project/SKILL.md",
|
|
32
|
-
"skills/the-ladder/SKILL.md",
|
|
33
|
-
// Sub-agent prompt files (repo-authored, referenced from manifest.json
|
|
34
|
-
// requiredMerges, not from bundle-runtime.json's `agents` array).
|
|
35
|
-
"prompts/software-engineer.txt",
|
|
36
|
-
"prompts/tech-architect.txt",
|
|
37
|
-
"prompts/qa-analyst.txt",
|
|
38
|
-
"prompts/oncall-ops.txt",
|
|
39
|
-
"prompts/arcs-docs.txt",
|
|
40
|
-
"prompts/system-architect.txt",
|
|
41
|
-
"prompts/code-reviewer.txt",
|
|
42
|
-
"prompts/docs-researcher.txt",
|
|
43
|
-
"prompts/devil-advocate.txt",
|
|
44
|
-
"prompts/graph-explorer.txt",
|
|
45
|
-
// Orchestrator prompt files — generated from src/cli/arcs-orchestrate*.ts
|
|
46
|
-
// by build-opencode-bundle.mjs. Committed mirrors so the bundle is
|
|
47
|
-
// self-describing alongside the static sub-agent prompts.
|
|
48
|
-
"prompts/arcs-orchestrate.txt",
|
|
49
|
-
"prompts/arcs-orchestrate-caveman.txt",
|
|
50
|
-
]);
|
|
51
|
-
|
|
52
24
|
/** @type {Array<{severity: 'error'|'warning', kind: string, message: string, file?: string, repair?: string}>} */const issues = [];
|
|
53
25
|
|
|
54
26
|
function addIssue(severity, kind, message, file, repair) {
|
|
@@ -76,6 +48,12 @@ if (!existsSync(manifestPath)) {
|
|
|
76
48
|
}
|
|
77
49
|
|
|
78
50
|
const manifest = JSON.parse(readFileSync(manifestPath, "utf-8"));
|
|
51
|
+
const sourceManifestPath = resolve(bundleRoot, "manifest.json");
|
|
52
|
+
if (!existsSync(sourceManifestPath)) {
|
|
53
|
+
addIssue("error", "source-manifest-missing", `manifest.json not found at ${sourceManifestPath}`);
|
|
54
|
+
output();
|
|
55
|
+
}
|
|
56
|
+
const sourceManifest = JSON.parse(readFileSync(sourceManifestPath, "utf-8"));
|
|
79
57
|
|
|
80
58
|
// --- Check 1: Every manifest-declared bundled file exists ---
|
|
81
59
|
const declaredFiles = new Set();
|
|
@@ -110,6 +88,30 @@ for (const pluginFile of manifest.plugin ?? []) {
|
|
|
110
88
|
}
|
|
111
89
|
}
|
|
112
90
|
|
|
91
|
+
for (const agent of sourceManifest.agents ?? []) {
|
|
92
|
+
declaredFiles.add(agent.source);
|
|
93
|
+
if (!existsSync(resolve(bundleRoot, agent.source))) {
|
|
94
|
+
addIssue(
|
|
95
|
+
"error",
|
|
96
|
+
"missing-declared-file",
|
|
97
|
+
`Source manifest declares ${agent.source} but file is missing`,
|
|
98
|
+
agent.source,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const preservedFiles = new Set(manifest.preservedFiles ?? []);
|
|
104
|
+
for (const preservedFile of preservedFiles) {
|
|
105
|
+
if (!existsSync(resolve(bundleRoot, preservedFile))) {
|
|
106
|
+
addIssue(
|
|
107
|
+
"error",
|
|
108
|
+
"missing-preserved-file",
|
|
109
|
+
`Runtime manifest preserves ${preservedFile} but file is missing`,
|
|
110
|
+
preservedFile,
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
113
115
|
// --- Check 2: No extra undeclared files in bundle ---
|
|
114
116
|
const allBundleFiles = listAllFiles(bundleRoot);
|
|
115
117
|
const allowedFiles = new Set([...declaredFiles, ...preservedFiles]);
|
|
@@ -117,7 +119,7 @@ const allowedFiles = new Set([...declaredFiles, ...preservedFiles]);
|
|
|
117
119
|
for (const file of allBundleFiles) {
|
|
118
120
|
if (!allowedFiles.has(file)) {
|
|
119
121
|
addIssue(
|
|
120
|
-
"
|
|
122
|
+
"error",
|
|
121
123
|
"undeclared-file",
|
|
122
124
|
`File ${file} exists in bundle but is not declared in manifest`,
|
|
123
125
|
file,
|
package/skills/explore-dag.md
CHANGED
|
@@ -17,9 +17,9 @@ flowchart TD
|
|
|
17
17
|
|
|
18
18
|
A[arcs project list → big picture] --> B{Question answered by DAG?}
|
|
19
19
|
B -->|yes| C[Report from DAG data]
|
|
20
|
-
B -->|no| D[Dispatch
|
|
20
|
+
B -->|no| D[Dispatch graph-explorer sub-agent]:::sub
|
|
21
21
|
D --> E{Durable discovery?}
|
|
22
|
-
E -->|yes| F[arcs knowledge
|
|
22
|
+
E -->|yes| F[arcs knowledge upsert]
|
|
23
23
|
E -->|no| C
|
|
24
24
|
F --> C
|
|
25
25
|
```
|
|
@@ -54,4 +54,4 @@ Discovery: `arcs --commands --json`
|
|
|
54
54
|
- Start with `arcs project list` for the big picture
|
|
55
55
|
- Use `knowledge` docs to quickly understand unfamiliar codebases
|
|
56
56
|
- Check `status` to know if a dependency is still actively maintained
|
|
57
|
-
- Persist durable discoveries via `arcs knowledge
|
|
57
|
+
- Persist durable discoveries via `arcs knowledge upsert`
|
package/skills/init-project.md
CHANGED
|
@@ -24,7 +24,7 @@ flowchart TD
|
|
|
24
24
|
F -->|no| H[Skip graph step, log gap]
|
|
25
25
|
G --> G2[ingestGraph → ≤20 proposals]
|
|
26
26
|
G2 --> G3[codegraph MCP explore / impact for enrichment]:::sub
|
|
27
|
-
H & G3 --> I[Fan out:
|
|
27
|
+
H & G3 --> I[Fan out: tech-architect + docs-researcher]:::sub
|
|
28
28
|
I --> J[Collect proposals → dedup → arcs knowledge create × N]
|
|
29
29
|
J --> K[Done]
|
|
30
30
|
```
|
|
@@ -82,10 +82,9 @@ If codegraph is missing, log "codegraph not on PATH; proceeding without graph si
|
|
|
82
82
|
|
|
83
83
|
| Sub-agent | Owns | Knowledge kinds it produces |
|
|
84
84
|
|-----------|------|----------------------------|
|
|
85
|
-
| `
|
|
85
|
+
| `tech-architect` | Module boundaries, clusters, dependency direction, cross-module couplings, structural gotchas, lessons | `architecture`, `module`, `gotcha`, `lesson` |
|
|
86
86
|
| `docs-researcher` | Tech stack, third-party libraries, key files, features | `reference`, `feature` |
|
|
87
|
-
| `
|
|
88
|
-
| `qa-analyst` (optional) | Coding-style + convention scan from existing code | `pattern` |
|
|
87
|
+
| `code-reviewer` (audit mode, optional) | Coding-style + convention scan from existing code | `pattern` |
|
|
89
88
|
|
|
90
89
|
Dispatch in parallel. Each agent receives the relevant `KnowledgeProposal` records from `ingestGraph` plus targeted codegraph MCP queries for evidence. Each agent returns finalized proposals (title, kind, summary, keywords, sourceFiles, body) for the orchestrator to write directly via `arcs knowledge create` (or `arcs batch`).
|
|
91
90
|
|
|
@@ -95,11 +94,11 @@ Dispatch in parallel. Each agent receives the relevant `KnowledgeProposal` recor
|
|
|
95
94
|
|----------|------|------------------|---------------|
|
|
96
95
|
| tech stack | `architecture` | Languages, frameworks, runtimes, build tools, versions | `docs-researcher` |
|
|
97
96
|
| key files | `reference` | Entry points, config files, main modules, purposes | `docs-researcher` (codegraph_search "entry points") |
|
|
98
|
-
| code patterns | `pattern` | Recurring design patterns, abstractions, error handling | `
|
|
99
|
-
| coding style | `pattern` | Formatting, linting, import ordering, file organization | `
|
|
100
|
-
| core modules | `module` | Core modules/shared functions — what, where, interconnections | `
|
|
97
|
+
| code patterns | `pattern` | Recurring design patterns, abstractions, error handling | `code-reviewer` (audit mode) or `tech-architect` |
|
|
98
|
+
| coding style | `pattern` | Formatting, linting, import ordering, file organization | `code-reviewer` (audit mode) |
|
|
99
|
+
| core modules | `module` | Core modules/shared functions — what, where, interconnections | `tech-architect` (god nodes from codegraph) |
|
|
101
100
|
| external services | `module` | APIs, databases, message queues the project interacts with | `docs-researcher` |
|
|
102
101
|
| third-party libraries | `reference` | Key dependencies and why they are used | `docs-researcher` |
|
|
103
102
|
| features | `feature` | Major user-facing or system-facing features | `docs-researcher` |
|
|
104
103
|
| cross-module couplings | `gotcha` | Hot edges between modules surfaced by codegraph | `tech-architect` (auto from `ingestGraph`) |
|
|
105
|
-
| architecture clusters | `architecture` | Pseudo-community/directory groupings from codegraph | `
|
|
104
|
+
| architecture clusters | `architecture` | Pseudo-community/directory groupings from codegraph | `tech-architect` (auto from `ingestGraph`) |
|
package/skills/orchestrate.md
CHANGED
|
@@ -84,7 +84,7 @@ Discovery: `arcs --commands --json`
|
|
|
84
84
|
- `arcs loop cancel <slug> --json` — cancel active loop
|
|
85
85
|
- `arcs loop status <slug> --json` — inspect loop state
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
Use these `arcs loop` session commands only when iterative execution is explicitly needed; otherwise route work through the selected execution skill.
|
|
88
88
|
|
|
89
89
|
## Verification Contract
|
|
90
90
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Knowledge — {{name}}
|
|
2
2
|
|
|
3
3
|
> This is a summary landing page. Detailed knowledge lives in structured entries under `knowledge/`.
|
|
4
|
-
> Use `
|
|
4
|
+
> Use `arcs knowledge list <slug>` to browse, `arcs knowledge search <slug> "<keywords>"` to find entries, and `arcs knowledge get <slug> <id> --body` to read one.
|
|
5
5
|
|
|
6
6
|
## Structured Entries
|
|
7
7
|
|
|
8
|
-
_No entries yet. Run
|
|
8
|
+
_No entries yet. Run `arcs init` for a new project or `arcs sync` to refresh an existing project._
|
|
9
9
|
|
|
10
10
|
## Quick Reference
|
|
11
11
|
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { KnowledgeProposal } from "./graphify.js";
|
|
2
|
-
/**
|
|
3
|
-
* Convert graphify ingestion output into a `proposals/graphify.json` payload
|
|
4
|
-
* and persist it through `proposal-store.writeProposals()`.
|
|
5
|
-
*
|
|
6
|
-
* Replaces the legacy direct-write path that used to populate
|
|
7
|
-
* `knowledge/index.json` and `knowledge/<id>.md` at ingest time. Graphify
|
|
8
|
-
* proposals now sit in the proposals gate until a skill-aware host enriches
|
|
9
|
-
* them into durable knowledge entries.
|
|
10
|
-
*
|
|
11
|
-
* Merge semantics: if a proposals file already exists, proposals from the
|
|
12
|
-
* existing file with ids NOT present in the new extraction are preserved.
|
|
13
|
-
* This protects backfilled proposals (with empty structuralFacts) and any
|
|
14
|
-
* other pending entries from being clobbered when graphify re-runs. The new
|
|
15
|
-
* extraction wins on collisions — a fresh extraction produces fresher facts.
|
|
16
|
-
*/
|
|
17
|
-
export declare function writeProposalsFile(slug: string, proposals: KnowledgeProposal[], graphJsonContent: string): Promise<{
|
|
18
|
-
written: number;
|
|
19
|
-
fingerprint: string;
|
|
20
|
-
preserved: number;
|
|
21
|
-
}>;
|
|
22
|
-
//# sourceMappingURL=graphify-knowledge.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphify-knowledge.d.ts","sourceRoot":"","sources":["../../src/utils/graphify-knowledge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAUvD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,iBAAiB,EAAE,EAC9B,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAmCtE"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { annotateDedupCandidates, computeGraphFingerprint, readProposals, writeProposals, } from "./proposal-store.js";
|
|
2
|
-
/**
|
|
3
|
-
* Convert graphify ingestion output into a `proposals/graphify.json` payload
|
|
4
|
-
* and persist it through `proposal-store.writeProposals()`.
|
|
5
|
-
*
|
|
6
|
-
* Replaces the legacy direct-write path that used to populate
|
|
7
|
-
* `knowledge/index.json` and `knowledge/<id>.md` at ingest time. Graphify
|
|
8
|
-
* proposals now sit in the proposals gate until a skill-aware host enriches
|
|
9
|
-
* them into durable knowledge entries.
|
|
10
|
-
*
|
|
11
|
-
* Merge semantics: if a proposals file already exists, proposals from the
|
|
12
|
-
* existing file with ids NOT present in the new extraction are preserved.
|
|
13
|
-
* This protects backfilled proposals (with empty structuralFacts) and any
|
|
14
|
-
* other pending entries from being clobbered when graphify re-runs. The new
|
|
15
|
-
* extraction wins on collisions — a fresh extraction produces fresher facts.
|
|
16
|
-
*/
|
|
17
|
-
export async function writeProposalsFile(slug, proposals, graphJsonContent) {
|
|
18
|
-
// Map ingestion shape → storage shape. The storage `Proposal` adds an
|
|
19
|
-
// initially-empty `suggestedDedupCandidates`; `annotateDedupCandidates`
|
|
20
|
-
// populates it from the existing knowledge index.
|
|
21
|
-
const draft = proposals.map((p) => ({
|
|
22
|
-
id: p.id,
|
|
23
|
-
kind: p.kind,
|
|
24
|
-
label: p.label,
|
|
25
|
-
structuralFacts: p.structuralFacts,
|
|
26
|
-
sourceFiles: p.sourceFiles,
|
|
27
|
-
suggestedDedupCandidates: [],
|
|
28
|
-
}));
|
|
29
|
-
const annotated = await annotateDedupCandidates(slug, draft);
|
|
30
|
-
// Preserve existing proposals not present in the new extraction. This
|
|
31
|
-
// protects the lossy backfill payload (structuralFacts: {}) and any other
|
|
32
|
-
// pending agent-enrichment work from being silently dropped on the next
|
|
33
|
-
// graphify-sync. New extraction wins on id collisions.
|
|
34
|
-
const existing = await readProposals(slug);
|
|
35
|
-
const newIds = new Set(annotated.map((p) => p.id));
|
|
36
|
-
const preserved = existing ? existing.proposals.filter((p) => !newIds.has(p.id)) : [];
|
|
37
|
-
const fingerprint = computeGraphFingerprint(graphJsonContent);
|
|
38
|
-
const payload = {
|
|
39
|
-
version: 1,
|
|
40
|
-
generatedAt: new Date().toISOString(),
|
|
41
|
-
graphFingerprint: fingerprint,
|
|
42
|
-
proposals: [...annotated, ...preserved],
|
|
43
|
-
};
|
|
44
|
-
await writeProposals(slug, payload);
|
|
45
|
-
return { written: proposals.length, fingerprint, preserved: preserved.length };
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=graphify-knowledge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphify-knowledge.js","sourceRoot":"","sources":["../../src/utils/graphify-knowledge.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAGvB,aAAa,EACb,cAAc,GACf,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,IAAY,EACZ,SAA8B,EAC9B,gBAAwB;IAExB,sEAAsE;IACtE,wEAAwE;IACxE,kDAAkD;IAClD,MAAM,KAAK,GAAe,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9C,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,eAAe,EAAE,CAAC,CAAC,eAAqD;QACxE,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,wBAAwB,EAAE,EAAE;KAC7B,CAAC,CAAC,CAAC;IAEJ,MAAM,SAAS,GAAG,MAAM,uBAAuB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAE7D,sEAAsE;IACtE,0EAA0E;IAC1E,wEAAwE;IACxE,uDAAuD;IACvD,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACnD,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtF,MAAM,WAAW,GAAG,uBAAuB,CAAC,gBAAgB,CAAC,CAAC;IAE9D,MAAM,OAAO,GAAkB;QAC7B,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACrC,gBAAgB,EAAE,WAAW;QAC7B,SAAS,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,SAAS,CAAC;KACxC,CAAC;IAEF,MAAM,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEpC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC;AACjF,CAAC"}
|
package/dist/utils/graphify.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
export interface GraphifyInfo {
|
|
2
|
-
available: boolean;
|
|
3
|
-
version?: string;
|
|
4
|
-
path?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function detectGraphify(): GraphifyInfo;
|
|
7
|
-
export interface ExtractionResult {
|
|
8
|
-
success: true;
|
|
9
|
-
graphJsonPath: string;
|
|
10
|
-
}
|
|
11
|
-
export interface ExtractionError {
|
|
12
|
-
success: false;
|
|
13
|
-
error: string;
|
|
14
|
-
code?: string;
|
|
15
|
-
}
|
|
16
|
-
export type ExtractionOutcome = ExtractionResult | ExtractionError;
|
|
17
|
-
/**
|
|
18
|
-
* A graphify-derived knowledge proposal.
|
|
19
|
-
*
|
|
20
|
-
* Carries STRUCTURAL FACTS only — not prose. The calling agent (which has LLM
|
|
21
|
-
* tokens) is responsible for producing the final `title`/`summary`/`keywords`
|
|
22
|
-
* during the proposal-promote step. See plan
|
|
23
|
-
* `2026-06-02-graphify-proposal-gate-implementation-plan` §Proposal Shape.
|
|
24
|
-
*
|
|
25
|
-
* `suggestedDedupCandidates` is intentionally NOT on this type — that's
|
|
26
|
-
* computed by the proposal-store layer when proposals are written to disk,
|
|
27
|
-
* not at ingest time.
|
|
28
|
-
*/
|
|
29
|
-
export interface KnowledgeProposal {
|
|
30
|
-
/** Stable id, e.g. "graphify-cluster-src-utils". */
|
|
31
|
-
id: string;
|
|
32
|
-
kind: "architecture" | "module" | "gotcha" | "pattern";
|
|
33
|
-
/** Human-friendly label. Agents will write the final title. */
|
|
34
|
-
label: string;
|
|
35
|
-
structuralFacts: ProposalStructuralFacts;
|
|
36
|
-
sourceFiles: Array<{
|
|
37
|
-
path: string;
|
|
38
|
-
anchor?: string;
|
|
39
|
-
}>;
|
|
40
|
-
}
|
|
41
|
-
export interface ProposalStructuralFacts {
|
|
42
|
-
memberCount?: number;
|
|
43
|
-
fileCount?: number;
|
|
44
|
-
/** e.g. { code: 260, document: 0 } */
|
|
45
|
-
fileTypeBreakdown?: Record<string, number>;
|
|
46
|
-
topHubs?: Array<{
|
|
47
|
-
label: string;
|
|
48
|
-
file: string;
|
|
49
|
-
in: number;
|
|
50
|
-
out: number;
|
|
51
|
-
}>;
|
|
52
|
-
topFilesByEntityCount?: Array<{
|
|
53
|
-
file: string;
|
|
54
|
-
count: number;
|
|
55
|
-
}>;
|
|
56
|
-
incomingFromOtherClusters?: number;
|
|
57
|
-
outgoingToOtherClusters?: number;
|
|
58
|
-
nodeFile?: string;
|
|
59
|
-
nodeIn?: number;
|
|
60
|
-
nodeOut?: number;
|
|
61
|
-
topCallers?: Array<{
|
|
62
|
-
label: string;
|
|
63
|
-
file: string;
|
|
64
|
-
}>;
|
|
65
|
-
topCallees?: Array<{
|
|
66
|
-
label: string;
|
|
67
|
-
file: string;
|
|
68
|
-
}>;
|
|
69
|
-
couplingA?: {
|
|
70
|
-
label: string;
|
|
71
|
-
file: string;
|
|
72
|
-
degree: number;
|
|
73
|
-
};
|
|
74
|
-
couplingB?: {
|
|
75
|
-
label: string;
|
|
76
|
-
file: string;
|
|
77
|
-
degree: number;
|
|
78
|
-
};
|
|
79
|
-
/** Edge relation types (e.g. ["imports_from", "calls"]). */
|
|
80
|
-
relations?: string[];
|
|
81
|
-
}
|
|
82
|
-
export interface IngestionResult {
|
|
83
|
-
proposals: KnowledgeProposal[];
|
|
84
|
-
stats: {
|
|
85
|
-
godNodes: number;
|
|
86
|
-
communities: number;
|
|
87
|
-
crossModuleCouplings: number;
|
|
88
|
-
totalProposals: number;
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
export declare function ingestGraph(graphJsonPath: string, _slug: string): IngestionResult;
|
|
92
|
-
export interface QueryResult {
|
|
93
|
-
success: true;
|
|
94
|
-
answer: string;
|
|
95
|
-
}
|
|
96
|
-
export interface QueryError {
|
|
97
|
-
success: false;
|
|
98
|
-
error: string;
|
|
99
|
-
}
|
|
100
|
-
export type QueryOutcome = QueryResult | QueryError;
|
|
101
|
-
export declare function queryGraph(question: string, workspacePath: string): QueryOutcome;
|
|
102
|
-
export declare function pathBetween(entityA: string, entityB: string, workspacePath: string): QueryOutcome;
|
|
103
|
-
export declare function runExtraction(workspacePath: string): ExtractionOutcome;
|
|
104
|
-
//# sourceMappingURL=graphify.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphify.d.ts","sourceRoot":"","sources":["../../src/utils/graphify.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,OA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