Feature Request: Sync verified features back to app_spec.txt
Problem
The app_spec.txt file has an <implemented_features> section that is populated ONLY during initial spec generation. When features move through the Kanban board lifecycle:
Backlog → In Progress → Waiting Approval → Verified → Completed
The app_spec.txt is NEVER updated. It remains a static snapshot from the initial project setup.
Current Behavior
1. User creates project with app_spec.txt
2. AI generates features, some marked as "implemented" based on code analysis
3. User implements NEW features via Kanban board
4. Features move to "Verified" then "Completed"
5. app_spec.txt <implemented_features> section remains UNCHANGED
6. Disconnect between spec and reality grows over time
Real example from seo-optimization project:
- Feature
claude-ai-integration has status: "completed" in feature.json
- But
app_spec.txt <implemented_features> section doesn't reflect this completion
- The spec shows what was detected at generation time, not current state
Why This Matters
- app_spec.txt becomes stale - Unreliable as source of truth
- AI generating new features doesn't know current state - May suggest already-implemented features
- Project documentation is inaccurate - Spec doesn't match reality
- Onboarding friction - New team members see outdated spec
- Regeneration loses progress - If user regenerates spec, completed features aren't preserved
Expected Behavior
When a feature reaches verified or completed status, it should be:
- Added to
<implemented_features> section in app_spec.txt
- Formatted consistently with existing entries
- Persisted so spec reflects actual project state
Suggested Implementation
Option A: Auto-sync on verification (Recommended)
Automatically update app_spec.txt when feature status changes to verified/completed:
// In apps/server/src/services/feature-loader.ts or auto-mode-service.ts
async function updateFeatureStatus(projectPath: string, featureId: string, newStatus: string) {
// ... existing status update logic ...
if (newStatus === 'verified' || newStatus === 'completed') {
await syncFeatureToAppSpec(projectPath, feature);
}
}
async function syncFeatureToAppSpec(projectPath: string, feature: Feature) {
const specPath = path.join(projectPath, '.automaker', 'app_spec.txt');
const specContent = await fs.readFile(specPath, 'utf-8');
// Parse XML, find <implemented_features> section
// Add new <feature> entry if not already present
// Write back with proper XML formatting
const featureEntry = ` <feature>${escapeXml(feature.title)}: ${escapeXml(feature.description.slice(0, 100))}</feature>`;
// Insert before </implemented_features> closing tag
const updatedSpec = specContent.replace(
'</implemented_features>',
`${featureEntry}\n </implemented_features>`
);
await fs.writeFile(specPath, updatedSpec);
}
Option B: Manual sync button
Add a "Sync to Spec" button in the Kanban board header:
// In board-view.tsx toolbar
<Button onClick={handleSyncToSpec} variant="outline">
<RefreshCw className="w-4 h-4 mr-2" />
Sync to Spec
</Button>
This would:
- Collect all verified/completed features
- Show diff preview of changes to app_spec.txt
- Allow user to confirm before saving
Option C: Periodic reconciliation
Add a "Reconcile Spec" action in Spec view:
- Compare features directory with app_spec.txt
- Show discrepancies in a modal
- Allow selective sync of completed features
Files to Modify
| File |
Changes |
apps/server/src/services/auto-mode-service.ts |
Add sync trigger on status change |
apps/server/src/services/feature-loader.ts |
Add syncToAppSpec method |
apps/server/src/lib/app-spec-format.ts |
Add XML update utilities |
apps/app/src/components/views/board-view/hooks/use-board-actions.ts |
Call sync on verify/complete |
Code References
Feature status update (no spec sync):
apps/server/src/services/auto-mode-service.ts:967-993
Feature persistence:
apps/server/src/services/feature-loader.ts:update()
App spec format utilities:
apps/server/src/lib/app-spec-format.ts
XML Format Considerations
The <implemented_features> section uses this format:
<implemented_features>
<feature_group name="Group Name">
<feature>Feature description here</feature>
<feature>Another feature description</feature>
</feature_group>
</implemented_features>
Options for adding new features:
- Add to existing group - Match category to feature_group name
- Create new group - "Kanban Completed" or use feature category
- Flat list - Add without grouping at the end
Edge Cases to Consider
| Scenario |
Suggested Behavior |
| Feature moved back to backlog |
Remove from implemented_features? Or keep? |
| Feature description was enhanced |
Use enhanced description or original? |
| Duplicate feature title |
Check before adding, skip if exists |
| app_spec.txt doesn't exist |
Skip sync, log warning |
| XML parsing fails |
Skip sync, preserve original, log error |
Acceptance Criteria
Future Enhancements
- Bi-directional sync - Changes to app_spec.txt reflected in Kanban
- Conflict resolution - Handle manual spec edits
- Version history - Track spec changes over time
- Spec regeneration awareness - Preserve completed features on regenerate
Labels
enhancement, feature-management, spec-management, data-integrity
Feature Request: Sync verified features back to app_spec.txt
Problem
The
app_spec.txtfile has an<implemented_features>section that is populated ONLY during initial spec generation. When features move through the Kanban board lifecycle:The
app_spec.txtis NEVER updated. It remains a static snapshot from the initial project setup.Current Behavior
Real example from seo-optimization project:
claude-ai-integrationhasstatus: "completed"infeature.jsonapp_spec.txt<implemented_features>section doesn't reflect this completionWhy This Matters
Expected Behavior
When a feature reaches
verifiedorcompletedstatus, it should be:<implemented_features>section in app_spec.txtSuggested Implementation
Option A: Auto-sync on verification (Recommended)
Automatically update app_spec.txt when feature status changes to verified/completed:
Option B: Manual sync button
Add a "Sync to Spec" button in the Kanban board header:
This would:
Option C: Periodic reconciliation
Add a "Reconcile Spec" action in Spec view:
Files to Modify
apps/server/src/services/auto-mode-service.tsapps/server/src/services/feature-loader.tsapps/server/src/lib/app-spec-format.tsapps/app/src/components/views/board-view/hooks/use-board-actions.tsCode References
Feature status update (no spec sync):
apps/server/src/services/auto-mode-service.ts:967-993Feature persistence:
apps/server/src/services/feature-loader.ts:update()App spec format utilities:
apps/server/src/lib/app-spec-format.tsXML Format Considerations
The
<implemented_features>section uses this format:Options for adding new features:
Edge Cases to Consider
Acceptance Criteria
<implemented_features>sectionFuture Enhancements
Labels
enhancement,feature-management,spec-management,data-integrity