sigmap 7.18.0 → 7.19.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/CHANGELOG.md +9 -0
- package/gen-context.js +65 -3
- package/llms-full.txt +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/core/package.json +1 -1
- package/src/mcp/server.js +1 -1
- package/src/scaffold/persist.js +45 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,15 @@ Format: [Semantic Versioning](https://semver.org/)
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## [7.19.0] — 2026-06-18
|
|
14
|
+
|
|
15
|
+
Minor release — scaffold persistence (grounded codegen, Gap 2 §6.2).
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **Scaffold persistence — `.context/scaffold/latest.md` (#334):** `sigmap scaffold` now writes an accepted proposal to `.context/scaffold/latest.md` so the `create` pipeline and agents can read back the convention-matched proposal instead of re-deriving it. New zero-dependency, bundle-safe `src/scaffold/persist.js` (`renderScaffoldMarkdown`, `scaffoldPath`); the record captures the filename + naming style, export style, test file + framework, and any force-warning. Persisted in both human and `--json` modes (the JSON output gains a `persistedTo` field); a refused scaffold writes nothing.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
13
22
|
## [7.18.0] — 2026-06-18
|
|
14
23
|
|
|
15
24
|
Minor release — `sigmap conventions --update` (grounded codegen, Layer 3 — completes the §4 flag set).
|
package/gen-context.js
CHANGED
|
@@ -34,6 +34,55 @@ function __require(key) {
|
|
|
34
34
|
// ── ./src/eval/llm-ablation ──
|
|
35
35
|
// ── ./src/conventions/fix ──
|
|
36
36
|
// ── ./src/conventions/update ──
|
|
37
|
+
// ── ./src/scaffold/persist ──
|
|
38
|
+
__factories["./src/scaffold/persist"] = function(module, exports) {
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Scaffold persistence (IMPL.md §6.2 — 2d).
|
|
42
|
+
*
|
|
43
|
+
* Renders an accepted scaffold proposal to markdown and locates the on-disk
|
|
44
|
+
* record (`.context/scaffold/latest.md`) so the `create` pipeline and agents can
|
|
45
|
+
* read back the convention-matched proposal. Pure render; zero-dependency,
|
|
46
|
+
* bundle-safe.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
const path = require('path');
|
|
50
|
+
|
|
51
|
+
/** Path to the persisted scaffold record. */
|
|
52
|
+
function scaffoldPath(cwd) {
|
|
53
|
+
return path.join(cwd, '.context', 'scaffold', 'latest.md');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Render an accepted scaffold decision to a markdown record.
|
|
58
|
+
* @param {object} decision a `proposeScaffold` result with `ok: true`
|
|
59
|
+
* @param {object} [opts]
|
|
60
|
+
* @param {string} [opts.timestamp] ISO timestamp (caller supplies — keeps this pure)
|
|
61
|
+
* @returns {string}
|
|
62
|
+
*/
|
|
63
|
+
function renderScaffoldMarkdown(decision, opts = {}) {
|
|
64
|
+
const d = decision || {};
|
|
65
|
+
const p = d.proposal || {};
|
|
66
|
+
const pct = (n) => `${Math.round((n || 0) * 100)}%`;
|
|
67
|
+
const lines = [
|
|
68
|
+
`# Scaffold — ${d.name || '(unnamed)'}`,
|
|
69
|
+
'',
|
|
70
|
+
`- **Conventions:** ${d.tier || 'unknown'} (${pct(d.confidence)})`,
|
|
71
|
+
`- **File:** \`${p.filename || ''}\` (${p.namingStyle || ''})`,
|
|
72
|
+
`- **Export style:** ${p.exportStyle || ''}`,
|
|
73
|
+
`- **Test file:** \`${p.testFile || ''}\`${p.testFramework ? ` (${p.testFramework})` : ''}`,
|
|
74
|
+
];
|
|
75
|
+
if (d.warning) lines.push(`- **Warning:** ${d.warning}`);
|
|
76
|
+
lines.push('');
|
|
77
|
+
lines.push(`<sub>Generated by \`sigmap scaffold\`${opts.timestamp ? ` · ${opts.timestamp}` : ''}.</sub>`);
|
|
78
|
+
lines.push('');
|
|
79
|
+
return lines.join('\n');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
module.exports = { scaffoldPath, renderScaffoldMarkdown };
|
|
83
|
+
|
|
84
|
+
};
|
|
85
|
+
|
|
37
86
|
__factories["./src/conventions/update"] = function(module, exports) {
|
|
38
87
|
|
|
39
88
|
/**
|
|
@@ -7819,7 +7868,7 @@ __factories["./src/mcp/server"] = function(module, exports) {
|
|
|
7819
7868
|
|
|
7820
7869
|
const SERVER_INFO = {
|
|
7821
7870
|
name: 'sigmap',
|
|
7822
|
-
version: '7.
|
|
7871
|
+
version: '7.19.0',
|
|
7823
7872
|
description: 'SigMap MCP server — code signatures on demand',
|
|
7824
7873
|
};
|
|
7825
7874
|
|
|
@@ -13497,7 +13546,7 @@ function __tryGit(args, opts = {}) {
|
|
|
13497
13546
|
catch (_) { return ''; }
|
|
13498
13547
|
}
|
|
13499
13548
|
|
|
13500
|
-
const VERSION = '7.
|
|
13549
|
+
const VERSION = '7.19.0';
|
|
13501
13550
|
const MARKER = '\n\n## Auto-generated signatures\n<!-- Updated by gen-context.js -->\n';
|
|
13502
13551
|
|
|
13503
13552
|
function requireSourceOrBundled(key) {
|
|
@@ -16891,8 +16940,20 @@ function main() {
|
|
|
16891
16940
|
const conventions = extractConventions(cwd, buildFileList(cwd, config));
|
|
16892
16941
|
const decision = proposeScaffold(name, conventions, { threshold, ext, force });
|
|
16893
16942
|
|
|
16943
|
+
// §6.2 (2d): persist an accepted proposal so `create`/agents can read it back.
|
|
16944
|
+
let persistedTo = null;
|
|
16945
|
+
if (decision.ok) {
|
|
16946
|
+
const { scaffoldPath, renderScaffoldMarkdown } = requireSourceOrBundled('./src/scaffold/persist');
|
|
16947
|
+
const outPath = scaffoldPath(cwd);
|
|
16948
|
+
try {
|
|
16949
|
+
fs.mkdirSync(path.dirname(outPath), { recursive: true });
|
|
16950
|
+
fs.writeFileSync(outPath, renderScaffoldMarkdown(decision, { timestamp: new Date().toISOString() }));
|
|
16951
|
+
persistedTo = path.relative(cwd, outPath) || outPath;
|
|
16952
|
+
} catch (_) {}
|
|
16953
|
+
}
|
|
16954
|
+
|
|
16894
16955
|
if (jsonOut) {
|
|
16895
|
-
process.stdout.write(JSON.stringify(decision) + '\n');
|
|
16956
|
+
process.stdout.write(JSON.stringify({ ...decision, persistedTo }) + '\n');
|
|
16896
16957
|
process.exit(decision.ok ? 0 : 1);
|
|
16897
16958
|
}
|
|
16898
16959
|
|
|
@@ -16904,6 +16965,7 @@ function main() {
|
|
|
16904
16965
|
console.log(` file: ${p.filename} (${p.namingStyle})`);
|
|
16905
16966
|
console.log(` export style: ${p.exportStyle}`);
|
|
16906
16967
|
console.log(` test file: ${p.testFile}${p.testFramework ? ` (${p.testFramework})` : ''}`);
|
|
16968
|
+
if (persistedTo) console.log(`\n → wrote ${persistedTo}`);
|
|
16907
16969
|
process.exit(0);
|
|
16908
16970
|
}
|
|
16909
16971
|
|
package/llms-full.txt
CHANGED
|
@@ -9,7 +9,7 @@ the files relevant to the task — cutting tokens ~97% while keeping answers
|
|
|
9
9
|
grounded. Deterministic, offline, no embeddings or vector database. Works with
|
|
10
10
|
Claude, Cursor, GitHub Copilot, Aider, Windsurf, local LLMs, and MCP.
|
|
11
11
|
|
|
12
|
-
# Version: 7.
|
|
12
|
+
# Version: 7.19.0 | Benchmark: sigmap-v7.0-main (2026-06-14)
|
|
13
13
|
# Source: auto-generated from package.json, version.json, src/mcp/tools.js, src/config/defaults.js
|
|
14
14
|
# Regenerate: npm run generate:llms | Validate: npm run validate:llms
|
|
15
15
|
|
package/llms.txt
CHANGED
|
@@ -9,7 +9,7 @@ the files relevant to the task — cutting tokens ~97% while keeping answers
|
|
|
9
9
|
grounded. Deterministic, offline, no embeddings or vector database. Works with
|
|
10
10
|
Claude, Cursor, GitHub Copilot, Aider, Windsurf, local LLMs, and MCP.
|
|
11
11
|
|
|
12
|
-
# Version: 7.
|
|
12
|
+
# Version: 7.19.0 | Benchmark: sigmap-v7.0-main (2026-06-14)
|
|
13
13
|
# Source: auto-generated from package.json, version.json, src/mcp/tools.js, src/config/defaults.js
|
|
14
14
|
# Regenerate: npm run generate:llms | Validate: npm run validate:llms
|
|
15
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigmap",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.19.0",
|
|
4
4
|
"description": "97% token reduction for AI coding. Extracts function & class signatures with TF-IDF ranking to feed only the right files to Claude, Cursor, Copilot, Aider, Windsurf, local LLMs & MCP. Zero dependencies, runs offline via npx.",
|
|
5
5
|
"main": "packages/core/index.js",
|
|
6
6
|
"exports": {
|
package/src/mcp/server.js
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Scaffold persistence (IMPL.md §6.2 — 2d).
|
|
5
|
+
*
|
|
6
|
+
* Renders an accepted scaffold proposal to markdown and locates the on-disk
|
|
7
|
+
* record (`.context/scaffold/latest.md`) so the `create` pipeline and agents can
|
|
8
|
+
* read back the convention-matched proposal. Pure render; zero-dependency,
|
|
9
|
+
* bundle-safe.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const path = require('path');
|
|
13
|
+
|
|
14
|
+
/** Path to the persisted scaffold record. */
|
|
15
|
+
function scaffoldPath(cwd) {
|
|
16
|
+
return path.join(cwd, '.context', 'scaffold', 'latest.md');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Render an accepted scaffold decision to a markdown record.
|
|
21
|
+
* @param {object} decision a `proposeScaffold` result with `ok: true`
|
|
22
|
+
* @param {object} [opts]
|
|
23
|
+
* @param {string} [opts.timestamp] ISO timestamp (caller supplies — keeps this pure)
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
26
|
+
function renderScaffoldMarkdown(decision, opts = {}) {
|
|
27
|
+
const d = decision || {};
|
|
28
|
+
const p = d.proposal || {};
|
|
29
|
+
const pct = (n) => `${Math.round((n || 0) * 100)}%`;
|
|
30
|
+
const lines = [
|
|
31
|
+
`# Scaffold — ${d.name || '(unnamed)'}`,
|
|
32
|
+
'',
|
|
33
|
+
`- **Conventions:** ${d.tier || 'unknown'} (${pct(d.confidence)})`,
|
|
34
|
+
`- **File:** \`${p.filename || ''}\` (${p.namingStyle || ''})`,
|
|
35
|
+
`- **Export style:** ${p.exportStyle || ''}`,
|
|
36
|
+
`- **Test file:** \`${p.testFile || ''}\`${p.testFramework ? ` (${p.testFramework})` : ''}`,
|
|
37
|
+
];
|
|
38
|
+
if (d.warning) lines.push(`- **Warning:** ${d.warning}`);
|
|
39
|
+
lines.push('');
|
|
40
|
+
lines.push(`<sub>Generated by \`sigmap scaffold\`${opts.timestamp ? ` · ${opts.timestamp}` : ''}.</sub>`);
|
|
41
|
+
lines.push('');
|
|
42
|
+
return lines.join('\n');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = { scaffoldPath, renderScaffoldMarkdown };
|