Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/insider-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
enable-cache: true

- name: Install dependencies
working-directory: skills/signal-sweep
working-directory: skills/idea-generation
run: uv sync --locked

- name: Run insider scan
env:
EDGAR_IDENTITY: ${{ secrets.EDGAR_IDENTITY }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
working-directory: skills/signal-sweep
working-directory: skills/idea-generation
run: |
DATE="${{ github.event.inputs.date || 'yesterday' }}"
LOOKBACK="${{ github.event.inputs.lookback || '5' }}"
Expand All @@ -55,5 +55,5 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: insider-scan-${{ github.run_id }}
path: skills/signal-sweep/signal-sweep-cache/insiders/
path: skills/idea-generation/idea-cache/insiders/
retention-days: 90
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ __pycache__/
# SEC EDGAR download cache (regenerated on demand)
sec-cache/

# Signal-sweep output cache (regenerated on demand)
signal-sweep-cache/
# Idea-generation output cache (regenerated on demand)
idea-cache/

# Transcript cache (market-scout, regenerated on demand)
# Transcript cache (market-data, regenerated on demand)
transcript-cache/

# OS cruft
Expand Down
2 changes: 1 addition & 1 deletion .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"**/node_modules/**",
".git",
"**/sec-cache/**",
"**/signal-sweep-cache/**",
"**/idea-cache/**",
"**/transcript-cache/**"
]
}
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docs route agents and preserve non-obvious project rationale.

- Never commit directly to `main`; work on a branch and open a PR.
- Never commit secrets. `EDGAR_IDENTITY` and `DISCORD_WEBHOOK_URL` are supplied via environment / CI secrets, never hard-coded.
- Never commit cache output. `sec-cache/`, `signal-sweep-cache/`, and `transcript-cache/` are regenerated on demand and are git-ignored.
- Never commit cache output. `sec-cache/`, `idea-cache/`, and `transcript-cache/` are regenerated on demand and are git-ignored.
- Lint and format must pass before a PR (see `context/CONVENTIONS.md`). CI runs `ruff check`, `ruff format --check`, and `markdownlint-cli2`.
- Keep changes scoped; avoid incidental refactors.
- Verify behavior with commands before documenting claims.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The five skills are documented in [`skills/README.md`](skills/README.md). The pr
flow is:

```text
signal-sweep → bottom-up-analyst → sec-edgar-skill / market-scout → pitch-like-lou
idea-generation → due-diligence → sec-filings / market-data → pitch-like-lou
```

## Development
Expand Down
5 changes: 4 additions & 1 deletion context/CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ Terse imperative code rules. No rationale here — rationale lives in

## Markdown / docs

- Keep each `SKILL.md` terse; defer detail to `references/` (progressive disclosure).
- Keep each `SKILL.md` to routes, commands, and pointers; defer detail to `references/`
(progressive disclosure).
- Put a script lesson where the mistake happens: handle it in code, else in the error
message, else in `--help` or report text; use `references/` only for off-script work.
- Ensure `AGENTS.md`, `README.md`, and everything in `context/` pass markdownlint.
- Append to `context/DECISIONS.md` only when the choice crosses the decision-log bar in `AGENTS.md`.

Expand Down
11 changes: 6 additions & 5 deletions context/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ Tradeoff: Research cannot be split across independent agents, but the full evide
model judgement stay together without an extra model-selection or context-budget dependency.
Status: active

## 2025-06-21 — market-scout uses agent-browser instead of a direct HTTP client
## 2025-06-21 — market-data uses agent-browser instead of a direct HTTP client

Context: Yahoo Finance transcript and market endpoints are unstable and
bot-hostile when scraped with a plain HTTP client.
Decision: Drive market-scout's transcript fetching through `agent-browser`.
Decision: Drive market-data's transcript fetching through `agent-browser`.
Tradeoff: Adds a Node/`agent-browser` install step (no SEC identity needed but
an extra dependency) in exchange for reliable access to dynamic pages.
Status: active
Expand All @@ -79,9 +79,10 @@ Status: active

Context: A fixed percentage move (e.g. -20%) is routine for a biotech but
exceptional for a utility, so a flat threshold misfires across the universe.
Decision: Tag dip/rip buys by the stock's trailing 30-day return z-score
(default ±1.5σ) rather than a fixed percent move; only Form 4 open-market
purchases (code `P`) are counted.
Decision: Tag dip/rip buys by the z-score of the 22-trading-day return as of the
transaction date against that stock's prior 252 rolling 22-day returns (default
±1.5σ) rather than a fixed percent move; only Form 4 open-market purchases
(code `P`) are counted.
Tradeoff: Requires per-stock volatility history and tuning of the z-score
threshold; rejects the simpler but universe-blind fixed-percent rule.
Status: active
Expand Down
35 changes: 18 additions & 17 deletions context/MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ SYSTEM.md Research-agent identity installed into the isolated profil
extensions/ Restores Pi's tool prompt envelope and brands the startup header
scripts/bootstrap.mjs Isolated-profile bootstrap
skills/ Skill collection and skill-level documentation
signal-sweep/ Discovery — scan the universe, surface tickers
sec-edgar-skill/ Data — SEC EDGAR filings, ownership, 13F holders
market-scout/ Data — price, peers, transcripts (Yahoo Finance)
bottom-up-analyst/ Analysis — one operating company → scoped answer or memo
idea-generation/ Discovery — scan the universe, surface tickers
sec-filings/ Data — SEC EDGAR filings, ownership, 13F holders
market-data/ Data — Yahoo Finance fields and earnings-call transcripts
due-diligence/ Analysis — one operating company → scoped answer or memo
pitch-like-lou/ Voice — finished thesis → VIC-style pitch
context/ Agent-maintained project documentation
```
Expand Down Expand Up @@ -49,39 +49,40 @@ configuration, sessions, and unrelated settings remain profile-local and untouch

## Skill internals

- `skills/signal-sweep/` — `scripts/scan_insiders.py`, `scan_market.py`,
- `skills/idea-generation/` — `scripts/scan_insiders.py`, `scan_market.py`,
`scan_conferences.py`, `search_themes.py`; universe config in `screens.json`; shared
bootstrap in `scripts/_common.py`.
- `skills/sec-edgar-skill/` — `scripts/fetch_*.py`, `parse_financials.py`, `orient.py`,
`list_headings.py`; filing, financial, ownership, proxy/governance, and holdings guides in
`references/`; shared bootstrap in `scripts/_common.py`.
- `skills/market-scout/` — `scripts/fetch_market_data.py`, `fetch_transcripts.py`, and shared
- `skills/sec-filings/` — `scripts/fetch_*.py`, `parse_financials.py`, `orient.py`,
`test_setup.py`; `references/edgartools.md` (inline API) and `references/ownership.md`
(ownership and governance semantics, shared with `due-diligence`); shared bootstrap in
`scripts/_common.py`.
- `skills/bottom-up-analyst/` — valuation `scripts/dcf.py`, `epv.py`; archetypes and guides in
`references/`.
- `skills/market-data/` — `scripts/fetch_market_data.py`, `fetch_transcripts.py`, and shared
`scripts/_common.py`.
- `skills/due-diligence/` — valuation `scripts/dcf.py`, `epv.py`; `references/`
normalization, valuation, archetypes, and memo spine.
- `skills/pitch-like-lou/` — reference corpus only, no scripts.

## Data flow

```mermaid
flowchart TD
SS[signal-sweep<br/>surfaces tickers] --> BUA[bottom-up-analyst<br/>analysis + optional memo]
BUA --> SEC[sec-edgar-skill<br/>filings]
BUA --> MS[market-scout<br/>price / peers / transcripts]
SS[idea-generation<br/>surfaces tickers] --> BUA[due-diligence<br/>analysis + optional memo]
BUA --> SEC[sec-filings<br/>filings]
BUA --> MS[market-data<br/>price / peers / transcripts]
BUA --> PLL[pitch-like-lou<br/>renders pitch]
```

- `bottom-up-analyst` selects evidence, reasons over it, and produces the requested analysis or
- `due-diligence` selects evidence, reasons over it, and produces the requested analysis or
full memo. Retrieval contracts and source semantics remain in the data skills.
- The two filing/market data skills know nothing of each other and are swappable.
- `signal-sweep` and SEC-facing `sec-edgar-skill` commands read `EDGAR_IDENTITY` and use
- `idea-generation` and SEC-facing `sec-filings` commands read `EDGAR_IDENTITY` and use
on-disk cache contracts defined in their `_common.py` modules. The SEC skill's routine 13F
convenience queries use 13f.info and expose underlying SEC periods and identifiers; raw
EDGAR remains the deep-field and verification route.

## Production order

For a full thesis: `signal-sweep` → `bottom-up-analyst` → memo → optionally
For a full thesis: `idea-generation` → `due-diligence` → memo → optionally
`pitch-like-lou`.

For the package installation and isolated-profile workflow, start at the root
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"./extensions/startup-header.ts"
],
"skills": [
"./skills/signal-sweep",
"./skills/sec-edgar-skill",
"./skills/market-scout",
"./skills/bottom-up-analyst",
"./skills/idea-generation",
"./skills/sec-filings",
"./skills/market-data",
"./skills/due-diligence",
"./skills/pitch-like-lou"
]
}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ignore = [
convention = "google"

[tool.ruff.lint.isort]
known-first-party = ["bottom-up-analyst", "market-scout", "pitch-like-lou", "sec-edgar-skill", "signal-sweep"]
known-first-party = ["due-diligence", "market-data", "pitch-like-lou", "sec-filings", "idea-generation"]

[dependency-groups]
dev = [
Expand Down
6 changes: 3 additions & 3 deletions scripts/bootstrap.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ function mergeSettings() {
function ensurePythonEnvironment() {
const uv = findUv();
const projects = [
installedSecStackPath("skills", "signal-sweep"),
installedSecStackPath("skills", "sec-edgar-skill"),
installedSecStackPath("skills", "market-scout"),
installedSecStackPath("skills", "idea-generation"),
installedSecStackPath("skills", "sec-filings"),
installedSecStackPath("skills", "market-data"),
];
for (const project of projects) {
const pyproject = join(project, "pyproject.toml");
Expand Down
43 changes: 22 additions & 21 deletions skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,53 @@ they form a research pipeline.

| Layer | Skill | Job |
|---|---|---|
| **Discovery** | [`signal-sweep`](signal-sweep/) | Scan SEC filings and market data to surface new investment ideas. |
| **Data** | [`sec-edgar-skill`](sec-edgar-skill/) | Retrieve and extract SEC filings, ownership, and 13F holder data. |
| **Data** | [`market-scout`](market-scout/) | Pull prices, returns, peers, sector screens, and transcripts. |
| **Analysis** | [`bottom-up-analyst`](bottom-up-analyst/) | Turn one operating company into scoped analysis or an auditable investment memo. |
| **Discovery** | [`idea-generation`](idea-generation/) | Surface new tickers from insider buying, 13Ds, screens, filing themes, and investor events. |
| **Data** | [`sec-filings`](sec-filings/) | Retrieve filings, XBRL statements, insider trades, 13F holders, and blockholders. |
| **Data** | [`market-data`](market-data/) | Pull any Yahoo Finance field and earnings-call transcripts. |
| **Analysis** | [`due-diligence`](due-diligence/) | Turn one operating company into a scoped answer or an auditable investment memo. |
| **Voice** | [`pitch-like-lou`](pitch-like-lou/) | Render a finished thesis as a VIC-style pitch. |

## Data flow

```text
signal-sweep (surfaces tickers)
idea-generation (surfaces tickers)
│
▼
bottom-up-analyst (deep dive on one ticker)
├── sec-edgar-skill (filings and ownership)
├── market-scout (price, peers, transcripts)
due-diligence (deep dive on one ticker)
├── sec-filings (filings and ownership)
├── market-data (price, peers, transcripts)
▼
pitch-like-lou (finished pitch)
```

`bottom-up-analyst` is the conductor. It decides what to pull, reasons over the evidence,
`due-diligence` is the conductor. It decides what to pull, reasons over the evidence,
values the business, and produces the requested analysis or full memo. The data skills supply
the underlying evidence.

`signal-sweep` and `sec-edgar-skill` are independent data sources. `market-scout` is also
swappable: the analyst can use a different market-data provider without changing its
reasoning workflow.
`idea-generation` and `sec-filings` are independent data sources. `market-data` is also
swappable: due diligence can use a different market-data provider without changing its
reasoning.

The voice skill renders from a finished thesis; it is not an idea generator.

**Production order for a full thesis:** signal-sweep → bottom-up-analyst → memo → optionally
**Production order for a full thesis:** idea-generation → due-diligence → memo → optionally
pitch-like-lou.

## Progressive disclosure

Each skill keeps its `SKILL.md` entry point concise. Detailed guidance lives in
`references/`, executable helpers live in `scripts/`, and configuration/assets stay beside
the skill that owns them. Load only the guide or script required for the current task.
Each `SKILL.md` holds routes, commands, and pointers. A script's lessons live in its code,
error messages, `--help`, and report text; off-script detail lives in `references/`,
executable helpers in `scripts/`, and configuration beside the skill that owns it.

## Skill resources

- [`signal-sweep`](signal-sweep/) contains configurable market screens, SEC discovery
- [`idea-generation`](idea-generation/) contains configurable market screens, SEC discovery
scanners, conference discovery, and theme search.
- [`sec-edgar-skill`](sec-edgar-skill/) contains filing, financial, ownership, and 13F
retrieval helpers.
- [`market-scout`](market-scout/) contains Yahoo Finance market and transcript helpers.
- [`bottom-up-analyst`](bottom-up-analyst/) contains valuation arithmetic and memo frameworks.
- [`sec-filings`](sec-filings/) contains filing, financial, ownership, and 13F
retrieval helpers plus an inline `edgartools` reference.
- [`market-data`](market-data/) contains Yahoo Finance snapshot and transcript helpers.
- [`due-diligence`](due-diligence/) contains valuation arithmetic, archetypes, and the memo
spine.
- [`pitch-like-lou`](pitch-like-lou/) contains the pitch-writing workflow and reference corpus.

Each skill's README documents its dependencies and usage. Invoke installed artifact-producing
Expand Down
55 changes: 0 additions & 55 deletions skills/bottom-up-analyst/README.md

This file was deleted.

Loading
Loading