@nac3/forge-cli 1.0.86 → 1.0.87
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/dist/chat/doctrine_digest.d.ts.map +1 -1
- package/dist/chat/doctrine_digest.js +7 -1
- package/dist/chat/doctrine_digest.js.map +1 -1
- package/dist/core/forge_profile.d.ts +5 -0
- package/dist/core/forge_profile.d.ts.map +1 -1
- package/dist/core/forge_profile.js +32 -3
- package/dist/core/forge_profile.js.map +1 -1
- package/dist/docs/doctrine/diagnostic-mode.md +31 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/doctrine/diagnostic-mode.md +31 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctrine_digest.d.ts","sourceRoot":"","sources":["../../src/chat/doctrine_digest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,mBAAmB;IAClC,sDAAsD;IACtD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,eAAe,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"doctrine_digest.d.ts","sourceRoot":"","sources":["../../src/chat/doctrine_digest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,mBAAmB;IAClC,sDAAsD;IACtD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,eAAe,EAAE,mBAAmB,EAyHhD,CAAC;AAEF,6DAA6D;AAC7D,wBAAgB,WAAW,IAAI,MAAM,EAAE,CAEtC;AAED,MAAM,WAAW,qBAAqB;IACpC;4EACwE;IACxE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;uEACuE;AACvE,wBAAgB,wBAAwB,CAAC,IAAI,GAAE,qBAA0B,GAAG,MAAM,EAAE,CAiBnF"}
|
|
@@ -85,7 +85,13 @@ export const DOCTRINE_DIGEST = [
|
|
|
85
85
|
+ 'When you ARE the read-only embedded assistant: diagnose with evidence, '
|
|
86
86
|
+ 'query via yujin.db.query (SELECT-only, never shell mysql nor invent an '
|
|
87
87
|
+ 'HTTP endpoint), emit precise operator instructions, write reports under '
|
|
88
|
-
+ 'docs/ or .forge/diagnostics/, and stay pinned (no writes/switch/push).'
|
|
88
|
+
+ 'docs/ or .forge/diagnostics/, and stay pinned (no writes/switch/push). '
|
|
89
|
+
+ 'DURABLE SYSTEM MAP: keep .forge/diagnostics/system-map.md (identity, '
|
|
90
|
+
+ 'environments, components, lifecycle, DB schemas+live counts, key files, '
|
|
91
|
+
+ 'jobs, secrets, diagnostic playbook, rules, semantic graph). The server '
|
|
92
|
+
+ 'injects it as ground truth; if it is MISSING, BUILD it before diagnosing; '
|
|
93
|
+
+ 'READ it first every session (never re-discover from scratch) and refresh '
|
|
94
|
+
+ 'it when stale.',
|
|
89
95
|
},
|
|
90
96
|
{
|
|
91
97
|
slugs: ['concurrency-scale'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctrine_digest.js","sourceRoot":"","sources":["../../src/chat/doctrine_digest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AASH,MAAM,CAAC,MAAM,eAAe,GAA0B;IACpD;QACE,KAAK,EAAE,CAAC,sBAAsB,CAAC;QAC/B,IAAI,EACF,8DAA8D;cAC5D,6DAA6D;cAC7D,+DAA+D;cAC/D,uDAAuD;cACvD,6DAA6D;cAC7D,yDAAyD;cACzD,gEAAgE;cAChE,4DAA4D;cAC5D,mCAAmC;KACxC;IACD;QACE,KAAK,EAAE,CAAC,gBAAgB,CAAC;QACzB,IAAI,EACF,gEAAgE;cAC9D,0DAA0D;cAC1D,4CAA4C;KACjD;IACD;QACE,KAAK,EAAE,CAAC,YAAY,CAAC;QACrB,IAAI,EAAE,2FAA2F;KAClG;IACD;QACE,KAAK,EAAE,CAAC,eAAe,CAAC;QACxB,IAAI,EAAE,2IAA2I;KAClJ;IACD;QACE,KAAK,EAAE,CAAC,OAAO,CAAC;QAChB,IAAI,EAAE,qFAAqF;KAC5F;IACD;QACE,KAAK,EAAE,CAAC,UAAU,EAAE,iBAAiB,CAAC;QACtC,IAAI,EAAE,2IAA2I;KAClJ;IACD;QACE,KAAK,EAAE,CAAC,gBAAgB,CAAC;QACzB,IAAI,EAAE,0aAA0a;KACjb;IACD;QACE,KAAK,EAAE,CAAC,OAAO,CAAC;QAChB,IAAI,EAAE,iGAAiG;KACxG;IACD;QACE,KAAK,EAAE,CAAC,iBAAiB,CAAC;QAC1B,IAAI,EAAE,qFAAqF;KAC5F;IACD;QACE,KAAK,EAAE,CAAC,iBAAiB,CAAC;QAC1B,IAAI,EAAE,4GAA4G;KACnH;IACD;QACE,KAAK,EAAE,CAAC,sBAAsB,CAAC;QAC/B,IAAI,EAAE,kJAAkJ;KACzJ;IACD;QACE,KAAK,EAAE,CAAC,uBAAuB,CAAC;QAChC,IAAI,EAAE,mFAAmF;KAC1F;IACD;QACE,KAAK,EAAE,CAAC,iBAAiB,CAAC;QAC1B,IAAI,EACF,2EAA2E;cACzE,4EAA4E;cAC5E,uEAAuE;cACvE,6EAA6E;cAC7E,yEAAyE;cACzE,yEAAyE;cACzE,yEAAyE;cACzE,0EAA0E;cAC1E,
|
|
1
|
+
{"version":3,"file":"doctrine_digest.js","sourceRoot":"","sources":["../../src/chat/doctrine_digest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AASH,MAAM,CAAC,MAAM,eAAe,GAA0B;IACpD;QACE,KAAK,EAAE,CAAC,sBAAsB,CAAC;QAC/B,IAAI,EACF,8DAA8D;cAC5D,6DAA6D;cAC7D,+DAA+D;cAC/D,uDAAuD;cACvD,6DAA6D;cAC7D,yDAAyD;cACzD,gEAAgE;cAChE,4DA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DAA6D;QAC7D,EAAE;KACH,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -3,6 +3,11 @@ export interface ForgeProfile {
|
|
|
3
3
|
name?: string;
|
|
4
4
|
read_only?: boolean;
|
|
5
5
|
mission_file?: string;
|
|
6
|
+
/** PND-157 -- durable system map. When the embed boots, this file (default
|
|
7
|
+
* .forge/diagnostics/system-map.md) is injected into the prompt as GROUND
|
|
8
|
+
* TRUTH so the assistant does not re-discover the whole system every
|
|
9
|
+
* session. Missing -> the prompt tells the brain to BUILD it first. */
|
|
10
|
+
system_map_file?: string;
|
|
6
11
|
/** Single report dir (legacy form; kept for back-compat). */
|
|
7
12
|
allow_report_dir?: string;
|
|
8
13
|
/** Report dirs (preferred form). Writing REPORTS is part of the embedded
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge_profile.d.ts","sourceRoot":"","sources":["../../src/core/forge_profile.ts"],"names":[],"mappings":"AAoCA,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;4EAEwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,2EAA2E;IAC3E,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,yCAA0C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MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAeD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,mBAAmB,CA2BrB;AAED,qEAAqE;AACrE,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAIxC"}
|
|
@@ -50,7 +50,12 @@ export function reportDirs(p) {
|
|
|
50
50
|
return dirs;
|
|
51
51
|
}
|
|
52
52
|
const MISSION_MAX_CHARS = 8000;
|
|
53
|
-
|
|
53
|
+
/** The durable system map is the assistant's ground truth -- worth a bigger
|
|
54
|
+
* budget than the mission (it carries DB schemas, file inventory, playbooks).
|
|
55
|
+
* Anything past this is read on demand from the file. */
|
|
56
|
+
const SYSTEM_MAP_MAX_CHARS = 18000;
|
|
57
|
+
const DEFAULT_SYSTEM_MAP_FILE = '.forge/diagnostics/system-map.md';
|
|
58
|
+
let ACTIVE = { profile: null, mission: '', systemMap: '', systemMapPath: '', root: '' };
|
|
54
59
|
/**
|
|
55
60
|
* Load the profile for a project root. Resolution order (Pablo 2026-07-09):
|
|
56
61
|
*
|
|
@@ -106,11 +111,24 @@ export function initProfile(projectRoot) {
|
|
|
106
111
|
mission = '';
|
|
107
112
|
}
|
|
108
113
|
}
|
|
109
|
-
|
|
114
|
+
/* PND-157 -- durable system map (default path when a profile is active, so
|
|
115
|
+
* existing profiles get it for free). Injected as ground truth if present. */
|
|
116
|
+
let systemMap = '', systemMapPath = '';
|
|
117
|
+
if (profile) {
|
|
118
|
+
systemMapPath = profile.system_map_file || DEFAULT_SYSTEM_MAP_FILE;
|
|
119
|
+
const smf = isAbsolute(systemMapPath) ? systemMapPath : join(projectRoot, systemMapPath);
|
|
120
|
+
try {
|
|
121
|
+
systemMap = readFileSync(smf, 'utf8').slice(0, SYSTEM_MAP_MAX_CHARS).trim();
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
systemMap = '';
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
ACTIVE = { profile, mission, systemMap, systemMapPath, root: projectRoot };
|
|
110
128
|
return profile;
|
|
111
129
|
}
|
|
112
130
|
/** For tests. */
|
|
113
|
-
export function _resetProfileForTest() { ACTIVE = { profile: null, mission: '', root: '' }; }
|
|
131
|
+
export function _resetProfileForTest() { ACTIVE = { profile: null, mission: '', systemMap: '', systemMapPath: '', root: '' }; }
|
|
114
132
|
export function activeProfile() { return ACTIVE.profile; }
|
|
115
133
|
/** System-prompt lines for the active profile (empty array when none).
|
|
116
134
|
* Mission text first (operator voice), then -- when read_only -- the
|
|
@@ -123,6 +141,17 @@ export function profilePromptLines() {
|
|
|
123
141
|
if (ACTIVE.mission) {
|
|
124
142
|
lines.push('=================================================================', 'MISSION (operator-configured -- .forge profile "' + (p.name || 'default') + '")', '=================================================================', '', ACTIVE.mission, '');
|
|
125
143
|
}
|
|
144
|
+
/* PND-157 -- durable system map. Present => inject it as ground truth (so the
|
|
145
|
+
* assistant does not re-discover the system every session). Missing (read_only)
|
|
146
|
+
* => tell it to BUILD the map first. The detailed 14-section template lives in
|
|
147
|
+
* the diagnostic-mode doctrine. */
|
|
148
|
+
const smPath = ACTIVE.systemMapPath || DEFAULT_SYSTEM_MAP_FILE;
|
|
149
|
+
if (ACTIVE.systemMap) {
|
|
150
|
+
lines.push('=================================================================', 'SYSTEM MAP -- durable ground truth (' + smPath + ')', '=================================================================', '', 'This is the persistent map of THIS system. USE IT as your baseline instead', 'of re-discovering the whole system before every analysis. If a section looks', 'truncated, read the full file with yujin.fs.read-file. If you find it STALE', '(schema/config/files changed), refresh it (write ' + smPath + ' -- a report', 'dir, so allowed).', '', ACTIVE.systemMap, '');
|
|
151
|
+
}
|
|
152
|
+
else if (p.read_only) {
|
|
153
|
+
lines.push('=================================================================', 'SYSTEM MAP -- MISSING: build it before you diagnose', '=================================================================', '', 'There is no durable system map yet at ' + smPath + '. As soon as you have', 'context, BUILD IT (that path is a report dir -- you have write access there)', 'so future sessions do NOT re-discover the system from scratch. Follow the', 'diagnostic-mode doctrine for the section template (identity, environments,', 'components, lifecycle/flows, integrations, auth/tokens, DB schemas + live', 'counts, data loads/mappings, key files, background jobs, dependencies/secrets,', 'diagnostic playbook, operative rules, + a reference to the semantic graph).', 'Write it in Markdown at ' + smPath + ', THEN diagnose.', '');
|
|
154
|
+
}
|
|
126
155
|
if (p.read_only) {
|
|
127
156
|
lines.push('=================================================================', 'READ-ONLY DIAGNOSTIC POSTURE (mechanically enforced)', '=================================================================', '', 'This deployment is a DIAGNOSTIC assistant for THIS system. WRITE verbs', 'that change the system (file writes outside the report dirs, git', 'commit/push/pull, lifecycle, office writes) are BLOCKED at the', 'dispatcher -- do not attempt them.', '', 'For DATABASE queries use the native verb yujin.db.query (SELECT-only,', 'connection from .forge/db.json) -- do NOT shell out to mysql and do NOT', 'invent an HTTP query endpoint.', '', 'READ-ONLY shell IS ALLOWED and is how you diagnose -- USE IT, do not', 'ask the operator to run queries for you. Permitted via yujin.shell.exec:', ' - SELECT-only DB queries (only if yujin.db.query is not configured);', ' - curl/wget GET to LOCALHOST (the app\'s own read endpoints);', ' - read commands (ls, cat, grep, tail, head, ...).', 'Blocked: writes, INSERT/UPDATE/DELETE/DROP, POST/PUT/DELETE, remote', 'network, sudo (except sudo -u <user> for a SELECT), destructive ops.', 'For those, emit the precise instruction for the operator.', 'Your job:', ' 1. DIAGNOSE with evidence: read code/config/logs, query the graph,', ' cite file:line for every claim.', ' 2. Emit PRECISE instructions the operator can apply by hand:', ' "set field <X> to value <V> in <file/table>, then verify with', ' <command/check>". One instruction per change, in order.', ' 3. Record findings as pendings (yujin.pending.add) so nothing is', ' lost between sessions.', ' 4. WRITE REPORTS -- part of your PRIMARY function. You MAY write', ' reports of any type (HTML/md/csv/...) under: '
|
|
128
157
|
+ reportDirs(p).map((d) => '"' + d + '/"').join(', ') + '.', ' Everything else on disk stays read-only.', '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge_profile.js","sourceRoot":"","sources":["../../src/core/forge_profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"forge_profile.js","sourceRoot":"","sources":["../../src/core/forge_profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBjE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAU,CAAC;AAE3E,6EAA6E;AAC7E,MAAM,UAAU,UAAU,CAAC,CAAe;IACxC,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACvC,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,iBAAiB;YAAE,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ;gBAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpF,CAAC;IACD,IAAI,CAAC,CAAC,gBAAgB,IAAI,OAAO,CAAC,CAAC,gBAAgB,KAAK,QAAQ;QAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAChG,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,IAAI;QAAE,OAAO,CAAC,GAAG,mBAAmB,CAAC,CAAC;IAC/E,OAAO,IAAI,CAAC;AACd,C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AAC,EAAE,CAAC,GAAG,GAAG;KAClH,CAAC;AACJ,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;IACzB,IAAI,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IAClB,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -46,3 +46,34 @@ The profile prompt already states the posture; the essence:
|
|
|
46
46
|
|
|
47
47
|
UAT is permissive: apply the change, verify it, THEN tell the operator the
|
|
48
48
|
exact steps to replicate it in PROD.
|
|
49
|
+
|
|
50
|
+
## 3. The durable SYSTEM MAP (build once, read always)
|
|
51
|
+
|
|
52
|
+
Re-discovering the whole system before every analysis is wasteful. Keep a
|
|
53
|
+
durable map at `.forge/diagnostics/system-map.md` (a report dir -- you may
|
|
54
|
+
write it even under read_only). The server injects it into your prompt as
|
|
55
|
+
ground truth when it exists; when it does NOT, the prompt tells you to build
|
|
56
|
+
it first. So:
|
|
57
|
+
|
|
58
|
+
- **First session (map missing): BUILD it before diagnosing.** Investigate the
|
|
59
|
+
real system (read code/config, `yujin.db.query`, the semantic graph) and
|
|
60
|
+
write a thorough Markdown map. Suggested sections -- adapt to the project,
|
|
61
|
+
drop what does not apply, add what does:
|
|
62
|
+
1. Identity -- stack, entrypoint, external integrations, secrets/vault.
|
|
63
|
+
2. Environments -- PROD vs UAT/others: paths, ports, services, credentials.
|
|
64
|
+
3. Components -- each process / bot / worker / service and what it does.
|
|
65
|
+
4. Lifecycle / main flows -- step by step, with an ASCII flow.
|
|
66
|
+
5. Integrations -- external APIs / queues / messaging and their circuits.
|
|
67
|
+
6. Auth / tokens -- validity, hashing, transport.
|
|
68
|
+
7. Database -- schema of the main tables + LIVE counts/distributions.
|
|
69
|
+
8. Data loads / mappings -- ETL / Excel / mappings / confidence levels, live.
|
|
70
|
+
9. Key files -- each relevant source and its function.
|
|
71
|
+
10. Background jobs -- what starts with the server.
|
|
72
|
+
11. Dependencies / secrets -- vault, external keys.
|
|
73
|
+
12. Diagnostic playbook -- systemctl / journalctl / SQL ready to copy-paste.
|
|
74
|
+
13. Operative rules -- read-only, PHI/regulatory, toggles, deploy windows.
|
|
75
|
+
14. Semantic graph -- reference the full graph (nodes + edges).
|
|
76
|
+
- **Every session: READ the map first** (it is injected; read the full file if
|
|
77
|
+
a section is truncated) and diagnose FROM it -- do not re-derive from scratch.
|
|
78
|
+
- **Keep it fresh:** when you notice the map is stale (schema/config/files
|
|
79
|
+
changed), update `.forge/diagnostics/system-map.md` in the same session.
|
package/dist/version.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Yujin Forge CLI version. Kept in sync with package.json by the npm
|
|
3
3
|
* "version" lifecycle (scripts/sync_version.mjs) so the two never drift.
|
|
4
4
|
*/
|
|
5
|
-
export declare const VERSION = "1.0.
|
|
5
|
+
export declare const VERSION = "1.0.87";
|
|
6
6
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -46,3 +46,34 @@ The profile prompt already states the posture; the essence:
|
|
|
46
46
|
|
|
47
47
|
UAT is permissive: apply the change, verify it, THEN tell the operator the
|
|
48
48
|
exact steps to replicate it in PROD.
|
|
49
|
+
|
|
50
|
+
## 3. The durable SYSTEM MAP (build once, read always)
|
|
51
|
+
|
|
52
|
+
Re-discovering the whole system before every analysis is wasteful. Keep a
|
|
53
|
+
durable map at `.forge/diagnostics/system-map.md` (a report dir -- you may
|
|
54
|
+
write it even under read_only). The server injects it into your prompt as
|
|
55
|
+
ground truth when it exists; when it does NOT, the prompt tells you to build
|
|
56
|
+
it first. So:
|
|
57
|
+
|
|
58
|
+
- **First session (map missing): BUILD it before diagnosing.** Investigate the
|
|
59
|
+
real system (read code/config, `yujin.db.query`, the semantic graph) and
|
|
60
|
+
write a thorough Markdown map. Suggested sections -- adapt to the project,
|
|
61
|
+
drop what does not apply, add what does:
|
|
62
|
+
1. Identity -- stack, entrypoint, external integrations, secrets/vault.
|
|
63
|
+
2. Environments -- PROD vs UAT/others: paths, ports, services, credentials.
|
|
64
|
+
3. Components -- each process / bot / worker / service and what it does.
|
|
65
|
+
4. Lifecycle / main flows -- step by step, with an ASCII flow.
|
|
66
|
+
5. Integrations -- external APIs / queues / messaging and their circuits.
|
|
67
|
+
6. Auth / tokens -- validity, hashing, transport.
|
|
68
|
+
7. Database -- schema of the main tables + LIVE counts/distributions.
|
|
69
|
+
8. Data loads / mappings -- ETL / Excel / mappings / confidence levels, live.
|
|
70
|
+
9. Key files -- each relevant source and its function.
|
|
71
|
+
10. Background jobs -- what starts with the server.
|
|
72
|
+
11. Dependencies / secrets -- vault, external keys.
|
|
73
|
+
12. Diagnostic playbook -- systemctl / journalctl / SQL ready to copy-paste.
|
|
74
|
+
13. Operative rules -- read-only, PHI/regulatory, toggles, deploy windows.
|
|
75
|
+
14. Semantic graph -- reference the full graph (nodes + edges).
|
|
76
|
+
- **Every session: READ the map first** (it is injected; read the full file if
|
|
77
|
+
a section is truncated) and diagnose FROM it -- do not re-derive from scratch.
|
|
78
|
+
- **Keep it fresh:** when you notice the map is stale (schema/config/files
|
|
79
|
+
changed), update `.forge/diagnostics/system-map.md` in the same session.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nac3/forge-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.87",
|
|
4
4
|
"description": "Yujin Forge -- voice-first NAC-3 React development framework. CLI + chat panel + spec ingest + 10-format document reader + voice loop.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pablo Kuschnirof <pablo@rpaforce.com>",
|