agentleFS
realnakarealnaka/alphaloop/skills/openorder/SKILL.md

openorder

Skill20 starsChanged 5 months agoMITView on GitHub

OpenOrder — Order out of investment chaos. An AI-maintained investment research wiki that compounds your edge across every conversation. Triggers automatically on: (1) any stock ticker (US/HK/A-share/TW/JP) or company name; (2) industry/theme discussions (semiconductors, AI infra, photonics, HBM, energy, biotech, crypto, etc.); (3) investment frameworks/methodology (moats, chokepoints, valuation, portfolio construction, value chain analysis); (4) earnings, guidance, research notes, or news analysis; (5) explicit operations ('ingest', 'lint wiki', 'archive this', 'add to research'). On trigger MUST: Read INDEX.md first → Read relevant sub-files → Answer using wiki content → Update wiki when new insights emerge. This is a cross-session, cross-project, read+write skill. Inspired by Andrej Karpathy's LLM Wiki pattern.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. realnaka/OpenOrder★ 0100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 14 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every conversation that touches a ticker / industry / earnings / framework MUST execute:

    line 28
  2. Distinctive:

    Raw is immutable: only append metadata headers.

    line 68
  3. Distinctive:

    Raw must produce Wiki updates: every raw file must trigger at least one wiki page update (otherwise it's dead data)

    line 69
  4. Very specific:

    Wiki references Raw: use relative paths source

    line 70
  5. Distinctive:

    Bull/bear balance: every company profile MUST have both bull and bear arguments

    line 213
  6. Very specific:

    How to append: use StrReplace at the top of the # Wiki Activity Log heading (newest first).

    line 250
  7. Very specific:

    Use templates/company-template.md to create companies/{TICKER}.md

    line 310
  8. Distinctive:

    Update file + INDEX.md timestamp

    line 317
  9. Distinctive:

    If thesis was wrong → revise bull/bear arguments

    line 324
  10. Very specific:

    Create or update portfolios/{NAME}.md

    line 328
  11. Distinctive:

    Add "review reminder" todo to INDEX.md

    line 331
  12. Distinctive:

    Before ending any conversation that touched stocks / industries:

    line 337
  13. Distinctive:

    If any answer is "no but should be yes", do it now.

    line 348
  14. Very specific:

    Right: Read INDEX.md → Read companies/AAPL.md → answer based on wiki

    line 356
  15. Distinctive:

    Wrong: Use stale data and stop

    line 359
  16. Distinctive:

    Right: If conversation produced new conclusion → append to file + log.md + INDEX.md

    line 360
  17. Very specific:

    Wrong: Create companies/NEW.md but INDEX.md unchanged

    line 363
  18. Distinctive:

    Right: Every new file → update INDEX navigation table + log.md

    line 364
  19. Distinctive:

    Right: Every profile must have a bear case section

    line 372
  20. Distinctive:

    Right: Every write operation must append log.md (even one line)

    line 380

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OpenOrder — Investment Research Wiki Skill

Order out of investment chaos. An open AI-maintained research wiki that compounds your edge across every conversation.

1. Core Mission

OpenOrder turns scattered investment research into a persistent, compounding wiki maintained by your AI agent.

Following the Karpathy LLM Wiki pattern:

  • The agent is the maintainer; you are the prompter + source curator
  • Knowledge is compiled once, kept fresh — not re-derived on every query
  • The wiki is a persistent, compounding artifact — every conversation makes it smarter

Every conversation that touches a ticker / industry / earnings / framework MUST execute:

READ → REASON → WRITE → LOG → (periodically) LINT
 ↓        ↓        ↓       ↓             ↓
look up  combine  archive  timeline    health-check
existing real-time new       append-only contradictions,
data     + history insights  record       gaps, staleness

2. Three-Layer Architecture

${OPENORDER_HOME}/
│
├── raw/                        ← Layer 1: Raw Sources (immutable, read-only)
│   ├── earnings/                  Earnings transcripts / 8-K filings
│   ├── articles/                  Articles, tweets, blog posts
│   ├── filings/                   SEC 10-K/10-Q PDFs
│   ├── research-notes/            Raw research notes from conversations
│   └── README.md
│
├── [Wiki Layer]                 ← Layer 2: Wiki (LLM-owned, continuously maintained)
│   ├── INDEX.md                   📌 Content index (always read first)
│   ├── log.md                     📌 Activity log (append-only timeline)
│   ├── README.md
│   ├── companies/{TICKER}.md      Company profiles
│   ├── industries/{NAME}/         Industry deep-dives
│   ├── frameworks/{NAME}.md       Investment frameworks
│   ├── earnings/{TICKER}-{Q}.md   Earnings deep-dives
│   ├── portfolios/{NAME}.md       Portfolio configurations
│   └── templates/                 Templates for new entries
│
└── [Schema Layer]               ← Layer 3: Schema (this file)
    ~/.claude/skills/openorder/SKILL.md (or equivalent for other agents)

Layer rules:

  • Raw is immutable: only append metadata headers; never modify content
  • Raw must produce Wiki updates: every raw file must trigger at least one wiki page update (otherwise it's dead data)
  • Wiki references Raw: use relative paths [source](../raw/earnings/{TICKER}-{Q}.txt)
  • Schema rules everything: this SKILL.md defines all rules

3. Mandatory Trigger Scenarios

🟢 MUST trigger (no user reminder needed)

The first action MUST be Read ${OPENORDER_HOME}/INDEX.md when any of the following appears:

3.1 Ticker / company mentions

  • Any equity ticker: US (4-letter), HK (4-digit), A-share (6-digit + .SZ/.SH), TW (.TW/.TWO), JP (.JP), KR, etc.
  • Any company name (English or local language)
  • Crypto: any token symbol (BTC, ETH, SOL, etc.) or protocol name

3.2 Industry / theme keywords

Replace this list with your own domain. Defaults below cover common AI / hard-tech / energy themes:

  • Semiconductors: foundry, fab, EUV, lithography, advanced packaging, CoWoS, chiplet
  • AI infra: hyperscaler capex, data center, scale-out, scale-up, NVLink, InfiniBand
  • Photonics: optical interconnect, CPO, CW laser, EML, DFB, VCSEL, InP, SiPh
  • Memory: HBM, HBM3E, HBM4, DDR5
  • Energy / storage: SOFC, fuel cell, BESS, sodium-ion, long-duration storage
  • Crypto: L1/L2, DeFi, perp DEX, stablecoin, restaking
  • (extend with your own domain keywords in the customization layer below)

3.3 Framework / methodology keywords

  • chokepoint, bottleneck, moat, value chain, supply chain
  • super-cycle, supply-constrained, structural shortage
  • target price, valuation, P/E, EV/EBITDA, DCF
  • thesis, conviction, base/bull/bear case

3.4 Earnings / financial keywords

  • earnings, guidance, beat, miss, transcript, 8-K, 10-Q, 10-K, FY/CY quarters
  • any concrete metric (revenue, gross margin, EPS, capex, backlog, inventory) tied to a company

3.5 Trading / portfolio keywords

  • "buy", "sell", "trim", "add", "short", "hedge"
  • "position", "weight", "allocation", "portfolio", "basket"

3.6 Explicit operation keywords

  • Ingest: "read this article", "ingest", "archive", "save this source"
  • Lint: "lint wiki", "health check", "find contradictions", "self-audit"
  • Query: any normal question (default mode)

🟡 Suggested triggers

  • "value chain", "upstream/downstream", "picks and shovels"
  • "AI beneficiaries", "second derivative plays"
  • Any "X vs Y" comparison

4. Operation 1: READ (mandatory every time)

Trigger → Read INDEX.md (mandatory, ~5s)
    ↓
Determine relevance, then read as needed:
    ├── Company question → companies/{TICKER}.md
    ├── Industry question → industries/{NAME}/README.md
    ├── Framework question → frameworks/{NAME}.md
    ├── Historical earnings → earnings/{TICKER}-{Q}.md
    ├── Portfolio → portfolios/{NAME}.md
    └── Timeline → log.md (newest first)
    ↓
When answering:
    1. Cite information timestamps ("based on YYYY-MM-DD data")
    2. Reference specific files ("see companies/{TICKER}.md")
    3. If data is stale → use WebSearch to confirm current state

5. Operation 2: INGEST (when user provides a new source)

Triggered by: user pastes a URL, sends a tweet/article, says "read this", "ingest", "archive".

Standardized 5-step flow:

Step 1. Fetch full content
   ├── URL: WebFetch / Browser
   ├── Tweet: browser MCP
   ├── Earnings: pull from filing / SEC direct link
   └── Write to raw/<subdir>/ (immutable; only add metadata header)

Step 2. Extract entities + key findings
   ├── Which companies are mentioned? (existing/new in wiki)
   ├── Which industries / concepts?
   ├── Key numbers, quotes, contradictions
   └── Confirm with user what to emphasize

Step 3. Update Wiki (may touch 10-15 files)
   ├── New company → use templates/company-template.md to create
   ├── Existing company → update "analysis log", revise bull/bear, adjust scores
   ├── Industry page → add "event tracking" entry
   ├── Framework → if validated/challenged, update framework file
   └── Each file: top "Last updated" date + bottom changelog entry

Step 4. Append log.md (mandatory)
   Add entry:
   ## [YYYY-MM-DD HH:MM] ingest | {title}
   - Source: raw/.../{file}
   - Key findings: ...
   - Files touched: companies/X.md, industries/Y.md, ...

Step 5. Update INDEX.md
   ├── Update top "Last updated"
   ├── Update "Wiki navigation" table (if new files)
   └── Update bottom "Update history"

After ingest, tell the user:

  • Which files were modified (so they can review in Obsidian)
  • Whether new findings need their decision

6. Operation 3: WRITE (when conversation produces new insights)

6.1 When to write

Trigger eventRequired write
User mentions an uncatalogued companyImmediately create companies/{TICKER}.md (use template)
New earnings released or discussedCreate earnings/{TICKER}-{Q}.md + update company profile
Conversation produces a new insight/analysisAppend to relevant file's "Analysis log" + log.md + INDEX.md
User makes a trading decision (buy/sell)Create or update portfolios/{NAME}.md + log.md
Industry change (M&A, partnership, product launch)Update industries/{NAME}/README.md "Event tracking"
Framework validated or revisedUpdate relevant frameworks/ file + log.md

6.2 Writing rules

Required metadata

  • File top: > **Last updated**: YYYY-MM-DD
  • File bottom: changelog (newest first)
  • INDEX.md: update history + todos
  • log.md: append one entry

Writing style

  • Concrete data: not "revenue grew strongly" — say "revenue $1.81B (+27% YoY)"
  • Cite sources: not "analysts think" — say "GS report 2026/3" or "CEO on Q3 FY26 transcript", with raw path
  • Flag assumptions: model predictions must say "assuming X conditions"
  • Bull/bear balance: every company profile MUST have both bull and bear arguments

Naming conventions

  • Company: companies/{TICKER}.md (e.g. AAPL.md, 0700-HK.md, 688012-SH.md)
  • Earnings: earnings/{TICKER}-{QUARTER}.md (e.g. AAPL-Q1-FY26.md)
  • Industry: industries/{NAME}/README.md
  • Framework: frameworks/{NAME}.md (kebab-case)
  • Portfolio: portfolios/{NAME}-{DATE}.md
  • Raw: see raw/README.md

6.3 Templates

See templates/company-template.md and templates/earnings-template.md.


7. Operation 4: LOG (append on every write)

Location: ${OPENORDER_HOME}/log.md

Format (Karpathy convention — uniform prefix for grep):

## [YYYY-MM-DD HH:MM] {action} | {one-line summary}
- Trigger: {user prompt or event}
- Files touched: {file1}, {file2}, ...
- Key findings/decisions: {1-3 lines}
- Raw source: {path if applicable}

action values:

  • ingest — new source absorbed
  • query — user Q&A (only log if it produced new insight)
  • lint — health check
  • decision — real trading decision
  • revise — corrected old thesis
  • framework — framework update

How to append: use StrReplace at the top of the # Wiki Activity Log heading (newest first).

Benefit: grep "^## \[" log.md | tail -10 instantly shows recent activity.


8. Operation 5: LINT (periodic or explicit)

Triggered by: user says "lint wiki", "health check", "find contradictions"; or proactively offer monthly.

Lint 5 checks:

8.1 Contradictions

  • Same company has conflicting target price / rating in companies/X.md vs portfolios/Y.md?
  • Industry ranking in industries/.../README.md conflicts with frameworks/.../*.md scores?
  • Same metric different across multiple earnings/ files?

8.2 Staleness

  • Company profile Last updated predates its latest earnings → flag for update
  • Earnings file >90 days old but catalysts have passed → need a new earnings file?

8.3 Orphans

  • Files in companies/ not referenced by any portfolio / framework / industry?
  • Raw sources without a corresponding wiki update?

8.4 Missing pages

  • Companies/concepts mentioned multiple times across files but no profile (e.g. "Anritsu" cited 5 times but no companies/Anritsu.md)?
  • Catalyst tables mention "watch X in YYYY/MM" — date passed without follow-up?

8.5 Data gaps

  • Companies that haven't been refreshed in 30+ days
  • Industries lacking a value-chain mermaid diagram

Lint output: a markdown report listing all issues + suggested next actions. Does not auto-modify — user decides.


9. Cross-Agent Compatibility

OpenOrder works with any AI agent that supports either SKILL.md or AGENTS.md:

AgentSkill mechanismInstall location
Claude Code (Anthropic)SKILL.md (native)~/.claude/skills/openorder/
Cursor (IDE + CLI)SKILL.md (compatible)~/.cursor/skills-cursor/openorder/
Codex CLI (OpenAI)AGENTS.md or SKILL.md~/.codex/skills/openorder/
OpenCode (sst)AGENTS.md.opencode/agent/ or repo root
Hermes Agent (NousResearch)AGENTS.md + ~/.hermes/skills/~/.hermes/skills/openorder/
OpenClawAGENTS.mdper project config
AiderCONVENTIONS.mdrepo root (symlink to SKILL.md)
Cline / Roo Code.clinerulesrepo root

The repository ships both SKILL.md (this file) and AGENTS.md (mirror). The install.sh script auto-detects installed agents and creates the appropriate symlinks.


10. Special Scenarios

10.1 Uncatalogued company

  1. WebSearch latest financials + industry position
  2. Use templates/company-template.md to create companies/{TICKER}.md
  3. Add to INDEX.md
  4. Append log.md ingest entry
  5. Answer the user

10.2 Stale data

  1. WebSearch confirms latest data
  2. Update file + INDEX.md timestamp
  3. Note in changelog: "YYYY-MM-DD: data updated from X to Y"
  4. Append log.md revise entry

10.3 Conflict with new data

  1. New data wins
  2. Note conflict reason in changelog
  3. If thesis was wrong → revise bull/bear arguments
  4. Append log.md revise entry

10.4 Real trading decision

  1. Create or update portfolios/{NAME}.md
  2. Record: entry/exit price, size, time, rationale
  3. Append log.md decision entry
  4. Add "review reminder" todo to INDEX.md

11. Self-check Checklist

Before ending any conversation that touched stocks / industries:

  • Did I read INDEX.md?
  • Did I read the relevant company profile(s)?
  • Did I answer using wiki content?
  • Are there new data / insights that need to be written back?
  • Is there a raw source to ingest?
  • Does log.md need a new entry?
  • Does INDEX.md need updating?
  • Are there new todos?

If any answer is "no but should be yes", do it now.


12. Anti-patterns to avoid

❌ Anti-pattern 1: Answer without reading the wiki

Wrong: "AAPL is a consumer hardware company..." (from memory) Right: Read INDEX.md → Read companies/AAPL.md → answer based on wiki

❌ Anti-pattern 2: Read but don't update

Wrong: Use stale data and stop Right: If conversation produced new conclusion → append to file + log.md + INDEX.md

❌ Anti-pattern 3: Create file but don't update INDEX

Wrong: Create companies/NEW.md but INDEX.md unchanged Right: Every new file → update INDEX navigation table + log.md

❌ Anti-pattern 4: Write data without timestamps

Wrong: "revenue +20% YoY" (which quarter?) Right: "Q3 FY26 revenue $1.81B (+20.5% YoY), reported YYYY-MM-DD"

❌ Anti-pattern 5: Bull-only profiles

Wrong: List only positives Right: Every profile must have a bear case section

❌ Anti-pattern 6: Skip Raw layer when ingesting

Wrong: Summarize an article straight into wiki without storing the original Right: First save raw/articles/{date}-{slug}.md, then wiki references it

❌ Anti-pattern 7: Wiki changes without log.md entry

Wrong: Modify 5 files, log.md unchanged Right: Every write operation must append log.md (even one line)


13. Customization (fork to your domain)

OpenOrder ships investment research as the default domain. To adapt:

  1. Edit Section 3 trigger keywords to match your field (e.g. biotech, crypto, real estate)
  2. Edit templates/ to fit your entity type (instead of "company profile" → "drug pipeline" / "protocol" / "property")
  3. Edit frameworks/ to fit your scoring methodology
  4. Keep Sections 2/4/5/6/7/8 unchanged — these are domain-agnostic operations

See docs/customize.md for examples adapting OpenOrder to:

  • Crypto research wiki
  • Academic literature review
  • Personal journaling / quantified self
  • Internal team knowledge base

14. External Tools Integration

ToolRoleHow agent uses it
Local markdown (this wiki)Primary storeRead / Grep / Glob
gitVersion history + collaborationgit log + auto-commit hook
ObsidianVisual browse + bidirectional linksVault → ${OPENORDER_HOME}
WebSearch / Browser MCPReal-time data + ingestStandard tools

15. Version History

VersionDateChanges
v1.0.0First public releaseOpen-sourced as OpenOrder

16. Credits

OpenOrder's three-layer architecture (Raw / Wiki / Schema), log.md timeline, Lint operation, and Ingest workflow are directly inspired by Andrej Karpathy's LLM Wiki pattern: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f

The investment-research domain framing, chokepoint scoring methodology, and cross-agent install scaffolding are original to OpenOrder.

License: MIT. See LICENSE.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.