Market Research Agent - Community Signal Intelligence
Scheduling
Goal
Run the installed upstream last30days research engine for community-signal research, then frame the result for the user's intent (pain / trend / competitor / discovery) with strategic frameworks and save one brief under .agents/results/market/.
Intent signature
- User asks about pain points, user complaints, or voice-of-customer signals for a product or category.
- User asks what is trending, growing, or declining in a space this week or month.
- User asks how one product compares to another in community sentiment or positioning.
- User asks for discovery or exploratory market research on a topic, a person, a company, or a ticker.
When to use
- Extracting real user pain points from community posts (Reddit with real upvotes and top comments, HN, X, Bluesky, GitHub Issues)
- Detecting trends in a category over a window (
--days 7|30|90|180) - Competitor sentiment analysis and SWOT / Porter's 5F positioning
- Open-ended discovery research (
--discover), person mode, hiring signals (--hiring-signals), follow-up drills (--drill)
When NOT to use
- General web research without market framing -> use oma-search directly
- Academic literature -> use oma-scholar
- Live dashboards or scheduled monitoring ->
oma schedule <action>wrapping this skill
Expected inputs
- Topic string; optional
--intent pain|trend|competitor|discovery(else classified perresources/intent-rules.md) - Optional window (
--days),--vs <entity>(competitor),--frameworks auto|none|swot,5f,pestel - Any native last30days flag (listed in the upstream contract at
engine.skillMd) โ passed through verbatim
Expected outputs
- Single markdown brief at
.agents/results/market/{topic-slug}-{YYYYMMDD}.md - First line: the engine's badge (
๐ last30days v{VERSION} ยท synced {date}); body per the upstream OUTPUT CONTRACT; framework sections per intent after the body; engine footer last - Raw engine artifacts under
market.save_dir(default.agents/results/market/raw/)
outputs:
- name: market-brief
description: Single LAW-compliant markdown brief with framework sections
artifact: ".agents/results/market/*.md"
required: true
No CLI gate reads this block for oma-market (oma verify checks outputs: only for agent-type skills); the self-check in resources/output-laws.md enforces the brief.
Dependencies
oma market resolve/oma market runโ engine location, Python 3.12+ resolution,--save-dirdefaultoma market detect-trap <topic>โ preflight gateoma market updateโ installs thelast30daysskill when missing, otherwise runsbunx skills update last30days -g -y- The engine is the skills-CLI install of
last30days:oma market resolvereads installed skill dirs such as~/.agents/skills/last30days/(amarket.path/LAST30DAYS_HOMEpin wins) - The upstream
SKILL.mdat the resolved engine root (skillMdinoma market resolve --json) โ the authoritative research contract resources/intent-rules.md,resources/frameworks/,resources/output-laws.md,resources/execution-protocol.md
Structural Flow
Transitions
--vs <entity>or "A vs B" phrasing โ competitor intent โ upstream COMPARISON flow (two passes + head-to-head as its contract specifies) โ SWOT + Porter's 5F.- Person / company / ticker topics โ upstream person / hiring-signals / StockTwits handling applies unchanged.
- Frameworks toggle by intent: pain / trend โ SWOT; competitor โ SWOT + Porter's 5F; discovery โ SWOT + PESTEL.
- A source that needs keys or cookies auto-skips inside the engine; keyless sources (Reddit, HN, GitHub, Polymarket, arXiv, Techmeme, Digg, web) always run.
Failure and recovery
- detect-trap exit 2 โ REFUSE; do not run the engine;
--forceonly on explicit user reconfirmation. oma market resolvenot ok โ stop with the reason; no engine run.- Engine non-zero exit โ report stderr verbatim; do not synthesize from partial stdout unless the upstream contract says the emitted compact output is still valid.
- Upstream Python-version gate / setup wizard messages โ relay to the user exactly as the upstream contract instructs.
- Python 3.12+ absent โ
oma market resolvestops before the upstream setup wizard. Relay its install hint; after an authorized interpreter installation, retry resolution. Do not expect the skipped upstream Python preflight to install it.
Exit
- Success: brief written with badge, clusters, frameworks, and engine footer, in that order; path reported.
- Partial: engine ran with skipped sources (footer lists them) โ say so; never pad with invented evidence.
Logical Operations
Canonical command path
- Run
oma market detect-trap "<topic>"before anything else. Exit 2 โ surface the REFUSE reason and reframe suggestion, stop. Exit 4 โ invalid topic, stop. - Run
oma market resolve --json. It is ok when the engine is present and Python โฅ 3.12 is found on PATH, viauv, or pinned withmarket.python/LAST30DAYS_PYTHON.ok: falseโ reportreason(missing engine โ ask the user, thenoma market update; missing Python โ the install hint) and stop. - Read the upstream contract at
engine.skillMdtop to bottom. It is long by design; do not skim. Treatengine.rootas itsSKILL_DIR. - Classify intent per
resources/intent-rules.md; map to engine flags and framework set. Record the intent, flags, and frameworks with subjectmarket.route-selectionper../_shared/runtime/route-selection.md(explicit flag,--vs, or the keyword score that decided it). - Follow the upstream SKILL.md exactly โ Step 0 (first-run setup wizard, consent-driven), intent parsing, Step 0.45 (its own query-quality preflight), Step 0.5 / 0.55 (handle, subreddit, hashtag resolution when WebSearch is available), Step 0.75 (query plan). Skip only its "Runtime Preflight" Python-hunt block:
oma market runalready resolved the interpreter. - Wherever the upstream contract says
"${LAST30DAYS_PYTHON}" "${SKILL_DIR}/scripts/last30days.py" <args>, runoma market run <args>with the same arguments (foreground, 5-minute timeout,--emit=compact); it passes them through to the resolved upstream engine's Python entry point.--save-diris added automatically frommarket.save_dirunless you pass one. - Produce the brief exactly as the upstream OUTPUT CONTRACT dictates (badge first line, Ranked Evidence Clusters, LAWs). Then add the framework sections selected for the intent between the engine body and the engine footer, using only clusters present in the engine output as evidence (
resources/frameworks/). - Write
.agents/results/market/{topic-slug}-{YYYYMMDD}.md, run the self-check inresources/output-laws.mdagainst the written file, fix and re-check, then preview the first 50 lines.
TOPIC="VS Code pain points"
oma market detect-trap "$TOPIC"
oma market resolve --json # read .engine.skillMd, then follow it
# โฆ upstream Steps 0 / 0.45 / 0.5 / 0.55 / 0.75 โฆ
oma market run "$TOPIC" --plan "$QUERY_PLAN_FILE" --subreddits=vscode --emit=compact --save-suffix=v3
Resource scope and effects
- Writes the brief to
.agents/results/market/{topic-slug}-{YYYYMMDD}.mdand raw engine files tomarket.save_dir. - First run: the upstream setup wizard may write
~/.config/last30days/.envwith user consent;~/.config/last30days/holds the engine config and keys. oma market runstarts the resolved upstream Python entry point.- Network calls happen inside the engine (its per-source fetchers) and in the skills CLI during
oma market update.
Guardrails
- Never fall back to WebSearch-only synthesis and present it as market research.
References
- Execution protocol:
resources/execution-protocol.md - Intent routing:
resources/intent-rules.md - Output contract:
resources/output-laws.md - Applicable framework:
resources/frameworks/swot.md,resources/frameworks/porters-5f.md, orresources/frameworks/pestel.md(load only the selected framework) - Validation:
resources/checklist.md - Recovery:
resources/error-playbook.md - Upstream engine instructions: read the resolved
engine.skillMdpath fromoma market resolve --json; upstream scripts belong to the installed engine, not to this skill's resources.