stellar-agent 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +162 -0
  2. package/package.json +37 -0
  3. package/src/core-skills/module-help.csv +5 -0
  4. package/src/core-skills/module.yaml +33 -0
  5. package/src/core-skills/stellar-brainstorming/SKILL.md +6 -0
  6. package/src/core-skills/stellar-brainstorming/steps/step-01-session-setup.md +67 -0
  7. package/src/core-skills/stellar-brainstorming/steps/step-02a-user-selected.md +20 -0
  8. package/src/core-skills/stellar-brainstorming/steps/step-02b-ai-recommended.md +29 -0
  9. package/src/core-skills/stellar-brainstorming/steps/step-03-technique-execution.md +69 -0
  10. package/src/core-skills/stellar-brainstorming/steps/step-04-idea-organization.md +64 -0
  11. package/src/core-skills/stellar-brainstorming/workflow.md +50 -0
  12. package/src/core-skills/stellar-help/SKILL.md +71 -0
  13. package/src/core-skills/stellar-party-mode/SKILL.md +109 -0
  14. package/src/scripts/resolve_config.py +170 -0
  15. package/src/scripts/resolve_customization.py +209 -0
  16. package/src/stellar-skills/1-analysis/stellar-agent-analyst/SKILL.md +71 -0
  17. package/src/stellar-skills/1-analysis/stellar-agent-analyst/customize.toml +41 -0
  18. package/src/stellar-skills/1-analysis/stellar-analytics/SKILL.md +239 -0
  19. package/src/stellar-skills/1-analysis/stellar-domain-research/SKILL.md +82 -0
  20. package/src/stellar-skills/1-analysis/stellar-market-research/SKILL.md +90 -0
  21. package/src/stellar-skills/2-planning/stellar-agent-pm/SKILL.md +57 -0
  22. package/src/stellar-skills/2-planning/stellar-agent-pm/customize.toml +36 -0
  23. package/src/stellar-skills/2-planning/stellar-epics-stories/SKILL.md +106 -0
  24. package/src/stellar-skills/2-planning/stellar-prd/SKILL.md +115 -0
  25. package/src/stellar-skills/2-planning/stellar-project-brief/SKILL.md +83 -0
  26. package/src/stellar-skills/3-architecture/stellar-agent-architect/SKILL.md +53 -0
  27. package/src/stellar-skills/3-architecture/stellar-agent-architect/customize.toml +31 -0
  28. package/src/stellar-skills/3-architecture/stellar-architecture-doc/SKILL.md +162 -0
  29. package/src/stellar-skills/4-implementation/stellar-agent-developer/SKILL.md +54 -0
  30. package/src/stellar-skills/4-implementation/stellar-agent-developer/customize.toml +56 -0
  31. package/src/stellar-skills/4-implementation/stellar-agent-devops/SKILL.md +54 -0
  32. package/src/stellar-skills/4-implementation/stellar-agent-devops/customize.toml +36 -0
  33. package/src/stellar-skills/4-implementation/stellar-agent-frontend/SKILL.md +54 -0
  34. package/src/stellar-skills/4-implementation/stellar-agent-frontend/customize.toml +52 -0
  35. package/src/stellar-skills/4-implementation/stellar-agent-qa/SKILL.md +54 -0
  36. package/src/stellar-skills/4-implementation/stellar-agent-qa/customize.toml +31 -0
  37. package/src/stellar-skills/4-implementation/stellar-create-asset/SKILL.md +145 -0
  38. package/src/stellar-skills/4-implementation/stellar-create-transaction/SKILL.md +134 -0
  39. package/src/stellar-skills/4-implementation/stellar-deploy-contract/SKILL.md +124 -0
  40. package/src/stellar-skills/4-implementation/stellar-freighter-integration/SKILL.md +193 -0
  41. package/src/stellar-skills/4-implementation/stellar-horizon-integration/SKILL.md +198 -0
  42. package/src/stellar-skills/4-implementation/stellar-init-contract/SKILL.md +102 -0
  43. package/src/stellar-skills/4-implementation/stellar-liquidity-pool/SKILL.md +156 -0
  44. package/src/stellar-skills/4-implementation/stellar-nextjs-setup/SKILL.md +198 -0
  45. package/src/stellar-skills/4-implementation/stellar-nextjs-soroban/SKILL.md +228 -0
  46. package/src/stellar-skills/4-implementation/stellar-nextjs-wallet/SKILL.md +276 -0
  47. package/src/stellar-skills/4-implementation/stellar-sep10-auth/SKILL.md +252 -0
  48. package/src/stellar-skills/4-implementation/stellar-setup-environment/SKILL.md +163 -0
  49. package/src/stellar-skills/4-implementation/stellar-setup-trustline/SKILL.md +107 -0
  50. package/src/stellar-skills/4-implementation/stellar-test-contract/SKILL.md +146 -0
  51. package/src/stellar-skills/4-implementation/stellar-write-contract/SKILL.md +140 -0
  52. package/src/stellar-skills/module-help.csv +24 -0
  53. package/src/stellar-skills/module.yaml +103 -0
  54. package/tools/installer/cli-utils.js +39 -0
  55. package/tools/installer/commands/init.js +335 -0
  56. package/tools/installer/fs-native.js +116 -0
  57. package/tools/installer/prompts.js +852 -0
  58. package/tools/installer/stellar-cli.js +80 -0
  59. package/tools/installer/yaml-format.js +245 -0
@@ -0,0 +1,239 @@
1
+ ---
2
+ name: stellar-analytics
3
+ description: 'Set up dbt blockchain analytics for Stellar network data including transaction modeling, account analysis, and token flow reporting. Use when the user wants to analyze Stellar blockchain data with dbt or build analytics dashboards.'
4
+ ---
5
+
6
+ # Stellar Analytics with dbt
7
+
8
+ ## Purpose
9
+
10
+ Guide setting up dbt models for Stellar blockchain data analytics and tokenomics reporting.
11
+
12
+ ## On Activation
13
+
14
+ Load `{project_knowledge}` from `{project-root}/_stellar/stellar/config.yaml`.
15
+
16
+ ## Workflow
17
+
18
+ ### Step 1: Choose a Data Source
19
+
20
+ Stellar blockchain data sources:
21
+
22
+ | Source | Coverage | Cost | Best for |
23
+ |---|---|---|---|
24
+ | **Horizon API** | Real-time + recent history | Free | Low-volume queries, real-time |
25
+ | **Galactic** (SDF BigQuery) | Full history | Free public dataset | Large-scale analysis |
26
+ | **StellarExpert API** | Full history + enrichment | Free tier available | Token analytics |
27
+ | **Self-hosted** | Full control | Infrastructure cost | Production analytics |
28
+
29
+ Ask which source the user has access to.
30
+
31
+ ### Step 2: Set Up dbt Project
32
+
33
+ ```bash
34
+ pip install dbt-bigquery # or dbt-postgres depending on source
35
+ dbt init stellar_analytics
36
+ cd stellar_analytics
37
+ ```
38
+
39
+ ### Step 3: Configure Source
40
+
41
+ **BigQuery (Galactic):**
42
+
43
+ ```yaml
44
+ # profiles.yml
45
+ stellar_analytics:
46
+ target: dev
47
+ outputs:
48
+ dev:
49
+ type: bigquery
50
+ method: oauth
51
+ project: your-gcp-project
52
+ dataset: stellar_dev
53
+ threads: 4
54
+ ```
55
+
56
+ **`models/sources.yml`:**
57
+
58
+ ```yaml
59
+ version: 2
60
+
61
+ sources:
62
+ - name: stellar
63
+ database: crypto-stellar
64
+ schema: crypto_stellar
65
+ tables:
66
+ - name: transactions
67
+ - name: operations
68
+ - name: ledgers
69
+ - name: effects
70
+ - name: assets
71
+ ```
72
+
73
+ ### Step 4: Staging Models
74
+
75
+ **`models/staging/stg_transactions.sql`:**
76
+
77
+ ```sql
78
+ select
79
+ id as transaction_hash,
80
+ ledger as ledger_sequence,
81
+ created_at,
82
+ source_account,
83
+ fee_charged,
84
+ operation_count,
85
+ successful,
86
+ memo_type,
87
+ memo
88
+ from {{ source('stellar', 'transactions') }}
89
+ where successful = true
90
+ ```
91
+
92
+ **`models/staging/stg_operations.sql`:**
93
+
94
+ ```sql
95
+ select
96
+ id as operation_id,
97
+ transaction_hash,
98
+ type as operation_type,
99
+ source_account,
100
+ created_at,
101
+ -- Payment-specific fields
102
+ asset_code,
103
+ asset_issuer,
104
+ asset_type,
105
+ amount,
106
+ from as payment_from,
107
+ to as payment_to
108
+ from {{ source('stellar', 'operations') }}
109
+ ```
110
+
111
+ **`models/staging/stg_ledgers.sql`:**
112
+
113
+ ```sql
114
+ select
115
+ sequence as ledger_sequence,
116
+ closed_at,
117
+ transaction_count,
118
+ operation_count,
119
+ total_coins,
120
+ fee_pool,
121
+ base_fee_in_stroops,
122
+ base_reserve_in_stroops
123
+ from {{ source('stellar', 'ledgers') }}
124
+ ```
125
+
126
+ ### Step 5: Mart Models
127
+
128
+ **`models/marts/asset_flows.sql`** — Token transfer analysis:
129
+
130
+ ```sql
131
+ with payments as (
132
+ select
133
+ asset_code,
134
+ asset_issuer,
135
+ payment_from,
136
+ payment_to,
137
+ cast(amount as float64) as amount,
138
+ date(created_at) as payment_date
139
+ from {{ ref('stg_operations') }}
140
+ where operation_type = 'payment'
141
+ and asset_code is not null
142
+ )
143
+ select
144
+ asset_code,
145
+ asset_issuer,
146
+ payment_date,
147
+ count(*) as payment_count,
148
+ sum(amount) as volume,
149
+ count(distinct payment_from) as unique_senders,
150
+ count(distinct payment_to) as unique_receivers
151
+ from payments
152
+ group by 1, 2, 3
153
+ ```
154
+
155
+ **`models/marts/account_balances.sql`** — Account-level balance tracking:
156
+
157
+ ```sql
158
+ with trustlines as (
159
+ select
160
+ account_id,
161
+ asset_code,
162
+ asset_issuer,
163
+ balance,
164
+ updated_at
165
+ from {{ source('stellar', 'trustlines') }}
166
+ )
167
+ select
168
+ account_id,
169
+ asset_code,
170
+ asset_issuer,
171
+ cast(balance as float64) / 10000000 as balance_xlm_units,
172
+ updated_at
173
+ from trustlines
174
+ where balance > 0
175
+ ```
176
+
177
+ **`models/marts/network_health.sql`** — Daily network metrics:
178
+
179
+ ```sql
180
+ select
181
+ date(closed_at) as date,
182
+ count(*) as ledger_count,
183
+ sum(transaction_count) as transaction_count,
184
+ sum(operation_count) as operation_count,
185
+ avg(base_fee_in_stroops) as avg_base_fee,
186
+ max(transaction_count) as peak_txns_per_ledger
187
+ from {{ ref('stg_ledgers') }}
188
+ group by 1
189
+ order by 1 desc
190
+ ```
191
+
192
+ ### Step 6: Tokenomics Models
193
+
194
+ **`models/marts/token_supply.sql`** — Track circulating supply:
195
+
196
+ ```sql
197
+ -- Net supply = issued - burned (sent to null issuer account)
198
+ with issued as (
199
+ select asset_code, asset_issuer, sum(cast(amount as float64)) as issued
200
+ from {{ ref('stg_operations') }}
201
+ where operation_type = 'payment' and payment_from = asset_issuer
202
+ group by 1, 2
203
+ ),
204
+ burned as (
205
+ select asset_code, asset_issuer, sum(cast(amount as float64)) as burned
206
+ from {{ ref('stg_operations') }}
207
+ where operation_type = 'payment' and payment_to = asset_issuer
208
+ group by 1, 2
209
+ )
210
+ select
211
+ i.asset_code,
212
+ i.asset_issuer,
213
+ i.issued,
214
+ coalesce(b.burned, 0) as burned,
215
+ i.issued - coalesce(b.burned, 0) as circulating_supply
216
+ from issued i
217
+ left join burned b using (asset_code, asset_issuer)
218
+ ```
219
+
220
+ ### Step 7: Tests and Documentation
221
+
222
+ **`models/staging/schema.yml`:**
223
+
224
+ ```yaml
225
+ version: 2
226
+ models:
227
+ - name: stg_transactions
228
+ columns:
229
+ - name: transaction_hash
230
+ tests: [unique, not_null]
231
+ - name: ledger_sequence
232
+ tests: [not_null]
233
+ ```
234
+
235
+ Run: `dbt test && dbt docs generate && dbt docs serve`
236
+
237
+ ### Step 8: Output
238
+
239
+ Save model documentation to `{project_knowledge}/analytics/`.
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: stellar-domain-research
3
+ description: 'Deep research into Stellar protocol specifics, regulatory landscape, SEPs, and use case viability for a specific domain. Use when the user needs to understand Stellar protocol capabilities or regulatory requirements for their dApp.'
4
+ ---
5
+
6
+ # Stellar Domain Research
7
+
8
+ ## Purpose
9
+
10
+ Produce a comprehensive domain knowledge document covering Stellar protocol capabilities and real-world constraints for a specific use case.
11
+
12
+ ## On Activation
13
+
14
+ Load config from `{project-root}/_stellar/stellar/config.yaml`. Check `{project_knowledge}` for existing research.
15
+
16
+ ## Research Areas
17
+
18
+ ### Step 1: Define the Domain
19
+
20
+ Ask the user to describe:
21
+ - The specific Stellar domain to research (e.g., stablecoin issuance, remittance, tokenized securities, NFTs, DeFi)
22
+ - Known regulatory jurisdictions relevant to the domain
23
+ - Level of depth needed (overview vs. implementation-ready)
24
+
25
+ ### Step 2: Stellar Protocol Research
26
+
27
+ Identify which Stellar Ecosystem Proposals (SEPs) are relevant:
28
+
29
+ | SEP | Purpose | Relevant for |
30
+ |---|---|---|
31
+ | SEP-1 | stellar.toml anchor documentation | Any asset issuer |
32
+ | SEP-6 | Deposit and withdrawal API | Fiat on/off ramps |
33
+ | SEP-10 | Web Authentication | Any dApp needing auth |
34
+ | SEP-12 | KYC API | Regulated assets |
35
+ | SEP-24 | Hosted deposit/withdrawal | Interactive anchoring |
36
+ | SEP-31 | Cross-border payments API | Remittance corridors |
37
+ | SEP-38 | Quotes API | Price discovery |
38
+
39
+ ### Step 3: Protocol Capabilities vs. Constraints
40
+
41
+ Document for the specific domain:
42
+ - What Stellar natively supports (trustlines, DEX, liquidity pools, Soroban)
43
+ - What requires off-chain components (KYC, fiat rails, complex state)
44
+ - Protocol limits relevant to the domain (operation limits, trustline limits, data entry limits)
45
+ - Known limitations or gotchas
46
+
47
+ ### Step 4: Regulatory Context
48
+
49
+ For the relevant jurisdictions, research:
50
+ - Money transmission licensing requirements
51
+ - AML/KYC obligations
52
+ - Securities classification risk (if tokens are involved)
53
+ - Data residency requirements
54
+ - Relevant existing regulatory guidance on blockchain/DeFi
55
+
56
+ **Note on regulatory advice**: All regulatory research is informational. Always recommend the user consult qualified legal counsel before making compliance decisions.
57
+
58
+ ### Step 5: Implementation Patterns
59
+
60
+ Document how similar use cases have been implemented on Stellar:
61
+ - Reference implementations (open-source Stellar projects in the domain)
62
+ - SDF reference implementations and documentation
63
+ - Anchor directory for similar anchors
64
+
65
+ ### Step 6: Output Document
66
+
67
+ Write to `{project-root}/_stellar-output/planning-artifacts/domain-research.md`:
68
+
69
+ ```markdown
70
+ # Domain Research: {domain}
71
+ **Date**: {date}
72
+ **Researcher**: Aria (Stellar Agent)
73
+
74
+ ## Domain Overview
75
+ ## Relevant Stellar SEPs
76
+ ## Protocol Capabilities and Constraints
77
+ ## Regulatory Context
78
+ ## Reference Implementations
79
+ ## Key Findings
80
+ ## Open Questions
81
+ ## Data Sources
82
+ ```
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: stellar-market-research
3
+ description: 'Research the Stellar DeFi landscape, competitive alternatives, and user needs analysis for a specific Stellar use case. Use when the user wants to understand the competitive landscape or validate market opportunity on Stellar.'
4
+ ---
5
+
6
+ # Stellar Market Research
7
+
8
+ ## Purpose
9
+
10
+ Produce evidence-based market research to inform Stellar dApp product decisions.
11
+
12
+ ## On Activation
13
+
14
+ Load config from `{project-root}/_stellar/stellar/config.yaml`. Check for existing research at `{project-root}/_stellar-output/planning-artifacts/` before starting new work.
15
+
16
+ ## Research Framework
17
+
18
+ ### Step 1: Define Research Scope
19
+
20
+ Ask the user:
21
+ - What is the specific use case or problem being researched?
22
+ - Target geography or demographic? (relevant for remittance corridors, cross-border payments)
23
+ - Timeframe for the research?
24
+ - Are there specific competitors to analyze?
25
+
26
+ ### Step 2: Stellar Ecosystem Analysis
27
+
28
+ Investigate the existing Stellar ecosystem for similar solutions:
29
+
30
+ **Key areas to research:**
31
+ - Existing Stellar anchors (SEP-24, SEP-31) for the use case
32
+ - Active Stellar dApps in the domain (check StellarExpert, Stellar ecosystem directory)
33
+ - SDF grants and projects in the space
34
+ - Stellar Protocol Enhancement Proposals (SEPs) relevant to the domain
35
+
36
+ **Key directories:**
37
+ - `https://stellar.org/ecosystem/projects` — official project directory
38
+ - `https://stellarexpert.com` — on-chain analytics for market sizing
39
+
40
+ ### Step 3: Competitive Landscape
41
+
42
+ For each competitor or alternative, document:
43
+ - Solution overview and target users
44
+ - On-chain vs. off-chain architecture choices
45
+ - Token model (if any)
46
+ - Key differentiators
47
+ - Weaknesses or gaps
48
+
49
+ **Comparison matrix columns:**
50
+ | Feature | Our Solution | Competitor A | Competitor B |
51
+ |---|---|---|---|
52
+
53
+ ### Step 4: User Needs Analysis
54
+
55
+ Document the Jobs-to-be-Done for target users:
56
+ - **Functional job**: What task are they trying to complete?
57
+ - **Emotional job**: How do they want to feel while doing it?
58
+ - **Social job**: How do they want to be perceived?
59
+
60
+ For Stellar-specific contexts, consider:
61
+ - Unbanked/underbanked users (financial inclusion angle)
62
+ - Remittance senders and receivers
63
+ - Merchants accepting cross-border payments
64
+ - DeFi participants seeking yield
65
+
66
+ ### Step 5: Market Sizing
67
+
68
+ Estimate addressable market:
69
+ - Total addressable market (TAM) — global market for the use case
70
+ - Serviceable addressable market (SAM) — what Stellar can realistically serve
71
+ - Serviceable obtainable market (SOM) — realistic first-year target
72
+
73
+ Use Stellar network stats (from StellarExpert or Horizon) for on-chain benchmarks.
74
+
75
+ ### Step 6: Output Document
76
+
77
+ Write research to `{project-root}/_stellar-output/planning-artifacts/market-research.md`:
78
+
79
+ ```markdown
80
+ # Market Research: {use_case}
81
+ **Date**: {date}
82
+ **Researcher**: Aria (Stellar Agent)
83
+
84
+ ## Executive Summary
85
+ ## Competitive Landscape
86
+ ## User Needs
87
+ ## Market Sizing
88
+ ## Key Findings and Recommendations
89
+ ## Data Sources
90
+ ```
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: stellar-agent-pm
3
+ description: 'dApp product manager for Stellar PRD creation and requirements discovery. Use when the user asks to talk to Kai or requests the product manager.'
4
+ ---
5
+
6
+ # Kai — dApp Product Manager
7
+
8
+ ## Overview
9
+
10
+ You are Kai, the dApp Product Manager. You drive product planning for Stellar blockchain applications through user interviews, requirements discovery, and stakeholder alignment. You translate financial inclusion goals into small, validated increments that development can ship.
11
+
12
+ ## Conventions
13
+
14
+ - Bare paths resolve from the skill root.
15
+ - `{skill-root}` resolves to this skill's installed directory.
16
+ - `{project-root}`-prefixed paths resolve from the project working directory.
17
+ - `{skill-name}` resolves to the skill directory's basename.
18
+
19
+ ## On Activation
20
+
21
+ ### Step 1: Resolve the Agent Block
22
+
23
+ Run: `python3 {project-root}/_stellar/scripts/resolve_customization.py --skill {skill-root} --key agent`
24
+
25
+ **If the script fails**, resolve the `agent` block yourself by reading these three files in base → team → user order:
26
+ 1. `{skill-root}/customize.toml` — defaults
27
+ 2. `{project-root}/_stellar/custom/{skill-name}.toml` — team overrides
28
+ 3. `{project-root}/_stellar/custom/{skill-name}.user.toml` — personal overrides
29
+
30
+ ### Step 2: Execute Prepend Steps
31
+
32
+ Execute each entry in `{agent.activation_steps_prepend}` in order.
33
+
34
+ ### Step 3: Adopt Persona
35
+
36
+ Adopt the Kai / dApp Product Manager identity. Layer the customized persona: `{agent.role}`, `{agent.identity}`, `{agent.communication_style}`, `{agent.principles}`. Do not break character.
37
+
38
+ ### Step 4: Load Persistent Facts
39
+
40
+ Treat `{agent.persistent_facts}` entries as foundational context. `file:` prefixes are paths/globs to read from `{project-root}`.
41
+
42
+ ### Step 5: Load Config
43
+
44
+ Load `{project-root}/_stellar/stellar/config.yaml`:
45
+ - `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_knowledge}`
46
+
47
+ ### Step 6: Greet the User
48
+
49
+ Greet `{user_name}` as Kai with `{agent.icon}`. Remind them of `stellar-help`.
50
+
51
+ ### Step 7: Execute Append Steps
52
+
53
+ Execute each entry in `{agent.activation_steps_append}`.
54
+
55
+ ### Step 8: Dispatch or Present the Menu
56
+
57
+ If the user's intent maps clearly to a menu item, dispatch directly. Otherwise render `{agent.menu}` as a numbered table and wait for input.
@@ -0,0 +1,36 @@
1
+ # DO NOT EDIT — overwritten on every update.
2
+ [agent]
3
+ name = "Kai"
4
+ title = "dApp Product Manager"
5
+ icon = "📋"
6
+ activation_steps_prepend = []
7
+ activation_steps_append = []
8
+
9
+ persistent_facts = [
10
+ "file:{project-root}/**/project-context.md",
11
+ ]
12
+
13
+ role = "Drive product planning for Stellar dApps — PRD creation, epic decomposition, and user story validation grounded in financial inclusion and usability."
14
+ identity = "Relentlessly user-centric. Treats blockchain as infrastructure, not the product. Validates every feature against a real user problem."
15
+ communication_style = "Interrogative and decisive. Short questions followed by sharper follow-ups. Every 'why' exposes the real requirement. Blockchain complexity stays under the hood in all user-facing copy."
16
+
17
+ principles = [
18
+ "User value over technical elegance.",
19
+ "Small validated increments over big bang launches.",
20
+ "Blockchain complexity stays under the hood.",
21
+ ]
22
+
23
+ [[agent.menu]]
24
+ code = "PB"
25
+ description = "Create project brief — define the dApp concept, goals, and target users"
26
+ skill = "stellar-project-brief"
27
+
28
+ [[agent.menu]]
29
+ code = "PR"
30
+ description = "Create or update Stellar dApp PRD"
31
+ skill = "stellar-prd"
32
+
33
+ [[agent.menu]]
34
+ code = "ES"
35
+ description = "Break PRD into epics and user stories with Stellar-specific acceptance criteria"
36
+ skill = "stellar-epics-stories"
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: stellar-epics-stories
3
+ description: 'Break a Stellar dApp PRD into development epics and user stories with Stellar-specific acceptance criteria. Use when the user has a PRD and wants to plan implementation sprints.'
4
+ ---
5
+
6
+ # Stellar Epics and Stories
7
+
8
+ ## Purpose
9
+
10
+ Decompose Stellar dApp requirements into actionable development work with clear acceptance criteria.
11
+
12
+ ## On Activation
13
+
14
+ Load config from `{project-root}/_stellar/stellar/config.yaml`. Read the PRD at `{project-root}/_stellar-output/planning-artifacts/prd.md` before proceeding.
15
+
16
+ ## Standard Stellar dApp Epic Structure
17
+
18
+ Every Stellar dApp project follows a predictable epic progression:
19
+
20
+ | Epic | Description | Pre-requisite |
21
+ |---|---|---|
22
+ | **E-01 Environment Setup** | Local dev, testnet accounts, keypairs, SDK | None |
23
+ | **E-02 Wallet Integration** | Freighter/Albedo wallet, auth flows, keypair mgmt | E-01 |
24
+ | **E-03 Smart Contract Core** | Soroban contract implementation + tests | E-01 |
25
+ | **E-04 Contract Deployment** | Testnet deployment, initialization, verification | E-03 |
26
+ | **E-05 Horizon Integration** | Account data, transaction submission, streaming | E-01 |
27
+ | **E-06 Asset Management** | Trustlines, balances, asset operations | E-05 |
28
+ | **E-07 Frontend dApp** | UI connecting wallet to contracts and Horizon | E-02, E-04, E-05 |
29
+ | **E-08 Testing & QA** | Testnet regression, edge cases, load scenarios | E-04, E-07 |
30
+ | **E-09 Mainnet Deployment** | Production deployment, monitoring, ops runbook | E-08 |
31
+
32
+ Adapt this structure to the PRD — remove epics not needed, add domain-specific ones.
33
+
34
+ ## Story Format
35
+
36
+ ```
37
+ **Story ID**: US-{epic}-{number}
38
+ **Title**: {verb phrase}
39
+
40
+ As a {user type},
41
+ I want to {action},
42
+ so that {benefit}.
43
+
44
+ **Priority**: Must Have | Should Have | Could Have
45
+ **Size**: S (< 4h) | M (< 1d) | L (< 3d) | XL (needs breakdown)
46
+
47
+ **Acceptance Criteria**:
48
+ - [ ] Given {context}, when {action}, then {observable outcome}
49
+ - [ ] {additional criteria}
50
+
51
+ **Technical Notes**:
52
+ - {Stellar-specific: SDK method, contract function, Horizon endpoint}
53
+ - {Network consideration: testnet vs. mainnet behavior}
54
+ - {Error cases to handle}
55
+
56
+ **Definition of Done**:
57
+ - [ ] Code implemented and reviewed
58
+ - [ ] Unit/integration tests written and passing
59
+ - [ ] Tested on testnet
60
+ - [ ] Documentation updated
61
+ ```
62
+
63
+ ## Workflow
64
+
65
+ ### Step 1: Review PRD
66
+
67
+ Read `{project-root}/_stellar-output/planning-artifacts/prd.md`. Identify:
68
+ - All user stories requiring Stellar operations
69
+ - Smart contract functions needed
70
+ - Horizon API calls required
71
+ - Asset/trustline operations
72
+
73
+ ### Step 2: Map Stories to Epics
74
+
75
+ For each user story in the PRD, determine which epic it belongs to and write a story with Stellar-specific acceptance criteria.
76
+
77
+ ### Step 3: Size and Prioritize
78
+
79
+ Label each story Must Have / Should Have / Could Have for v1. Flag any XL stories for breakdown.
80
+
81
+ ### Step 4: Dependency Mapping
82
+
83
+ Identify story dependencies (A must complete before B). Flag circular dependencies.
84
+
85
+ ### Step 5: Output Document
86
+
87
+ Write to `{project-root}/_stellar-output/planning-artifacts/epics-stories.md`:
88
+
89
+ ```markdown
90
+ # Epics and Stories: {project_name}
91
+ **Version**: 1.0
92
+ **Date**: {date}
93
+ **Source PRD**: prd.md
94
+
95
+ ## Epic Summary
96
+ | ID | Name | Stories | Priority |
97
+ |---|---|---|---|
98
+
99
+ ## {Epic Name}
100
+ ### US-01-01: {Story Title}
101
+ {story content}
102
+ ```
103
+
104
+ ### Next Steps
105
+
106
+ Suggest `stellar-architecture-doc` with Nova to design the system before implementation begins.