Skip to content

Commit e7e0943

Browse files
jsonifyJason Rueckert
andauthored
Feature/enhancing ai user story creator (#92)
* feat: enhance AI user story generation with optional context and improved output structure * feat: add integration guide and workflow tips for user story generation * fix: remove unnecessary validateInput property from context input prompt * feat: implement UserStoryPromptService for user story generation - Added UserStoryPromptService to manage user story generation prompts. - Refactored prompt building logic into UserStoryPromptService. - Created unit tests for UserStoryPromptService covering prompt generation and validation. - Updated tsconfig.json to include test files in the compilation. * test: add unit tests for UserStoryPromptService functionality --------- Co-authored-by: Jason Rueckert <[email protected]>
1 parent 5f72c52 commit e7e0943

File tree

6 files changed

+725
-41
lines changed

6 files changed

+725
-41
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Noted - Your Personal Knowledge Base in VS Code
22

3-
> **💖 Love Noted? Help us grow!** This extension is built and maintained by the community. If you find Noted useful, please [**rate and review it on the VS Code Marketplace**](https://marketplace.visualstudio.com/items?itemName=jsonify.noted&ssr=false#review-details) — your feedback helps others discover Noted and motivates us to keep improving. Every star counts!
3+
> **💖 Love Noted? Help us grow!** This extension is built and maintained by the community. If you find Noted useful, please [**rate and review it on the VS Code Marketplace**](https://marketplace.visualstudio.com/items?itemName=jsonify.noted&ssr=false#review-details) — your feedback helps others discover Noted and motivates us to keep improving. Every star counts!
44
55
---
66
[Repository](https://github.com/jsonify/noted) | [Issues](https://github.com/jsonify/noted/issues) | [Documentation](https://jsonify.github.io/noted/)

docs/_posts/2025-10-24-templates.md

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,287 @@ function example() {
362362
```
363363
````
364364

365+
## AI-Powered User Story Generation
366+
367+
**Generate comprehensive, technical user stories** with AI assistance for agile software development.
368+
369+
### Quick Start
370+
371+
1. Open Command Palette (`Cmd+Shift+P`)
372+
2. Run "Noted: Create User Story with AI"
373+
3. Enter brief description (e.g., "Set up GCP project with networking")
374+
4. Choose whether you have additional context
375+
5. (Optional) Paste architecture details, dependencies, tech stack
376+
6. Review and create!
377+
378+
### What You Get
379+
380+
The AI generates a **production-ready user story** with:
381+
382+
- **Scope Statement**: What part of the system this addresses
383+
- **Story Title**: Concise, specific title
384+
- **Description**: Professional "As a [role], I want [goal], So that [benefit]" format
385+
- **5-15 Technical Tasks**: Specific, actionable steps with service names
386+
- **3-7 Acceptance Criteria**: Testable, verifiable outcomes
387+
- **Dependencies**: Required access, prerequisites, blocking items
388+
- **Time Estimate**: Realistic effort estimation
389+
390+
### Example Output
391+
392+
**Input**:
393+
```
394+
Description: Establish GCP project and core networking infrastructure
395+
Context: Integration with JFrog Cloud, VPN to on-prem AD, uses Cloud NAT,
396+
DataProc, GKE, GAR, requires network peering with JFrog-managed services
397+
```
398+
399+
**Generated User Story**:
400+
401+
```markdown
402+
---
403+
tags: [user-story]
404+
created: 2025-11-13T22:30:26.883Z
405+
status: draft
406+
---
407+
408+
# User Story: Establish GCP Project and Core Networking Infrastructure
409+
410+
**Created:** Thursday, November 13, 2025 | **Author:** jruecke
411+
412+
## Scope
413+
Foundation for the Managed GCP section of multi-cloud deployment
414+
415+
## Story Title
416+
Establish GCP Project and Core Networking Infrastructure
417+
418+
## Description
419+
As a Platform Engineer,
420+
I want a properly configured GCP project with networking for JFrog SaaS,
421+
So that development teams have secure infrastructure for deploying services.
422+
423+
### Tasks
424+
- [ ] Create GCP project(s) with appropriate billing and IAM structure
425+
- [ ] Configure VPC networks for GCP region deployment
426+
- [ ] Establish subnet allocation for Cloud Run, DataProc, GKE, and GAR
427+
- [ ] Configure Cloud NAT and Cloud Router
428+
- [ ] Set up VPC firewall rules for inter-service communication
429+
- [ ] Configure private Google access for subnets
430+
- [ ] Establish connectivity to JFrog Cloud Global Load Balancer
431+
- [ ] Establish VPN/Interconnect to on-premises for authentication
432+
- [ ] Set up VPC peering requirements for JFrog-managed services
433+
- [ ] Document network architecture diagram
434+
- [ ] Set up initial Cloud Logging and Cloud Monitoring workspace
435+
436+
## Acceptance Criteria
437+
- [ ] GCP project provisioned and accessible
438+
- [ ] VPC networks configured with connectivity to JFrog Cloud
439+
- [ ] Network connectivity to authentication provider verified
440+
- [ ] Firewall rules allow traffic flow per architecture
441+
- [ ] Architecture documentation created
442+
443+
## Dependencies
444+
- JFrog SaaS subscription and architecture guidance
445+
- Authentication provider details (LDAP/AD endpoints)
446+
- Network IP addressing scheme approved
447+
448+
## Estimate
449+
**Time to Complete:** 2-3 days
450+
```
451+
452+
### Pro Tips for Better Results
453+
454+
**1. Be Specific**: Instead of "Add user authentication", say "Add OAuth2 authentication with Google Sign-In"
455+
456+
**2. Provide Context**: Include:
457+
- Integration points (APIs, services, external systems)
458+
- Technology stack (languages, frameworks, cloud services)
459+
- Dependencies (what must exist first)
460+
- Architecture constraints (security, compliance, scalability)
461+
462+
**3. Example Context Formats**:
463+
464+
```
465+
# Infrastructure Story
466+
Context: Uses AWS EKS, RDS PostgreSQL, ALB, integrates with
467+
DataDog monitoring, requires IAM roles for service accounts
468+
469+
# Feature Story
470+
Context: React frontend, Node.js backend, MongoDB, uses Stripe API,
471+
needs WebSocket for real-time updates
472+
473+
# Integration Story
474+
Context: Connects to Salesforce API v52, uses OAuth2, requires
475+
scheduled sync every 15 minutes, max 10k records per sync
476+
```
477+
478+
**4. Without Context**: Still works! AI generates good generic stories, just less specific to your architecture
479+
480+
### How It Works
481+
482+
1. **Query Analysis**: AI analyzes your description and context
483+
2. **Technical Depth**: Generates 5-15 tasks based on complexity
484+
- Simple features: 5-7 tasks
485+
- Complex infrastructure: 8-12+ tasks
486+
3. **Specific Details**: Incorporates service names, tech stack from context
487+
4. **Professional Format**: Follows agile best practices
488+
5. **Saved**: Note created in `Notes/User Stories/` folder
489+
490+
### Configuration
491+
492+
Uses your preferred AI model (Claude Sonnet, GPT-4, etc.):
493+
494+
```
495+
Setting: noted.templates.preferredModel
496+
Default: Automatic (Claude > GPT > Gemini)
497+
```
498+
499+
### Best Practices
500+
501+
**DO**:
502+
- ✅ Include specific technologies and services in context
503+
- ✅ Mention integration points between systems
504+
- ✅ Specify compliance or security requirements
505+
- ✅ List blocking dependencies upfront
506+
507+
**DON'T**:
508+
- ❌ Use vague descriptions like "make it better"
509+
- ❌ Skip context for complex infrastructure tasks
510+
- ❌ Forget to mention external systems or APIs
511+
- ❌ Ignore prerequisites or access requirements
512+
513+
### Comparison: With vs Without Context
514+
515+
| Without Context | With Context |
516+
|----------------|--------------|
517+
| "Create a new GCP project" | "Create GCP project with billing, enable Compute Engine, Cloud Storage, and Kubernetes Engine APIs" |
518+
| "Set up networking" | "Configure VPC with subnets for dev/prod, Cloud NAT, Cloud Router, firewall rules for SSH/HTTPS from specific IPs" |
519+
| "Configure access" | "Set up IAM roles for Project Admin and Developer, configure VPN to on-prem AD for authentication" |
520+
521+
**Result**: Context gives you 3x more actionable, technical detail!
522+
523+
### Integration Guide
524+
525+
**How generated stories work with existing tag/link systems**
526+
527+
User stories integrate seamlessly with Noted's existing features:
528+
529+
**Tags System**:
530+
- Generated stories automatically include `[user-story]` tag in frontmatter
531+
- Stories are tagged with `status: draft` by default
532+
- Use tag autocomplete to add custom tags: `#feature`, `#infrastructure`, `#bug-fix`
533+
- Find all stories: Use Tags view → filter by `user-story`
534+
- Rename/merge tags: Right-click any tag → Rename Tag (affects all stories)
535+
536+
**Wiki Links**:
537+
- Add `[[dependencies]]` to link prerequisite stories or notes
538+
- Reference design docs: `[[architecture-diagram]]`, `[[api-spec]]`
539+
- Link to related stories: `[[user-story-authentication]]`
540+
- Backlinks panel automatically shows which stories reference this one
541+
- Graph view visualizes story dependencies
542+
543+
**Smart Collections**:
544+
- Filter stories by status: Create collection with `status: draft`
545+
- Group by priority: Use `priority: high` in frontmatter
546+
- Track sprint stories: Add `sprint: 2025-11` tag
547+
548+
**Example Integration**:
549+
```markdown
550+
---
551+
tags: [user-story, infrastructure, gcp]
552+
created: 2025-11-13T22:30:26.883Z
553+
status: in-progress
554+
priority: high
555+
sprint: 2025-12
556+
---
557+
558+
# User Story: Establish GCP Project
559+
560+
## Dependencies
561+
- [[network-design-doc]] - IP addressing scheme
562+
- [[security-requirements]] - Firewall rules
563+
- [[jfrog-integration-guide]] - VPC peering setup
564+
565+
## Related Stories
566+
- [[user-story-gke-cluster]] - Depends on this networking
567+
- [[user-story-monitoring]] - Uses same GCP project
568+
569+
Tags: #gcp #networking #infrastructure
570+
```
571+
572+
**Workflow Tips**:
573+
- Create story → Add wiki links → View graph → See dependencies
574+
- Tag stories by epic: `#epic-authentication`, `#epic-infrastructure`
575+
- Use Connections panel to track which stories reference this one
576+
- Archive completed stories to keep workspace clean
577+
578+
### FAQ
579+
580+
**Q: When should I provide context?**
581+
582+
A: Provide context when:
583+
-**Complex infrastructure**: Cloud setup, networking, security configs
584+
-**Integrations**: Connecting to external APIs or services
585+
-**Specific tech stack**: Using particular frameworks, languages, or tools
586+
-**Architecture constraints**: Security, compliance, scalability requirements
587+
-**Multiple systems**: Stories spanning databases, backends, frontends
588+
589+
Skip context when:
590+
- ❌ Simple features: "Add a logout button" (description alone is enough)
591+
- ❌ Obvious tech: "Fix typo in docs" (no technical depth needed)
592+
- ❌ UI-only changes: "Change button color to blue"
593+
594+
**Rule of thumb**: If you'd need to explain your architecture to a new team member, provide that as context!
595+
596+
---
597+
598+
**Q: Can I edit the generated story?**
599+
600+
A: **Yes, absolutely!** Generated stories are standard notes—edit freely:
601+
602+
**How to edit**:
603+
1. Click the generated story in Notes tree view
604+
2. Edit directly in VS Code editor
605+
3. Changes auto-save like any note
606+
607+
**What to edit**:
608+
- ✏️ **Tasks**: Add/remove/reorder checklist items
609+
- ✏️ **Acceptance Criteria**: Make criteria more/less specific
610+
- ✏️ **Description**: Refine the "As a... I want... So that..." statement
611+
- ✏️ **Estimate**: Adjust time based on team velocity
612+
- ✏️ **Dependencies**: Add forgotten prerequisites
613+
- ✏️ **Tags**: Add custom tags like `#sprint-12`, `#team-backend`
614+
- ✏️ **Links**: Add wiki links to related notes: `[[design-doc]]`
615+
616+
**Pro tips**:
617+
- Use AI output as a **starting point**, not final draft
618+
- Break large stories into smaller ones (copy/paste tasks)
619+
- Add team-specific details AI couldn't know
620+
- Update tasks as you complete them: `- [x] Completed task`
621+
- Add notes/findings under tasks during implementation
622+
623+
**Example edit**:
624+
```markdown
625+
### Tasks (AI Generated)
626+
- [ ] Configure VPC networks for GCP region deployment
627+
- [ ] Set up VPC firewall rules for inter-service communication
628+
629+
### Tasks (After Editing)
630+
- [x] Configure VPC networks for GCP region deployment
631+
- Note: Used CIDR 10.0.0.0/16 for dev, 10.1.0.0/16 for prod
632+
- [ ] Set up VPC firewall rules for inter-service communication
633+
- Added: Allow SSH from bastion host (10.0.1.0/24)
634+
- Added: Allow HTTPS from ALB subnet
635+
- See: [[firewall-rules-doc]] for full config
636+
```
637+
638+
**Remember**: AI gives you ~80% of the story—you add the final 20% that makes it perfect for your team!
639+
365640
## Related Features
366641

367642
- [Daily Notes](/noted/posts/daily-notes/) - Quick daily note access
368643
- [Tags](/noted/posts/tags/) - Organize with tags
369644
- [Wiki Links](/noted/posts/wiki-links/) - Connect notes
645+
- [Bundles](/noted/posts/bundles/) - Multi-note workflows
370646

371647
---
372648

notes.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,30 @@ pnpm run test
784784

785785
## Recent Updates
786786

787+
### Enhanced User Story Generation (v1.41.3 - 2025-11-13)
788+
- **Optional Context Collection**: Prompt to add architecture details, dependencies, tech stack
789+
- Two-step input: Brief description + optional detailed context
790+
- Context significantly improves technical specificity
791+
- Examples provided for infrastructure, feature, and integration stories
792+
- **Improved AI Prompts**: Enhanced to generate comprehensive, technical user stories
793+
- Requests 5-15 tasks based on complexity (vs previous 3-5)
794+
- Emphasizes specific service names, integration points, technical details
795+
- Instructions differentiate simple features (5-7 tasks) from complex infrastructure (8-12+ tasks)
796+
- Guides AI to include configuration details and actionable steps
797+
- **Extended Data Model**: New fields in user story structure
798+
- **Scope**: What part of the system/architecture this story addresses
799+
- **Dependencies**: List of prerequisites, access requirements, blocking items
800+
- Both fields fully integrated into generation and note templates
801+
- **Enhanced Note Template**: Richer output format
802+
- Scope section clearly defines boundaries
803+
- Dependencies section lists blocking requirements
804+
- Supports empty dependencies with "- None" fallback
805+
- **Better Results**: Matches quality of web-based Claude interactions
806+
- Technical depth comparable to manual story writing
807+
- Specific service names and tools referenced in tasks
808+
- Architecture-aware acceptance criteria
809+
- Realistic dependencies based on context
810+
787811
### AI Summarization Phase 4 (v1.39.0 - 2025-11-07)
788812
- **Custom Prompt Templates**: Create and use custom prompts for AI summarization
789813
- Built-in templates: Default, Technical Deep Dive, Meeting Summary, Code Review, Brainstorm

0 commit comments

Comments
 (0)