Skip to content

Frappucc1no/recall-loom / skills/recallloom

recallloom

Flagged

Use when a task involves continuing a project, restoring project context, maintaining file-based project memory, updating current-state summaries, or recording meaningful progress across sessions. Works best for long-horizon, file-based projects and supports research writing, product document collaboration, software project coordination, and broader cross-functional project continuity.

FileKindSize
LICENSEother10.0 KB
NOTICEother190 B
SKILL.mdskill md24.5 KB
managed-assets.jsonconfig1.1 KB
native_commands/README.mdmarkdown1.2 KB
native_commands/claude-code/rl-init.md.tmplother323 B
native_commands/claude-code/rl-resume.md.tmplother290 B
native_commands/claude-code/rl-status.md.tmplother299 B
native_commands/claude-code/rl-validate.md.tmplother277 B
native_commands/gemini-cli/rl-init.toml.tmplother295 B
native_commands/gemini-cli/rl-resume.toml.tmplother262 B
native_commands/gemini-cli/rl-status.toml.tmplother271 B
native_commands/gemini-cli/rl-validate.toml.tmplother249 B
native_commands/opencode/rl-init.md.tmplother286 B
native_commands/opencode/rl-resume.md.tmplother253 B
native_commands/opencode/rl-status.md.tmplother262 B
native_commands/opencode/rl-validate.md.tmplother240 B
package-metadata.jsonconfig1.0 KB
profiles/general-project-continuity.mdmarkdown2.4 KB
profiles/product-doc-collaboration.mdmarkdown2.2 KB
profiles/research-writing.mdmarkdown2.1 KB
profiles/software-project-coordination.mdmarkdown2.8 KB
references/anti-patterns.mdmarkdown2.5 KB
references/contract-registry.jsonconfig7.7 KB
references/contract-schema.jsonconfig7.7 KB
references/file-contracts.mdmarkdown23.4 KB
references/operation-playbooks.mdmarkdown26.5 KB
references/package-support-policy.mdmarkdown9.4 KB
references/profiles.mdmarkdown2.0 KB
references/protocol.mdmarkdown20.5 KB
references/recording-workflow.mdmarkdown9.9 KB
scripts/_common.pyscript87.8 KB
scripts/append_daily_log_entry.pyscript40.4 KB
scripts/archive_logs.pyscript17.6 KB
scripts/commit_context_file.pyscript31.6 KB
scripts/core/__init__.pyscript39 B
scripts/core/bridge/__init__.pyscript30 B
scripts/core/bridge/blocks.pyscript6.9 KB
scripts/core/coldstart/__init__.pyscript26 B
scripts/core/coldstart/sources.pyscript22.4 KB
scripts/core/coldstart/structured.pyscript5.4 KB
scripts/core/continuity/__init__.pyscript34 B
scripts/core/continuity/daily_log.pyscript16.1 KB
scripts/core/continuity/freshness.pyscript15.3 KB
scripts/core/continuity/preflight.pyscript41.0 KB
scripts/core/continuity/quick_summary.pyscript10.9 KB
scripts/core/continuity/workday.pyscript12.3 KB
scripts/core/errors.pyscript838 B
scripts/core/failure/__init__.pyscript47 B
scripts/core/failure/context.pyscript5.6 KB
scripts/core/failure/contracts.pyscript108.6 KB
scripts/core/output/__init__.pyscript35 B
scripts/core/output/confirmation_material.pyscript15.0 KB
scripts/core/output/privacy.pyscript10.5 KB
scripts/core/output/user_status.pyscript5.8 KB
scripts/core/protocol/__init__.pyscript60 B
scripts/core/protocol/contracts.pyscript8.3 KB
scripts/core/protocol/markers.pyscript4.9 KB
scripts/core/protocol/sections.pyscript3.4 KB
scripts/core/protocol/templates.pyscript6.5 KB
scripts/core/provenance/__init__.pyscript67 B
scripts/core/provenance/bindings.pyscript13.2 KB
scripts/core/provenance/evidence.pyscript58.2 KB
scripts/core/provenance/inconsistent_review.pyscript85.6 KB
scripts/core/provenance/receipts.pyscript20.2 KB
scripts/core/provenance/state.pyscript38.0 KB
scripts/core/provenance/store.pyscript43.8 KB
scripts/core/recording/__init__.pyscript1.6 KB
scripts/core/recording/contracts.pyscript31.7 KB
scripts/core/recording/daily_log_append.pyscript30.2 KB
scripts/core/recording/managed_write.pyscript52.8 KB
scripts/core/recording/planner.pyscript20.6 KB
scripts/core/recording/privacy.pyscript1.7 KB
scripts/core/recording/suggestions.pyscript8.6 KB
scripts/core/recording/transaction.pyscript93.3 KB
scripts/core/registry/__init__.pyscript58 B
scripts/core/registry/loader.pyscript18.8 KB
scripts/core/safety/__init__.pyscript30 B
scripts/core/safety/attached_text.pyscript6.9 KB
scripts/core/safety/input_transport.pyscript61.0 KB
scripts/core/safety/prepared_input.pyscript24.4 KB
scripts/core/safety/scratch_residue.pyscript18.8 KB
scripts/core/support/__init__.pyscript53 B
scripts/core/support/cache.pyscript19.4 KB
scripts/core/support/policy.pyscript8.8 KB
scripts/core/trust/__init__.pyscript42 B
scripts/core/trust/state.pyscript4.1 KB
scripts/core/workspace/__init__.pyscript33 B
scripts/core/workspace/atomic_io.pyscript12.2 KB
scripts/core/workspace/runtime.pyscript54.7 KB
scripts/detect_project_root.pyscript3.4 KB
scripts/generate_coldstart_proposal.pyscript7.5 KB
scripts/init_context.pyscript37.8 KB
scripts/install_native_commands.pyscript31.5 KB
scripts/manage_entry_bridge.pyscript20.8 KB
scripts/preflight_context_check.pyscript10.1 KB
scripts/prepare_recovery_promotion.pyscript22.1 KB
scripts/query_continuity.pyscript84.1 KB
scripts/recallloom.pyscript233.7 KB
scripts/recommend_workday.pyscript17.6 KB
scripts/record_recovery_review.pyscript50.9 KB
scripts/remove_context.pyscript13.9 KB
scripts/repair_daily_log_cursor.pyscript33.7 KB
scripts/stage_recovery_proposal.pyscript17.5 KB
scripts/summarize_continuity_status.pyscript43.7 KB
scripts/sync_contract_docs.pyscript11.3 KB
scripts/unlock_write_lock.pyscript8.1 KB
scripts/validate_context.pyscript54.9 KB

scripts/core/failure/context.py

View on GitHub
"""Typed operation context for RecallLoom failure contracts (single owner).

Frozen by the v0.5.0 construction contract (unique construction plan §7.4 and
product plan V2 R4): one immutable ``OperationContext`` carries
``command, operation, write_type, input_mode, stage`` from the earliest point
where the input is known, and the context -> legacy-details mapping lives here
alone. Helpers, dispatcher adapters, and the failure-contract registry must not
hand-assemble those fields or re-derive them from error strings or helper
names.

This module is stdlib-only by contract: it must never import from ``scripts/``
or ``_common.py`` so every layer (helpers, dispatcher, core) can depend on it
without an import cycle.
"""

from __future__ import annotations

from dataclasses import dataclass
from types import MappingProxyType
from typing import Optional


# Typed operation domain (frozen §7.4 / R4): the three mutation operations.
OPERATION_MANAGED_WRITE = "managed_write"
OPERATION_DAILY_LOG_APPEND = "daily_log_append"
OPERATION_POST_APPEND_SUMMARY_SYNC = "post_append_summary_sync"
OPERATION_DOMAIN = frozenset(
    (
        OPERATION_MANAGED_WRITE,
        OPERATION_DAILY_LOG_APPEND,
        OPERATION_POST_APPEND_SUMMARY_SYNC,
    )
)

# Public command spellings of the three mutation operations (frozen §7.2).
COMMAND_WRITE = "write"
COMMAND_APPEND = "append"
COMMAND_SYNC_CURRENT_STATE_AFTER_APPEND = "sync-current-state-after-append"
COMMAND_DOMAIN = frozenset(
    (
        COMMAND_WRITE,
        COMMAND_APPEND,
        COMMAND_SYNC_CURRENT_STATE_AFTER_APPEND,
    )
)

# R4 failure-stage domain (frozen).
STAGE_INPUT = "input"
STAGE_PREFLIGHT = "preflight"
STAGE_LOCK = "lock"
STAGE_REVISION = "revision"
STAGE_CURSOR = "cursor"
STAGE_TARGET = "target"
STAGE_STATE = "state"
STAGE_POST_HASH = "post_hash"
STAGE_RECEIPT = "receipt"
STAGE_SUPPORT = "support"
STAGE_DOMAIN = frozenset(
    (
        STAGE_INPUT,
        STAGE_PREFLIGHT,
        STAGE_LOCK,
        STAGE_REVISION,
        STAGE_CURSOR,
        STAGE_TARGET,
        STAGE_STATE,
        STAGE_POST_HASH,
        STAGE_RECEIPT,
        STAGE_SUPPORT,
    )
)

# Single-owner typed -> legacy spelling mapping. The legacy strings are the
# exact v0.4.8.3 public payload vocabulary and must remain byte-identical
# (managed_write intentionally keeps the historical "managed_file_commit").
LEGACY_COMMAND_BY_OPERATION = MappingProxyType(
    {
        OPERATION_MANAGED_WRITE: COMMAND_WRITE,
        OPERATION_DAILY_LOG_APPEND: COMMAND_APPEND,
        OPERATION_POST_APPEND_SUMMARY_SYNC: COMMAND_SYNC_CURRENT_STATE_AFTER_APPEND,
    }
)
LEGACY_OPERATION_BY_OPERATION = MappingProxyType(
    {
        OPERATION_MANAGED_WRITE: "managed_file_commit",
        OPERATION_DAILY_LOG_APPEND: "daily_log_append",
        OPERATION_POST_APPEND_SUMMARY_SYNC: "post_append_summary_sync",
    }
)


def _require_typed_operation(operation: str) -> str:
    if operation not in OPERATION_DOMAIN:
        raise ValueError(f"unknown typed operation: {operation!r}")
    return operation


def legacy_command_for(operation: str) -> str:
    """Return the legacy public command spelling for a typed operation."""
    return LEGACY_COMMAND_BY_OPERATION[_require_typed_operation(operation)]


def legacy_operation_for(operation: str) -> str:
    """Return the legacy public operation spelling for a typed operation."""
    return LEGACY_OPERATION_BY_OPERATION[_require_typed_operation(operation)]


@dataclass(frozen=True)
class OperationContext:
    """Immutable typed failure context (frozen §7.4 fields).

    Created at the earliest point where the input is known and passed through
    layers verbatim. ``operation`` and ``stage`` are validated against their
    frozen domains; ``command`` must be the operation's public command
    spelling so the context can never mix one operation's command with
    another's identity. ``write_type`` and ``input_mode`` are free-form
    (not frozen domains) and may be ``None`` when not yet known.
    """

    command: str
    operation: str
    write_type: Optional[str]
    input_mode: Optional[str]
    stage: str

    def __post_init__(self) -> None:
        _require_typed_operation(self.operation)
        if self.stage not in STAGE_DOMAIN:
            raise ValueError(f"unknown failure stage: {self.stage!r}")
        canonical_command = LEGACY_COMMAND_BY_OPERATION[self.operation]
        if self.command != canonical_command:
            raise ValueError(
                f"command {self.command!r} does not match operation "
                f"{self.operation!r} (expected {canonical_command!r})"
            )
        for field_name in ("write_type", "input_mode"):
            value = getattr(self, field_name)
            if value is not None and not isinstance(value, str):
                raise TypeError(f"{field_name} must be a string or None")

    @property
    def legacy_operation(self) -> str:
        """The legacy v0.4.8.3 operation spelling for this context."""
        return LEGACY_OPERATION_BY_OPERATION[self.operation]

    def legacy_details_fields(self) -> dict[str, str]:
        """Project the legacy public details fields, in legacy key order.

        Emits exactly the keys v0.4.8.3 payloads carry: ``command`` and
        ``operation`` always, ``write_type`` / ``input_mode`` only when known.
        ``stage`` is typed-context only and is never emitted into legacy
        details.
        """
        fields = {
            "command": self.command,
            "operation": self.legacy_operation,
        }
        if self.write_type is not None:
            fields["write_type"] = self.write_type
        if self.input_mode is not None:
            fields["input_mode"] = self.input_mode
        return fields
add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks.Stars: 115kUpdated Claude CodeCodexVerifiedInstall