Spec Kit: setup and workflow for an existing project
Learn to add Spec Kit to an existing repository, then specify and implement engaged-views analytics across Postgres, SQLite fallback, and UI changes.
Player not loading? Watch on YouTube
This tutorial introduces Spec Kit into Zaphod, an existing YouTube analytics application with loosely organized agent instructions. The presenter installs specify-cli with UV and initializes the repository with OpenCode as the agent integration. He starts with a project constitution rather than a separate full codebase audit, and reports that the generated constitution reflects the repository's structure.
The constitution requires public API compatibility, existing service boundaries, rollback plans for database migrations, and the repository's established test suites. The feature request adds engaged views alongside views, with changes involving Postgres, a SQLite fallback, endpoints, and the interface.
The workflow moves through specify and clarify before planning. Clarify raises a question about displaying missing data. The planning stage produces research notes, a data model, an API contract, and a quick-start document. Tasks include completion criteria and testing instructions for the AI agent.
During implementation, the presenter reports code commits and an update to his existing progress.md file. He then runs converge to find omissions, appends follow-up tasks, and runs implement again before merging to main. The final application has a sortable engaged-views column. This example demonstrates the workflow in one repository; it does not establish that generated changes will be correct in every project.