Repository navigation
Closed
Labels
ai-in-progressCurrently being worked by automationauto-readyCan be resolved via automated workflowenhancementNew feature or request
Description
Summary
Add lightweight convention awareness so sequant-generated code better matches existing codebase style.
Scope: Simple, deterministic analysis - not AI "learning".
Proposed Features
Convention Hints (Single Feature)
During sequant init, scan codebase for observable patterns and store hints:
// .sequant/conventions.json
{
"detected": {
"testFilePattern": "*.test.ts", // from existing test files
"componentDir": "src/components/", // from package structure
"exportStyle": "named", // named vs default exports
"asyncPattern": "async/await" // vs .then() chains
},
"manual": {
// User can add/override
"prTitleFormat": "feat(#N): description"
}
}How it works:
sequant initruns detection, saves to.sequant/conventions.json/execreads conventions before generating code- Conventions included in skill context: "This codebase uses named exports"
- User can edit file to correct/add conventions
Detection methods (deterministic, not AI):
- Test file pattern: glob for
*.test.*,*.spec.*,__tests__/ - Export style: grep for
export defaultvsexport { - Component structure: check for
components/,pages/, etc.
What This Is NOT
- ❌ Not "learning" or "memory" across sessions
- ❌ Not automatic pattern extraction from successful PRs
- ❌ Not failure analysis (see roadmap: Developer Experience Improvements #237)
- ❌ Not style enforcement (use ESLint/Prettier)
Acceptance Criteria
-
sequant initdetects 5+ conventions from codebase - Conventions stored in
.sequant/conventions.json -
/execskill template references conventions -
sequant conventionscommand shows current settings - User can manually edit conventions file
Value
Reduces "doesn't match our style" feedback by giving Claude observable context about codebase patterns. Simple, transparent, user-controllable.
Out of Scope (Future Consideration)
- Learning from PR feedback
- Automatic convention updates
- Cross-project convention sharing
Revised from original feature planning discussion - scoped down to deterministic detection only
Metadata
Metadata
Assignees
Labels
ai-in-progressCurrently being worked by automationauto-readyCan be resolved via automated workflowenhancementNew feature or request
Activity
admarble commentedon Feb 26, 2026
Spec Plan: #233 — Codebase Conventions Detection
AC Checklist with Verification
sequant initdetects 5+ conventions from codebase.sequant/conventions.json/execskill template references conventionssequant conventionscommand shows current settingsmanualsection persists across re-detectionNon-Goals
Implementation Plan
Create
src/lib/conventions-detector.ts— Deterministic detection module*.test.*,*.spec.*,__tests__/export defaultvsexport {in src/async/awaitvs.then(components/,pages/,app/detectConventions(projectRoot): ConventionsResultCreate
src/lib/conventions-detector.test.ts— Unit testsIntegrate into
src/commands/init.ts— Run detection during initcreateDefaultSettings(), calldetectAndSaveConventions().sequant/conventions.jsonwithdetectedandmanualsectionsmanualsection on re-initCreate
src/commands/conventions.ts— New CLI commandsequant conventions— display all detected + manual conventionssequant conventions --detect— re-run detection and updatesequant conventions --reset— clear detected, keep manualRegister in
bin/cli.ts— Wire up conventions command.command("conventions")with optionsUpdate exec skill template — Reference conventions in context
.claude/skills/exec/SKILL.md— add step to read conventions.jsontemplates/skills/exec/SKILL.md— mirror the changeRecommended Workflow
Phases: spec → exec → qa
Quality Loop: disabled
Skip test: Yes (CLI/library feature, no UI)
feat(#233): add codebase conventions detection
admarble commentedon Mar 13, 2026
Solve Analysis
Recommended Phases: spec → testgen → exec → qa
Skip Spec: No (enhancement needs spec to verify remaining work vs active worktree)
Browser Testing: No (CLI/config feature, no UI)
Quality Loop: Yes (multi-component feature: detector, CLI, init, skill templates)
Reasoning
Flags
📝 Generated by
/solvefeat(#233): add codebase conventions detection
fix(#233): move CHANGELOG entry to Unreleased, remove conflict marker
admarble commentedon Mar 13, 2026
/fullsolve Complete
Issue: #233
Status: READY_FOR_MERGE
PR: #362
Summary
AC Coverage
.sequant/conventions.jsonwith detected/manual/detectedAtsequant conventionswith --detect and --resetIterations
Self-Evaluation
Fixes Applied During QA
Ready for human review and merge.
fix(#233): align template exec skill with .claude/skills version
fix(#233): resolve lint errors in conventions detector
feat(#233): add codebase conventions detection (#362)
admarble commentedon Mar 13, 2026
Documentation Generated
File:
docs/features/codebase-conventions.mdSections Included:
Next Steps:
Ready to merge!
docs: add codebase conventions feature documentation (#233)
docs(#233): add conventions command reference and update cheat sheet
fix(exec): block background tasks under the orchestrator; WIP-commit …