From devflow
Guided interview to capture team-wide development conventions (coding standards, branching strategy, tech stack, testing requirements, architecture patterns) and store them in the configured documentation backend. Use this when the user asks things like "capture our team conventions," "document our coding standards," "set up team conventions," or "record how our team works."
npx claudepluginhub joshuarweaver/cascade-code-general-misc-4 --plugin codingthefuturewithai-claude-code-primitivesThis skill is limited to using the following tools:
**Say exactly:** "SKILL INVOKED: capture-conventions"
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Say exactly: "SKILL INVOKED: capture-conventions"
Guided interview to capture your team's conventions and store them centrally. These conventions can later be used by /devflow:foundation:generate-claude-md to generate consistent CLAUDE.md + .claude/rules/ files across all your repos.
Progress:
- [ ] Step 0: Load config and check for existing conventions
- [ ] Step 0.5: Select tech stack
- [ ] Step 1: Team identity
- [ ] Step 2: Tech stack details
- [ ] Step 3: Coding standards
- [ ] Step 4: Code quality and refactoring
- [ ] Step 5: Testing conventions
- [ ] Step 6: Documentation standards
- [ ] Step 7: Git and workflow
- [ ] Step 8: Architecture preferences
- [ ] Step 9: Security practices
- [ ] Step 10: Definition of done
- [ ] Step 11: Preferred libraries
- [ ] Step 12: Review and store
Load DevFlow config:
~/.claude/plugins/config/devflow/config.md/devflow-setup first to configure your backends." STOP.Determine doc backend:
docs.enabled=true → use configured docs backend (Confluence or Google Drive)rag-memory.enabled=true → RAG Memory is available/devflow-setup to enable one." STOP.Check for existing conventions (search broadly — never assume location):
Search ALL configured backends for anything resembling team conventions. Do NOT assume a specific collection name, folder, or page title.
If RAG Memory enabled:
mcp__rag-memory-primary__list_collections — see what collections existmcp__rag-memory-primary__search_documents(query="team conventions tech stack coding standards workflow") — search across ALL collections (no collection_name filter)If Confluence enabled:
searchConfluenceUsingCql(cql="text ~ 'team conventions' AND type = 'page'") — or similar broad searchIf Google Drive enabled:
search_files(query="conventions") and search_files(query="coding standards")If nothing found in any backend:
"I didn't find existing team conventions in any of your configured backends. Would you like to:"
- Start fresh with the interview
- Point me to where your conventions are stored
- Cancel
If user points to a location → load from there, go to Update Flow.
Organizations often use multiple tech stacks. This interview captures conventions for ONE stack at a time. You can run this skill multiple times to capture conventions for different stacks.
Ask using AskUserQuestion:
"Which tech stack are these conventions for?"
Options (pick one - use multiSelect: false):
(If user picks "Other", show second question with more options)
Second question if needed:
(Continue with additional questions to cover all stacks from ../references/tech-stack-detection.md)
Store the selected stack - this will be used in the document title:
[Selected Stack] Conventions - [Company Name]PHP Laravel Conventions - Acme CorpAfter interview completes, ask:
"Would you like to capture conventions for another tech stack?"
- Yes → Start over at Step 0.5 with different stack
- No → Done
Present current conventions:
"Found existing team conventions. Here's a summary:" [Show section headings and key values]
Ask:
"What would you like to do?"
- Update specific sections
- Start fresh (replace everything)
- View full document
- Cancel
If "Update specific sections" → ask which sections, then run only those interview sections. Merge updates into existing document.
Ask using AskUserQuestion:
"Let's capture your team's conventions. First, some basics."
Team/org name — free text
Primary domains — ask in two rounds to stay within the 4-option limit of AskUserQuestion:
Round 1 (multiSelect):
"What types of projects does your team work on?"
- Web / Frontend (SPAs, SSR sites, static sites)
- Backend / API services (REST, GraphQL, microservices, CLI tools)
- Mobile apps (iOS, Android, cross-platform)
- Data / ML / DevOps (pipelines, models, IaC, CI/CD)
Round 2 (multiSelect):
"Any additional project types?"
- Libraries / SDKs (reusable packages, open source)
- Desktop applications (Electron, Tauri, native)
- Embedded / IoT
- None — that covers it
Store selections — these determine which tech stack sections to ask about in Step 2.
Confirm: Show summary, ask if correct before proceeding.
Only ask about project types selected in Step 1. For each relevant type, follow the interview guide.
See references/interview-guide.md for the full question bank organized by project type.
For each project type:
Ask about:
Confirm section.
Frame as: "Let's talk about code quality expectations — these are triggers for thinking, not hard rules."
Ask about:
See references/interview-guide.md for the full question bank.
Confirm section.
Ask about:
Confirm section.
Frame as: "What does your team expect when it comes to documentation?"
Ask about:
See references/interview-guide.md for the full question bank.
Confirm section.
Ask about:
See references/interview-guide.md for the full question bank.
Confirm section.
Ask about:
Confirm section.
Frame as: "Let's capture what your team does around security — every team is different, so I'll ask rather than assume."
Ask about:
See references/interview-guide.md for the full question bank.
Confirm section.
Frame as: "What does 'done' mean on your team? This helps Claude understand when work is truly complete."
Ask about:
See references/interview-guide.md for the full question bank.
Confirm section.
Only ask about cross-cutting concerns relevant to the team's stack. See references/interview-guide.md for the full question bank.
Confirm section.
Compile all answers into a structured markdown document.
Title format: {Selected Tech Stack} Conventions - {Team Name}
PHP Laravel Conventions - Acme CorpReact TypeScript Conventions - Acme CorpDocument structure:
# {Selected Tech Stack} Conventions - {Team Name}
Last updated: {YYYY-MM-DD}
Tech Stack: {Selected Tech Stack}
Domain: {primary domains, comma-separated}
## Tech Stack
### {Project Type}
- Language: {answer}
- Framework: {answer}
...
## Coding Standards
- Formatter: {answer}
- Linter: {answer}
...
## Code Quality & Refactoring
- File size guidance: {answer}
- Function length: {answer}
- DRY threshold: {answer}
- Dead code policy: {answer}
- Refactoring triggers: {answer}
- Complexity awareness: {answer}
## Testing
- Framework: {answer per stack}
- Coverage: {answer}
...
## Documentation Standards
- README expectations: {answer}
- API documentation: {answer}
- ADRs: {answer}
- Changelog: {answer}
- Code comments: {answer}
- Runbooks: {answer}
## Git & Workflow
- Branching: {answer}
- Branch naming: {answer}
...
## Architecture
- Pattern: {answer}
...
## Security Practices
- Dependency scanning: {answer}
- Input validation: {answer}
- Secrets management: {answer}
- Auth patterns: {answer}
- Security review triggers: {answer}
- Security awareness: {answer}
## Definition of Done
- Code complete: {answer}
- Testing: {answer}
- Documentation: {answer}
- Review: {answer}
- Security: {answer}
- Deployment readiness: {answer}
## Preferred Libraries
- {concern}: {library}
...
Show the full document to the user:
"Here are your compiled team conventions. Please review:" [Full document]
- Looks good — save it
- Edit a section
- Cancel
If "Edit" → ask which section, re-run that interview section, regenerate.
Route to the configured doc backend:
RAG Memory:
mcp__rag-memory-primary__list_collections — show available collections"Where should I store your {Selected Tech Stack} conventions? Here are your existing collections:" [list collections] "Or I can create a new collection. What should it be called?"
mcp__rag-memory-primary__create_collection(name=user_chosen_name, domain="team conventions", description="Team-wide coding conventions, tech stack decisions, and workflow standards") — let user confirm name and descriptionmcp__rag-memory-primary__ingest_text(content=document, collection_name=chosen_collection, document_title="{Selected Tech Stack} Conventions - {Team Name}", actor_type="Claude Code")Confluence:
default_space from config)createConfluencePage(spaceKey=space, title=chosen_title, body=document)Google Drive:
default_folder_id from config if available, or let user specify)/tmp/team-conventions-{stack-slug}.mdupload_file(file_path="/tmp/team-conventions-{stack-slug}.md", name="{Selected Tech Stack} Conventions - {Team Name}.md", folder_id=chosen_folder)"{Selected Tech Stack} conventions saved to {backend}."
Ask:
"Would you like to capture conventions for another tech stack?"
- Yes → Return to Step 0.5 (Select Tech Stack)
- No → Done
If Yes: Restart at Step 0.5 with a different tech stack. All previous work is saved.
If No: Finish.
Skill complete. Inform the user:
Multi-stack conventions captured successfully!
Any developer can now use
/devflow:foundation:generate-claude-mdin their repos. The skill will:
- Detect the repo's tech stack automatically
- Load matching conventions (e.g., PHP Laravel repos get PHP Laravel conventions)
- Generate CLAUDE.md +
.claude/rules/filesTo capture more stacks: Re-run
/devflow:foundation:capture-conventions