@nebutra/founder-cemetery 0.1.1 → 0.1.2

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.
@@ -1,5 +1,5 @@
1
- {"at":"2026-05-18T16:46:04.359Z","type":"reindex","tenantId":"tenant_a","files":0}
2
- {"at":"2026-05-18T16:46:04.434Z","type":"reindex","tenantId":"tenant_a","files":0}
3
- {"at":"2026-05-18T16:46:04.463Z","type":"write","tenantId":"tenant_a","path":"cemetery/loop.json"}
4
- {"at":"2026-05-18T16:46:04.565Z","type":"reindex","tenantId":"tenant_a","files":0}
5
- {"at":"2026-05-18T16:46:04.619Z","type":"reindex","tenantId":"tenant_a","files":0}
1
+ {"at":"2026-05-19T08:15:21.765Z","type":"reindex","tenantId":"tenant_a","files":0}
2
+ {"at":"2026-05-19T08:15:21.883Z","type":"reindex","tenantId":"tenant_a","files":0}
3
+ {"at":"2026-05-19T08:15:21.927Z","type":"write","tenantId":"tenant_a","path":"cemetery/loop.json"}
4
+ {"at":"2026-05-19T08:15:22.029Z","type":"reindex","tenantId":"tenant_a","files":0}
5
+ {"at":"2026-05-19T08:15:22.081Z","type":"reindex","tenantId":"tenant_a","files":0}
@@ -1 +1 @@
1
- {"traceId":"founder_cemetery_publish_loop_mpbfravb","kind":"content_write","affected":["cemetery/loop.json"],"parent":null,"snapshot":{"cemetery/loop.json":"{\n \"slug\": \"loop\",\n \"companyId\": \"loop\",\n \"companyName\": \"Loop\",\n \"publishLevel\": \"community\",\n \"coolingOffUntil\": \"2026-05-19T16:46:04.436Z\",\n \"consentSignatures\": [\n \"alice\"\n ],\n \"redactions\": [],\n \"causes\": [\n {\n \"category\": \"pmf\",\n \"confidence\": 0.78,\n \"evidence\": [\n \"Pivoted from devtools to sales without user interviews\",\n \"Outbound reply rate stayed below 1 percent\"\n ]\n }\n ],\n \"lessons\": [\n {\n \"title\": \"Validate demand before widening the pitch\",\n \"lessonText\": \"Loop should preserve the decision context and avoid repeating the highest-impact pmf mistake.\",\n \"evidence\": [\n \"Pivoted from devtools to sales without user interviews\",\n \"Outbound reply rate stayed below 1 percent\"\n ]\n }\n ],\n \"narrative\": \"Loop appears to have stalled around pmf.\"\n}\n"},"id":"418edd914a5dfb74a5157dd4b058bb0eae45f67285e77995e0bee63fa931e94e","tenantId":"tenant_a","at":"2026-05-18T16:46:04.499Z","summary":"content_write touched 1 path(s)","objectHashes":["220628f7c4091ed614d56dcd39181c966cc25d4fd6f6d885b064552c6c1ec8be"]}
1
+ {"at":"2026-05-19T08:15:21.956Z","traceId":"founder_cemetery_publish_loop_mpccydla","kind":"content_write","affected":["cemetery/loop.json"],"parent":null,"snapshot":{"cemetery/loop.json":"{\n \"slug\": \"loop\",\n \"companyId\": \"loop\",\n \"companyName\": \"Loop\",\n \"publishLevel\": \"community\",\n \"coolingOffUntil\": \"2026-05-20T08:15:21.897Z\",\n \"consentSignatures\": [\n \"alice\"\n ],\n \"redactions\": [],\n \"causes\": [\n {\n \"category\": \"pmf\",\n \"confidence\": 0.78,\n \"evidence\": [\n \"Pivoted from devtools to sales without user interviews\",\n \"Outbound reply rate stayed below 1 percent\"\n ]\n }\n ],\n \"lessons\": [\n {\n \"title\": \"Validate demand before widening the pitch\",\n \"lessonText\": \"Loop should preserve the decision context and avoid repeating the highest-impact pmf mistake.\",\n \"evidence\": [\n \"Pivoted from devtools to sales without user interviews\",\n \"Outbound reply rate stayed below 1 percent\"\n ]\n }\n ],\n \"narrative\": \"Loop appears to have stalled around pmf.\"\n}\n"},"id":"88d85c40ba4529577b9a10d16fafef8d5e5cbc5081dba3e0f08cb7d8fa8c7e8e","tenantId":"tenant_a","summary":"content_write touched 1 path(s)","objectHashes":["ffe8f001f3b66d02a4aeaedc34494a0babde2e9ed368295ac8a0befe996a594e"]}
@@ -1,8 +1,8 @@
1
- {"at":"2026-05-18T16:46:04.375Z","type":"start_closing_flow","tenantId":"tenant_a","companyId":"loop","companyName":"Loop","recommendedMode":"pause","availableModes":["pause","archive","cemetery"],"requiresCoolingOff":true,"startedAt":"2026-05-18T16:46:04.375Z"}
2
- {"at":"2026-05-18T16:46:04.434Z","type":"analyze_death","tenantId":"tenant_a","companyId":"loop","category":"pmf"}
3
- {"at":"2026-05-18T16:46:04.435Z","type":"extract_lessons","tenantId":"tenant_a","companyId":"loop","lessons":1}
4
- {"at":"2026-05-18T16:46:04.503Z","type":"publish_memorial","tenantId":"tenant_a","companyId":"loop","publishLevel":"community"}
5
- {"at":"2026-05-18T16:46:04.565Z","type":"analyze_death","tenantId":"tenant_a","companyId":"loop","category":"runway"}
6
- {"at":"2026-05-18T16:46:04.566Z","type":"extract_lessons","tenantId":"tenant_a","companyId":"loop","lessons":1}
7
- {"at":"2026-05-18T16:46:04.620Z","type":"analyze_death","tenantId":"tenant_a","companyId":"loop","category":"pmf"}
8
- {"at":"2026-05-18T16:46:04.620Z","type":"extract_lessons","tenantId":"tenant_a","companyId":"loop","lessons":1}
1
+ {"at":"2026-05-19T08:15:21.773Z","type":"start_closing_flow","tenantId":"tenant_a","companyId":"loop","companyName":"Loop","recommendedMode":"pause","availableModes":["pause","archive","cemetery"],"requiresCoolingOff":true,"startedAt":"2026-05-19T08:15:21.769Z"}
2
+ {"at":"2026-05-19T08:15:21.889Z","type":"analyze_death","tenantId":"tenant_a","companyId":"loop","category":"pmf"}
3
+ {"at":"2026-05-19T08:15:21.896Z","type":"extract_lessons","tenantId":"tenant_a","companyId":"loop","lessons":1}
4
+ {"at":"2026-05-19T08:15:21.969Z","type":"publish_memorial","tenantId":"tenant_a","companyId":"loop","publishLevel":"community"}
5
+ {"at":"2026-05-19T08:15:22.033Z","type":"analyze_death","tenantId":"tenant_a","companyId":"loop","category":"runway"}
6
+ {"at":"2026-05-19T08:15:22.033Z","type":"extract_lessons","tenantId":"tenant_a","companyId":"loop","lessons":1}
7
+ {"at":"2026-05-19T08:15:22.082Z","type":"analyze_death","tenantId":"tenant_a","companyId":"loop","category":"pmf"}
8
+ {"at":"2026-05-19T08:15:22.082Z","type":"extract_lessons","tenantId":"tenant_a","companyId":"loop","lessons":1}
@@ -1,5 +1,5 @@
1
1
 
2
- > @nebutra/founder-cemetery@0.1.1 build /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/founder-cemetery
2
+ > @nebutra/founder-cemetery@0.1.2 build /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/founder-cemetery
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/cli.ts, src/index.ts
@@ -11,12 +11,12 @@
11
11
  ESM Build start
12
12
  ESM dist/cli.js 1.16 KB
13
13
  ESM dist/index.js 176.00 B
14
- ESM dist/chunk-X5WY4XBS.js 7.04 KB
14
+ ESM dist/chunk-EJUWG7L2.js 7.08 KB
15
15
  ESM dist/cli.js.map 2.06 KB
16
16
  ESM dist/index.js.map 71.00 B
17
- ESM dist/chunk-X5WY4XBS.js.map 14.99 KB
18
- ESM ⚡️ Build success in 70ms
17
+ ESM dist/chunk-EJUWG7L2.js.map 15.00 KB
18
+ ESM ⚡️ Build success in 92ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 8345ms
20
+ DTS ⚡️ Build success in 14372ms
21
21
  DTS dist/cli.d.ts 13.00 B
22
22
  DTS dist/index.d.ts 3.22 KB
@@ -1,16 +1,15 @@
1
1
 
2
- > @nebutra/founder-cemetery@0.1.1 test /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/founder-cemetery
2
+ > @nebutra/founder-cemetery@0.1.2 test /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/founder-cemetery
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.1.4 /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/founder-cemetery
7
7
 
8
- (node:10996) ExperimentalWarning: SQLite is an experimental feature and might change at any time
9
- (Use `node --trace-warnings ...` to show where the warning was created)
10
- ✓ src/index.test.ts (4 tests) 427ms
8
+ ✓ src/index.test.ts (4 tests) 618ms
9
+ ✓ starts with pause as the safe default instead of one-click deletion  328ms
11
10
 
12
11
   Test Files  1 passed (1)
13
12
   Tests  4 passed (4)
14
-  Start at  16:46:02
15
-  Duration  2.39s (transform 1.01s, setup 0ms, import 1.22s, tests 427ms, environment 0ms)
13
+  Start at  08:15:19
14
+  Duration  2.45s (transform 783ms, setup 0ms, import 994ms, tests 618ms, environment 0ms)
16
15
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @nebutra/founder-cemetery@0.1.1 typecheck /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/founder-cemetery
2
+ > @nebutra/founder-cemetery@0.1.2 typecheck /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/founder-cemetery
3
3
  > tsc --noEmit
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @nebutra/founder-cemetery
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Publish registry package metadata under the MIT license.
8
+
9
+ - Updated dependencies []:
10
+ - @nebutra/capability-kit@0.2.1
11
+ - @nebutra/content-store@0.1.1
12
+ - @nebutra/ecosystem-safety@0.1.1
13
+ - @nebutra/errors@0.1.1
14
+ - @nebutra/event-log@0.1.1
15
+ - @nebutra/generation-context@0.1.1
16
+
3
17
  ## 0.1.1
4
18
 
5
19
  ### Patch Changes
@@ -1,21 +1,13 @@
1
1
  // src/index.ts
2
2
  import { mkdir } from "fs/promises";
3
3
  import { join } from "path";
4
+ import { requireCapabilityTenant } from "@nebutra/capability-kit";
4
5
  import { appendCapabilityDebug, readCapabilityDebug } from "@nebutra/capability-kit/debug";
5
6
  import { ContentStore } from "@nebutra/content-store";
6
7
  import { assertPublicDisclosureSafe } from "@nebutra/ecosystem-safety";
7
8
  import { CapabilityError } from "@nebutra/errors";
8
9
  import { EventLog } from "@nebutra/event-log";
9
10
  import { assetId } from "@nebutra/generation-context";
10
- function requireTenant(value) {
11
- if (!value?.trim()) {
12
- throw new CapabilityError("founder-cemetery", "Founder Cemetery requires tenant context", {
13
- suggestion: "Pass tenantId so closure artifacts stay tenant-scoped.",
14
- statusCode: 400
15
- });
16
- }
17
- return value;
18
- }
19
11
  function slugify(value) {
20
12
  return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64);
21
13
  }
@@ -52,7 +44,13 @@ var FounderCemetery = class _FounderCemetery {
52
44
  #contentStore;
53
45
  #eventLog;
54
46
  constructor(options) {
55
- this.#tenantId = requireTenant(options.tenantId);
47
+ this.#tenantId = requireCapabilityTenant({
48
+ explicit: options.tenantId,
49
+ onMissing: () => new CapabilityError("founder-cemetery", "Founder Cemetery requires tenant context", {
50
+ suggestion: "Pass tenantId so closure artifacts stay tenant-scoped.",
51
+ statusCode: 400
52
+ })
53
+ });
56
54
  this.#debugRoot = options.debugRoot ?? process.cwd();
57
55
  this.#contentStore = options.contentStore;
58
56
  this.#eventLog = options.eventLog;
@@ -190,4 +188,4 @@ export {
190
188
  FounderCemetery,
191
189
  readFounderCemeteryDebug
192
190
  };
193
- //# sourceMappingURL=chunk-X5WY4XBS.js.map
191
+ //# sourceMappingURL=chunk-EJUWG7L2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { mkdir } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { requireCapabilityTenant } from \"@nebutra/capability-kit\";\nimport { appendCapabilityDebug, readCapabilityDebug } from \"@nebutra/capability-kit/debug\";\nimport { ContentStore } from \"@nebutra/content-store\";\nimport { assertPublicDisclosureSafe } from \"@nebutra/ecosystem-safety\";\nimport { CapabilityError } from \"@nebutra/errors\";\nimport { EventLog } from \"@nebutra/event-log\";\nimport { assetId } from \"@nebutra/generation-context\";\n\nexport type CloseMode = \"pause\" | \"archive\" | \"cemetery\";\nexport type CauseCategory =\n | \"pmf\"\n | \"runway\"\n | \"fundraising\"\n | \"competition\"\n | \"founder_conflict\"\n | \"pivot\";\nexport type MemorialPublishLevel = \"private\" | \"community\" | \"public\";\n\nexport interface ClosingFlowRequest {\n readonly companyId: string;\n readonly companyName: string;\n readonly founderIds: readonly string[];\n}\n\nexport interface ClosingFlow {\n readonly companyId: string;\n readonly companyName: string;\n readonly recommendedMode: \"pause\";\n readonly availableModes: readonly CloseMode[];\n readonly requiresCoolingOff: true;\n readonly startedAt: string;\n}\n\nexport interface DeathAnalysisRequest {\n readonly companyId: string;\n readonly companyName: string;\n readonly timelineSummaries: readonly string[];\n}\n\nexport interface DeathCause {\n readonly category: CauseCategory;\n readonly confidence: number;\n readonly evidence: readonly string[];\n}\n\nexport interface DeathAnalysis {\n readonly companyId: string;\n readonly companyName: string;\n readonly causes: readonly DeathCause[];\n readonly narrative: string;\n readonly evidence: readonly string[];\n}\n\nexport interface Lesson {\n readonly title: string;\n readonly lessonText: string;\n readonly evidence: readonly string[];\n}\n\nexport interface PublishMemorialRequest {\n readonly analysis: DeathAnalysis;\n readonly lessons: readonly Lesson[];\n readonly publishLevel: MemorialPublishLevel;\n readonly consentSignatures: readonly string[];\n readonly redactions?: readonly string[];\n}\n\nexport interface Memorial {\n readonly slug: string;\n readonly path: string;\n readonly publishLevel: MemorialPublishLevel;\n readonly coolingOffUntil: string;\n readonly eventId: string;\n readonly lessons: readonly Lesson[];\n readonly redactions: readonly string[];\n}\n\nexport interface FounderCemeteryDoctorReport {\n readonly capability: \"founder-cemetery\";\n readonly ok: boolean;\n readonly checkedAt: string;\n readonly features: readonly string[];\n readonly suggestion?: string;\n}\n\nexport interface FounderCemeteryOptions {\n readonly tenantId?: string;\n readonly debugRoot?: string;\n readonly contentStore?: ContentStore;\n readonly eventLog?: EventLog;\n}\n\nfunction slugify(value: string): string {\n return value\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .slice(0, 64);\n}\n\nfunction inferCause(evidence: readonly string[]): DeathCause {\n const combined = evidence.join(\"\\n\").toLowerCase();\n if (combined.includes(\"runway\") || combined.includes(\"cash\")) {\n return { category: \"runway\", confidence: 0.74, evidence };\n }\n if (combined.includes(\"raise\") || combined.includes(\"fund\")) {\n return { category: \"fundraising\", confidence: 0.72, evidence };\n }\n if (combined.includes(\"conflict\")) {\n return { category: \"founder_conflict\", confidence: 0.7, evidence };\n }\n if (combined.includes(\"pivot\")) {\n return { category: \"pmf\", confidence: 0.78, evidence };\n }\n return { category: \"pmf\", confidence: 0.68, evidence };\n}\n\nfunction coolingOffDate(): string {\n return new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString();\n}\n\nfunction memorialDisclosureBody(request: PublishMemorialRequest): string {\n return [\n request.analysis.companyName,\n request.analysis.narrative,\n request.analysis.evidence.join(\"\\n\"),\n request.lessons\n .map((lesson) => [lesson.title, lesson.lessonText, lesson.evidence.join(\"\\n\")].join(\"\\n\"))\n .join(\"\\n\"),\n ].join(\"\\n\");\n}\n\nexport class FounderCemetery {\n readonly #tenantId: string;\n readonly #debugRoot: string;\n readonly #contentStore: ContentStore;\n readonly #eventLog: EventLog;\n\n private constructor(\n options: Required<Pick<FounderCemeteryOptions, \"tenantId\" | \"contentStore\" | \"eventLog\">> &\n Pick<FounderCemeteryOptions, \"debugRoot\">,\n ) {\n this.#tenantId = requireCapabilityTenant({\n explicit: options.tenantId,\n onMissing: () =>\n new CapabilityError(\"founder-cemetery\", \"Founder Cemetery requires tenant context\", {\n suggestion: \"Pass tenantId so closure artifacts stay tenant-scoped.\",\n statusCode: 400,\n }),\n });\n this.#debugRoot = options.debugRoot ?? process.cwd();\n this.#contentStore = options.contentStore;\n this.#eventLog = options.eventLog;\n }\n\n static async open(\n root = \".nebutra/founder-cemetery\",\n options: Omit<FounderCemeteryOptions, \"contentStore\" | \"eventLog\"> = {},\n ): Promise<FounderCemetery> {\n const tenantId = options.tenantId ?? \"local\";\n await mkdir(root, { recursive: true });\n const contentStore = await ContentStore.open(join(root, \"content\"), { tenantId });\n const eventLog = await EventLog.open(join(root, \"event-log\"), { tenantId });\n return new FounderCemetery({ ...options, tenantId, contentStore, eventLog });\n }\n\n async startClosingFlow(request: ClosingFlowRequest): Promise<ClosingFlow> {\n const flow: ClosingFlow = {\n companyId: request.companyId,\n companyName: request.companyName,\n recommendedMode: \"pause\",\n availableModes: [\"pause\", \"archive\", \"cemetery\"],\n requiresCoolingOff: true,\n startedAt: new Date().toISOString(),\n };\n await this.#debug({ type: \"start_closing_flow\", tenantId: this.#tenantId, ...flow });\n return flow;\n }\n\n async analyzeDeath(request: DeathAnalysisRequest): Promise<DeathAnalysis> {\n const evidence =\n request.timelineSummaries.length > 0\n ? request.timelineSummaries\n : [\"No timeline summaries were provided.\"];\n const cause = inferCause(evidence);\n const analysis: DeathAnalysis = {\n companyId: request.companyId,\n companyName: request.companyName,\n causes: [cause],\n evidence,\n narrative: `${request.companyName} appears to have stalled around ${cause.category}.`,\n };\n await this.#debug({\n type: \"analyze_death\",\n tenantId: this.#tenantId,\n companyId: request.companyId,\n category: cause.category,\n });\n return analysis;\n }\n\n async extractLessons(analysis: DeathAnalysis): Promise<readonly Lesson[]> {\n const title =\n analysis.causes[0]?.category === \"runway\"\n ? \"Validate before scaling burn\"\n : \"Validate demand before widening the pitch\";\n const lesson: Lesson = {\n title,\n lessonText: `${analysis.companyName} should preserve the decision context and avoid repeating the highest-impact ${analysis.causes[0]?.category ?? \"pmf\"} mistake.`,\n evidence: analysis.evidence.slice(0, Math.max(2, analysis.evidence.length)),\n };\n await this.#debug({\n type: \"extract_lessons\",\n tenantId: this.#tenantId,\n companyId: analysis.companyId,\n lessons: 1,\n });\n return [lesson];\n }\n\n async publishMemorial(request: PublishMemorialRequest): Promise<Memorial> {\n if (request.consentSignatures.length === 0) {\n throw new CapabilityError(\"founder-cemetery\", \"Memorial publication requires consent\", {\n suggestion:\n \"Collect founder consent signatures before publishing or keep the company paused.\",\n statusCode: 400,\n });\n }\n if (request.publishLevel !== \"private\") {\n assertPublicDisclosureSafe({\n capability: \"founder-cemetery\",\n content: memorialDisclosureBody(request),\n ...(request.redactions !== undefined ? { redactions: request.redactions } : {}),\n suggestion: \"Review detected private values and pass redactions before publishing.\",\n });\n }\n\n const slug = slugify(request.analysis.companyName) || request.analysis.companyId;\n const path = `cemetery/${slug}.json`;\n const memorial = {\n slug,\n companyId: request.analysis.companyId,\n companyName: request.analysis.companyName,\n publishLevel: request.publishLevel,\n coolingOffUntil: coolingOffDate(),\n consentSignatures: request.consentSignatures,\n redactions: request.redactions ?? [],\n causes: request.analysis.causes,\n lessons: request.lessons,\n narrative: request.analysis.narrative,\n };\n const snapshot = `${JSON.stringify(memorial, null, 2)}\\n`;\n await this.#contentStore.write(path, snapshot);\n const eventId = await this.#eventLog.commit({\n traceId: assetId(\"founder_cemetery_publish\", slug),\n kind: \"content_write\",\n affected: [path],\n parent: null,\n snapshot: { [path]: snapshot },\n });\n await this.#debug({\n type: \"publish_memorial\",\n tenantId: this.#tenantId,\n companyId: request.analysis.companyId,\n publishLevel: request.publishLevel,\n });\n return {\n slug,\n path,\n publishLevel: request.publishLevel,\n coolingOffUntil: memorial.coolingOffUntil,\n eventId,\n lessons: request.lessons,\n redactions: memorial.redactions,\n };\n }\n\n async doctor(): Promise<FounderCemeteryDoctorReport> {\n const report: FounderCemeteryDoctorReport = {\n capability: \"founder-cemetery\",\n ok: true,\n checkedAt: new Date().toISOString(),\n features: [\"pause-first\", \"death-analysis\", \"lessons\", \"memorial\", \"cooling-off\"],\n suggestion:\n \"Local memorial artifacts are active; global search and video recap remain lower-layer handoffs.\",\n };\n await this.#debug({ type: \"doctor\", tenantId: this.#tenantId });\n return report;\n }\n\n async close(): Promise<void> {\n await this.#contentStore.close();\n }\n\n async #debug(entry: Record<string, unknown>): Promise<void> {\n await appendCapabilityDebug(\"founder-cemetery\", entry, { root: this.#debugRoot });\n }\n}\n\nexport async function readFounderCemeteryDebug(\n root = process.cwd(),\n limit = 20,\n): Promise<unknown[]> {\n return readCapabilityDebug(\"founder-cemetery\", { root, limit });\n}\n"],"mappings":";AAAA,SAAS,aAAa;AACtB,S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Y,aAAa;AAAA,MAChF,YACE;AAAA,IACJ;AACA,UAAM,KAAK,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK,UAAU,CAAC;AAC9D,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,QAAuB;AAC3B,UAAM,KAAK,cAAc,MAAM;AAAA,EACjC;AAAA,EAEA,MAAM,OAAO,OAA+C;AAC1D,UAAM,sBAAsB,oBAAoB,OAAO,EAAE,MAAM,KAAK,WAAW,CAAC;AAAA,EAClF;AACF;AAEA,eAAsB,yBACpB,OAAO,QAAQ,IAAI,GACnB,QAAQ,IACY;AACpB,SAAO,oBAAoB,oBAAoB,EAAE,MAAM,MAAM,CAAC;AAChE;","names":[]}
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FounderCemetery,
3
3
  readFounderCemeteryDebug
4
- } from "./chunk-X5WY4XBS.js";
4
+ } from "./chunk-EJUWG7L2.js";
5
5
 
6
6
  // src/cli.ts
7
7
  var command = process.argv[2] ?? "doctor";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FounderCemetery,
3
3
  readFounderCemeteryDebug
4
- } from "./chunk-X5WY4XBS.js";
4
+ } from "./chunk-EJUWG7L2.js";
5
5
  export {
6
6
  FounderCemetery,
7
7
  readFounderCemeteryDebug
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebutra/founder-cemetery",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Company closing, postmortem, lesson extraction, and memorial publication surface",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -30,12 +30,12 @@
30
30
  ".": "./src/index.ts"
31
31
  },
32
32
  "dependencies": {
33
- "@nebutra/capability-kit": "0.2.0",
34
- "@nebutra/content-store": "0.1.0",
35
- "@nebutra/ecosystem-safety": "0.1.0",
36
- "@nebutra/errors": "0.1.0",
37
- "@nebutra/event-log": "0.1.0",
38
- "@nebutra/generation-context": "0.1.0"
33
+ "@nebutra/capability-kit": "0.2.1",
34
+ "@nebutra/content-store": "0.1.1",
35
+ "@nebutra/ecosystem-safety": "0.1.1",
36
+ "@nebutra/errors": "0.1.1",
37
+ "@nebutra/event-log": "0.1.1",
38
+ "@nebutra/generation-context": "0.1.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^22.19.15",
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { mkdir } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
+ import { requireCapabilityTenant } from "@nebutra/capability-kit";
3
4
  import { appendCapabilityDebug, readCapabilityDebug } from "@nebutra/capability-kit/debug";
4
5
  import { ContentStore } from "@nebutra/content-store";
5
6
  import { assertPublicDisclosureSafe } from "@nebutra/ecosystem-safety";
@@ -91,16 +92,6 @@ export interface FounderCemeteryOptions {
91
92
  readonly eventLog?: EventLog;
92
93
  }
93
94
 
94
- function requireTenant(value: string | undefined): string {
95
- if (!value?.trim()) {
96
- throw new CapabilityError("founder-cemetery", "Founder Cemetery requires tenant context", {
97
- suggestion: "Pass tenantId so closure artifacts stay tenant-scoped.",
98
- statusCode: 400,
99
- });
100
- }
101
- return value;
102
- }
103
-
104
95
  function slugify(value: string): string {
105
96
  return value
106
97
  .toLowerCase()
@@ -151,7 +142,14 @@ export class FounderCemetery {
151
142
  options: Required<Pick<FounderCemeteryOptions, "tenantId" | "contentStore" | "eventLog">> &
152
143
  Pick<FounderCemeteryOptions, "debugRoot">,
153
144
  ) {
154
- this.#tenantId = requireTenant(options.tenantId);
145
+ this.#tenantId = requireCapabilityTenant({
146
+ explicit: options.tenantId,
147
+ onMissing: () =>
148
+ new CapabilityError("founder-cemetery", "Founder Cemetery requires tenant context", {
149
+ suggestion: "Pass tenantId so closure artifacts stay tenant-scoped.",
150
+ statusCode: 400,
151
+ }),
152
+ });
155
153
  this.#debugRoot = options.debugRoot ?? process.cwd();
156
154
  this.#contentStore = options.contentStore;
157
155
  this.#eventLog = options.eventLog;
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { mkdir } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { appendCapabilityDebug, readCapabilityDebug } from \"@nebutra/capability-kit/debug\";\nimport { ContentStore } from \"@nebutra/content-store\";\nimport { assertPublicDisclosureSafe } from \"@nebutra/ecosystem-safety\";\nimport { CapabilityError } from \"@nebutra/errors\";\nimport { EventLog } from \"@nebutra/event-log\";\nimport { assetId } from \"@nebutra/generation-context\";\n\nexport type CloseMode = \"pause\" | \"archive\" | \"cemetery\";\nexport type CauseCategory =\n | \"pmf\"\n | \"runway\"\n | \"fundraising\"\n | \"competition\"\n | \"founder_conflict\"\n | \"pivot\";\nexport type MemorialPublishLevel = \"private\" | \"community\" | \"public\";\n\nexport interface ClosingFlowRequest {\n readonly companyId: string;\n readonly companyName: string;\n readonly founderIds: readonly string[];\n}\n\nexport interface ClosingFlow {\n readonly companyId: string;\n readonly companyName: string;\n readonly recommendedMode: \"pause\";\n readonly availableModes: readonly CloseMode[];\n readonly requiresCoolingOff: true;\n readonly startedAt: string;\n}\n\nexport interface DeathAnalysisRequest {\n readonly companyId: string;\n readonly companyName: string;\n readonly timelineSummaries: readonly string[];\n}\n\nexport interface DeathCause {\n readonly category: CauseCategory;\n readonly confidence: number;\n readonly evidence: readonly string[];\n}\n\nexport interface DeathAnalysis {\n readonly companyId: string;\n readonly companyName: string;\n readonly causes: readonly DeathCause[];\n readonly narrative: string;\n readonly evidence: readonly string[];\n}\n\nexport interface Lesson {\n readonly title: string;\n readonly lessonText: string;\n readonly evidence: readonly string[];\n}\n\nexport interface PublishMemorialRequest {\n readonly analysis: DeathAnalysis;\n readonly lessons: readonly Lesson[];\n readonly publishLevel: MemorialPublishLevel;\n readonly consentSignatures: readonly string[];\n readonly redactions?: readonly string[];\n}\n\nexport interface Memorial {\n readonly slug: string;\n readonly path: string;\n readonly publishLevel: MemorialPublishLevel;\n readonly coolingOffUntil: string;\n readonly eventId: string;\n readonly lessons: readonly Lesson[];\n readonly redactions: readonly string[];\n}\n\nexport interface FounderCemeteryDoctorReport {\n readonly capability: \"founder-cemetery\";\n readonly ok: boolean;\n readonly checkedAt: string;\n readonly features: readonly string[];\n readonly suggestion?: string;\n}\n\nexport interface FounderCemeteryOptions {\n readonly tenantId?: string;\n readonly debugRoot?: string;\n readonly contentStore?: ContentStore;\n readonly eventLog?: EventLog;\n}\n\nfunction requireTenant(value: string | undefined): string {\n if (!value?.trim()) {\n throw new CapabilityError(\"founder-cemetery\", \"Founder Cemetery requires tenant context\", {\n suggestion: \"Pass tenantId so closure artifacts stay tenant-scoped.\",\n statusCode: 400,\n });\n }\n return value;\n}\n\nfunction slugify(value: string): string {\n return value\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .slice(0, 64);\n}\n\nfunction inferCause(evidence: readonly string[]): DeathCause {\n const combined = evidence.join(\"\\n\").toLowerCase();\n if (combined.includes(\"runway\") || combined.includes(\"cash\")) {\n return { category: \"runway\", confidence: 0.74, evidence };\n }\n if (combined.includes(\"raise\") || combined.includes(\"fund\")) {\n return { category: \"fundraising\", confidence: 0.72, evidence };\n }\n if (combined.includes(\"conflict\")) {\n return { category: \"founder_conflict\", confidence: 0.7, evidence };\n }\n if (combined.includes(\"pivot\")) {\n return { category: \"pmf\", confidence: 0.78, evidence };\n }\n return { category: \"pmf\", confidence: 0.68, evidence };\n}\n\nfunction coolingOffDate(): string {\n return new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString();\n}\n\nfunction memorialDisclosureBody(request: PublishMemorialRequest): string {\n return [\n request.analysis.companyName,\n request.analysis.narrative,\n request.analysis.evidence.join(\"\\n\"),\n request.lessons\n .map((lesson) => [lesson.title, lesson.lessonText, lesson.evidence.join(\"\\n\")].join(\"\\n\"))\n .join(\"\\n\"),\n ].join(\"\\n\");\n}\n\nexport class FounderCemetery {\n readonly #tenantId: string;\n readonly #debugRoot: string;\n readonly #contentStore: ContentStore;\n readonly #eventLog: EventLog;\n\n private constructor(\n options: Required<Pick<FounderCemeteryOptions, \"tenantId\" | \"contentStore\" | \"eventLog\">> &\n Pick<FounderCemeteryOptions, \"debugRoot\">,\n ) {\n this.#tenantId = requireTenant(options.tenantId);\n this.#debugRoot = options.debugRoot ?? process.cwd();\n this.#contentStore = options.contentStore;\n this.#eventLog = options.eventLog;\n }\n\n static async open(\n root = \".nebutra/founder-cemetery\",\n options: Omit<FounderCemeteryOptions, \"contentStore\" | \"eventLog\"> = {},\n ): Promise<FounderCemetery> {\n const tenantId = options.tenantId ?? \"local\";\n await mkdir(root, { recursive: true });\n const contentStore = await ContentStore.open(join(root, \"content\"), { tenantId });\n const eventLog = await EventLog.open(join(root, \"event-log\"), { tenantId });\n return new FounderCemetery({ ...options, tenantId, contentStore, eventLog });\n }\n\n async startClosingFlow(request: ClosingFlowRequest): Promise<ClosingFlow> {\n const flow: ClosingFlow = {\n companyId: request.companyId,\n companyName: request.companyName,\n recommendedMode: \"pause\",\n availableModes: [\"pause\", \"archive\", \"cemetery\"],\n requiresCoolingOff: true,\n startedAt: new Date().toISOString(),\n };\n await this.#debug({ type: \"start_closing_flow\", tenantId: this.#tenantId, ...flow });\n return flow;\n }\n\n async analyzeDeath(request: DeathAnalysisRequest): Promise<DeathAnalysis> {\n const evidence =\n request.timelineSummaries.length > 0\n ? request.timelineSummaries\n : [\"No timeline summaries were provided.\"];\n const cause = inferCause(evidence);\n const analysis: DeathAnalysis = {\n companyId: request.companyId,\n companyName: request.companyName,\n causes: [cause],\n evidence,\n narrative: `${request.companyName} appears to have stalled around ${cause.category}.`,\n };\n await this.#debug({\n type: \"analyze_death\",\n tenantId: this.#tenantId,\n companyId: request.companyId,\n category: cause.category,\n });\n return analysis;\n }\n\n async extractLessons(analysis: DeathAnalysis): Promise<readonly Lesson[]> {\n const title =\n analysis.causes[0]?.category === \"runway\"\n ? \"Validate before scaling burn\"\n : \"Validate demand before widening the pitch\";\n const lesson: Lesson = {\n title,\n lessonText: `${analysis.companyName} should preserve the decision context and avoid repeating the highest-impact ${analysis.causes[0]?.category ?? \"pmf\"} mistake.`,\n evidence: analysis.evidence.slice(0, Math.max(2, analysis.evidence.length)),\n };\n await this.#debug({\n type: \"extract_lessons\",\n tenantId: this.#tenantId,\n companyId: analysis.companyId,\n lessons: 1,\n });\n return [lesson];\n }\n\n async publishMemorial(request: PublishMemorialRequest): Promise<Memorial> {\n if (request.consentSignatures.length === 0) {\n throw new CapabilityError(\"founder-cemetery\", \"Memorial publication requires consent\", {\n suggestion:\n \"Collect founder consent signatures before publishing or keep the company paused.\",\n statusCode: 400,\n });\n }\n if (request.publishLevel !== \"private\") {\n assertPublicDisclosureSafe({\n capability: \"founder-cemetery\",\n content: memorialDisclosureBody(request),\n ...(request.redactions !== undefined ? { redactions: request.redactions } : {}),\n suggestion: \"Review detected private values and pass redactions before publishing.\",\n });\n }\n\n const slug = slugify(request.analysis.companyName) || request.analysis.companyId;\n const path = `cemetery/${slug}.json`;\n const memorial = {\n slug,\n companyId: request.analysis.companyId,\n companyName: request.analysis.companyName,\n publishLevel: request.publishLevel,\n coolingOffUntil: coolingOffDate(),\n consentSignatures: request.consentSignatures,\n redactions: request.redactions ?? [],\n causes: request.analysis.causes,\n lessons: request.lessons,\n narrative: request.analysis.narrative,\n };\n const snapshot = `${JSON.stringify(memorial, null, 2)}\\n`;\n await this.#contentStore.write(path, snapshot);\n const eventId = await this.#eventLog.commit({\n traceId: assetId(\"founder_cemetery_publish\", slug),\n kind: \"content_write\",\n affected: [path],\n parent: null,\n snapshot: { [path]: snapshot },\n });\n await this.#debug({\n type: \"publish_memorial\",\n tenantId: this.#tenantId,\n companyId: request.analysis.companyId,\n publishLevel: request.publishLevel,\n });\n return {\n slug,\n path,\n publishLevel: request.publishLevel,\n coolingOffUntil: memorial.coolingOffUntil,\n eventId,\n lessons: request.lessons,\n redactions: memorial.redactions,\n };\n }\n\n async doctor(): Promise<FounderCemeteryDoctorReport> {\n const report: FounderCemeteryDoctorReport = {\n capability: \"founder-cemetery\",\n ok: true,\n checkedAt: new Date().toISOString(),\n features: [\"pause-first\", \"death-analysis\", \"lessons\", \"memorial\", \"cooling-off\"],\n suggestion:\n \"Local memorial artifacts are active; global search and video recap remain lower-layer handoffs.\",\n };\n await this.#debug({ type: \"doctor\", tenantId: this.#tenantId });\n return report;\n }\n\n async close(): Promise<void> {\n await this.#contentStore.close();\n }\n\n async #debug(entry: Record<string, unknown>): Promise<void> {\n await appendCapabilityDebug(\"founder-cemetery\", entry, { root: this.#debugRoot });\n }\n}\n\nexport async function readFounderCemeteryDebug(\n root = process.cwd(),\n limit = 20,\n): Promise<unknown[]> {\n return readCapabilityDebug(\"founder-cemetery\", { root, limit });\n}\n"],"mappings":";AAAA,SAAS,aAAa;AACtB,SAAS,YAAY;AACrB,SAAS,uBAAuB,2BAA2B;AAC3D,SAAS,oBAAoB;AAC7B,SAAS,kCAAkC;AAC3C,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAsFxB,SAAS,cAAc,OAAmC;AACxD,MAAI,CAAC,OAAO,KAAK,GAAG;AAClB,UAAM,IAAI,gBAAgB,oBAAoB,4CAA4C;AAAA,MACxF,YAAY;AAAA,MACZ,YAAY;AAAA,IACd,CAAC;AAAA,EACH;AACA,SAAO;AACT;AAEA,SAAS,QAAQ,OAAuB;AACtC,SAAO,MACJ,YAAY,EACZ,QAAQ,eAAe,GAAG,EAC1B,QAAQ,YAAY,EAAE,EACtB,MAAM,GAAG,EAAE;AAChB;AAEA,SAAS,WAAW,UAAyC;AAC3D,QAAM,WAAW,SAAS,KAAK,IAAI,EAAE,YAAY;AACjD,MAAI,SAAS,SAAS,QAAQ,KAAK,SAAS,SAAS,MAAM,GAAG;AAC5D,WAAO,EAAE,UAAU,UAAU,YAAY,MAAM,SAAS;AAAA,EAC1D;AACA,MAAI,SAAS,SAAS,OAAO,KAAK,SAAS,SAAS,MAAM,GAAG;AAC3D,WAAO,EAAE,UAAU,eA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