diff --git a/.windsurf/rules/specify-rules.md b/.windsurf/rules/specify-rules.md new file mode 100644 index 0000000..3e858be --- /dev/null +++ b/.windsurf/rules/specify-rules.md @@ -0,0 +1,34 @@ +# diff Development Guidelines + +Auto-generated from all feature plans. Last updated: 2026-02-07 + +## Active Technologies + +- N/A (client-side only, no persistence) (001-text-diff) + +- TypeScript 5.9.3 (strict mode) + React 19.2.4, `diff` (npm — to be added as runtime dependency) (001-text-diff) + +## Project Structure + +```text +backend/ +frontend/ +tests/ +``` + +## Commands + +npm test && npm run lint + +## Code Style + +TypeScript 5.9.3 (strict mode): Follow standard conventions + +## Recent Changes + +- 001-text-diff: Added TypeScript 5.9.3 (strict mode) + React 19.2.4, `diff` (npm — to be added as runtime dependency) + +- 001-text-diff: Added TypeScript 5.9.3 (strict mode) + React 19.2.4, `diff` (npm — to be added as runtime dependency) + + + diff --git a/AGENTS.md b/AGENTS.md index d39c9bb..d6d781e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -44,9 +44,8 @@ You're an expert engineer for this React app. ### Testing -- **Watch mode:** `npm test` (run Vitest tests in watch mode with file watching) - **Coverage:** `npm run test:ci` (run tests with coverage report, requires 100% coverage) -- **Single test file:** `npm test -- --run path/to/test.test.tsx` (run specific test file) +- **Single test file:** `npm test -- path/to/test.test.tsx` (run specific test file) - **Single test with coverage:** `npm run test:ci -- path/to/test.test.tsx` ## Code Style Guidelines @@ -115,7 +114,7 @@ import type { User } from './types'; - **Mock external dependencies** - mock API calls, browser APIs, etc. - **Descriptive test names** - should clearly state what is being tested - **Vitest globals** - use `vi.fn()`, `vi.mock()`, `vi.clearAllMocks()` -- **Test setup** - global test environment configured in `vitest.config.mts` with `globals: true` +- **Test setup** - global test environment configured in `vite.config.mts` with `globals: true` ### Code Quality Rules diff --git a/README.md b/README.md index 337cb15..701e041 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# diff +# 📝 Diff [![build](https://github.com/remarkablemark/diff/actions/workflows/build.yml/badge.svg)](https://github.com/remarkablemark/diff/actions/workflows/build.yml) [![test](https://github.com/remarkablemark/diff/actions/workflows/test.yml/badge.svg)](https://github.com/remarkablemark/diff/actions/workflows/test.yml) -📝 Check the diff between 2 files: +Compare the [diff](https://wikipedia.org/wiki/Diff#Use) between 2 texts: -- [diff](https://remarkablemark.org/diff/) +- [Website](https://remarkablemark.org/diff/) ## Install diff --git a/index.html b/index.html index 303e198..9f0a37c 100644 --- a/index.html +++ b/index.html @@ -2,13 +2,19 @@ - + - diff + + Diff - +
diff --git a/package-lock.json b/package-lock.json index 51aa4c4..438fb34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "diff", "version": "1.0.0-alpha", "dependencies": { + "diff": "8.0.3", "react": "19.2.4", "react-dom": "19.2.4" }, @@ -5265,10 +5266,9 @@ } }, "node_modules/diff": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", - "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", - "dev": true, + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/diff/-/diff-8.0.3.tgz", + "integrity": "sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==", "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -8738,6 +8738,16 @@ } } }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", + "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/ts-pattern": { "version": "5.9.0", "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-5.9.0.tgz", diff --git a/package.json b/package.json index f7d9ff3..b33aec3 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,12 @@ "prepare": "husky", "preview": "vite preview", "start": "vite --open", - "test": "vitest", - "test:ci": "CI=true npm test -- --color --coverage --run" + "test": "vitest run", + "test:ci": "CI=true npm test -- --color --coverage", + "test:watch": "vitest" }, "dependencies": { + "diff": "8.0.3", "react": "19.2.4", "react-dom": "19.2.4" }, diff --git a/public/react.svg b/public/react.svg deleted file mode 100644 index 8e0e0f1..0000000 --- a/public/react.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/public/tailwind.svg b/public/tailwind.svg deleted file mode 100644 index 6a9ab49..0000000 --- a/public/tailwind.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/specs/001-text-diff/checklists/requirements.md b/specs/001-text-diff/checklists/requirements.md new file mode 100644 index 0000000..be09a5f --- /dev/null +++ b/specs/001-text-diff/checklists/requirements.md @@ -0,0 +1,44 @@ +# Specification Quality Checklist: Diff + +**Purpose**: Validate specification completeness and quality before proceeding to planning +**Created**: 2026-02-07 +**Feature**: [spec.md](../spec.md) + +## Content Quality + +- [x] No implementation details (languages, frameworks, APIs) +- [x] Focused on user value and business needs +- [x] Written for non-technical stakeholders +- [x] All mandatory sections completed + +## Requirement Completeness + +- [x] No [NEEDS CLARIFICATION] markers remain +- [x] Requirements are testable and unambiguous +- [x] Success criteria are measurable +- [x] Success criteria are technology-agnostic (no implementation details) +- [x] All acceptance scenarios are defined +- [x] Edge cases are identified +- [x] Scope is clearly bounded +- [x] Dependencies and assumptions identified + +## Feature Readiness + +- [x] All functional requirements have clear acceptance criteria +- [x] User scenarios cover primary flows +- [x] Feature meets measurable outcomes defined in Success Criteria +- [x] No implementation details leak into specification + +## Notes + +- All items pass validation. Spec is ready for `/speckit.plan`. +- Clarification session 2026-02-07 resolved 8 questions: + 1. Diff library: `diff` (`npm: diff`) + 2. Display format: Both unified inline and side-by-side views with toggle + 3. Diff granularity: Word-level + 4. Text input component: Plain `