jeeves-meta-monorepo
    Preparing search index...

    Function actualStaleness

    • Compute actual staleness in seconds (now minus _generatedAt).

      Never-synthesized metas are capped at MAX_STALENESS_SECONDS (1 year) so that depth weighting can differentiate them. Without bounding, Infinity * depthFactor = Infinity for all depths.

      Parameters

      • meta: {
            _architect?: string;
            _architectTokens?: number;
            _architectTokensAvg?: number;
            _archived?: boolean;
            _archivedAt?: string;
            _builder?: string;
            _builderTokens?: number;
            _builderTokensAvg?: number;
            _content?: string;
            _critic?: string;
            _criticTokens?: number;
            _criticTokensAvg?: number;
            _crossRefs?: string[];
            _depth?: number;
            _emphasis?: number;
            _error?: {
                code: string;
                message: string;
                step: "architect" | "builder" | "critic";
            };
            _feedback?: string;
            _generatedAt?: string;
            _id?: string;
            _state?: unknown;
            _steer?: string;
            _structureHash?: string;
            _synthesisCount?: number;
            [key: string]: unknown;
        }

        Current meta.json content.

        • [key: string]: unknown
        • Optional_architect?: string

          Architect system prompt used this turn. Defaults from config.

        • Optional_architectTokens?: number

          Token count from last architect subprocess call.

        • Optional_architectTokensAvg?: number

          Exponential moving average of architect token usage (decay 0.3).

        • Optional_archived?: boolean

          Present and true on archive snapshots. Distinguishes live vs. archived metas.

        • Optional_archivedAt?: string

          Timestamp when this snapshot was archived. ISO 8601.

        • Optional_builder?: string

          Task brief generated by the architect. Cached and reused across cycles; regenerated only when triggered.

        • Optional_builderTokens?: number

          Token count from last builder subprocess call.

        • Optional_builderTokensAvg?: number

          Exponential moving average of builder token usage (decay 0.3).

        • Optional_content?: string

          Narrative synthesis output. Rendered by watcher for embedding.

        • Optional_critic?: string

          Critic system prompt used this turn. Defaults from config.

        • Optional_criticTokens?: number

          Token count from last critic subprocess call.

        • Optional_criticTokensAvg?: number

          Exponential moving average of critic token usage (decay 0.3).

        • Optional_crossRefs?: string[]

          Explicit cross-references to other meta owner paths. Referenced metas' _content is included as architect/builder context.

        • Optional_depth?: number

          Scheduling priority. Higher = updates more often. Negative allowed; normalized to min 0 at scheduling time.

        • Optional_emphasis?: number

          Emphasis multiplier for depth weighting in scheduling. Default 1. Higher values increase this meta's scheduling priority relative to its depth. Set to 0.5 to halve the depth effect, 2 to double it, 0 to ignore depth entirely for this meta.

        • Optional_error?: { code: string; message: string; step: "architect" | "builder" | "critic" }

          Structured error from last cycle. Present when a step failed. Cleared on successful cycle.

          • code: string

            Error classification code.

          • message: string

            Human-readable error message.

          • step: "architect" | "builder" | "critic"

            Which step failed: 'architect', 'builder', or 'critic'.

        • Optional_feedback?: string

          Critic evaluation of the last synthesis.

        • Optional_generatedAt?: string

          Timestamp of last synthesis. ISO 8601.

        • Optional_id?: string

          Stable identity. Auto-generated on first synthesis if not provided.

        • Optional_state?: unknown

          Opaque state carried across synthesis cycles for progressive work. Set by the builder, passed back as context on next cycle.

        • Optional_steer?: string

          Human-provided steering prompt. Optional.

        • Optional_structureHash?: string

          Hash of sorted file listing in scope. Detects directory structure changes that trigger an architect re-run.

        • Optional_synthesisCount?: number

          Cycles since last architect run. Reset to 0 when architect runs. Used with architectEvery to trigger periodic re-prompting.

      Returns number

      Staleness in seconds, capped at 1 year for never-synthesized metas.