@forwardimpact/libwiki 0.2.14 → 0.2.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardimpact/libwiki",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "Wiki lifecycle primitives — stable memory for agent teams so coordination persists across sessions.",
5
5
  "keywords": [
6
6
  "wiki",
@@ -77,7 +77,6 @@ const columnCount = (expected) => (s) =>
77
77
 
78
78
  const exists = (s) => (s.exists ? null : {});
79
79
  const expired = (s, ctx) => (s.expires_at < ctx.today ? {} : null);
80
- const always = () => ({});
81
80
 
82
81
  function entryHasDecision(lines, startIdx, requiredLine, stopRe) {
83
82
  let seen = 0;
@@ -492,15 +491,4 @@ export const RULES = [
492
491
  // -- STATUS.md rows (per-migration-unit sub-row schema) --
493
492
 
494
493
  ...STATUS_ROW_RULES,
495
-
496
- // -- Stray files --
497
-
498
- {
499
- id: "wiki.stray-file",
500
- scope: "stray-file",
501
- severity: "fail",
502
- check: always,
503
- message: () => "Does not match any known scope",
504
- hint: "rename to a recognized scope (summary, weekly log, weekly-log part) or remove the file",
505
- },
506
494
  ];
@@ -74,8 +74,7 @@ function classifyFile(filePath, fs) {
74
74
  const base = path.basename(filePath);
75
75
  if (EXCLUDED_BASES.has(base)) return null;
76
76
  // STATUS.md is loaded separately (loadStatus) and audited via the dedicated
77
- // `status-row` scope — skip the per-file classification so it is not treated
78
- // as a stray file.
77
+ // `status-row` scope — skip the per-file classification.
79
78
  if (base === "STATUS.md") return null;
80
79
  if (NON_SUMMARY_PREFIXES.some((p) => base.startsWith(p))) return null;
81
80
  if (WEEKLY_LOG_NAME_RE.test(base)) {
@@ -85,8 +84,10 @@ function classifyFile(filePath, fs) {
85
84
  return { kind: "weekly-log-part", subject: loadFile(filePath, fs) };
86
85
  }
87
86
  const subject = loadFile(filePath, fs);
88
- const kind = SUMMARY_H1_RE.test(subject.firstLine) ? "summary" : "stray";
89
- return { kind, subject };
87
+ // Files that do not match a summary or weekly-log shape are left
88
+ // unclassified: stray files are not audited.
89
+ if (!SUMMARY_H1_RE.test(subject.firstLine)) return null;
90
+ return { kind: "summary", subject };
90
91
  }
91
92
 
92
93
  function loadMemory(wikiRoot, fs) {
@@ -216,7 +217,6 @@ const SCOPE_RESOLVERS = {
216
217
  ...r,
217
218
  path: ctx.status.path,
218
219
  })),
219
- "stray-file": (ctx) => ctx.subjects.stray,
220
220
  };
221
221
 
222
222
  /** Resolve a scope key into the list of subjects the engine should iterate. */
@@ -236,7 +236,6 @@ export function buildContext({ wikiRoot, today, fs }) {
236
236
  summary: [],
237
237
  "weekly-log-main": [],
238
238
  "weekly-log-part": [],
239
- stray: [],
240
239
  };
241
240
  for (const file of listMdFiles(wikiRoot, fs)) {
242
241
  const classified = classifyFile(file, fs);