Common Workflows
Practical, step-by-step guides for the tasks developers tackle most often with JD.AI. Each workflow shows numbered steps with example prompts you can adapt to your own projects.
Understand new codebases
Ramp up on an unfamiliar project without reading every file by hand.
Get a high-level overview — start broad:
what does this project do?Explore folder structure — understand how code is organized:
explain the folder structure and key filesFind specific logic — drill into a feature area:
where is the authentication logic?Delegate deep exploration — spawn a focused subagent for larger investigations:
spawn an explore agent to map out the API endpoints
Fix bugs efficiently
Move from symptom to fix with a tight feedback loop.
Describe the symptom — include error messages and reproduction steps:
the login endpoint returns 401 after session timeout — here is the stack trace: ...Let JD.AI locate the root cause — point it at the right area:
the login fails after session timeout, check src/auth/Write a failing test first — prove the bug exists before touching production code:
write a test that reproduces the session-timeout 401Implement the fix and verify — apply the change, then run the full suite:
fix the bug and run the tests to make sure nothing else broke
Refactor code
Improve structure incrementally while keeping existing behavior intact.
Analyze before changing — understand what needs work:
analyze the payment module for code smellsPlan the refactor — get a concrete action list:
create a plan to refactor payments to use async/awaitExecute step by step — make one change at a time and verify after each:
apply step 1 of the plan and run the testsRun tests after every change — catch regressions immediately:
run the full test suite and report any failures
Write tests
Build confidence in your code with thorough test coverage.
Check current coverage — find the gaps:
what code paths in UserService aren't tested?Generate tests — target a specific method and its edge cases:
write unit tests for the Calculator.Divide method, including edge casesFollow existing patterns — match the conventions already in the project:
look at existing tests to match the styleVerify — run the new tests and confirm they pass:
run the tests and report results
Create pull requests
Go from local changes to a reviewable PR in a single conversation.
Review changes — see what you have staged and unstaged:
what files have I changed?Create a commit — let JD.AI draft a message following conventional commits:
commit my changes with a descriptive conventional commit messagePush and open a PR — target the right branch:
push to origin and create a PR targeting main
Handle documentation
Keep docs accurate and complete without switching tools.
Generate from code — sync documentation with the actual implementation:
update the README to reflect current installation stepsAdd XML docs — ensure public APIs are documented:
add XML documentation to all public methods in UserServiceCreate guides — produce onboarding or contributor documentation:
write a getting-started guide for new contributors
Use subagents for specialized tasks
Delegate scoped work to purpose-built subagents that run in their own context.
Explore — deep-dive into a feature without polluting your main conversation:
use an explore agent to find how caching worksTask — offload a long-running command and get a summary:
use a task agent to run the full test suite and report failuresReview — get a second opinion on your changes:
use a review agent to check my changes against the coding standards
Orchestrate teams for complex work
Coordinate multiple subagents when a single agent is not enough.
Sequential pipeline — chain stages end to end:
analyze the codebase, plan the migration, implement it, then review the resultFan-out — run independent analyses in parallel:
analyze the frontend, backend, and database layers in parallel and summarizeDebate — solicit competing perspectives before committing to a direction:
get two different architectural proposals for the new notification service
Manage sessions
Preserve and resume your work across terminal sessions.
| Command | Purpose |
|---|---|
/name feature-auth |
Name the current session |
/save |
Persist the session to disk |
/sessions |
List all saved sessions |
/resume <id> |
Continue a previous session |
/export |
Export the session as JSON |
Tip
Name your sessions descriptively — /name feature-auth is easier to find later than an auto-generated ID.
Next steps
- Best Practices — tips for writing effective prompts
- Subagents — full reference for subagent types and capabilities
- Orchestration — strategies for multi-agent coordination
- Commands Reference — complete list of slash commands