From 616ed554771af1dbcb90fef3c3b7fddb2f14b326 Mon Sep 17 00:00:00 2001 From: minimalmod Date: Thu, 30 Apr 2026 07:30:10 -0300 Subject: [PATCH 1/3] feat: onchain random idea picker, dual-state search, streamlined publish flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bounty 3C: Skill Enhancement - Add 'Random Idea Picker' mode (Mode B) — pulls random ideas from the Intuition mainnet knowledge graph via GraphQL, with GitHub fallback - Dual-state checking in Step 1 — searches both onchain atoms AND GitHub issues/ideas repo before brainstorming to prevent duplicates - Improved Step 5 publish flow: - Pre-flight cost checks (atom cost, triple cost, curve ID, balance) - Duplicate atom detection — reuses existing atoms instead of failing - Batch triple creation for efficiency - Deposit preview before execution - Clear cost summary shown to user BEFORE any transaction - New trigger phrases: 'random idea', 'inspire me', 'what should I build' - Ideas list integration: new ideas auto-linked via 'top project ideas for' triple, making them discoverable by the Random Picker and Ideation Dapp - Enhanced error handling: IPFS pin failures, insufficient balance, atom exists, transaction reverts — all with clear user-facing recovery paths - Updated README with v2 feature documentation --- README.md | 39 +++++++--- SKILL.md | 209 +++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 216 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index c999b2b..ae0a96b 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,33 @@ A [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/ ## What It Does -This skill walks non-technical community members through a **5-step conversational workflow**: +This skill supports **two modes** for non-technical community members: -1. **Describe & Search** — Capture the idea and search for similar concepts in the Intuition knowledge graph +### Mode A: Full Ideation (5 Steps) +Walk through the complete idea-to-publication pipeline: + +1. **Describe & Search** — Capture the idea and search for similar concepts in **both** the Intuition knowledge graph (onchain) **and** GitHub 2. **Brainstorm & Draft** — Structure the idea into a standardized template through guided conversation 3. **Challenge** — Stress-test the idea from feasibility, market, protocol-fit, and UX angles 4. **Publish to GitHub** — Create a PR on the [intuition-box/ideas](https://github.com/intuition-box/ideas) repo -5. **Publish on Intuition** — Create an on-chain atom and claim via the Intuition Protocol +5. **Publish on Intuition** — Create an on-chain atom, link it to the curated ideas list, and stake on it + +### Mode B: Random Idea Picker 🎲 +Start with a random idea pulled from the **onchain Intuition ideas list** and refine it: + +- Queries the Intuition mainnet GraphQL API for ideas published as atoms +- Shows community backing (stakers, $TRUST staked) +- Jumps directly to Step 2 for brainstorming refinement +- Falls back to GitHub ideas repo if onchain list is empty + +## What's New (v2) + +- **🎲 Random Idea Picker** — Pull random ideas from the onchain knowledge graph for inspiration +- **🔍 Dual-state checking** — Search both GitHub AND onchain state before brainstorming to prevent duplicates +- **🔗 Onchain ideas list integration** — New ideas are automatically linked to the curated list via the `[Idea] → [top project ideas for] → [Intuition]` triple pattern +- **💰 Streamlined publish flow** — Pre-flight cost checks, batch triple creation, deposit previews, and clear error recovery +- **🛡️ Duplicate prevention** — Automatically detects existing atoms and reuses them instead of creating duplicates +- **📊 Cost transparency** — Shows exact $TRUST costs upfront before any transaction ## Installation @@ -37,12 +57,13 @@ Once installed, the skill triggers automatically when you say things like: - *"Let's brainstorm a product concept"* - *"I want to submit an idea to intuition-box"* - *"New idea for the protocol"* +- *"Random idea"* / *"Inspire me"* / *"What should I build?"* / *"Pick an idea for me"* ## Skill Structure ``` .claude/skills/intuition-ideation/ -├── SKILL.md # Main skill definition +├── SKILL.md # Main skill definition (v2 — with random picker & onchain integration) ├── assets/ │ └── workflow-overview.png # Visual overview of the 5-step workflow └── references/ @@ -56,10 +77,12 @@ Once installed, the skill triggers automatically when you say things like: The skill bootstraps by loading the full [Intuition Protocol skill](https://github.com/0xIntuition/agent-skills/blob/main/skills/intuition/SKILL.md) as context, giving it deep knowledge of atoms, triples, vaults, GraphQL queries, ABI fragments, and network configuration. This enables it to: -- Search the Intuition knowledge graph for similar ideas (Step 1) -- Suggest realistic protocol integration patterns (Step 2) -- Evaluate feasibility against actual protocol capabilities (Step 3) -- Guide on-chain publishing with correct transaction parameters (Step 5) +- **Search** the Intuition knowledge graph for similar ideas (Step 1) — now checks both onchain AND GitHub +- **Discover** existing onchain ideas via the Random Idea Picker (Mode B) +- **Suggest** realistic protocol integration patterns (Step 2) +- **Evaluate** feasibility against actual protocol capabilities (Step 3) +- **Publish** with streamlined pre-flight checks, batch triple creation, and cost previews (Step 5) +- **Link** new ideas to the curated onchain list for discoverability All technical details are translated into plain English for non-technical users. diff --git a/SKILL.md b/SKILL.md index 55b137d..7d2aa01 100644 --- a/SKILL.md +++ b/SKILL.md @@ -7,7 +7,8 @@ description: > attestation about their idea, or generally talks about "I have an idea" in the context of Intuition, web3 identity, attestations, knowledge graphs, or decentralized trust. Also trigger when someone says things like "new idea", "product concept", "build on Intuition", - "idea for the protocol", "submit idea", or "publish my idea". + "idea for the protocol", "submit idea", "publish my idea", "random idea", "pick an idea", + "inspire me", "what should I build", or "explore ideas". compatibility: tools: - Bash @@ -46,7 +47,13 @@ Think of yourself as a friendly co-founder helping someone shape their vision. K ## Important: This is a Conversational Workflow -This skill walks the user through **5 steps in order**. Don't rush — each step involves a conversation with the user. Wait for their input and confirmation before moving to the next step. Show progress clearly so the user always knows where they are. +This skill supports **two modes**: + +### Mode A: Full Ideation (5 Steps) +Walk the user through all 5 steps when they come with their own idea. This is the default mode. + +### Mode B: Random Idea Picker +When the user says "random idea", "inspire me", "what should I build", or "pick an idea for me", start with the **Random Idea Picker** (see below) to pull an existing idea from the onchain list, then jump to Step 2 for brainstorming refinement. Display this progress bar at the start and update it as you go: @@ -56,9 +63,70 @@ Display this progress bar at the start and update it as you go: --- +## Random Idea Picker (Mode B Entry Point) + +**Goal:** Pull a random idea from the Intuition onchain knowledge graph and present it for brainstorming. + +### Fetch Ideas from Onchain + +Query the Intuition mainnet GraphQL API to retrieve ideas that have been published as atoms with the `[Idea] - [top project ideas for] - [Intuition]` triple pattern: + +```bash +# Fetch ideas linked to Intuition via the "top project ideas for" predicate +RESULT=$(curl -s -X POST https://mainnet.intuition.sh/v1/graphql \ + -H "Content-Type: application/json" \ + -d '{ + "query": "query GetIdeas { triples(where: {predicate: {label: {_ilike: \"%top project ideas%\"}}, object: {label: {_ilike: \"%intuition%\"}}}, limit: 100) { id subject { term_id label type image { url } vault { totalShares positionCount } } predicate { label } object { label } vault { totalShares positionCount } } }" + }') + +echo "$RESULT" | python3 -c " +import json, sys, random +data = json.load(sys.stdin) +triples = data.get('data', {}).get('triples', []) +if not triples: + print('NO_IDEAS_FOUND') +else: + pick = random.choice(triples) + subj = pick['subject'] + shares = subj.get('vault', {}).get('totalShares', '0') + positions = subj.get('vault', {}).get('positionCount', 0) + print(f'IDEA: {subj[\"label\"]}') + print(f'ATOM_ID: {subj[\"term_id\"]}') + print(f'TYPE: {subj.get(\"type\", \"Unknown\")}') + print(f'STAKERS: {positions}') + print(f'TOTAL_SHARES: {shares}') +" +``` + +If the onchain query returns no ideas (e.g., the 300 ideas haven't been migrated yet), fall back to the GitHub ideas repo: + +```bash +# Fallback: fetch ideas from GitHub +gh api repos/intuition-box/ideas/contents/ideas --jq '.[].name' 2>/dev/null | shuf -n 1 +``` + +### Present the Random Idea + +Show the user the picked idea with context: + +> "🎲 **Random Idea from the Intuition Knowledge Graph:** +> +> **[Idea Title]** +> - On-chain atom: [link to app.intuition.systems/atom/ATOM_ID] +> - Community backing: [X] stakers with [Y] $TRUST staked +> - Status: [Already scoped / Needs refinement / Fresh concept] +> +> Want to brainstorm how to build this? Or roll again for a different idea?" + +If the user wants to proceed, jump to **Step 2** with this idea pre-loaded as the base concept. +If they want another idea, re-run the random selection (up to 5 times). +If they prefer to start fresh with their own idea, go to **Step 1**. + +--- + ## Step 1: Brief Description & Search for Similarity -**Goal:** Understand the user's idea at a high level and check if something similar already exists in the Intuition ecosystem. +**Goal:** Understand the user's idea at a high level and check if something similar already exists — both on GitHub AND on-chain. ### 1a. Capture the idea @@ -71,28 +139,50 @@ Listen carefully and reflect back a **one-paragraph summary** for them to confir - **Who** it's for (the target user) - **Why** it connects to Intuition (how it uses trust, attestations, identity, or the knowledge graph) -### 1b. Search for existing similar ideas +### 1b. Dual-check: Search GitHub AND onchain state + +**Important:** Always check BOTH sources before proceeding. This prevents duplicate work and surfaces existing community interest. + +#### Check 1: Onchain Knowledge Graph -Use the Intuition Protocol's GraphQL API to search for atoms related to the user's idea. This helps avoid duplicates and can inspire refinements. Use the endpoint from `references/intuition-protocol-skill.md` (mainnet: `https://mainnet.intuition.sh/v1/graphql`). +Search the Intuition mainnet GraphQL API for atoms related to the user's idea: ```bash # Search for atoms matching key terms from the idea -# Use mainnet GraphQL endpoint from the protocol skill reference curl -s -X POST https://mainnet.intuition.sh/v1/graphql \ -H "Content-Type: application/json" \ - -d '{"query": "query { atoms(where: {label: {_ilike: \"%KEYWORD%\"}}, limit: 10) { id term_id label type image { url } vault { totalShares positionCount } } }"}' + -d '{ + "query": "query SearchIdeas($keyword: String!) { atoms(where: {label: {_ilike: $keyword}}, limit: 10, order_by: {vault: {totalShares: desc}}) { term_id label type image { url } vault { totalShares positionCount } as_subject_triples(limit: 5) { predicate { label } object { label } } } }", + "variables": {"keyword": "%KEYWORD%"} + }' ``` Replace `KEYWORD` with 2-3 key terms from the user's idea (run separate searches). -Also search the GitHub ideas repo: +#### Check 2: GitHub Ideas Repository + ```bash gh search issues --repo intuition-box/ideas "KEYWORD" --limit 10 ``` -**Present results to the user:** -- If similar ideas exist: "I found some related concepts already in the ecosystem. Here's what exists: [list]. Your idea is [similar/different] because [reason]. Want to refine your angle, or continue as-is?" -- If nothing similar: "Good news — this looks like fresh territory! No similar ideas found in the Intuition network or the ideas repo." +#### Check 3: Onchain Ideas List + +Also check if this idea already exists in the curated ideas list: + +```bash +# Check if the idea exists as a triple in the ideas list +curl -s -X POST https://mainnet.intuition.sh/v1/graphql \ + -H "Content-Type: application/json" \ + -d '{ + "query": "query CheckIdeaExists($keyword: String!) { triples(where: {subject: {label: {_ilike: $keyword}}, predicate: {label: {_ilike: \"%top project ideas%\"}}}, limit: 5) { id subject { term_id label vault { totalShares positionCount } } } }", + "variables": {"keyword": "%KEYWORD%"} + }' +``` + +**Present combined results to the user:** +- If the idea exists onchain: "This idea already lives on the Intuition knowledge graph! It has [X] stakers with [Y] $TRUST behind it. Here's what exists: [details]. Would you like to refine your angle, stake on the existing idea, or continue with a fresh take?" +- If it exists on GitHub but not onchain: "Found this on GitHub but it hasn't been published onchain yet. Want to be the one to bring it on-chain?" +- If nothing similar found anywhere: "Good news — this looks like fresh territory! No similar ideas found on-chain or in the ideas repo." --- @@ -244,7 +334,41 @@ This step uses the **Intuition Protocol skill** (`intuition`). If the user hasn' > "For this last step, we need the Intuition Protocol skill to create your idea on-chain. You can install it with: `npx skills add 0xintuition/agent-skills --skill intuition`" -### 5a. Create the Idea Atom +### 5a. Pre-flight checks (NEW — streamlined flow) + +Before creating anything, run all checks in one batch to avoid mid-flow failures: + +```bash +# 1. Verify the user's wallet is connected and funded +# 2. Query current costs so we can give accurate estimates upfront +ATOM_COST=$(cast call $MULTIVAULT "getAtomCost()(uint256)" --rpc-url https://rpc.intuition.systems/http) +TRIPLE_COST=$(cast call $MULTIVAULT "getTripleCost()(uint256)" --rpc-url https://rpc.intuition.systems/http) +CURVE_ID=$(cast call $MULTIVAULT "getBondingCurveConfig()((address,uint256))" --rpc-url https://rpc.intuition.systems/http | awk -F, '{print $2}') + +# 3. Check if the idea atom already exists (prevent duplicate creation) +IDEA_LABEL="[slugified idea title]" +EXISTING=$(curl -s -X POST https://mainnet.intuition.sh/v1/graphql \ + -H "Content-Type: application/json" \ + -d "{\"query\": \"query { atoms(where: {label: {_eq: \\\"$IDEA_LABEL\\\"}}) { term_id label } }\"}") + +echo "=== Pre-flight Summary ===" +echo "Atom creation cost: $(cast --to-unit $ATOM_COST ether) TRUST" +echo "Triple creation cost: $(cast --to-unit $TRIPLE_COST ether) TRUST" +echo "Default curve ID: $CURVE_ID" +echo "Existing atom check: $EXISTING" +``` + +Present a clear cost summary to the user BEFORE proceeding: + +> "Here's what the on-chain publishing will cost: +> - Creating your idea atom: [X] $TRUST +> - Creating relationship triples (up to 4): [Y] $TRUST each +> - Your stake amount: [user's choice] +> - **Estimated total: [X + 4Y + stake] $TRUST** +> +> Want to proceed?" + +### 5b. Create the Idea Atom An "atom" in Intuition is like a permanent entry in a global knowledge base. We'll create one for this idea. @@ -254,17 +378,36 @@ Using the intuition skill, create an atom with: - **URL:** The permanent GitHub blob URL from Step 4c (e.g., `https://github.com/intuition-box/ideas/blob/[COMMIT_SHA]/ideas/[slug-title].md`). This links the on-chain atom directly to the immutable version of the full idea writeup on GitHub — so the atom always points to exactly what was published, even if the file is later updated. - **Image:** (optional, if the user has one) -### 5b. Create Relationship Triples +**If the atom already exists** (detected in pre-flight), skip creation and reuse the existing atom ID: + +> "Great news — an atom for this concept already exists on-chain! We'll link to it instead of creating a duplicate." + +### 5c. Create Relationship Triples (batch) + +Create triples that connect the idea to relevant concepts. **Use batch creation** to minimize transactions and gas: -Create triples that connect the idea to relevant concepts. Suggest triples like: +First, search for existing predicate and object atoms: + +```bash +# Find existing atoms for predicates and objects +for LABEL in "top project ideas for" "is-a" "built-on" "targets" "solves"; do + curl -s -X POST https://mainnet.intuition.sh/v1/graphql \ + -H "Content-Type: application/json" \ + -d "{\"query\": \"query { atoms(where: {label: {_eq: \\\"$LABEL\\\"}}, order_by: {as_predicate_triples_aggregate: {count: desc}}, limit: 1) { term_id label type } }\"}" +done +``` + +Then create all triples in a single batch: + +- `[Idea Atom]` → `top project ideas for` → `Intuition` (links to the curated ideas list) - `[Idea Atom]` → `is-a` → `Product Idea` - `[Idea Atom]` → `built-on` → `Intuition Protocol` -- `[Idea Atom]` → `targets` → `[Target User Atom]` -- `[Idea Atom]` → `solves` → `[Problem Atom]` +- `[Idea Atom]` → `targets` → `[Target User Atom]` (if applicable) +- `[Idea Atom]` → `solves` → `[Problem Atom]` (if applicable) -Search for existing atoms for the objects (e.g., "Intuition Protocol" likely already exists as an atom) before creating new ones. +**Important:** The first triple (`top project ideas for Intuition`) is what connects this idea to the curated onchain ideas list, making it discoverable by the Random Idea Picker and the Ideation Dapp. -### 5c. Stake on the Idea +### 5d. Stake on the Idea Now it's time for the user to put conviction behind their idea. Staking means depositing $TRUST tokens into the idea's vault — it's like saying "I believe in this enough to put money on it." @@ -272,11 +415,20 @@ Ask the user: > "Now here's the fun part — you can stake on your own idea to show you believe in it. Staking means depositing some $TRUST tokens into your idea's vault. The more you stake, the more visible your idea becomes, and if others stake too, early believers (that's you!) benefit. > -> How much would you like to stake on your idea? (There's a small minimum required by the protocol)" +> How much would you like to stake on your idea? (Minimum: [minDeposit from pre-flight] $TRUST)" + +**Show a preview before executing:** + +```bash +# Preview the deposit to show exact shares they'll receive +cast call $MULTIVAULT "previewDeposit(bytes32,uint256,uint256)(uint256,uint256)" \ + $IDEA_ATOM_ID $CURVE_ID $STAKE_AMOUNT \ + --rpc-url https://rpc.intuition.systems/http +``` -Once the user chooses an amount, proceed to create the claim. +> "For [AMOUNT] $TRUST, you'll receive approximately [SHARES] vault shares. After fees, [NET_AMOUNT] $TRUST will go into the vault. Proceed?" -### 5d. Create the Claim: [New Idea] → best +### 5e. Create the Claim: [New Idea] → best Create a triple (claim) that asserts this idea is among the best: - **Subject:** The newly created Idea Atom @@ -285,13 +437,13 @@ Create a triple (claim) that asserts this idea is among the best: Deposit into this claim's vault with: - The **minimum protocol deposit** (required to create the triple) -- **Plus** the additional amount the user chose to stake in 5c +- **Plus** the additional amount the user chose to stake in 5d Using the intuition skill, this means creating the triple and depositing in the same transaction (or sequentially: create triple with minimum deposit, then deposit the user's additional stake). The claim link will look like: `https://app.intuition.systems/claim/[TRIPLE_ID]` -### 5e. Post the Claim to the GitHub PR +### 5f. Post the Claim to the GitHub PR Loop back to the PR from Step 4 and add a comment inviting the community to support the idea on-chain: @@ -312,17 +464,19 @@ The author has staked [AMOUNT] $TRUST on this idea. *Published on-chain via the Intuition Ideation Skill*" ``` -### 5f. Confirm everything +### 5g. Confirm everything > "You're all set! Here's a recap of everything we did: > > 📝 **GitHub PR:** [PR URL] — your structured idea, open for community discussion > ⛓️ **Idea Atom:** [atom link] — your idea, permanently on the Intuition knowledge graph +> 🔗 **Ideas List:** Your idea is now linked to the curated Intuition ideas list — discoverable by the Random Idea Picker and the Ideation Dapp > 🏷️ **Claim:** [claim link] — your '[Idea Title] → best' claim, staked with [AMOUNT] $TRUST > 💬 **PR Comment:** posted — community members can now discover your claim directly from the PR > > Anyone in the ecosystem can now: > - Read your idea on GitHub +> - Discover it via the Random Idea Picker 🎲 > - Stake on your claim to show support > - Build on your idea by creating new connections in the knowledge graph > @@ -337,6 +491,12 @@ The author has staked [AMOUNT] $TRUST on this idea. - **User wants to skip steps:** That's OK. Steps can be skipped, but inform them what they'll miss. The minimum viable path is: Step 2 (draft) → Step 4 (GitHub publish). - **User's idea doesn't fit Intuition:** Be honest. "This is a solid idea, but I'm not sure the Intuition Protocol adds much here. Want to explore how it might fit, or would you rather focus on the idea itself and publish it as a general concept?" - **GraphQL search fails:** Fall back to text-based search of the GitHub repo only. Don't block the workflow. +- **Atom already exists:** Don't create a duplicate. Reuse the existing atom ID and inform the user. Offer to stake on the existing atom instead. +- **Insufficient $TRUST balance:** Show the user their balance and the required amount. Guide them to bridge $TRUST if needed. Don't attempt the transaction. +- **Transaction reverts:** Check the error against the Error Patterns table in the protocol skill reference. Common causes: atom already exists (use existing), insufficient value (recalculate costs), or array length mismatch (verify batch inputs). +- **IPFS pinning fails:** If structured atom pinning fails, offer to create a simpler text-only atom as fallback, or retry the pin. Don't silently skip the atom. +- **Random Idea Picker returns no results:** This means the 300 ideas haven't been migrated onchain yet. Fall back to GitHub search. Offer to help the user migrate an idea as part of their contribution (this itself could be a bounty). +- **User came from Random Picker and wants to modify the idea:** That's great — encourage remixing. The original atom stays untouched; the user creates a new refined version that references the original. --- @@ -347,3 +507,4 @@ The author has staked [AMOUNT] $TRUST on this idea. - **Use analogies.** "An atom is like a Wikipedia page for any concept" / "Staking is like putting your money where your mouth is — you're saying 'I believe in this'" - **Keep it moving.** Each step should feel like progress. If a section is taking too long, offer to fill in a sensible default and let the user edit later. - **Celebrate the finish.** Publishing an idea is an achievement. Make it feel like one. +- **Show costs upfront.** Never surprise the user with a transaction cost. Always preview and confirm before executing. From 1e574fe284774c668624a640d847ae762a5ee668 Mon Sep 17 00:00:00 2001 From: minimalmod Date: Thu, 30 Apr 2026 23:41:55 -0300 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20smart=20discovery=20modes=20?= =?UTF-8?q?=E2=80=94=20popular,=20hidden=20gems,=20rising=20+=20momentum?= =?UTF-8?q?=20scoring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements three discovery strategies for the Random Idea Picker: - Popular: top ideas by total TRUST staked - Hidden Gems: staleness-weighted rediscovery (backed but dormant >14d) - Rising: momentum scoring (stakers-per-day growth rate) Each mode has tailored presentation and users can switch mid-session. Addresses feedback from @danielamodu on PR #2. --- README.md | 27 +++++++---- SKILL.md | 135 +++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 138 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index ae0a96b..b8fee00 100644 --- a/README.md +++ b/README.md @@ -17,16 +17,26 @@ Walk through the complete idea-to-publication pipeline: 4. **Publish to GitHub** — Create a PR on the [intuition-box/ideas](https://github.com/intuition-box/ideas) repo 5. **Publish on Intuition** — Create an on-chain atom, link it to the curated ideas list, and stake on it -### Mode B: Random Idea Picker 🎲 -Start with a random idea pulled from the **onchain Intuition ideas list** and refine it: +### Mode B: Smart Idea Discovery 🎲 +Discover ideas from the **onchain Intuition ideas list** using three strategies: -- Queries the Intuition mainnet GraphQL API for ideas published as atoms -- Shows community backing (stakers, $TRUST staked) -- Jumps directly to Step 2 for brainstorming refinement -- Falls back to GitHub ideas repo if onchain list is empty +- 🔥 **Popular** — the most backed ideas, sorted by $TRUST staked +- 💎 **Hidden Gems** — ideas with community support but no recent activity (staleness-weighted rediscovery) +- 📈 **Rising** — ideas gaining momentum, ranked by stakers-per-day growth rate +- 🎲 **Random** — pure surprise mode -## What's New (v2) +All modes query the Intuition mainnet GraphQL API, compute momentum scores and activity age, and fall back to GitHub if onchain data is unavailable. +## What's New + +### v2.1 — Smart Discovery Modes +- **🔥 Popular / 💎 Hidden Gems / 📈 Rising** — Three discovery strategies for the Random Idea Picker, each with tailored presentation +- **📊 Momentum scoring** — Computes stakers-per-day growth rate to identify rising ideas +- **⏰ Staleness-weighted rediscovery** — Surfaces ideas with community backing (positionCount > 0) but no activity for 14+ days +- **🔄 Mode switching** — Users can switch between discovery modes mid-session +- **📈 Activity metrics** — Each idea now shows days since last activity and momentum score + +### v2.0 — Onchain Integration - **🎲 Random Idea Picker** — Pull random ideas from the onchain knowledge graph for inspiration - **🔍 Dual-state checking** — Search both GitHub AND onchain state before brainstorming to prevent duplicates - **🔗 Onchain ideas list integration** — New ideas are automatically linked to the curated list via the `[Idea] → [top project ideas for] → [Intuition]` triple pattern @@ -58,12 +68,13 @@ Once installed, the skill triggers automatically when you say things like: - *"I want to submit an idea to intuition-box"* - *"New idea for the protocol"* - *"Random idea"* / *"Inspire me"* / *"What should I build?"* / *"Pick an idea for me"* +- *"Show me hidden gems"* / *"What's trending?"* / *"Find forgotten ideas"* ## Skill Structure ``` .claude/skills/intuition-ideation/ -├── SKILL.md # Main skill definition (v2 — with random picker & onchain integration) +├── SKILL.md # Main skill definition (v2.1 — smart discovery modes + onchain integration) ├── assets/ │ └── workflow-overview.png # Visual overview of the 5-step workflow └── references/ diff --git a/SKILL.md b/SKILL.md index 7d2aa01..5c11e21 100644 --- a/SKILL.md +++ b/SKILL.md @@ -67,35 +67,113 @@ Display this progress bar at the start and update it as you go: **Goal:** Pull a random idea from the Intuition onchain knowledge graph and present it for brainstorming. +### Discovery Modes + +When the user triggers Mode B, offer three discovery strategies: + +> "How would you like to discover ideas? +> +> 🔥 **Popular** — the most backed ideas (highest $TRUST staked) +> 💎 **Hidden Gems** — ideas with community support that haven't had recent activity (rediscovery mode) +> 📈 **Rising** — ideas gaining momentum right now (most new stakers recently) +> +> Or just say 'surprise me' for a fully random pick!" + +Map the user's choice: +- "popular" / "top" / "best" → `popular` mode (sort by `totalShares desc`) +- "hidden" / "forgotten" / "gems" / "rediscovery" → `rediscovery` mode (sort by `updatedAt asc`, filter `positionCount > 0`) +- "rising" / "momentum" / "trending" → `momentum` mode (sort by recent position growth) +- "surprise" / "random" / default → pure random selection + ### Fetch Ideas from Onchain -Query the Intuition mainnet GraphQL API to retrieve ideas that have been published as atoms with the `[Idea] - [top project ideas for] - [Intuition]` triple pattern: +Query the Intuition mainnet GraphQL API to retrieve ideas that have been published as atoms with the `[Idea] - [top project ideas for] - [Intuition]` triple pattern. + +**Base query** (used by all modes): ```bash # Fetch ideas linked to Intuition via the "top project ideas for" predicate +# MODE_ORDER_BY is set based on user's choice (see mode-specific overrides below) RESULT=$(curl -s -X POST https://mainnet.intuition.sh/v1/graphql \ -H "Content-Type: application/json" \ -d '{ - "query": "query GetIdeas { triples(where: {predicate: {label: {_ilike: \"%top project ideas%\"}}, object: {label: {_ilike: \"%intuition%\"}}}, limit: 100) { id subject { term_id label type image { url } vault { totalShares positionCount } } predicate { label } object { label } vault { totalShares positionCount } } }" + "query": "query GetIdeas { triples(where: {predicate: {label: {_ilike: \"%top project ideas%\"}}, object: {label: {_ilike: \"%intuition%\"}}}, limit: 100) { id createdAt updatedAt subject { term_id label type image { url } createdAt updatedAt vault { totalShares positionCount currentSharePrice } } predicate { label } object { label } vault { totalShares positionCount } } }" }') +``` + +**Mode-specific selection logic:** -echo "$RESULT" | python3 -c " +```python import json, sys, random +from datetime import datetime, timezone + data = json.load(sys.stdin) triples = data.get('data', {}).get('triples', []) + if not triples: print('NO_IDEAS_FOUND') + sys.exit(0) + +MODE = sys.argv[1] if len(sys.argv) > 1 else 'random' +now = datetime.now(timezone.utc) + +def parse_ts(ts_str): + """Parse ISO timestamp, return datetime or epoch if missing.""" + if not ts_str: + return datetime(2020, 1, 1, tzinfo=timezone.utc) + return datetime.fromisoformat(ts_str.replace('Z', '+00:00')) + +def days_since(ts_str): + return (now - parse_ts(ts_str)).days or 1 + +# Enrich each triple with computed metrics +for t in triples: + subj = t['subject'] + vault = subj.get('vault', {}) + shares = int(vault.get('totalShares', '0')) + positions = vault.get('positionCount', 0) + age_days = days_since(subj.get('updatedAt')) + t['_shares'] = shares + t['_positions'] = positions + t['_age_days'] = age_days + # Momentum: stakers per day of age (higher = faster growing) + t['_momentum'] = positions / age_days if age_days > 0 else 0 + # Rediscovery: has backers but hasn't been touched recently + t['_rediscovery'] = (positions > 0 and age_days > 14) + +if MODE == 'popular': + # Sort by total shares descending, pick from top 10 + ranked = sorted(triples, key=lambda t: t['_shares'], reverse=True)[:10] + pick = random.choice(ranked) +elif MODE == 'rediscovery': + # Filter: has stakers but dormant >14 days, sort by staleness + candidates = [t for t in triples if t['_rediscovery']] + if not candidates: + candidates = sorted(triples, key=lambda t: t['_age_days'], reverse=True)[:10] + pick = random.choice(candidates[:10]) +elif MODE == 'momentum': + # Sort by stakers-per-day, pick from top 10 fastest growing + ranked = sorted(triples, key=lambda t: t['_momentum'], reverse=True)[:10] + pick = random.choice(ranked) else: + # Pure random pick = random.choice(triples) - subj = pick['subject'] - shares = subj.get('vault', {}).get('totalShares', '0') - positions = subj.get('vault', {}).get('positionCount', 0) - print(f'IDEA: {subj[\"label\"]}') - print(f'ATOM_ID: {subj[\"term_id\"]}') - print(f'TYPE: {subj.get(\"type\", \"Unknown\")}') - print(f'STAKERS: {positions}') - print(f'TOTAL_SHARES: {shares}') -" + +subj = pick['subject'] +vault = subj.get('vault', {}) +shares = vault.get('totalShares', '0') +positions = vault.get('positionCount', 0) +age = pick['_age_days'] +momentum = pick['_momentum'] + +print(f'IDEA: {subj["label"]}') +print(f'ATOM_ID: {subj["term_id"]}') +print(f'TYPE: {subj.get("type", "Unknown")}') +print(f'STAKERS: {positions}') +print(f'TOTAL_SHARES: {shares}') +print(f'DAYS_SINCE_ACTIVITY: {age}') +print(f'MOMENTUM_SCORE: {momentum:.4f}') +print(f'MODE: {MODE}') ``` If the onchain query returns no ideas (e.g., the 300 ideas haven't been migrated yet), fall back to the GitHub ideas repo: @@ -107,16 +185,41 @@ gh api repos/intuition-box/ideas/contents/ideas --jq '.[].name' 2>/dev/null | sh ### Present the Random Idea -Show the user the picked idea with context: +Show the user the picked idea with context. Tailor the presentation based on the discovery mode: -> "🎲 **Random Idea from the Intuition Knowledge Graph:** +**Popular mode:** +> "🔥 **Top Idea from the Intuition Knowledge Graph:** > > **[Idea Title]** > - On-chain atom: [link to app.intuition.systems/atom/ATOM_ID] > - Community backing: [X] stakers with [Y] $TRUST staked -> - Status: [Already scoped / Needs refinement / Fresh concept] +> - Status: [Already scoped / Needs refinement / Fresh concept]" + +**Rediscovery mode:** +> "💎 **Hidden Gem Rediscovered:** > -> Want to brainstorm how to build this? Or roll again for a different idea?" +> **[Idea Title]** +> - On-chain atom: [link to app.intuition.systems/atom/ATOM_ID] +> - Community backing: [X] stakers — but no activity for [N] days +> - This idea had believers but got buried. Could you be the one to revive it?" + +**Momentum mode:** +> "📈 **Rising Idea — Gaining Traction:** +> +> **[Idea Title]** +> - On-chain atom: [link to app.intuition.systems/atom/ATOM_ID] +> - [X] stakers and growing — momentum score: [M] +> - This idea is picking up steam. Jump in now while it's early!" + +**Random mode:** +> "🎲 **Random Idea from the Intuition Knowledge Graph:** +> +> **[Idea Title]** +> - On-chain atom: [link to app.intuition.systems/atom/ATOM_ID] +> - Community backing: [X] stakers with [Y] $TRUST staked" + +After presenting, always offer: +> "Want to brainstorm how to build this? Or roll again for a different idea? (You can also switch modes: `popular`, `hidden gems`, `rising`, or `random`)" If the user wants to proceed, jump to **Step 2** with this idea pre-loaded as the base concept. If they want another idea, re-run the random selection (up to 5 times). From 94390f1aba8cab25dfe468a64c01e4bea7394f9b Mon Sep 17 00:00:00 2001 From: minimalmod Date: Fri, 1 May 2026 04:53:04 -0300 Subject: [PATCH 3/3] feat: configurable thresholds, min-age rising filter, selection reasoning Addresses feedback from @danielamodu: - dormancy_days param (default 14, user-tunable) for Hidden Gems - min_rising_age_days param (default 3) prevents <3-day ideas scoring as rising - SELECTION_REASON output explains WHY each idea was picked - Interactive dormancy prompt when entering Hidden Gems mode - Enhanced presentation with threshold transparency --- README.md | 7 +++++++ SKILL.md | 44 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b8fee00..0b225f5 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,13 @@ All modes query the Intuition mainnet GraphQL API, compute momentum scores and a ## What's New +### v2.2 — Configurable Intelligence (feedback from [@danielamodu](https://github.com/danielamodu)) +- **🎛️ Configurable `dormancy_days`** — Hidden Gems threshold is now tunable (default: 14 days). Power users can set custom values for seasonal ideas (e.g., infrastructure ideas dormant 30+ days) +- **⏱️ Rising mode minimum age filter** — New `min_rising_age_days` parameter (default: 3 days) prevents brand-new ideas with 1 staker from falsely appearing as "rising" +- **🧠 Selection reasoning** — Each picked idea now includes a `SELECTION_REASON` explaining WHY it was chosen (e.g., "Gaining 2.45 stakers/day — fastest growing in the pool") +- **💬 Interactive threshold prompt** — When entering Hidden Gems mode, the skill proactively asks the user if they want to adjust the dormancy window +- **📊 Enhanced output** — Presentations now show `DORMANCY_THRESHOLD` and `MIN_RISING_AGE` for full transparency + ### v2.1 — Smart Discovery Modes - **🔥 Popular / 💎 Hidden Gems / 📈 Rising** — Three discovery strategies for the Random Idea Picker, each with tailored presentation - **📊 Momentum scoring** — Computes stakers-per-day growth rate to identify rising ideas diff --git a/SKILL.md b/SKILL.md index 5c11e21..7913885 100644 --- a/SKILL.md +++ b/SKILL.md @@ -85,6 +85,20 @@ Map the user's choice: - "rising" / "momentum" / "trending" → `momentum` mode (sort by recent position growth) - "surprise" / "random" / default → pure random selection +### Configurable Thresholds + +Both `Hidden Gems` and `Rising` modes support user-tunable parameters: + +| Parameter | Default | Description | +|-----------|---------|-------------| +| `dormancy_days` | 14 | Minimum days of inactivity for Hidden Gems eligibility | +| `min_rising_age_days` | 3 | Minimum age (days) for Rising mode — prevents brand-new ideas with 1 staker from appearing as "rising" | + +If the user selects **Hidden Gems**, proactively ask: +> "The default dormancy threshold is **14 days** — ideas untouched for longer are surfaced first. Want to adjust? Some seasonal infrastructure ideas may need 30+ days. Just say a number or 'default'." + +Parse the user's response: a number sets `dormancy_days`, anything else keeps the default (14). + ### Fetch Ideas from Onchain Query the Intuition mainnet GraphQL API to retrieve ideas that have been published as atoms with the `[Idea] - [top project ideas for] - [Intuition]` triple pattern. @@ -115,6 +129,9 @@ if not triples: sys.exit(0) MODE = sys.argv[1] if len(sys.argv) > 1 else 'random' +# Configurable thresholds (power users can tune via CLI args) +DORMANCY_DAYS = int(sys.argv[2]) if len(sys.argv) > 2 else 14 +MIN_RISING_AGE_DAYS = int(sys.argv[3]) if len(sys.argv) > 3 else 3 now = datetime.now(timezone.utc) def parse_ts(ts_str): @@ -139,21 +156,25 @@ for t in triples: # Momentum: stakers per day of age (higher = faster growing) t['_momentum'] = positions / age_days if age_days > 0 else 0 # Rediscovery: has backers but hasn't been touched recently - t['_rediscovery'] = (positions > 0 and age_days > 14) + t['_rediscovery'] = (positions > 0 and age_days > DORMANCY_DAYS) if MODE == 'popular': # Sort by total shares descending, pick from top 10 ranked = sorted(triples, key=lambda t: t['_shares'], reverse=True)[:10] pick = random.choice(ranked) elif MODE == 'rediscovery': - # Filter: has stakers but dormant >14 days, sort by staleness + # Filter: has stakers but dormant >DORMANCY_DAYS days, sort by staleness candidates = [t for t in triples if t['_rediscovery']] if not candidates: candidates = sorted(triples, key=lambda t: t['_age_days'], reverse=True)[:10] pick = random.choice(candidates[:10]) elif MODE == 'momentum': # Sort by stakers-per-day, pick from top 10 fastest growing - ranked = sorted(triples, key=lambda t: t['_momentum'], reverse=True)[:10] + # Filter out ideas younger than MIN_RISING_AGE_DAYS to avoid false positives + mature = [t for t in triples if t['_age_days'] >= MIN_RISING_AGE_DAYS] + if not mature: + mature = triples # fallback if all ideas are brand new + ranked = sorted(mature, key=lambda t: t['_momentum'], reverse=True)[:10] pick = random.choice(ranked) else: # Pure random @@ -166,6 +187,16 @@ positions = vault.get('positionCount', 0) age = pick['_age_days'] momentum = pick['_momentum'] +# Selection reasoning — explain WHY this idea was picked +if MODE == 'popular': + reason = f'Top-backed idea with {positions} stakers and {shares} $TRUST staked' +elif MODE == 'rediscovery': + reason = f'Had {positions} believers but dormant for {age} days — ripe for revival' +elif MODE == 'momentum': + reason = f'Gaining {momentum:.2f} stakers/day — fastest growing in the pool' +else: + reason = 'Randomly selected from the full onchain idea pool' + print(f'IDEA: {subj["label"]}') print(f'ATOM_ID: {subj["term_id"]}') print(f'TYPE: {subj.get("type", "Unknown")}') @@ -174,6 +205,9 @@ print(f'TOTAL_SHARES: {shares}') print(f'DAYS_SINCE_ACTIVITY: {age}') print(f'MOMENTUM_SCORE: {momentum:.4f}') print(f'MODE: {MODE}') +print(f'DORMANCY_THRESHOLD: {DORMANCY_DAYS}') +print(f'MIN_RISING_AGE: {MIN_RISING_AGE_DAYS}') +print(f'SELECTION_REASON: {reason}') ``` If the onchain query returns no ideas (e.g., the 300 ideas haven't been migrated yet), fall back to the GitHub ideas repo: @@ -201,6 +235,7 @@ Show the user the picked idea with context. Tailor the presentation based on the > **[Idea Title]** > - On-chain atom: [link to app.intuition.systems/atom/ATOM_ID] > - Community backing: [X] stakers — but no activity for [N] days +> - Dormancy threshold: [DORMANCY_DAYS] days (configurable) > - This idea had believers but got buried. Could you be the one to revive it?" **Momentum mode:** @@ -208,7 +243,8 @@ Show the user the picked idea with context. Tailor the presentation based on the > > **[Idea Title]** > - On-chain atom: [link to app.intuition.systems/atom/ATOM_ID] -> - [X] stakers and growing — momentum score: [M] +> - [X] stakers and growing — momentum score: [M] stakers/day +> - Age: [N] days (min threshold: [MIN_RISING_AGE_DAYS] days) > - This idea is picking up steam. Jump in now while it's early!" **Random mode:**