Skip to content

feat: add crypto-market-movers template#212

Closed
ngisaiah wants to merge 7 commits into
Lamatic:mainfrom
ngisaiah:feat/top-crypto-movers
Closed

feat: add crypto-market-movers template#212
ngisaiah wants to merge 7 commits into
Lamatic:mainfrom
ngisaiah:feat/top-crypto-movers

Conversation

@ngisaiah

@ngisaiah ngisaiah commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

1. Select Contribution Type

  • [* ] Kit (kits/<category>/<kit-name>/)
  • [* ] Bundle (bundles/<bundle-name>/)
  • [* ] Template (templates/<template-name>/)

2. General Requirements

  • [* ] PR is for one project only (no unrelated changes)
  • [* ] No secrets, API keys, or real credentials are committed
  • [ *] Folder name uses kebab-case and matches the flow ID
  • [* ] All changes are documented in README.md (purpose, setup, usage)

3. File Structure (Check what applies)

  • [* ] config.json present with valid metadata (name, description, tags, steps, author, env keys)
  • [* ] All flows in flows/<flow-name>/ (where applicable) include:
    • config.json (Lamatic flow export)
    • inputs.json
    • meta.json
    • README.md
  • [ *] .env.example with placeholder values only (kits only)
  • [* ] No hand‑edited flow config.json node graphs (changes via Lamatic Studio export)

4. Validation

  • npm install && npm run dev works locally (kits: UI runs; bundles/templates: flows are valid)
  • PR title is clear (e.g., [kit] Add <name> for <use case>)
  • GitHub Actions workflows pass (all checks are green)
  • All CodeRabbit or other PR review comments are addressed and resolved
  • No unrelated files or projects are modified
  • Added kits/crypto-market-movers/.gitignore to ignore Lamatic cache, node_modules, and local .env files.
  • Added kits/crypto-market-movers/README.md documenting the “Crypto Market Movers” scheduled agent: CoinGecko fetch (top 100), deterministic ranking (top 5 gainers/losers by 24h % change), LLM-based Markdown formatting, configuration, output structure, limitations, and future improvements.
  • Added kits/crypto-market-movers/agent.md defining the non-interactive daily pipeline, required output/report sections/order, and strict safety/anti-fabrication guardrails (no speculation/financial advice; handle missing values as unavailable while preserving names/symbols).
  • Added kits/crypto-market-movers/constitutions/default.md with a default constitution governing identity/safety/data handling and crypto-reporting prohibitions (no fabricated market data, no altered rankings, uncertainty disclosure, and no advice).
  • Added kits/crypto-market-movers/flows/crypto-market-movers.ts flow definition for Crypto_Market_Movers:
    • Node types used: triggerNode (cron), dynamicNode for CoinGecko API fetch, deterministic codeNode, and LLMNode, plus an addNode.
    • Flow wiring: cron triggerCoinGecko /coins/markets (top 100, USD, order=market_cap_desc, per_page=100, price_change_percentage=24h) → Rank Market Movers (deterministic ranking) → Generate Daily Report (system+user prompts) → addNode.
  • Added kits/crypto-market-movers/lamatic.config.ts template configuration with metadata, a required crypto-market-movers step, tags, and link references.
  • Added kits/crypto-market-movers/model-configs/crypto-market-movers_llmnode-261_generative-model-name.ts for the LLMNode generative model name (gpt-5.2-2025-12-11, OpenAI).
  • Added kits/crypto-market-movers/prompts/crypto-market-movers_llmnode-261_system_0.md system prompt enforcing: use only provided structured JSON, no re-ranking/recalculation, no speculation/finance advice, exact preservation of coin names/tickers, and Markdown-only output.
  • Added kits/crypto-market-movers/prompts/crypto-market-movers_llmnode-261_user_1.md user prompt specifying the exact report Markdown layout (snapshot + top 5 gainers/losers + exactly three observations + disclaimer) and formatting/validation rules (e.g., N/A for missing/null fields; +/- percent formatting).
  • Added kits/crypto-market-movers/scripts/crypto-market-movers_code-node-672_code.ts deterministic ranking code that validates/normalizes the API payload, rounds/formatting for price/volume/% change, sorts by 24h % change to select top 5 gainers and top 5 losers, and returns { analyzed_coin_count, top_gainers, top_losers }.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

The mission adds a scheduled Crypto Market Movers agent that fetches CoinGecko data, deterministically ranks valid gainers and losers, and uses an LLM to produce a constrained Markdown report.

Crypto Market Movers

Layer / File(s) Summary
Deterministic market ranking
kits/crypto-market-movers/scripts/...
Validates and normalizes market data, ranks the top five gainers and losers, formats values, and returns the report input structure.
Scheduled flow orchestration
kits/crypto-market-movers/flows/...
Connects the cron trigger, CoinGecko request, ranking code node, LLM node, and output node.
Report contracts and guardrails
kits/crypto-market-movers/agent.md, kits/crypto-market-movers/constitutions/..., kits/crypto-market-movers/prompts/...
Defines fixed report sections, data-only generation, missing-value handling, ranking preservation, and cryptocurrency reporting restrictions.
Template packaging and documentation
kits/crypto-market-movers/lamatic.config.ts, kits/crypto-market-movers/model-configs/..., kits/crypto-market-movers/README.md, kits/crypto-market-movers/.gitignore
Adds Lamatic template metadata, model configuration, workflow documentation, and local artifact ignore rules.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and clearly names the main change: adding the crypto-market-movers template.
Description check ✅ Passed The description matches the checklist template and covers the required sections for this kit.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ngisaiah ngisaiah changed the title Feat/top crypto movers agentkit-challenge Jul 13, 2026
@ngisaiah ngisaiah changed the title agentkit-challenge add top-crypto-movers Jul 14, 2026
@ngisaiah ngisaiah changed the title add top-crypto-movers feat: add top-crypto-movers Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/crypto-market-movers

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@kits/crypto-market-movers/scripts/crypto-market-movers_code-node-672_code.ts`:
- Around line 15-23: Update the validation filter in the market-data processing
chain to reject null values before numeric validation, especially for
current_price, price_change_percentage_24h, and total_volume. Replace
Number-based coercion with a precise numeric type check that accepts only actual
finite numbers and preserves the existing coin, name, and symbol checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: d3a74a10-dee0-448b-aa20-8df461c14c77

📥 Commits

Reviewing files that changed from the base of the PR and between aabc909 and 9eb06bb.

📒 Files selected for processing (10)
  • kits/crypto-market-movers/.gitignore
  • kits/crypto-market-movers/README.md
  • kits/crypto-market-movers/agent.md
  • kits/crypto-market-movers/constitutions/default.md
  • kits/crypto-market-movers/flows/crypto-market-movers.ts
  • kits/crypto-market-movers/lamatic.config.ts
  • kits/crypto-market-movers/model-configs/crypto-market-movers_llmnode-261_generative-model-name.ts
  • kits/crypto-market-movers/prompts/crypto-market-movers_llmnode-261_system_0.md
  • kits/crypto-market-movers/prompts/crypto-market-movers_llmnode-261_user_1.md
  • kits/crypto-market-movers/scripts/crypto-market-movers_code-node-672_code.ts

@ngisaiah ngisaiah changed the title feat: add top-crypto-movers feat: add crypto-market-movers Jul 15, 2026
Accidentally created by npm install at repo root (which has no
package.json) and swept into an earlier commit; unrelated to the
crypto-market-movers contribution.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ngisaiah ngisaiah changed the title feat: add crypto-market-movers feat: add crypto-market-movers template Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ngisaiah ngisaiah closed this Jul 17, 2026
@ngisaiah

Copy link
Copy Markdown
Contributor Author

Superseded by #262 — same contribution, reopened from a clean branch with a single scoped commit instead of the merge-noisy history here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant