@compr/opscontext-mcp 2.5.7 → 2.5.8

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 CHANGED
@@ -4,6 +4,15 @@ All notable changes to OpsContext for AI Agents (previously ContextEngine — MC
4
4
 
5
5
  > Entries for 2.2.0 through 2.4.0 were not backfilled here; see `docs/sessions/SESSION_19` through `SESSION_21` for those releases.
6
6
 
7
+ ## [2.5.8] — 2026-09-05 — "rules" is not a learnings heading
8
+
9
+ ### Fixed
10
+
11
+ - `LEARNINGS_HEADING` no longer matches the word "rules". "## Key rules" and "### Security Rules"
12
+ are ordinary doc sections; on the evening 2.5.7 shipped the word let 231 subsection headings back
13
+ into the store. "## Essential Rules, distilled from Learnings" still qualifies through "learnings".
14
+ Replayed from a foreign cwd with the default patterns over ~/Projects: 99 records from 819 sources.
15
+
7
16
  ## [2.5.7] — 2026-09-05 — The learnings store was a pile of headings
8
17
 
9
18
  Of 3,005 records, about 2,760 had been produced by the doc importer from ~160 ordinary docs
@@ -17,7 +26,7 @@ secrets" under mobile because "expose" contains "expo".
17
26
 
18
27
  - **Auto-import takes only marked learnings** (`[AUTO-IMPORT-ONLY-MARKED-LEARNINGS]`): inline
19
28
  `- [category] rule → context` bullets anywhere; every shape inside a `*LEARNINGS.md` file; every
20
- shape under a heading that says learnings / lessons / gotchas / pitfalls / rules / anti-patterns /
29
+ shape under a heading that says learnings / lessons / gotchas / pitfalls / anti-patterns /
21
30
  "never repeat" / "the hard way"; JSON. Bare H3 headings, bold bullets and table rows in ordinary
22
31
  docs are reported as `ignored` and left alone; the docs stay searchable as docs. Replayed over the
23
32
  818 discovered sources: 129 records instead of 1,879. `import_learnings` gains `permissive: true`
package/dist/learnings.js CHANGED
@@ -501,13 +501,15 @@ function deleteLearningUnlocked(id) {
501
501
  // FIX: a candidate becomes a learning only when the author marked it as one:
502
502
  // (1) an inline-category bullet `- [category] rule → context`, anywhere;
503
503
  // (2) any shape inside a file whose name says learnings (AGENT-LEARNINGS.md, LEARNINGS.md);
504
- // (3) any shape under a heading that says learnings / lessons / gotchas / pitfalls / rules /
505
- // anti-patterns / "never repeat" / "the hard way" (LEARNINGS_HEADING);
504
+ // (3) any shape under a heading that says learnings / lessons / gotchas / pitfalls /
505
+ // anti-patterns / "never repeat" / "the hard way" / mistakes (LEARNINGS_HEADING).
506
+ // Not "rules": "## Key rules" and "### Security Rules" are ordinary doc sections, and
507
+ // the word let 231 subsection headings back in on the evening this shipped;
506
508
  // (4) JSON files, which are explicit by construction.
507
509
  // `permissive: true` (MCP `import_learnings`, CLI `--permissive`) restores the old parser for
508
510
  // a file the user chose on purpose. Every imported record now carries `source`.
509
511
  export const LEARNINGS_FILE_NAME = /learnings?\.md$/i;
510
- export const LEARNINGS_HEADING = /\b(learnings?|lessons?|gotchas?|pitfalls?|anti-?patterns?|never repeat|do not repeat|don'?t repeat|the hard way|hard way|mistakes?|rules?)\b/i;
512
+ export const LEARNINGS_HEADING = /\b(learnings?|lessons?|gotchas?|pitfalls?|anti-?patterns?|never repeat|do not repeat|don'?t repeat|the hard way|hard way|mistakes?)\b/i;
511
513
  export function importLearningsFromFile(filePath, defaultCategory = "other", defaultProject, opts = {}) {
512
514
  if (!existsSync(filePath)) {
513
515
  return { imported: 0, updated: 0, skipped: 0, ignored: 0, errors: [`File not found: ${filePath}`] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compr/opscontext-mcp",
3
- "version": "2.5.7",
3
+ "version": "2.5.8",
4
4
  "description": "OpsContext for AI Agents — read-only fleet visibility (PM2/nginx/Docker/git/cron) + tamper-evident audit log + policy-as-code hooks. The ops + compliance layer Claude Code can't grow natively.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",