notex.nvim/specs/001-create-a-neovim/tasks.md

54 lines
2.5 KiB
Markdown
Raw Normal View History

# Tasks: Relational Document System in Neovim
**Input**: Design documents from `/specs/001-create-a-neovim/`
**Prerequisites**: plan.md (required), research.md, data-model.md, quickstart.md
## Format: `[ID] [P?] Description`
- **[P]**: Can run in parallel (different files, no dependencies)
- Include exact file paths in descriptions
## Path Conventions
- Paths shown below assume the project structure defined in `plan.md`.
## Phase 3.1: Setup
- [ ] T001 Create the project structure in `lua/` and `tests/` as defined in `plan.md`.
- [ ] T002 Initialize a Lua project and set up dependencies (lsqlite3, busted).
- [ ] T003 [P] Configure linting and formatting tools for Lua (e.g., luacheck, stylua).
## Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3
**CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation**
- [ ] T004 [P] Write a test for schema inference in `tests/spec/schema_spec.lua`.
- [ ] T005 [P] Write a test for document parsing in `tests/spec/document_spec.lua`.
- [ ] T006 [P] Write a test for query parsing in `tests/spec/query_spec.lua`.
- [ ] T007 [P] Write an integration test for creating a document and viewing it in a query in `tests/integration/main_spec.lua`.
## Phase 3.3: Core Implementation (ONLY after tests are failing)
- [ ] T008 Implement schema inference logic in `lua/notex/schema.lua`.
- [ ] T009 Implement document parsing logic in `lua/notex/document.lua`.
- [ ] T010 Implement query parsing logic in `lua/notex/query.lua`.
- [ ] T011 Implement the main plugin logic in `lua/notex/init.lua` to tie everything together.
- [ ] T012 Implement the view logic in `lua/notex/view.lua` to display query results in a virtual buffer.
## Phase 3.4: Integration
- [ ] T013 Integrate the SQLite database for document indexing and querying.
## Phase 3.5: Polish
- [ ] T014 [P] Write unit tests for all public functions.
- [ ] T015 [P] Add documentation for all public functions and configuration options.
- [ ] T016 Perform manual testing based on `quickstart.md`.
## Dependencies
- Tests (T004-T007) before implementation (T008-T012).
- T008, T009, T010 block T011.
- T011 blocks T012.
- T011 blocks T013.
## Parallel Example
```
# Launch T004-T007 together:
Task: "Write a test for schema inference in tests/spec/schema_spec.lua"
Task: "Write a test for document parsing in tests/spec/document_spec.lua"
Task: "Write a test for query parsing in tests/spec/query_spec.lua"
Task: "Write an integration test for creating a document and viewing it in a query in tests/integration/main_spec.lua"
```