feat: source-driven-development skill#45
Conversation
74c0be4 to
d33cee4
Compare
Grounds every framework-specific implementation decision in official documentation — verify, cite sources, and surface what's unverified. Covers the full process from stack detection to citation format, with a framework-agnostic design and optional documentation cache.
d33cee4 to
bbd62a8
Compare
|
Quick comment in between meetings: I really love this idea at a high-level. Going to spend some time reviewing the implementation details soon! Thank you, @federicobartoli! |
addyosmani
left a comment
There was a problem hiding this comment.
Really like the direction here. The flow gives the agent a clear mental model to follow, and the source hierarchy table does a lot of heavy lifting.
I've left some minor review comments and I think we should be able to land this with just a little more work. Great stuff, @federicobartoli!
| - Reviewing or improving code that uses framework-specific patterns | ||
| - Any time you are about to write framework-specific code from memory | ||
|
|
||
| **When NOT to use:** |
There was a problem hiding this comment.
The "When NOT to use" framing around language-level vs. library patterns feels a bit loose.
A more reliable signal might be "does correctness depend on a specific version?" I think that might cover more edge cases cleanly.
There was a problem hiding this comment.
Great point , reframed around version-dependent correctness. Much cleaner.
| **When docs conflict with existing project code:** | ||
|
|
||
| ``` | ||
| CONFLICT DETECTED: |
There was a problem hiding this comment.
This is great, but it only handles code-vs-docs conflicts. What happens when the docs themselves are inconsistent across versions (e.g. a migration guide that contradicts the reference page)? Might be worth a note.
There was a problem hiding this comment.
Added a note after the source hierarchy: surface the discrepancy to the user and verify against the detected version.
| pending states automatically" | ||
| ``` | ||
|
|
||
| **Citation rules:** |
There was a problem hiding this comment.
Small one: the citation examples feel like they might point to top-level pages, but docs restructure and anchors are more stable long-term.
Recommending deep links where possible? (e.g. /reference/react/useActionState#usage over just /reference/react/useActionState) would make the citations more durable. None of these are blockers solid skill overall, happy to see it land.
There was a problem hiding this comment.
Updated examples with anchors in the two links and added a citation rule to prefer deep links where possible.
- Reframe 'When NOT to use' around version-dependent correctness - Add guidance for conflicting official sources - Prefer deep links with anchors in citation examples and rules
Thanks for the review Addy, glad you liked the direction and the mental model approach! 🙏 ❤️
Let me know if it's ready to land! |
|
Thank you! This looks good to land! |
…ven-development feat: source-driven-development skill
What this adds
A new source-driven-development skill that grounds every framework-specific implementation decision in official documentation.
The core idea: agents shouldn't implement from memory. They should verify, cite, and let the user see the sources behind every non-trivial pattern.
The problem it solves
AI agents confidently produce code that looks correct but uses outdated patterns — because training data goes stale. The agent doesn't know it's wrong, and neither does the user until they hit a deprecation warning or a subtle runtime bug.
This is especially painful with fast-moving frameworks: the agent writes React 18-style code in a React 19 project, Django 4 patterns in a Django 5 project. The code runs, the tests pass, and the problem surfaces six months later.
How it works
Four-step process: DETECT → FETCH → IMPLEMENT → CITE
package.json,go.mod,Cargo.toml, etc.)Every pattern in the output traces back to a source the user can verify.
What makes it different from just "read the docs"
UNVERIFIED:flag when documentation can't be foundCONFLICT DETECTED:surfacing when docs differ from existing codebase patternsIntegration
using-agent-skillsflowchart and lifecycle sequenceCLAUDE.mdBuild phaseREADME.mdBuild table (20 skills total)Demo
Built a SpaceX launch dashboard POC with the skill active. The agent:
package.jsonreact.dev/reference/react/useandreact.dev/blog/2024/12/05/react-19use()for data fetching (notuseEffect),<Context>without.Provider(React 19),useOptimisticfor favoritesThe same prompt without the skill produces
useEffect+useState— valid React 18 code, wrong for React 19.Future work
An earlier version included a local documentation cache (
.agent-sources/) for reusing fetched docs across sessions. Removed from this PR to keep the skill focused on verification and citation. A caching mechanism could live in a dedicated skill or as an extension tocontext-engineering.