Skip to content

Commit 70d4704

Browse files
lalaluneclaude
andcommitted
cleanup: strip wave-reference comments + slop JSDoc
Remove internal milestone labels (Wave-1, W1-A, W2-D, W3-C, etc.) from code comments and JSDoc across personality, scenario-runner, app-lifeops, and plugin-health. Remove duplicate PersonalityStore.clearAll() method (dead code — no callers; clear() is the used path). Strip narration from judge.ts parseJudgeJson comment. Update section headers in contract-stubs and default-packs/index to reflect current state rather than pending work. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 22a5c5a commit 70d4704

18 files changed

Lines changed: 66 additions & 138 deletions

File tree

packages/core/src/features/advanced-capabilities/personality/services/personality-store.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ function clone(slot: PersonalitySlot): PersonalitySlot {
3232
/**
3333
* Structured store for personality slots (user + global) and named profiles.
3434
*
35-
* Skeleton-quality persistence: state is held in-memory and mirrored as
36-
* agent memories so it survives a runtime reload. A future Wave-3 followup
37-
* will move this to a dedicated table with proper indexes.
35+
* Persistence is in-memory, mirrored as agent memories so state survives a
36+
* runtime reload.
3837
*/
3938
export class PersonalityStore extends Service {
4039
static serviceType = PersonalityServiceType.PERSONALITY_STORE;
@@ -300,16 +299,6 @@ export class PersonalityStore extends Service {
300299
return { before, after };
301300
}
302301

303-
/**
304-
* Clear every in-memory slot and audit entry, leaving the named-profile
305-
* registry intact. Used by the benchmark server between scenarios so
306-
* personality state from one scenario does not bleed into the next.
307-
*/
308-
clearAll(): void {
309-
this.slots.clear();
310-
this.audit = [];
311-
}
312-
313302
async stop(): Promise<void> {
314303
logger.debug("PersonalityStore stopped");
315304
}

packages/scenario-runner/src/judge.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ function judgeResponseToResult(
5656
}
5757

5858
function parseJudgeJson(raw: string): JudgeResult | null {
59-
// Kept for the non-Cerebras path (runtime.useModel fallback). Uses the
60-
// same tolerant parser the shared CerebrasJudge transport uses.
6159
const balanced = extractBalancedJsonObject(raw);
6260
if (!balanced) return null;
6361
let parsed: Record<string, unknown>;

plugins/app-lifeops/src/default-packs/contract-stubs.ts

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
/**
2-
* Wave-1 contract stubs for default-pack consumers.
2+
* Canonical contract types for default-pack consumers.
33
*
4-
* These types mirror the **frozen** signatures in
5-
* `eliza/plugins/app-lifeops/docs/audit/wave1-interfaces.md` so this agent
6-
* (W1-D) can ship default packs without blocking on W1-A's spine landing
7-
* first.
4+
* These types define the frozen `ScheduledTask`, `ScheduledTaskRunner`,
5+
* `AnchorConsolidationPolicy`, `RecentTaskStatesProvider`,
6+
* `RelationshipStore`, and `ConnectorRegistry` shapes used by all default
7+
* packs. Do not edit these definitions without updating all pack consumers.
88
*
9-
* **STUB STATUS:**
10-
* - `ScheduledTask`, `ScheduledTaskRunner`, `AnchorConsolidationPolicy`,
11-
* `EscalationStep`, `TerminalState`, `GateDecision` come from W1-A's
12-
* `src/lifeops/scheduled-task/types.ts` once it lands.
13-
* - `RecentTaskStatesProvider` comes from W1-C.
14-
* - `RelationshipStore` / `RelationshipFilter` come from W1-E.
15-
* - `ConnectorRegistry` / `ConnectorContribution` come from W1-F.
16-
*
17-
* Once those modules ship, this file flips to `export type ... from
18-
* "<owner-module>"` re-exports (the integration gate in §4 of
19-
* `IMPLEMENTATION_PLAN.md` enforces the swap).
20-
*
21-
* The on-the-wire shapes here are copies of the wave1-interfaces.md `§1`,
22-
* `§2.3`, `§3.x`, `§4` definitions — do not edit them in place. If the
23-
* upstream contract changes, the integration gate routes the change through
24-
* W1-A / W1-C / W1-E / W1-F first.
9+
* Reference: `docs/audit/wave1-interfaces.md`.
2510
*/
2611

27-
// -- §1 W1-A — ScheduledTask --
12+
// -- §1 ScheduledTask --
2813

2914
export type TerminalState =
3015
| "completed"
@@ -175,7 +160,7 @@ export interface ScheduledTask {
175160
metadata?: Record<string, unknown>;
176161
}
177162

178-
// W1-D ships pack records as the input to `ScheduledTaskRunner.schedule`,
163+
// Pack records are the input to `ScheduledTaskRunner.schedule`,
179164
// i.e. `Omit<ScheduledTask, "taskId" | "state">`. This alias is the canonical
180165
// "default-pack record" type.
181166
export type ScheduledTaskSeed = Omit<ScheduledTask, "taskId" | "state">;
@@ -190,7 +175,7 @@ export interface AnchorConsolidationPolicy {
190175
sortBy?: "priority_desc" | "fired_at_asc";
191176
}
192177

193-
// -- §3.4 default escalation ladders (frozen in wave1-interfaces.md §3.4) --
178+
// -- §3.4 default escalation ladders --
194179

195180
export type DefaultEscalationLadderKey =
196181
| "priority_low_default"
@@ -201,7 +186,7 @@ export interface EscalationLadder {
201186
steps: EscalationStep[];
202187
}
203188

204-
// -- §4.4 RecentTaskStatesProvider (W1-C) --
189+
// -- §4.4 RecentTaskStatesProvider --
205190

206191
export interface RecentTaskStatesSummary {
207192
summary: string;
@@ -221,7 +206,7 @@ export interface RecentTaskStatesProvider {
221206
}): Promise<RecentTaskStatesSummary>;
222207
}
223208

224-
// -- §2.3 RelationshipStore (W1-E) — only the surface W1-D consumes --
209+
// -- §2.3 RelationshipStore --
225210

226211
export interface RelationshipStateStub {
227212
lastObservedAt?: string;
@@ -261,7 +246,7 @@ export interface RelationshipStoreStub {
261246
list(filter?: RelationshipFilterStub): Promise<RelationshipStub[]>;
262247
}
263248

264-
// -- §3.1 ConnectorRegistry (W1-F) — only the surface W1-D consumes --
249+
// -- §3.1 ConnectorRegistry --
265250

266251
export interface ConnectorContributionStub {
267252
kind: string;

plugins/app-lifeops/src/default-packs/escalation-ladders.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
/**
2-
* Default escalation ladders registered by W1-D.
2+
* Default escalation ladders.
33
*
4-
* Frozen by wave1-interfaces.md §3.4. Wave-1 ships the ladder data here;
5-
* once W1-F's `src/lifeops/escalation-ladders.ts` lands, this module flips
6-
* to a re-export per the integration gate (`IMPLEMENTATION_PLAN.md` §4).
7-
*
8-
* Ladders shipped:
4+
* Frozen shapes per `docs/audit/wave1-interfaces.md` §3.4.
95
*
106
* ```
117
* priority_low_default: { steps: [] }
@@ -16,9 +12,6 @@
1612
* { delayMinutes: 45, channelKey: "imessage", intensity: "urgent" },
1713
* ]}
1814
* ```
19-
*
20-
* Stub status: see `contract-stubs.ts` — `EscalationStep` /
21-
* `EscalationLadder` types are local until W1-A's `escalation.ts` lands.
2215
*/
2316

2417
import type {

plugins/app-lifeops/src/default-packs/index.ts

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
/**
2-
* Default-pack registration entry point (W1-D).
2+
* Default-pack registration entry point.
33
*
4-
* The W1-A spine consumes `getAllDefaultPacks()` to seed records on first-run.
5-
* First-run customize consumes `getOfferedDefaultPacks()` to render the
6-
* pick-list. The lint script (`scripts/lint-default-packs.mjs`) consumes
7-
* `getAllDefaultPacks()` and runs `lintPacks()` against the result.
8-
*
9-
* Stub status: see `contract-stubs.ts` — all imported types are local Wave-1
10-
* stubs that match the frozen wave1-interfaces.md signatures. Once W1-A,
11-
* W1-C, W1-E, W1-F land, the stubs flip to re-exports from the owner
12-
* modules; consumers of this index do not change.
4+
* `getAllDefaultPacks()` is consumed by the runner spine to seed records on
5+
* first-run. `getOfferedDefaultPacks()` renders the first-run pick-list. The
6+
* lint script (`scripts/lint-default-packs.mjs`) consumes `getAllDefaultPacks()`
7+
* and runs `lintPacks()` against the result.
138
*/
149

1510
export type {
@@ -95,10 +90,10 @@ import {
9590
import type { DefaultPack } from "./registry-types.js";
9691

9792
/**
98-
* The canonical list of W1-D default packs in the order they are offered.
93+
* The canonical list of default packs in the order they are offered.
9994
*
100-
* `plugin-health` (W1-B) registers its own packs (`bedtime`, `wake-up`,
101-
* `sleep-recap`) through the same registry — they do not appear here.
95+
* `plugin-health` registers its own packs (`bedtime`, `wake-up`, `sleep-recap`)
96+
* through the same registry — they do not appear here.
10297
*/
10398
export const DEFAULT_PACKS: ReadonlyArray<DefaultPack> = [
10499
dailyRhythmPack,

plugins/app-lifeops/src/lifeops/checkin/types.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,9 @@ export interface CheckinCollectorErrors {
8383
* sleep stats today, and the night path falls back gracefully when the
8484
* baseline has fewer than 5 episodes (`baseline === null`).
8585
*
86-
* Moved to `@elizaos/plugin-health` in Wave-1 (W1-B). Re-exported here for
87-
* backward compatibility with the existing `from "./types.js"` importers,
88-
* and brought into local scope for downstream `SleepRecap | null` usages
89-
* inside this file.
86+
* Canonical home: `@elizaos/plugin-health`. Re-exported here for backward
87+
* compatibility with `from "./types.js"` importers, and brought into local
88+
* scope for downstream `SleepRecap | null` usages inside this file.
9089
*/
9190
import type { SleepRecap } from "@elizaos/plugin-health";
9291

plugins/app-lifeops/src/lifeops/feature-flags.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export type LifeOpsFeatureKey =
4949
* `FeatureFlagRegistry` is the source of truth for what flags exist —
5050
* including 3rd-party plugin contributions — so anywhere that ingests a
5151
* key from outside (chat input, REST routes, dev-registries view) uses
52-
* `LifeOpsFeatureFlagKey`. Parallel to W2-D's
52+
* `LifeOpsFeatureFlagKey`. Parallel to
5353
* `LifeOpsBusFamily = LifeOpsTelemetryFamily | string`.
5454
*/
5555
export type LifeOpsFeatureFlagKey = LifeOpsFeatureKey | string;

plugins/app-lifeops/src/lifeops/identity-observations/observer.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
/**
22
* Identity-observation pipeline routing through EntityStore + RelationshipStore.
33
*
4-
* Replaces the prior `identity-observations.ts` planner-flow (kept in-place
5-
* with a deletion deferred to W2-D). New code should call `observeIdentity`
6-
* here; legacy code paths still compile against the original module.
7-
*
8-
* The observer takes platform-side observations (gmail-sender, phone-contact,
9-
* chat-identity, etc.), normalizes them via the existing
10-
* `normalizeIdentityObservation` helpers, and routes the result through:
4+
* Takes platform-side observations (gmail-sender, phone-contact, chat-identity,
5+
* etc.), normalizes them via `normalizeIdentityObservation` helpers, and routes
6+
* the result through:
117
* 1. `EntityStore.observeIdentity` — collapses identities by (platform, handle)
12-
* 2. `RelationshipStore.observe` — strengthens edges that already exist
8+
* 2. `RelationshipStore.observe` — strengthens edges that already exist
139
*/
1410

1511
import type { EntityStore } from "../entities/store.js";

plugins/app-lifeops/src/lifeops/schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import {
3434
export const appLifeopsPgSchema = pgSchema("app_lifeops");
3535

3636
// ---------------------------------------------------------------------------
37-
// Wave 1+ additions — relationships, X read, screen time, scheduling.
3837
// All life_* prefix, text IDs, ISO timestamps.
3938
// ---------------------------------------------------------------------------
4039

plugins/app-lifeops/src/lifeops/seed-routines.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
/**
22
* Seed routine templates offered during first-run onboarding.
33
*
4-
* **Wave-1 transitional alias:** the canonical source of truth for the 8
5-
* habit starters is `src/default-packs/habit-starters.ts` (W1-D). This file
6-
* preserves the legacy `RoutineSeedTemplate` shape (rooted in
7-
* `CreateLifeOpsDefinitionRequest`) so existing callers
8-
* (`service-mixin-definitions.ts`, `client-lifeops.ts`,
9-
* `service-mixin-reminders.ts`) compile.
10-
*
11-
* Wave-2 (W2-A migration) deletes this file entirely once those callers
12-
* move to the `ScheduledTaskRunner` API and read from
13-
* `default-packs/habit-starters.ts` directly.
14-
*
15-
* Do **not** add new templates here — author them in
16-
* `default-packs/habit-starters.ts` instead.
4+
* Canonical source of truth for habit starters: `src/default-packs/habit-starters.ts`.
5+
* Do not add new templates here — author them there instead.
176
*/
187

198
import type { CreateLifeOpsDefinitionRequest } from "../contracts/index.js";
@@ -25,11 +14,8 @@ import {
2514

2615
/**
2716
* Canonical title for the seeded stretch routine. Exported so the
28-
* reminder dispatch loop can apply stretch-specific gating (busy-day
29-
* skip, walk-out reset) without grep-matching string literals.
30-
*
31-
* Wave-2: replaced by `task.shouldFire.kind === "stretch.walk_out_reset"`
32-
* (see GAP §2.7 + IMPL §3.4 — title-string match goes away).
17+
* reminder dispatch loop can apply stretch-specific gating without
18+
* grep-matching string literals.
3319
*/
3420
export const STRETCH_ROUTINE_TITLE = "Stretch";
3521

0 commit comments

Comments
 (0)