Логотип Phase Preflight

Phase Preflight

Организация
buriedsignals
phase-preflight

Spotlight Preflight: config detection, sovereign search/fetch backing checks, OSINT skill inventory, OpenKnowledge workspace validation, project setup, integration tiering, resume feedback check

Обзор

Издательburiedsignals
Репозиторийspotlight
Название навыкаphase-preflight
Звёзды
60
Форки
11
Файлы в комплекте
Только инструкции
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Всё необходимое — в инструкциях

    Всё необходимое для модели содержится в инструкциях — никаких дополнительных файлов для синхронизации.

  • Открытый исходный код

    Издатель навыка на GitHub — buriedsignals. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Phase Preflight в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/buriedsignals/spotlight/tree/main/skills/phase-preflight
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/buriedsignals/spotlight.git /tmp/spotlight
mkdir -p .claude/skills
cp -r /tmp/spotlight/skills/phase-preflight .claude/skills/phase-preflight
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Phase Preflight в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Phase Preflight, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Phase Preflight не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Preflight

Run these checks in order. Stop at the first failure.

0. Storage and checkout preconditions

Both checks run before anything else is read or written. They state what must be true; they do not describe how any runtime provides storage or a shell.

Durable case storage

CASE_ROOT (from case_workspace_root, legacy cases_root, or the default cases/, resolved to an absolute path) must be durable, user-owned storage that survives this session. Some runtimes run the agent's shell on a separate, ephemeral filesystem. A case written there validates green, passes every gate, and is destroyed at session end: total evidence loss with no error, on a product whose value is chain of custody.

Confirm it; do not assume it:

  1. Resolve the absolute CASE_ROOT and show it to the user.
  2. Write a probe: write-file("{CASE_ROOT}/.spotlight-durability-probe", "<random nonce> <ISO timestamp>").
  3. Read it back in step 5, before creating CASE_DIR; the nonce must match.
  4. If the path cannot be resolved, is not writable, the read-back fails, or you cannot tell whether the location outlives the session, stop and ask:

"Spotlight needs a case directory on durable, user-owned storage that survives this session. {CASE_ROOT} could not be confirmed. Which absolute path should hold the case files?"

Never choose a fallback location silently. Record the resolved path and the check result in .spotlight-config.json (step 8).

Co-located checkout

skills/, scripts/, integrations/, and schemas/ sit in one checkout, and every execute-shell call in Spotlight runs from a shell whose working directory is that checkout root (AGENTS.md, "Checkout layout"). Confirm:

execute-shell("test -f skills/phase-preflight/SKILL.md && test -f scripts/spotlight-orchestration.py && echo ok")

If this does not print ok, establish such a shell before continuing. Do not rewrite script paths to guessed locations.

A runtime without execute-shell (AGENTS.md, Tool Verb Registry) skips this shell check. It confirms the checkout through its typed tools instead: the Spotlight resolver answering for the active case is enough. If it does not answer, stop.

1. Config check

Use read-file on .spotlight-config.json in the working directory. If it exists and contains valid search_library, vault_path, and case_workspace_root (or legacy cases_root) fields, update last_used to the current timestamp, refresh the storage block from step 0, and skip to step 5 (project setup).

case_workspace_root is the active investigation workspace. vault_path is the durable knowledge vault. Do not write active case files into the vault. At case start, query the vault for prior context; at case end, ask before ingesting verified material into the vault.

2. Search/scrape backing detection

Spotlight is sovereign by default: fetch → Crawl4AI (integrations.scraping, no API key), search → SearXNG (integrations.search, self-hosted). Firecrawl is an optional escape hatch (scrape fallback on a hard bot-block, or a --union search engine) enabled only when FIRECRAWL_API_KEY is present. Check the sovereign backings with:

execute-shell("scripts/spotlight-python -m integrations.scraping https://example.com --provider crawl4ai --no-escalate > /dev/null && echo fetch:ok")   # Crawl4AI, a real fetch
execute-shell("curl -s --get --data-urlencode 'q=wikipedia' --data-urlencode 'format=json' \"${SEARXNG_URL:-http://localhost:8899}/search\" | scripts/spotlight-python -c 'import json,sys; d=json.load(sys.stdin); print(\"searxng results:\", len(d[\"results\"]), \"unresponsive:\", d[\"unresponsive_engines\"])'")   # SearXNG, a real query

Both probes test the backing end to end: an HTTP 200 from SearXNG with zero results (every engine suspended, CAPTCHA-blocked, or crashing) and an installed-but-unusable Crawl4AI are failures, not green.

If the fetch probe fails:

"Crawl4AI cannot fetch on this install. Spotlight's fetch verb uses Crawl4AI. Repair the install with Engine (bsig doctor, then re-apply the Mycroft or Spotlight plan), or set FIRECRAWL_API_KEY to use the Firecrawl fallback."

If SearXNG is unreachable or returns zero results, report the unresponsive engines; search falls back to Firecrawl when FIRECRAWL_API_KEY is set, otherwise report the gap. Proceed once at least one search + one fetch backing is available — a pure-sovereign install (no Firecrawl key) is fully supported.

Apify is a second optional escape hatch — hosted social-media collection actors (X, Instagram, TikTok, Facebook, LinkedIn) used by social-media-intelligence — enabled only when an APIFY_API_TOKEN is configured. Indicator Labs writes keys to the credential file named by env_file in .spotlight-config.json; from-repo users set them in their environment, that file, or the checkout .env. Check presence only; never print a key or open a credential file:

execute-shell('scripts/spotlight-python -m integrations.apify status')   # Apify (optional)

If this prints apify:unavailable, report:

"social-media collection via Apify unavailable — add an Apify token in Indicator Labs or set APIFY_API_TOKEN"

and continue — Apify is never required. Native platform APIs and fetch + manual review remain available (social-media-intelligence, "Pluggable platform scraping").

3. OSINT skill availability

Confirm the following skills resolve via invoke-skill:

  • osint — tool routing and technique catalog
  • investigation-methodology — step-by-step techniques
  • follow-the-money — financial investigation methodology
  • epistemic-grounding — claim-to-evidence grounding and confidence caps
  • shell-safety — safe command construction and destructive-operation probes
  • acquisition-graduation — reusable dev-browser acquisition paths
  • social-media-intelligence — account authenticity, coordination detection

These ship in skills/ in this repo. If your runtime cannot resolve them, fix the skill-loading configuration before proceeding.

Then confirm the local tool index that Methodology falls back to whenever Navigator is not green:

execute-shell("scripts/spotlight-python scripts/osint-tools.py categories")

If it reports index missing, build it once (network, about a minute) before leaving preflight:

execute-shell("uv run --with datasets --with pandas --with pyarrow scripts/osint-tools.py build")

Engine installs do not build this index, so a first case always needs this step.

3.5. Agent skill inventory

No user action required. This step establishes what capabilities your agents have access to before you spawn them.

Agents have access to the following skills by their own invoke-skill calls:

SkillAgent(s)Purpose
acquisition-graduationinvestigator, fact-checkerGraduate repeated dev-browser acquisition paths into durable source/domain guidance
web-archivinginvestigator, fact-checkerArchive all evidence before citing
content-accessinvestigator, fact-checkerWork through paywall hierarchy before marking sources inaccessible
epistemic-groundinginvestigator, fact-checkerTest whether exact evidence actually supports exact claims; cap confidence when grounding is weak
shell-safetyinvestigator, fact-checkerValidate untrusted values before execute-shell; require probes for destructive operations
provenance-signingorchestrator, userBuild a case provenance manifest and optionally hand it to Noosphere C2PA signing
osint, investigation-methodology, follow-the-moneyinvestigatorTool routing + technique catalog
social-media-intelligenceinvestigator, fact-checkerAccount authenticity, coordination detection, narrative tracking

When building spawn prompts, remind agents these are available and expected.

3.6. Parent/child phase contract

Spotlight keeps a one-level physical skill layout, but phase execution has mandatory child-skill loading. Use skills-manifest.json as the maintenance contract and apply this runtime table:

Parent phaseRequired child skillsConditional child skillsValidation
Preflightintegrationsshell-safety if preflight executes dynamic shell values.spotlight-config.json stores full integration status, not only booleans.
Methodologyintegrations, osint, investigation-methodology, epistemic-groundingfollow-the-money, social-media-intelligence, technical-investigation, content-accessmethodology.json includes skills_invoked[] and required Navigator fields when green.
Investigationepistemic-grounding, shell-safety, web-archivingcontent-access, acquisition-graduation, social-media-intelligence, technical-investigationfindings contain evidence refs, archives, confidence caps.
Investigation fact-checkepistemic-grounding, content-access, shell-safetyosint, social-media-intelligence, technical-investigation, web-archivingfact-check output independently checks investigator claims.
Reportreport-drafting, epistemic-groundingprovenance-signing, technical-investigationreport claims map to evidence ledger.
Ingestingestnoneonly verified or explicitly caveated material enters vault.

3.7. Knowledge workspace preflight

Spotlight uses OpenKnowledge as its canonical local knowledge workspace. Confirm that the selected workspace contains .ok/config.yml and that ok --cwd "{workspace_path}" config validate succeeds. If either check fails, stop with the exact repair command from OpenKnowledge; do not silently switch to a different directory or legacy vault backend.

obsidian_legacy remains an explicit migration-only backend. Run an Obsidian CLI check only when that exact backend is recorded in .spotlight-config.json.

4. Vault configuration

Ask the user:

"Which OpenKnowledge workspace should archive verified findings?"

Use the configured workspace by default. Keep Markdown/YAML frontmatter and relative links portable. Tolaria and obsidian_legacy may be selected only through explicit migration configuration; never infer them from directory contents.

5. Project setup

Durability read-back

Before any case directory is created, in every mode:

read-file("{CASE_ROOT}/.spotlight-durability-probe")

The nonce must equal the one written in step 0. If the file is missing or the nonce differs, CASE_ROOT is not durable storage: stop and ask the user for an absolute path, exactly as in step 0. On a match, delete the probe file and continue.

Pi harness case binding

When running in the Pi harness, use only the host's launcher-bound active case. The registered Spotlight tools have already established that exact case and its data/ directory beneath the configured cases root. Do not derive another slug, create or enumerate sibling cases, accept a model-selected case path, or invoke the Python adapter directly.

After the preceding preflight checks, call spotlight_resolve({}) and return its resolution to the dispatcher without inspecting case artifacts or data/orchestration.json.

Case selection on other runtimes

Derive a project slug from the user's lead (lowercase, hyphens, no spaces). Resolve CASE_ROOT from case_workspace_root; if absent, use legacy cases_root; if absent, use cases/. Resolve CASE_DIR = CASE_ROOT/{project}. Create:

{CASE_DIR}/
{CASE_DIR}/data/
{CASE_DIR}/research/
{CASE_DIR}/evidence/
Duplicate project check

If CASE_DIR already exists, prompt:

"An investigation named {project} already exists. Resume the existing investigation, or start fresh?"

If resuming, call the runtime adapter's resolver operation and return its resolution to the dispatcher without inspecting case artifacts or data/orchestration.json. If fresh, back up the existing directory to {CASE_ROOT}/{project}-{timestamp}/ and create a new one.

Active investigation check

Use list-files("{CASE_ROOT}/*") to enumerate case directories, then use the thin Python adapter for each valid case: scripts/spotlight-python scripts/spotlight-orchestration.py status --json {CASE_DIR}. Cases whose returned phase is not complete are active:

"Note: {N} investigation(s) in progress: {names}. Continuing with {project}."

8. Write config

Write .spotlight-config.json via write-file:

json
{
  "search_library": "<detected library>",
  "vault_path": "<user-provided path or ./vault/>",
  "vault_type": "openknowledge | tolaria | obsidian_legacy | directory",
  "case_workspace_root": "<absolute CASE_ROOT from step 0>",
  "cases_root": "<absolute CASE_ROOT from step 0>",
  "storage": {
    "case_root_resolved": "<absolute CASE_ROOT from step 0>",
    "durability": "confirmed",
    "durability_check": "probe write + read-back",
    "durability_checked_at": "<ISO timestamp>"
  },
  "integrations": {
    "osint_navigator": {
      "status": "unknown",
      "checked_at": "<ISO timestamp>",
      "source": "not checked yet",
      "required_in_phase_2": false,
      "reason": "preflight not run yet"
    },
    "rlm": {
      "enabled": false,
      "mode": "off",
      "model": null,
      "prefilter": false,
      "hybrid": false,
      "evidence_boundary": "lead-only; never verified or publishable"
    },
    "decisions": "<preserve the existing block; step 9.1 records the opt-in choice>"
  },
  "sensitive": false,
  "created_at": "<ISO timestamp>",
  "last_used": "<ISO timestamp>",
  "active_project": "<project slug>"
}

9. Integration checks

Check for optional API integrations. None are required for Spotlight to start, but a green OSINT Navigator result becomes mandatory during Methodology tool selection when sensitive mode is false.

Run the manifest-based preflight and parse the osint-navigator entry:

execute-shell("scripts/spotlight-python integrations/preflight.py --model-tier {config.model_tier} --json")

Update .spotlight-config.json with the full status, not a boolean:

json
{
  "integrations": {
    "osint_navigator": {
      "status": "green|yellow|red|unconfigured|dismissed",
      "checked_at": "<ISO timestamp>",
      "source": "integrations/preflight.py --json",
      "required_in_phase_2": true,
      "reason": ""
    }
  }
}

Set required_in_phase_2: true only when ALL hold:

  • model_tier is NOT 12b (the constrained tier dismisses every integration — see below), and
  • sensitive is false, and
  • the osint-navigator preflight entry has status: "green" (needs a subscription entitlement — OSINT_NAV_API_KEY).

Set required_in_phase_2: false and preserve a concrete reason when model_tier is 12b, Navigator is red/yellow, sensitive mode is active, the lead is local-only, or the user explicitly forbids external APIs. On the open tier, Phase-2 tool discovery uses scripts/osint-tools.py find (local SQL index).

Integration tiering (model_tier):

  • 12b — ALL integrations dismissed; native capabilities only (dev-browser, Crawl4AI seam, osint-tools SQL, native verbs). integrations/preflight.py --model-tier 12b forces every integration status: "dismissed".
  • 26b / 31b / frontier / api — integrations on by default except Unpaywall (opt-in), Navigator (entitlement-gated), and Noosphere (opt-in, pending). Scoutpost is not a Spotlight integration.

Also preserve any existing integrations.rlm setup block from .spotlight-config.json. If it is absent, treat RLM as not installed:

json
{
  "integrations": {
    "rlm": {
      "enabled": false,
      "mode": "off",
      "model": null,
      "prefilter": false,
      "hybrid": false,
      "evidence_boundary": "lead-only; never verified or publishable"
    }
  }
}

If integrations.rlm.enabled is true, find the rlm entry in integrations/preflight.py --json and record its status under the same integrations.rlm object as preflight_status, checked_at, source, and reason. Do not ask the user about RLM during Preflight.

9.1. Decision checks — one-time opt-in choice

Find the decisions entry in the same integrations/preflight.py --json output. When its opt_in is undecided (a new install, or the choice was never recorded), and model_tier is not 12b and sensitive mode is off, ask the user once, using the entry's choice text:

"Spotlight can add opt-in decision checks. A decision model on OpenRouter (default typesafe/jev-1.13, served by TypeSafe in the US, which says it does not train on inputs but keeps them as long as reasonably necessary) flags findings whose stored source does not support them and report prose that overstates them. Flags can only lower confidence, never raise it. It needs your OpenRouter key, cost well under a cent per investigation in testing, and every investigation still asks before anything is sent. Enable decision checks?"

Record the answer, preserving every other key:

json
{
  "integrations": {
    "decisions": {
      "enabled": true,
      "decided_at": "<ISO timestamp>",
      "decided_by": "user",
      "env_file": "<optional absolute path to a private file holding OPENROUTER_API_KEY>",
      "modes": {"investigation_gate": "advisory", "report": "advisory"}
    }
  }
}

When the user declines, write "enabled": false with decided_at and decided_by; preflight then reports decisions as dismissed and no phase runs it. When the user accepts but the entry is unconfigured, tell them to provide OPENROUTER_API_KEY either in their environment (Engine, shell profile) or in a private file outside any repository (chmod 600), and to give you only that file's path for env_file. Never ask for the key itself in chat, and never write it to .spotlight-config.json. Keep modes at advisory unless the user explicitly asks for enforce. When opt_in is already enabled or declined, do not ask again; the user can change the choice by asking at any time.

9.5. Follow-up recovery (resume only)

When resuming an existing project, consume the same resolver result used above. If it returns phase: investigation with resume.instructions, pass those instructions to the returned execution owner. Do not derive resume state from feedback-file presence. The Investigation gate owner validates structured feedback and records requestFollowUp through spotlight_transition before execution resumes.

10. Monitoring + integrations availability (optional)

Run integration preflight and check whether Mycroft passive monitoring is installed:

execute-shell("scripts/spotlight-python integrations/preflight.py --model-tier {config.model_tier} --json")
execute-shell('test -f ~/.mycroft/monitoring/monitor.py && echo true || echo false')

Display a combined summary to the user so they know which external integrations are green and whether passive Mycroft signals are available. Do not block on failures — supplementary monitoring is optional.

Typical expectations:

  • Sovereign search + fetch backing ready (checked in step 2: Crawl4AI + SearXNG; firecrawl optional, only if FIRECRAWL_API_KEY is set)
  • Integration dev-browser green if the dev-browser CLI is available
  • Integration osint-navigator green if OSINT_NAV_API_KEY is set
  • Integration apify green if APIFY_API_TOKEN is set (opt-in hosted social-media collection; unconfigured until set, and Spotlight works fully without it via native platform APIs and fetch + manual review)
  • Integration arbiter green if ARBITER_API_KEY is set (opt-in — curated social-media case studies, credit-metered to the member's account; unconfigured until set, and Spotlight works fully without it via the junkipedia/search fallbacks)
  • Other integrations (junkipedia, future integrations like serus/thinkpol) green only if user has access

Часто задаваемые вопросы

Что делает навык ИИ Phase Preflight?

Spotlight Preflight: config detection, sovereign search/fetch backing checks, OSINT skill inventory, OpenKnowledge workspace validation, project setup, integration tiering, resume feedback check

Зачем использовать Phase Preflight в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Phase Preflight — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Phase Preflight в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/buriedsignals/spotlight/tree/main/skills/phase-preflight. TypingMind прочитает файл SKILL.md и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Phase Preflight?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Phase Preflight?

С любым количеством. В TypingMind вы можете использовать Phase Preflight с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Phase Preflight?

Навык опубликован на GitHub. Издатель — buriedsignals. Условия лицензии можно найти в репозитории. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇