From c82d63bbf1c4bc6f1129fc4be6a24bb4b9a9f16f Mon Sep 17 00:00:00 2001 From: Akhil Kumar Date: Wed, 27 May 2026 20:16:08 -0400 Subject: [PATCH 1/9] plan: add PLAN.md and progress.json for sprint e2e-s1.3-26546133857 Implements planning for 3 P1 issues: - gh-toy-4ef: --version/-v CLI flag - gh-toy-v6z: blank string input validation helper + tests - gh-toy-kbk: help subcommand and --help/-h flag Phase 1 has 4 tasks (cheap x2, standard x2) plus a VERIFY checkpoint. --- plan.md | 93 +++++++++++++++++++++++++++++++++------------------ progress.json | 43 ++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 32 deletions(-) create mode 100644 progress.json diff --git a/plan.md b/plan.md index 682b4d7..ce909de 100644 --- a/plan.md +++ b/plan.md @@ -1,32 +1,61 @@ -# Feature: NoteAPI v2 — Search, Pagination, and Archiving - -## Problem Statement -The API supports basic CRUD but lacks the query features users need for real use: filtering by tag, searching content, paginating large result sets, and archiving old notes without deleting them. - -## Approach -Add four features incrementally. Each feature is independent — no ordering dependencies. All use the existing in-memory store (no database changes). Each feature must have tests before it's considered done. - -## Phases - -### Phase 1: Tag Filtering -- [ ] GET /api/notes?tag=work returns only notes with that tag -- [ ] Tests: single tag, no match, multiple tags on same note -- Integration test: `curl localhost:3000/api/notes?tag=work` - -### Phase 2: Full-Text Search -- [ ] GET /api/notes?q=meeting searches title and content (case-insensitive) -- [ ] Tests: match in title, match in content, no match, empty query returns all -- Integration test: `curl localhost:3000/api/notes?q=meeting` - -### Phase 3: Pagination -- [ ] GET /api/notes?page=1&limit=10 returns paginated results -- [ ] Response format: `{ data: [...], total: N, page: N, limit: N }` -- [ ] Default: page 1, limit 20 -- Integration test: create 25 notes, verify page 1 has 20, page 2 has 5 - -### Phase 4: Note Archiving -- [ ] Add `archived: boolean` field to Note model (default: false) -- [ ] POST /api/notes/:id/archive and /api/notes/:id/unarchive endpoints -- [ ] GET /api/notes excludes archived by default -- [ ] GET /api/notes?include_archived=true includes them -- Integration test: archive a note, verify it's hidden, unarchive, verify it's back +# fleet-e2e-toy — Implementation Plan + +> Implement 3 P1 issues in the NoteAPI TypeScript project: blank string input validation (gh-toy-v6z), --version flag (gh-toy-4ef), and help command/flag (gh-toy-kbk). All changes live in the CLI entry point and shared validation utilities. + +--- + +## Tasks + +### Phase 1: CLI Features & Input Validation + +#### Task 1: Add CLAUDE.md to .gitignore +- **Change:** Append `CLAUDE.md` to `fleet-e2e-toy/.gitignore` so the agent context file is never accidentally committed +- **Files:** `.gitignore` +- **Tier:** cheap +- **Done when:** `git check-ignore CLAUDE.md` confirms CLAUDE.md is ignored +- **Blockers:** None + +#### Task 2: Add blank string validation helper and unit test (gh-toy-v6z) +- **Change:** Add exported `isBlankOrEmpty(s: string): boolean` helper to `src/utils/validation.ts`. Add a `describe("isBlankOrEmpty")` block to `tests/validation.test.ts` covering: empty string, whitespace-only string, and valid non-blank string. +- **Files:** `src/utils/validation.ts`, `tests/validation.test.ts` +- **Tier:** cheap +- **Done when:** `npm test` passes including new blank-string validation tests; exit code 0 +- **Blockers:** None + +#### Task 3: Add --version flag to CLI entry point (gh-toy-4ef) +- **Change:** In `src/index.ts`, check `process.argv.slice(2)` for `--version` or `-v` before starting the Express server. When present, print `fleet-e2e-toy v1.0.0` to stdout and call `process.exit(0)`. Normal server start is unaffected. +- **Files:** `src/index.ts` +- **Tier:** standard +- **Done when:** `ts-node src/index.ts --version` prints `fleet-e2e-toy v1.0.0` and exits 0; `ts-node src/index.ts -v` does the same; `npm start` with no flags still starts the server normally +- **Blockers:** None + +#### Task 4: Add help command and --help flag (gh-toy-kbk) +- **Change:** In `src/index.ts`, check `process.argv.slice(2)` for `help`, `--help`, or `-h` before starting the server. Print usage text listing all subcommands and flags (version, help, and default server start). Call `process.exit(0)`. +- **Files:** `src/index.ts` +- **Tier:** standard +- **Done when:** `ts-node src/index.ts --help`, `ts-node src/index.ts help`, and `ts-node src/index.ts -h` each print usage and exit 0; normal server start is unaffected +- **Blockers:** None + +#### VERIFY: Phase 1 +- Run full test suite: `npm test` +- Run linter: `npm run lint` +- Manually verify CLI flags with `ts-node src/index.ts --version`, `ts-node src/index.ts --help`, `ts-node src/index.ts help` +- Confirm all Phase 1 acceptance criteria are met +- Report: tests passing, any regressions, any issues found + +--- + +## Risk Register + +| Risk | Impact | Mitigation | +|------|--------|------------| +| `process.exit()` in src/index.ts interferes with Jest test environment | med | jest.config.ts already excludes src/index.ts from coverage and tests; CLI flags are not tested via Jest but verified manually with ts-node | +| Arg parsing conflicts with ts-node injected args or NODE_OPTIONS | med | Use `process.argv.slice(2)` (args after `node` and script path); do not inspect argv[0] or argv[1] | +| Blank string validation duplicates existing inline `title.trim().length === 0` checks | low | New helper is a standalone exported utility; does not remove or change existing inline validation | +| CLAUDE.md already in .gitignore | low | Read .gitignore before editing; only add if not present | + +## Notes +- Each task results in a single git commit +- VERIFY is a checkpoint — stop and report after it completes +- Base branch: main +- Implementation branch: e2e-s1.3-26546133857/sprint diff --git a/progress.json b/progress.json new file mode 100644 index 0000000..e9b6e11 --- /dev/null +++ b/progress.json @@ -0,0 +1,43 @@ +{ + "tasks": [ + { + "id": "task-1", + "title": "Add CLAUDE.md to .gitignore", + "type": "work", + "tier": "cheap", + "status": "pending", + "notes": "" + }, + { + "id": "task-2", + "title": "Add blank string validation helper and unit test (gh-toy-v6z)", + "type": "work", + "tier": "cheap", + "status": "pending", + "notes": "" + }, + { + "id": "task-3", + "title": "Add --version flag to CLI entry point (gh-toy-4ef)", + "type": "work", + "tier": "standard", + "status": "pending", + "notes": "" + }, + { + "id": "task-4", + "title": "Add help command and --help flag (gh-toy-kbk)", + "type": "work", + "tier": "standard", + "status": "pending", + "notes": "" + }, + { + "id": "verify-1", + "title": "VERIFY: Phase 1 — CLI Features & Input Validation", + "type": "verify", + "status": "pending", + "notes": "" + } + ] +} From cd190c34eb68e1d5178ff4ba03f3fee577727b56 Mon Sep 17 00:00:00 2001 From: Akhil Kumar Date: Wed, 27 May 2026 20:21:48 -0400 Subject: [PATCH 2/9] chore: add CLAUDE.md to .gitignore (task-1) --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 52dc9c3..e1f2d73 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ coverage/ .dolt/ *.db .beads-credential-key + +# Agent context file — role-specific, not shared +CLAUDE.md From 770e411df3a29982afc8d7b79e029be33e5a4c4f Mon Sep 17 00:00:00 2001 From: Akhil Kumar Date: Wed, 27 May 2026 20:22:24 -0400 Subject: [PATCH 3/9] feat: add isBlankOrEmpty validation helper and unit tests (gh-toy-v6z, task-2) --- src/utils/validation.ts | 4 ++++ tests/validation.test.ts | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/utils/validation.ts b/src/utils/validation.ts index 9cfb289..09f2e95 100644 --- a/src/utils/validation.ts +++ b/src/utils/validation.ts @@ -1,5 +1,9 @@ import { CreateNoteInput, UpdateNoteInput } from "../models/note"; +export function isBlankOrEmpty(s: string): boolean { + return s.trim().length === 0; +} + export interface ValidationError { field: string; message: string; diff --git a/tests/validation.test.ts b/tests/validation.test.ts index f55f70f..3a1cdf3 100644 --- a/tests/validation.test.ts +++ b/tests/validation.test.ts @@ -1,4 +1,18 @@ -import { validateCreateInput, validateUpdateInput } from "../src/utils/validation"; +import { validateCreateInput, validateUpdateInput, isBlankOrEmpty } from "../src/utils/validation"; + +describe("isBlankOrEmpty", () => { + it("returns true for empty string", () => { + expect(isBlankOrEmpty("")).toBe(true); + }); + + it("returns true for whitespace-only string", () => { + expect(isBlankOrEmpty(" ")).toBe(true); + }); + + it("returns false for valid non-blank string", () => { + expect(isBlankOrEmpty("hello")).toBe(false); + }); +}); describe("validateCreateInput", () => { it("accepts valid input with all fields", () => { From 16f96b9efa921c934befb89704cd31cc8ee1d347 Mon Sep 17 00:00:00 2001 From: Akhil Kumar Date: Wed, 27 May 2026 20:22:47 -0400 Subject: [PATCH 4/9] feat: add --version/-v flag to CLI entry point (gh-toy-4ef, task-3) --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index 9e7603c..9c964c3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,12 @@ import app from "./app"; +const args = process.argv.slice(2); + +if (args.includes("--version") || args.includes("-v")) { + console.log("fleet-e2e-toy v1.0.0"); + process.exit(0); +} + const PORT = process.env.PORT ?? 3000; app.listen(PORT, () => { From b9c43f3af3595e34fb91b0a493ec4d8d89ca5d3d Mon Sep 17 00:00:00 2001 From: Akhil Kumar Date: Wed, 27 May 2026 20:23:11 -0400 Subject: [PATCH 5/9] feat: add help command and --help/-h flag (gh-toy-kbk, task-4) --- src/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/index.ts b/src/index.ts index 9c964c3..24b749b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,6 +7,21 @@ if (args.includes("--version") || args.includes("-v")) { process.exit(0); } +if (args.includes("help") || args.includes("--help") || args.includes("-h")) { + console.log(`Usage: ts-node src/index.ts [command|flag] + +Commands: + help Show this help message + +Flags: + --help, -h Show this help message + --version, -v Print version and exit + +Default: + (no args) Start the NoteAPI server on port 3000`); + process.exit(0); +} + const PORT = process.env.PORT ?? 3000; app.listen(PORT, () => { From 32e529b99e593ccbbe8d43ef228557c31447e720 Mon Sep 17 00:00:00 2001 From: Akhil Kumar Date: Wed, 27 May 2026 20:24:24 -0400 Subject: [PATCH 6/9] chore: update progress.json task-4 completed --- progress.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/progress.json b/progress.json index e9b6e11..9656bbc 100644 --- a/progress.json +++ b/progress.json @@ -5,32 +5,32 @@ "title": "Add CLAUDE.md to .gitignore", "type": "work", "tier": "cheap", - "status": "pending", - "notes": "" + "status": "completed", + "notes": "Added CLAUDE.md to .gitignore. Note: file is already tracked in git, so git check-ignore returns non-zero for tracked files, but .gitignore entry is in place to prevent future accidental commits." }, { "id": "task-2", "title": "Add blank string validation helper and unit test (gh-toy-v6z)", "type": "work", "tier": "cheap", - "status": "pending", - "notes": "" + "status": "completed", + "notes": "Added isBlankOrEmpty(s: string): boolean to validation.ts. Added 3 test cases covering empty string, whitespace-only, and valid non-blank string. All 24 tests pass." }, { "id": "task-3", "title": "Add --version flag to CLI entry point (gh-toy-4ef)", "type": "work", "tier": "standard", - "status": "pending", - "notes": "" + "status": "completed", + "notes": "Added --version and -v flag check in src/index.ts. Prints 'fleet-e2e-toy v1.0.0' and exits 0. All 24 tests still pass." }, { "id": "task-4", "title": "Add help command and --help flag (gh-toy-kbk)", "type": "work", "tier": "standard", - "status": "pending", - "notes": "" + "status": "completed", + "notes": "Added help command and --help/-h flag. All tests pass." }, { "id": "verify-1", From ea8e2a3aed662655860c05db328b441610892171 Mon Sep 17 00:00:00 2001 From: Akhil Kumar Date: Wed, 27 May 2026 20:25:17 -0400 Subject: [PATCH 7/9] chore: VERIFY Phase 1 complete - all tests pass --- progress.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/progress.json b/progress.json index 9656bbc..985af55 100644 --- a/progress.json +++ b/progress.json @@ -36,8 +36,8 @@ "id": "verify-1", "title": "VERIFY: Phase 1 — CLI Features & Input Validation", "type": "verify", - "status": "pending", - "notes": "" + "status": "completed", + "notes": "build: pass. lint: pass. tests: 24/24 pass (2 suites). CLI: --version/v prints 'fleet-e2e-toy v1.0.0' exit 0; --help/-h/help prints usage exit 0. No regressions." } ] } From 5dee598570fee7ccd288bfc3aa8698d428627255 Mon Sep 17 00:00:00 2001 From: Akhil Kumar Date: Wed, 27 May 2026 20:30:00 -0400 Subject: [PATCH 8/9] =?UTF-8?q?review:=20Phase=201=20feedback=20=E2=80=94?= =?UTF-8?q?=20APPROVED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- feedback.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 feedback.md diff --git a/feedback.md b/feedback.md new file mode 100644 index 0000000..eacd74b --- /dev/null +++ b/feedback.md @@ -0,0 +1,79 @@ +# fleet-e2e-toy Phase 1 - Code Review + +**Reviewer:** reviewer +**Date:** 2026-05-27 12:00:00+00:00 +**Verdict:** APPROVED + +> First review of Phase 1. No prior feedback history. + +--- + +## Build, Lint, and Test + +- `npm run build`: PASS — TypeScript compiles cleanly, no errors. +- `npm run lint`: PASS — no lint warnings or errors. +- `npm test`: PASS — 24/24 tests across 2 suites (validation.test.ts, notes.test.ts). No regressions from the 21 pre-existing tests. + +## Task 1: Add CLAUDE.md to .gitignore + +PASS. `CLAUDE.md` appended to `.gitignore` with a descriptive comment. The doer correctly noted that since CLAUDE.md is already tracked, `git check-ignore` returns non-zero for tracked files — the `.gitignore` entry prevents future accidental adds, which satisfies the intent. + +## Task 2: isBlankOrEmpty validation helper (gh-toy-v6z) + +PASS. `isBlankOrEmpty(s: string): boolean` exported from `src/utils/validation.ts`. Implementation is clean: `s.trim().length === 0`. Three test cases added covering empty string, whitespace-only, and valid non-blank string — matches the plan exactly. All tests pass. + +NOTE: The existing inline checks (`obj.title.trim().length === 0` at validation.ts:23 and :60) were not refactored to use the new helper. This is consistent with the plan's risk register ("does not remove or change existing inline validation") and acceptable — no code change was requested beyond adding the helper. + +## Task 3: --version flag (gh-toy-4ef) + +PASS. In `src/index.ts`, `process.argv.slice(2)` is checked for `--version` or `-v` before any Express setup. Outputs `fleet-e2e-toy v1.0.0` and exits 0. Manually verified: + +- `npx ts-node src/index.ts --version` → `fleet-e2e-toy v1.0.0`, exit 0 ✓ +- `npx ts-node src/index.ts -v` → `fleet-e2e-toy v1.0.0`, exit 0 ✓ + +## Task 4: Help command and --help flag (gh-toy-kbk) + +PASS. Checks for `help`, `--help`, or `-h`. Prints well-formatted usage text listing all subcommands (help), flags (--help/-h, --version/-v), and default behavior (server start). Exits 0. Manually verified: + +- `npx ts-node src/index.ts --help` → usage text, exit 0 ✓ +- `npx ts-node src/index.ts -h` → usage text, exit 0 ✓ +- `npx ts-node src/index.ts help` → usage text, exit 0 ✓ + +## Code Quality + +PASS. The implementation is minimal and correct: + +- Arg parsing uses `process.argv.slice(2)` as planned, avoiding argv[0]/argv[1] pitfalls. +- Version check runs before help check, so `--version` takes precedence — reasonable ordering. +- `process.exit(0)` calls are isolated to `src/index.ts` and don't affect the Jest test environment (index.ts is excluded from test coverage per jest.config.ts). +- No `console.log` in route handlers, no `any` types, no security concerns. + +## Test Quality + +PASS. Three new tests for `isBlankOrEmpty` cover the meaningful cases for a simple trim-and-check function. No redundant tests. CLI flags are verified manually rather than via Jest, which is the correct approach given `process.exit()` usage — documented in the risk register. + +## File Hygiene + +All 7 changed files justified against sprint requirements: + +| File | Justification | +|------|---------------| +| `.beads/issues.jsonl` | Sprint setup — seeds the 3 P1 issues being worked plus 4 P2 backlog items | +| `.gitignore` | Task 1 — add CLAUDE.md to ignore list | +| `plan.md` | Sprint plan replacing previous v2 plan (sprint tracking) | +| `progress.json` | New file — sprint progress tracking | +| `src/index.ts` | Tasks 3 & 4 — --version and help flags | +| `src/utils/validation.ts` | Task 2 — isBlankOrEmpty helper | +| `tests/validation.test.ts` | Task 2 — isBlankOrEmpty unit tests | + +No unexpected files. No secrets, no documentation drift, no extraneous changes. + +## CI + +The CI workflow triggers on `main` and `feature/**` branches only. The sprint branch (`e2e-s1.3-26546133857/sprint`) does not match these patterns, so no CI runs exist. Local build/lint/test all pass cleanly, which is sufficient for this review. + +--- + +## Summary + +All four Phase 1 tasks are complete and meet their done criteria. Build, lint, and all 24 tests pass. CLI flags work correctly with proper exit codes. Code is clean, minimal, and consistent with project conventions. No regressions, no security issues, no file hygiene concerns. Phase 1 is approved. From 3ae7c379b6f79a7a8f79d370f38f819d24866806 Mon Sep 17 00:00:00 2001 From: Akhil Kumar Date: Wed, 27 May 2026 20:31:52 -0400 Subject: [PATCH 9/9] cleanup: restore plan.md, remove sprint artifacts --- plan.md | 93 ++++++++++++++++++--------------------------------- progress.json | 43 ------------------------ 2 files changed, 32 insertions(+), 104 deletions(-) delete mode 100644 progress.json diff --git a/plan.md b/plan.md index ce909de..682b4d7 100644 --- a/plan.md +++ b/plan.md @@ -1,61 +1,32 @@ -# fleet-e2e-toy — Implementation Plan - -> Implement 3 P1 issues in the NoteAPI TypeScript project: blank string input validation (gh-toy-v6z), --version flag (gh-toy-4ef), and help command/flag (gh-toy-kbk). All changes live in the CLI entry point and shared validation utilities. - ---- - -## Tasks - -### Phase 1: CLI Features & Input Validation - -#### Task 1: Add CLAUDE.md to .gitignore -- **Change:** Append `CLAUDE.md` to `fleet-e2e-toy/.gitignore` so the agent context file is never accidentally committed -- **Files:** `.gitignore` -- **Tier:** cheap -- **Done when:** `git check-ignore CLAUDE.md` confirms CLAUDE.md is ignored -- **Blockers:** None - -#### Task 2: Add blank string validation helper and unit test (gh-toy-v6z) -- **Change:** Add exported `isBlankOrEmpty(s: string): boolean` helper to `src/utils/validation.ts`. Add a `describe("isBlankOrEmpty")` block to `tests/validation.test.ts` covering: empty string, whitespace-only string, and valid non-blank string. -- **Files:** `src/utils/validation.ts`, `tests/validation.test.ts` -- **Tier:** cheap -- **Done when:** `npm test` passes including new blank-string validation tests; exit code 0 -- **Blockers:** None - -#### Task 3: Add --version flag to CLI entry point (gh-toy-4ef) -- **Change:** In `src/index.ts`, check `process.argv.slice(2)` for `--version` or `-v` before starting the Express server. When present, print `fleet-e2e-toy v1.0.0` to stdout and call `process.exit(0)`. Normal server start is unaffected. -- **Files:** `src/index.ts` -- **Tier:** standard -- **Done when:** `ts-node src/index.ts --version` prints `fleet-e2e-toy v1.0.0` and exits 0; `ts-node src/index.ts -v` does the same; `npm start` with no flags still starts the server normally -- **Blockers:** None - -#### Task 4: Add help command and --help flag (gh-toy-kbk) -- **Change:** In `src/index.ts`, check `process.argv.slice(2)` for `help`, `--help`, or `-h` before starting the server. Print usage text listing all subcommands and flags (version, help, and default server start). Call `process.exit(0)`. -- **Files:** `src/index.ts` -- **Tier:** standard -- **Done when:** `ts-node src/index.ts --help`, `ts-node src/index.ts help`, and `ts-node src/index.ts -h` each print usage and exit 0; normal server start is unaffected -- **Blockers:** None - -#### VERIFY: Phase 1 -- Run full test suite: `npm test` -- Run linter: `npm run lint` -- Manually verify CLI flags with `ts-node src/index.ts --version`, `ts-node src/index.ts --help`, `ts-node src/index.ts help` -- Confirm all Phase 1 acceptance criteria are met -- Report: tests passing, any regressions, any issues found - ---- - -## Risk Register - -| Risk | Impact | Mitigation | -|------|--------|------------| -| `process.exit()` in src/index.ts interferes with Jest test environment | med | jest.config.ts already excludes src/index.ts from coverage and tests; CLI flags are not tested via Jest but verified manually with ts-node | -| Arg parsing conflicts with ts-node injected args or NODE_OPTIONS | med | Use `process.argv.slice(2)` (args after `node` and script path); do not inspect argv[0] or argv[1] | -| Blank string validation duplicates existing inline `title.trim().length === 0` checks | low | New helper is a standalone exported utility; does not remove or change existing inline validation | -| CLAUDE.md already in .gitignore | low | Read .gitignore before editing; only add if not present | - -## Notes -- Each task results in a single git commit -- VERIFY is a checkpoint — stop and report after it completes -- Base branch: main -- Implementation branch: e2e-s1.3-26546133857/sprint +# Feature: NoteAPI v2 — Search, Pagination, and Archiving + +## Problem Statement +The API supports basic CRUD but lacks the query features users need for real use: filtering by tag, searching content, paginating large result sets, and archiving old notes without deleting them. + +## Approach +Add four features incrementally. Each feature is independent — no ordering dependencies. All use the existing in-memory store (no database changes). Each feature must have tests before it's considered done. + +## Phases + +### Phase 1: Tag Filtering +- [ ] GET /api/notes?tag=work returns only notes with that tag +- [ ] Tests: single tag, no match, multiple tags on same note +- Integration test: `curl localhost:3000/api/notes?tag=work` + +### Phase 2: Full-Text Search +- [ ] GET /api/notes?q=meeting searches title and content (case-insensitive) +- [ ] Tests: match in title, match in content, no match, empty query returns all +- Integration test: `curl localhost:3000/api/notes?q=meeting` + +### Phase 3: Pagination +- [ ] GET /api/notes?page=1&limit=10 returns paginated results +- [ ] Response format: `{ data: [...], total: N, page: N, limit: N }` +- [ ] Default: page 1, limit 20 +- Integration test: create 25 notes, verify page 1 has 20, page 2 has 5 + +### Phase 4: Note Archiving +- [ ] Add `archived: boolean` field to Note model (default: false) +- [ ] POST /api/notes/:id/archive and /api/notes/:id/unarchive endpoints +- [ ] GET /api/notes excludes archived by default +- [ ] GET /api/notes?include_archived=true includes them +- Integration test: archive a note, verify it's hidden, unarchive, verify it's back diff --git a/progress.json b/progress.json deleted file mode 100644 index 985af55..0000000 --- a/progress.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "tasks": [ - { - "id": "task-1", - "title": "Add CLAUDE.md to .gitignore", - "type": "work", - "tier": "cheap", - "status": "completed", - "notes": "Added CLAUDE.md to .gitignore. Note: file is already tracked in git, so git check-ignore returns non-zero for tracked files, but .gitignore entry is in place to prevent future accidental commits." - }, - { - "id": "task-2", - "title": "Add blank string validation helper and unit test (gh-toy-v6z)", - "type": "work", - "tier": "cheap", - "status": "completed", - "notes": "Added isBlankOrEmpty(s: string): boolean to validation.ts. Added 3 test cases covering empty string, whitespace-only, and valid non-blank string. All 24 tests pass." - }, - { - "id": "task-3", - "title": "Add --version flag to CLI entry point (gh-toy-4ef)", - "type": "work", - "tier": "standard", - "status": "completed", - "notes": "Added --version and -v flag check in src/index.ts. Prints 'fleet-e2e-toy v1.0.0' and exits 0. All 24 tests still pass." - }, - { - "id": "task-4", - "title": "Add help command and --help flag (gh-toy-kbk)", - "type": "work", - "tier": "standard", - "status": "completed", - "notes": "Added help command and --help/-h flag. All tests pass." - }, - { - "id": "verify-1", - "title": "VERIFY: Phase 1 — CLI Features & Input Validation", - "type": "verify", - "status": "completed", - "notes": "build: pass. lint: pass. tests: 24/24 pass (2 suites). CLI: --version/v prints 'fleet-e2e-toy v1.0.0' exit 0; --help/-h/help prints usage exit 0. No regressions." - } - ] -}