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/protocol/templates.py

View on GitHub
#!/usr/bin/env python3
"""Template rendering helpers for RecallLoom protocol files."""

from __future__ import annotations

from core.protocol.contracts import (
    CONTEXT_BRIEF_RENDER_ORDER,
    LABELS,
    SECTION_KEYS,
    validate_workspace_language,
)
from core.protocol.markers import (
    daily_log_scaffold_marker,
    file_marker,
    file_state_marker,
    rolling_summary_header,
    section_marker,
)


def render_heading(level: int, heading: str) -> str:
    return "#" * level + " " + heading


def render_section_block(level: int, section_key: str, heading: str, body: list[str] | None = None) -> str:
    lines = [section_marker(section_key), render_heading(level, heading)]
    if body is None:
        lines.extend(["", "-"])
    else:
        lines.extend(["", *body])
    return "\n".join(lines)


def render_context_brief_template(language: str, *, tool_name: str, timestamp: str, workspace_revision: int) -> str:
    language = validate_workspace_language(language)
    labels = LABELS[language]["context_brief"]
    parts = [
        file_marker("context_brief", language),
        file_state_marker(
            revision=1,
            updated_at=timestamp,
            writer_id=tool_name,
            base_workspace_revision=workspace_revision,
        ),
    ]
    for section_key in CONTEXT_BRIEF_RENDER_ORDER:
        parts.append("")
        parts.append(render_section_block(1, section_key, labels[section_key]))
    return "\n".join(parts) + "\n"


def render_rolling_summary_template(
    tool_name: str,
    day: str,
    language: str,
    *,
    timestamp: str,
    workspace_revision: int,
) -> str:
    language = validate_workspace_language(language)
    labels = LABELS[language]["rolling_summary"]
    guidance = {
        "en": {
            "current_state": [
                "Write the validated handoff-first state here:",
                "",
                "- Active state",
                "- Relevant files",
                "- Critical context",
            ],
            "active_judgments": [
                "Record the coordination judgments that matter right now:",
                "",
                "- Key decisions",
                "- Active assumptions",
                "- Tradeoffs in force",
            ],
            "risks_open_questions": [
                "Make blocker visibility explicit:",
                "",
                "- Blocked items",
                "- Open questions",
                "- External dependencies",
            ],
            "next_step": [
                "Describe the handoff-first next move:",
                "",
                "- Active task",
                "- Owner or role when known",
                "- Immediate next action",
            ],
            "recent_pivots": [
                "-",
            ],
        },
        "zh-CN": {
            "current_state": [
                "这里优先写 handoff-first 的已确认当前状态:",
                "",
                "- 当前活跃状态",
                "- 相关文件",
                "- 关键上下文",
            ],
            "active_judgments": [
                "这里记录当前真正影响推进的判断:",
                "",
                "- 关键决策",
                "- 当前假设",
                "- 仍在生效的取舍",
            ],
            "risks_open_questions": [
                "把阻塞与未决问题写清楚:",
                "",
                "- 当前阻塞",
                "- 未决问题",
                "- 外部依赖",
            ],
            "next_step": [
                "这里写 handoff-first 的下一步:",
                "",
                "- 当前任务",
                "- 已知负责人或角色",
                "- 立刻要做的动作",
            ],
            "recent_pivots": [
                "-",
            ],
        },
    }[language]
    parts = [
        file_marker("rolling_summary", language),
        rolling_summary_header(tool_name, day),
        file_state_marker(
            revision=1,
            updated_at=timestamp,
            writer_id=tool_name,
            base_workspace_revision=workspace_revision,
        ),
    ]
    for section_key in SECTION_KEYS["rolling_summary"]:
        parts.append("")
        parts.append(render_section_block(1, section_key, labels[section_key], guidance[section_key]))
    return "\n".join(parts) + "\n"


def render_daily_log_template(language: str, *, tool_name: str, timestamp: str) -> str:
    del tool_name
    del timestamp
    language = validate_workspace_language(language)
    labels = LABELS[language]["daily_log"]
    parts = [
        file_marker("daily_log", language),
        daily_log_scaffold_marker(),
    ]
    for section_key in SECTION_KEYS["daily_log"]:
        parts.append("")
        parts.append(render_section_block(1, section_key, labels[section_key]))
    return "\n".join(parts) + "\n"


def render_update_protocol_template(
    language: str,
    *,
    tool_name: str,
    timestamp: str,
    workspace_revision: int,
) -> str:
    language = validate_workspace_language(language)
    labels = LABELS[language]["update_protocol"]
    parts = [
        file_marker("update_protocol", language),
        file_state_marker(
            revision=1,
            updated_at=timestamp,
            writer_id=tool_name,
            base_workspace_revision=workspace_revision,
        ),
        "",
        render_section_block(1, "project_specific_overrides", labels["title"], labels["body"]),
    ]
    return "\n".join(parts) + "\n"


def render_template(
    file_key: str,
    *,
    tool_name: str,
    day: str,
    language: str,
    timestamp: str,
    workspace_revision: int,
) -> str:
    if file_key == "context_brief":
        return render_context_brief_template(
            language,
            tool_name=tool_name,
            timestamp=timestamp,
            workspace_revision=workspace_revision,
        )
    if file_key == "rolling_summary":
        return render_rolling_summary_template(
            tool_name,
            day,
            language,
            timestamp=timestamp,
            workspace_revision=workspace_revision,
        )
    if file_key == "daily_log":
        return render_daily_log_template(language, tool_name=tool_name, timestamp=timestamp)
    if file_key == "update_protocol":
        return render_update_protocol_template(
            language,
            tool_name=tool_name,
            timestamp=timestamp,
            workspace_revision=workspace_revision,
        )
    raise KeyError(file_key)
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