foresight

A command that reviews stored information across different areas of life or work to spot connections, changing pace, and upcoming opportunities or risks.

In plain words
What is it for?
It scans domain notes, recent context, and action lists, then writes one practical suggestion when there is enough information.
Why use it?
It avoids forcing predictions when the stored history is too small or limited to one area.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/marciopuga/cog/foresight
Clone the repo
git clone --depth 1 https://github.com/marciopuga/cog

Made for: Claude Code.

Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,066 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.01066
Opus 5 $0.00019 $0.00533
Sonnet 5 $0.00008 $0.00213
Haiku 4.5 $0.00004 $0.00107

Measured 2d ago against content hash 8252cc63d3d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

foresight scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/foresight.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cog Foresight

Strategic foresight — connecting dots across domains. Future-facing.

This is NOT reflect (past-facing) or evolve (system architecture). Foresight scans broadly and projects trajectories.

Memory Path

All files under the resolved memory path: $COG_HOME/memory/ if COG_HOME is set, otherwise ~/cog/memory/.

Minimum Data Check

Before scanning, verify there's enough material for meaningful foresight:

  • If total observations across all domains < 10: stop. Say "Not enough history for strategic foresight. Keep capturing for a few more weeks."
  • If only 1 domain has data: say "Foresight works best with 2+ active domains (it connects dots between them). Consider adding more domains or building out existing ones."
  • If no action items exist: say "No active items to assess velocity on. Capture some tasks first."

Don't force a nudge from thin data. One honest "not yet" is better than a weak insight.

Files to Read

Read broadly — this is a scan:

  1. Read memory/domains.yml to discover all active domains
  2. For each domain: hot-memory.md + action-items.md
  3. Also read:
    • memory/hot-memory.md (cross-domain context)
    • memory/personal/entities.md (birthdays, relationships)
    • memory/personal/calendar.md (upcoming events)
    • memory/personal/health.md (health trajectory)
    • Recent observations across all domains (last 7 days)
    • Thread current-state sections

Process

1. Cross-Domain Convergence

Look for topics, people, or themes appearing in 2+ domains simultaneously. These are convergence points — where effort in one area compounds into another.

2. Velocity & Stall Detection

Classify active items:

  • Accelerating — multiple updates last week. Signal: ride the wave.
  • Cruising — steady progress. Signal: nothing to flag.
  • Stalling — no movement 2+ weeks. Signal: blocked or lost priority?
  • Dormant — domain silence 4+ weeks. Signal: conscious or drift?

3. Timing Awareness

Read calendar and entities for events in next 2-4 weeks. Things that should start NOW to be ready later.

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 120 lines · 39 tokens per session scan A 8252cc63d3d8

Subscribe to this mod's changes

foresight is a command published in the GitHub repository marciopuga/cog (376 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 1,066 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.