How to Collaboratively Build a Data Analysis Notebook
This tutorial shows how to use sudocode when building data analysis scripts. You’ll see how to break down the work step-by-step while capturing requirements iteratively - exploring your data, figuring out what to analyze, and discovering missing requirements as you plan the implementation. Traditional approach:- Receive data dump
- Write exploratory scripts alone
- Realize you need different metrics
- Rewrite analysis
- Discover data quality issues late
- Context scattered across notebooks
- Explore existing data with AI assistance
- Discuss what metrics and visualizations would be valuable
- Capture requirements in a spec
- Break down into concrete implementation issues
- Discover missing requirements during planning (e.g., deduplication)
- Add new issues as needs emerge
- Implement with full context preserved in version control
Workflow
1
1. Explore Data Together
Use AI assistance to understand the data structure and formatStart by asking your agent to explore existing data files and understand the current state:The agent will:
- Read existing related specs for context
- Explore the data directory structure
- Examine CSV headers and sample rows
- Understand data relationships and granularity
2
2. Discuss Analytical Approaches
Have a conversation about what insights you want and how to get themBefore writing a spec, discuss what analysis would be valuable:This conversation establishes:
- What metrics matter
- What questions to answer
- Which tools to use
- What visualizations to create
3
3. Co-create the Specification
Work together to capture requirements in a specOnce you’ve discussed the approach, create the spec:The initial spec will likely include:
- Goals and success metrics
- Data sources and schema
- Key analytics and visualizations
- Technical architecture
- Implementation phases
localhost:3000.4
4. Break Down into Issues
Split the spec into actionable implementation tasksThe agent will:
- Create issues based on implementation phases
- Link all issues to the spec via
implementsrelationship - Establish dependency chains using
depends-onlinks - Set appropriate priorities
5
5. Implement Issues
Execute the issues in dependency orderNow dispatch agents to implement the work:
- Start with foundation issues (data loading)
- Progress through metrics and visualizations
- End with notebooks and documentation
6
6. Discover Missing Requirements
Identify gaps through conversation - add issues iterativelyAs you discuss and implement issues, you may realize something is missing:This is key: Requirements emerge through discussion. Don’t try to think of everything upfront - let the conversation surface gaps.
Best Practices
Start with conversation, not specification
Start with conversation, not specification
Don’t jump straight to writing specs. Explore and discuss first.Approach:Benefits:
- Agent understands context before formalizing
- You get suggestions informed by data exploration
- Requirements emerge naturally from discussion
- Shared understanding before committing to approach
Keep specs focused on requirements, not implementation
Keep specs focused on requirements, not implementation
Specs should define what you want, not how to build it.Wrong approach:Right approach:Benefits:
- Specs stay relevant longer
- Implementation can adapt to new patterns
- Focus remains on requirements
- Easier to review and understand
Let requirements emerge through conversation
Let requirements emerge through conversation
Don’t try to specify everything upfront. Discover gaps iteratively.Example from walkthrough:This is normal and expected:
- Requirements surface through discussion
- Edge cases emerge when reviewing the plan
- Implementation reveals additional needs
- Specs evolve based on learnings
- More complete requirements
- Realistic implementation plans
- No premature over-specification
- Context for why requirements were added
Discuss metrics and approaches before formalizing
Discuss metrics and approaches before formalizing
Have a conversation about what to analyze before deciding how.Key questions to discuss:This establishes shared understanding before writing anything formal.
- What insights do we want?
- What metrics would be valuable?
- What visualizations would tell the story?
- What tools are appropriate?
- What are the data quality considerations?
Break specs into phases for iterative implementation
Break specs into phases for iterative implementation
Structure implementation in logical phases with dependencies.Example breakdown:Benefits:
- Clear execution order
- Parallel work opportunities within phases
- Easy to track progress
- Natural checkpoints for review
Common Patterns
Pattern: Exploratory Data Analysis to Specification
Pattern: Iterative Requirement Discovery
Requirements emerge through conversation, not just upfront specification:Troubleshooting
Spec has too much implementation detail
Spec has too much implementation detail
Symptom: Spec contains code snippets, function implementations, detailed pseudocodeSolution:Ask the agent to refine the spec:What to remove:
- Specific code implementations
- Detailed function signatures
- Step-by-step algorithms
- Goals and success criteria
- Data model and schemas
- Metrics to compute
- Visualization requirements
- High-level architecture
Discovered missing requirement after issues created
Discovered missing requirement after issues created
Symptom: Realize something is missing after breaking down the specSolution:This is normal! Create a new issue and link it appropriately:From the walkthrough:
- Initial plan: data loading, metrics, visualizations, notebooks
- During review: “What about deduplication?”
- New issue created: i-7gkc for deduplication logic
- Linked to data loading issue as related work
- Requirements emerge when discoverable
- Context preserved (why it was added)
- Implementation can proceed with complete requirements
- No need to restart the whole planning process

