Skip to content
Merged
Show file tree
Hide file tree
Changes from 140 commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
0ba26df
added initial gliner notebook
omri374 Dec 16, 2025
c88e799
added approaches for entity mapping
omri374 Jan 1, 2026
f14cd07
updated design doc
omri374 Jan 6, 2026
5da5de1
entity mapping
omri374 Feb 28, 2026
b4b3e3c
Delete .github/agents/Research.agent.md
omri374 Feb 28, 2026
b8add90
Delete docs/entity_mapping_analysis.md
omri374 Feb 28, 2026
511fb0f
Modify ner group dependencies in pyproject.toml
omri374 Feb 28, 2026
1e01a9f
Update presidio_evaluator/models/base_model.py
omri374 Feb 28, 2026
7cd3aab
updates to PR
omri374 Feb 28, 2026
8b023f2
Merge branch 'omri/enhanced_mapping' of https://github.com/microsoft/…
omri374 Feb 28, 2026
8ef4dc7
ruff
omri374 Feb 28, 2026
bf47a51
updates to notebooks and PR comments
omri374 Mar 1, 2026
fb989b9
Remove deprecated entity_mapping check from model
omri374 Mar 1, 2026
f867938
added changelog
omri374 Mar 1, 2026
d40a4fd
changed iou_threshold
omri374 Mar 1, 2026
f057b78
changed iou to 0.75
omri374 Mar 1, 2026
27eb133
removed dead code on mapper.py
omri374 Mar 1, 2026
1601dc1
removed dead code from interactive.py
omri374 Mar 1, 2026
496d40c
updating flair test
omri374 Mar 1, 2026
58043eb
deprecating old models and removing tests
omri374 Mar 2, 2026
b2b4d88
forgotten comma
omri374 Mar 2, 2026
ea98c02
bugfix
omri374 Mar 2, 2026
c085704
Update base_evaluator.py
omri374 Mar 2, 2026
19fcfea
feat: [US-001] - CanonicalMapper core implementation
omri374 Mar 20, 2026
dfb146d
feat: [US-002,US-003,US-004,US-005,US-006] - Complete CanonicalMapper…
omri374 Mar 20, 2026
d58f0f7
chore: mark all stories complete and add progress log
omri374 Mar 20, 2026
9490eb3
chore: update progress log with full implementation details
omri374 Mar 20, 2026
4caccdf
chore: remove stale test_entity_mapping.py (tested old SemanticEntity…
omri374 Mar 20, 2026
fcfec9d
Initial plan
Copilot Mar 21, 2026
95f230c
Add ADR-001: Simplified Evaluation Pipeline Using DataFrame as Clean …
Copilot Mar 21, 2026
b59cded
Simplify evaluation pipeline and update model prediction
omri374 Mar 21, 2026
1df517c
docs: add ADR-002 for entity mapping via CanonicalMapper
Copilot Mar 21, 2026
3e900aa
docs: revise ADR-002 per review feedback
Copilot Mar 21, 2026
6ca1cac
Add hierarchical entity mapping dictionary
omri374 Mar 21, 2026
e1b5884
Update entity mapping details in ADR-002
omri374 Mar 21, 2026
ec19dc7
Refactor CanonicalMapper usage examples
omri374 Mar 21, 2026
87a9d8e
Update docs/adr/ADR-001-simplified-evaluation-pipeline.md
omri374 Mar 22, 2026
cddbdda
docs: move DOMAIN, WEB, URL, WEBSITE to NETWORK_IDENTIFIER
Copilot Mar 22, 2026
e0daa3c
Update docs/adr/ADR-001-simplified-evaluation-pipeline.md
omri374 Mar 22, 2026
d7d95e9
docs: update CanonicalMapper API and map_entities interface per revie…
Copilot Mar 22, 2026
6d6866f
docs: remove HOSPITAL alias from ORGANIZATION.COMPANY
Copilot Mar 22, 2026
151acad
Apply suggestions from code review
omri374 Mar 22, 2026
44adbc0
docs: remove MRN alias from PHI.PATIENT_ID
Copilot Mar 22, 2026
a56c6ac
Add example mappings for entity labels
omri374 Mar 22, 2026
a34a441
updates to canonical mapper
omri374 Mar 24, 2026
c74e418
Enhance ADR-001 with additional evaluation details
omri374 Mar 24, 2026
5fdf500
Enhance evaluation pipeline with hierarchy scoring
omri374 Mar 24, 2026
b400004
Update ADR-001-simplified-evaluation-pipeline.md
omri374 Mar 24, 2026
7c600b6
Modify prediction method to return DataFrame
omri374 Mar 24, 2026
aac1880
Merge remote-tracking branch 'origin/copilot/add-simplified-evaluatio…
omri374 Mar 24, 2026
191f330
Enhance ADR-002 with input format and usage updates
omri374 Mar 24, 2026
6bb51f7
Merge remote-tracking branch 'origin/copilot/add-simplified-evaluatio…
omri374 Mar 24, 2026
6725db7
Enhance ADR-001 with multi-hierarchical evaluation example
omri374 Mar 24, 2026
f8d6f01
Merge remote-tracking branch 'origin/copilot/add-simplified-evaluatio…
omri374 Mar 24, 2026
6012aff
feat: [US-001] - Add predict_dataset() to BaseModel
omri374 Mar 24, 2026
3ae9a1b
chore: mark US-001 as passing, update progress log
omri374 Mar 24, 2026
3165f4a
feat: [US-005] - Strip entity mapping from evaluation package
omri374 Mar 24, 2026
613aa46
chore: mark US-005 as passing, update progress log
omri374 Mar 24, 2026
4392d3f
feat: [US-002] - Add get_mapped_results_dataframe() to CanonicalMapper
omri374 Mar 24, 2026
34ce7b2
chore: mark US-002 as passing, update progress log
omri374 Mar 24, 2026
8aa9634
feat: [US-006] - Add calculate_score_on_df() to TokenEvaluator, integ…
omri374 Mar 24, 2026
a332a08
chore: mark US-006 as passing, update progress log
omri374 Mar 24, 2026
0808679
feat: [US-003] - Add get_mapping(mode=html/text) to CanonicalMapper
omri374 Mar 24, 2026
75a5f64
chore: mark US-003 as passing, gitignore temp test file
omri374 Mar 24, 2026
33a1299
feat: [US-004] - Remove from_dataset() classmethod from CanonicalMapper
omri374 Mar 24, 2026
e50e5ce
chore: mark US-003, US-004 as passing, update progress
omri374 Mar 24, 2026
601fc18
feat: [US-007] - Deprecate evaluate_all() with hard stop
omri374 Mar 24, 2026
fd91fce
chore: remove temp files
omri374 Mar 24, 2026
0bc911f
chore: US-007 passing - update prd and progress
omri374 Mar 24, 2026
3cf7988
feat: [US-008] - Soft deprecate get_results_dataframe() with Deprecat…
omri374 Mar 24, 2026
f3d8b07
chore: US-008 passing - update prd and progress
omri374 Mar 24, 2026
6dfe5a7
feat: [US-010] - Remove non-Presidio model wrappers
omri374 Mar 24, 2026
c37d88f
chore: US-010 passing - update prd and progress
omri374 Mar 24, 2026
2ad5fa0
feat: [US-013] - Migrate to uv, update dependency versions
omri374 Mar 24, 2026
8128ee0
chore: US-013 passing - update prd and progress
omri374 Mar 24, 2026
429d77c
feat: [US-015] - Add ruff linter and formatter configuration
omri374 Mar 24, 2026
90bd50b
chore: US-015 passing - update prd and progress
omri374 Mar 24, 2026
bcd4915
feat: [US-016] - Add pre-commit hooks
omri374 Mar 24, 2026
fdf9fdc
chore: US-016 passing - update prd and progress
omri374 Mar 24, 2026
a4fc0c7
feat: [US-017] - Reorganize tests into topic-based directories
omri374 Mar 24, 2026
589c0de
chore: US-017 passing - update prd and progress
omri374 Mar 24, 2026
6f455fc
feat: [US-011] - Update evaluation notebooks to the new pipeline
omri374 Mar 24, 2026
58db30f
feat: [US-012] - Replace obsolete model notebooks with deprecation no…
omri374 Mar 24, 2026
cee532b
feat: [US-018] - Write migration guide and changelog
omri374 Mar 24, 2026
e37e40c
chore: US-011, US-012, US-018 passing - update prd and progress
omri374 Mar 24, 2026
69e5eab
chore: fix trailing commas in prd.json - all 16 stories complete
omri374 Mar 24, 2026
828ae34
fix: ruff format/check violations + update stale evaluate_all() in docs
omri374 Mar 25, 2026
2fed0ca
chore: update progress.txt and codebase patterns after quality audit
omri374 Mar 25, 2026
0452700
fix: docs review - update stale references after redesign
omri374 Mar 25, 2026
d2a00f2
fix: update test_entity_hierarchy import path and remove --ignore wor…
omri374 Mar 25, 2026
3a18844
fix: replace CanonicalMapper.from_dataset() with CanonicalMapper(labe…
omri374 Mar 25, 2026
051108f
feat: [US-009] - Decouple model from evaluators
omri374 Mar 25, 2026
9016dce
chore: mark US-009 passes=true and update progress log
omri374 Mar 25, 2026
ffec2f8
fix: update notebooks 4 and 5 to use model=None in SpanEvaluator (US-…
omri374 Mar 25, 2026
f69dc84
docs: split run-experiment cells into 3 labelled steps (predict → map…
omri374 Mar 25, 2026
ef9e7c6
fix: use CanonicalMapper() with no labels in notebooks; map via get_m…
omri374 Mar 25, 2026
d33fd71
refactor: restructure notebook flow — predict first, then review mapp…
omri374 Mar 25, 2026
8ecd174
fix: exclude 'O' non-entity tag from label discovery in get_mapped_re…
omri374 Mar 25, 2026
1c897a9
fix: update integration tests and notebooks for new evaluator pipeline
omri374 Mar 25, 2026
9d269ad
refactor: move compare, evaluate_sample, and helpers to TokenEvaluator
omri374 Mar 25, 2026
e514407
feat: add level parameter to calculate_score_on_df for entity/pii/bot…
omri374 Mar 25, 2026
464398a
updates to notebooks
omri374 Mar 26, 2026
3282b60
delete unneeded files
omri374 Mar 26, 2026
e4f6b60
Align TokenEvaluator and SpanEvaluator EvaluationResult outputs; add …
omri374 Mar 26, 2026
8af177e
pr updates
omri374 Mar 28, 2026
1d5f566
feat: [US-001 through US-017] - Complete two-phase CanonicalMapper re…
omri374 Apr 27, 2026
c185e35
chore: update PRD passes:true for US-001 through US-017 + progress log
omri374 Apr 27, 2026
aea64bb
feat: [US-018] - Update Notebook 4 for two-phase CanonicalMapper API
omri374 Apr 27, 2026
337d3c1
chore: update PRD passes:true for US-018 + progress log
omri374 Apr 27, 2026
3034701
feat: [US-019 through US-023] - Update notebooks and docs for two-pha…
omri374 Apr 28, 2026
f734f02
chore: update PRD passes:true for US-019 through US-023 + progress log
omri374 Apr 28, 2026
0ff60a1
fix: review fixes — DATASET_ONLY never fired, keep_as_fp invalid, mod…
omri374 Apr 28, 2026
6c4ef2b
refactor: extract rendering into MapperRenderer in rendering.py
omri374 Apr 28, 2026
dce6a28
refactor: rename eval_surface/eval_depth to canonical_surface/canonic…
omri374 Apr 28, 2026
a209a65
feat: [US-024] - Hierarchical multi-level evaluation convenience wrapper
omri374 Apr 29, 2026
e08ab5e
chore: mark US-024 passes=true, update progress.txt
omri374 Apr 29, 2026
44c5ff6
refactor: move calculate_hierarchical_scores to evaluation module
omri374 Apr 29, 2026
a36fe49
chore: mark US-006/012/014/015 passes=false per ADR-003 (COLLISION_AM…
omri374 Apr 29, 2026
625367d
chore: US-024 passes=false — wrapper must be method on SpanEvaluator,…
omri374 Apr 29, 2026
85dceae
chore: US-024 — move calculate_hierarchical_scores to BaseEvaluator, …
omri374 Apr 29, 2026
fb3021a
feat: [US-006/US-012/US-014/US-015/US-024] - Demote COLLISION_AMBIGUO…
omri374 Apr 29, 2026
02a2fd3
chore: mark US-006/012/014/015/024 as passing and update progress
omri374 Apr 29, 2026
771f033
feat: [US-001] - Define MappedResults and level helpers
omri374 May 1, 2026
0a078ce
feat: [US-002] - Update IssueType taxonomy
omri374 May 1, 2026
a68d3e4
feat: [US-003] - Remove projection phase, emit MappedResults
omri374 May 1, 2026
f39d49b
feat: [US-004] - Add min_severity to analyze()
omri374 May 1, 2026
2393901
feat: [US-005] - Add get_mapping() method
omri374 May 1, 2026
c6e0537
feat: [US-006] - Update HTML audit table for new issue taxonomy
omri374 May 1, 2026
dadc8bc
feat: [US-007] - Update calculate_hierarchical_scores() to accept Map…
omri374 May 1, 2026
d9945bf
feat: [US-008, US-009, US-010] - Update Notebooks 4, 5, 6 for single-…
omri374 May 1, 2026
5b1c2b0
docs: add AGENTS.md with codebase patterns
omri374 May 1, 2026
bb10aca
fix: remove mapping-to-entity rendering, rename Mapped to -> Resolved as
omri374 May 3, 2026
493b33d
fix: suppress COLLISION_CROSS_BRANCH when same-branch co-occurrences …
omri374 May 3, 2026
2d0f204
fix: COLLISION_CROSS_BRANCH only fires when model has no prediction c…
omri374 May 3, 2026
e0d3e1b
feat: add suppress_prediction_only() to CanonicalMapper
omri374 May 3, 2026
704a73c
docs: update AGENTS.md — level_helpers merged into EntityHierarchy
omri374 May 3, 2026
976b8b7
refactor: mutation methods return None (analyze, map, suppress_predic…
omri374 May 3, 2026
3f59bc5
fix: COLLISION_CROSS_BRANCH 3-case logic — suppress when pred has sam…
omri374 May 8, 2026
3b13779
refining the noteboks and html rendering
omri374 May 12, 2026
53e08d1
fix: correct wheel target configuration in pyproject.toml
RonShakutai May 24, 2026
2bc9ebb
Delete .github/instructions/prd-skill.md
omri374 Jun 29, 2026
28730e4
Delete .github/instructions directory
omri374 Jun 29, 2026
99d327b
Delete .github/agents/Ralph.agent.md
omri374 Jun 29, 2026
95e381b
Delete ralph/archive/2026-05-01-dataset-anchored-mapper/progress.txt
omri374 Jun 29, 2026
cda8fd7
Delete ralph directory
omri374 Jun 29, 2026
d890e64
Delete progress.txt
omri374 Jun 29, 2026
1366b5b
Update README.md
omri374 Jun 30, 2026
fb436e3
Add Python 3.10 to CI workflow matrix
omri374 Jun 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions .github/agents/Ralph.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
name: Ralph
description: Describe what this custom agent does and when to use it.
argument-hint: The inputs this agent expects, e.g., "a task to implement" or "a question to answer".
disable-model-invocation: false
user-invocable: true
---
# Ralph Agent Instructions

You are an autonomous coding agent working on a software project.

## Your Task

1. Read the PRD at `.ralph/prd.json` (from the repo root)
2. Read the progress log at `.ralph/progress.txt`. If missing, create a new `.ralph/progress.txt` with a Codebase Patterns section.
3. Read Codbase Patterns section in `AGENTS.md` and `copilot-instructions.md` under the repo root. If `AGENTS.MD` is missing, create one with an empty Codebase Patterns section.
4. Check you're on the correct branch from PRD `branchName`. If not, check it out from the current checked-out branch (HEAD).
5. Pick the **highest priority** user story where `passes: false`
6. Implement that single user story
7. Load the `quality-checks` skill and follow its instructions to verify the story before committing. If any check fails, fix the issues and retry until all checks pass.
8. If all quality checks pass: Update the PRD to set `passes: true`, append progress to `.ralph/progress.txt` and commit ALL changes with message: `feat: [Story ID] - [Story Title]`
9. If any of the hooks fail: Fix the issues and retry. Do NOT mark the story as passing.
10. Update AGENTS.md files if you discover reusable patterns (see below)
11. When finished, compare your implementation with the PRD to make sure the success criteria are met.

## Progress Report Format

APPEND to `.ralph/progress.txt` (never replace, always append):

```
## [Date/Time] - [Story ID]
- What was implemented
- Files changed
- **Learnings for future iterations:**
- Patterns discovered (e.g., "this codebase uses X for Y")
- Gotchas encountered (e.g., "don't forget to update Z when changing W")
- Useful context (e.g., "the evaluation panel is in component X")
---
```

The learnings section is critical - it helps future iterations avoid repeating mistakes and understand the codebase better.

## Consolidate Patterns

If you discover a **reusable pattern** that future iterations should know, add it to the repo root `AGENTS.md` file (create it if it doesn't exist). This file should consolidate the most important learnings:

```
## Codebase Patterns
- Example: Use `sql<number>` template for aggregations
- Example: Always use `IF NOT EXISTS` for migrations
- Example: Export types from actions.ts for UI components
- Always use `uv run` for Python — never bare python/pip
```

Only add patterns that are **general and reusable**, not story-specific details.

## Update AGENTS.md Files

Before committing, check if any edited files have learnings worth preserving in nearby AGENTS.md files:

1. **Identify directories with edited files** - Look at which directories you modified
2. **Check for existing AGENTS.md** - Look for AGENTS.md in those directories or parent directories
3. **Add valuable learnings** - If you discovered something future developers/agents should know:
- API patterns or conventions specific to that module
- Gotchas or non-obvious requirements
- Dependencies between files
- Testing approaches for that area
- Configuration or environment requirements

**Examples of good AGENTS.md additions:**

- "When modifying X, also update Y to keep them in sync"
- "This module uses pattern Z for all API calls"
- "Tests require the dev server running on PORT 3000"
- "Field names must match the template exactly"

**Do NOT add:**

- Story-specific implementation details
- Temporary debugging notes
- Information already in progress.txt
- Implementation details that are too specific or likely to change

Only update AGENTS.md if you have **genuinely reusable knowledge** that would help future work in that directory.

## Quality Requirements

- ALL commits must pass your project's quality checks (typecheck, lint, test)
- Do NOT commit broken code
- Keep changes focused and minimal
- Follow existing code patterns
- Validate the alignment between the PRD and the implementation when you're finished implementing

## Browser Testing (Required for Frontend Stories)

For any story that changes UI, you MUST verify it works in the browser:

1. Load the `dev-browser` skill
2. Navigate to the relevant page
3. Verify the UI changes work as expected
4. Take a screenshot if helpful for the progress log

A frontend story is NOT complete until browser verification passes.

## Stop Condition

After completing a user story, check if ALL stories in `.ralph/prd.json` have `passes: true`.

If ALL stories are complete and passing, reply with:
<promise>COMPLETE</promise>

If there are still stories with `passes: false`, end your response normally (another iteration will pick up the next story).

## Important

- Work on ONE story per iteration
- Commit frequently
- Keep CI green
- Read the Codebase Patterns section in root `AGENTS.md` Codebase Patterns section and the `copilot-instruction.md` docs before starting
258 changes: 258 additions & 0 deletions .github/instructions/convert-prd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
---
name: ralph
description: "Convert PRDs to prd.json format for the Ralph autonomous agent system. Use when you have an existing PRD and need to convert it to Ralph's JSON format. Triggers on: convert this prd, turn this into ralph format, create prd.json from this, ralph json."
user-invocable: true
---

# Ralph PRD Converter

Converts existing PRDs to the prd.json format that Ralph uses for autonomous execution.

---

## The Job

Take a PRD (markdown file or text) and convert it to `prd.json` in your ralph directory.

---

## Output Format

```json
{
"project": "[Project Name]",
"branchName": "ralph/[feature-name-kebab-case]",
"description": "[Feature description from PRD title/intro]",
"userStories": [
{
"id": "US-001",
"title": "[Story title]",
"description": "As a [user], I want [feature] so that [benefit]",
"acceptanceCriteria": [
"Criterion 1",
"Criterion 2",
"Typecheck passes"
],
"priority": 1,
"passes": false,
"notes": ""
}
]
}
```

---

## Story Size: The Number One Rule

**Each story must be completable in ONE Ralph iteration (one context window).**

Ralph spawns a fresh Amp instance per iteration with no memory of previous work. If a story is too big, the LLM runs out of context before finishing and produces broken code.

### Right-sized stories:
- Add a database column and migration
- Add a UI component to an existing page
- Update a server action with new logic
- Add a filter dropdown to a list

### Too big (split these):
- "Build the entire dashboard" - Split into: schema, queries, UI components, filters
- "Add authentication" - Split into: schema, middleware, login UI, session handling
- "Refactor the API" - Split into one story per endpoint or pattern

**Rule of thumb:** If you cannot describe the change in 2-3 sentences, it is too big.

---

## Story Ordering: Dependencies First

Stories execute in priority order. Earlier stories must not depend on later ones.

**Correct order:**
1. Schema/database changes (migrations)
2. Server actions / backend logic
3. UI components that use the backend
4. Dashboard/summary views that aggregate data

**Wrong order:**
1. UI component (depends on schema that does not exist yet)
2. Schema change

---

## Acceptance Criteria: Must Be Verifiable

Each criterion must be something Ralph can CHECK, not something vague.

### Good criteria (verifiable):
- "Add `status` column to tasks table with default 'pending'"
- "Filter dropdown has options: All, Active, Completed"
- "Clicking delete shows confirmation dialog"
- "Typecheck passes"
- "Tests pass"

### Bad criteria (vague):
- "Works correctly"
- "User can do X easily"
- "Good UX"
- "Handles edge cases"

### Always include as final criterion:
```
"Typecheck passes"
```

For stories with testable logic, also include:
```
"Tests pass"
```

### For stories that change UI, also include:
```
"Verify in browser using dev-browser skill"
```

Frontend stories are NOT complete until visually verified. Ralph will use the dev-browser skill to navigate to the page, interact with the UI, and confirm changes work.

---

## Conversion Rules

1. **Each user story becomes one JSON entry**
2. **IDs**: Sequential (US-001, US-002, etc.)
3. **Priority**: Based on dependency order, then document order
4. **All stories**: `passes: false` and empty `notes`
5. **branchName**: Derive from feature name, kebab-case, prefixed with `ralph/`
6. **Always add**: "Typecheck passes" to every story's acceptance criteria

---

## Splitting Large PRDs

If a PRD has big features, split them:

**Original:**
> "Add user notification system"

**Split into:**
1. US-001: Add notifications table to database
2. US-002: Create notification service for sending notifications
3. US-003: Add notification bell icon to header
4. US-004: Create notification dropdown panel
5. US-005: Add mark-as-read functionality
6. US-006: Add notification preferences page

Each is one focused change that can be completed and verified independently.

---

## Example

**Input PRD:**
```markdown
# Task Status Feature

Add ability to mark tasks with different statuses.

## Requirements
- Toggle between pending/in-progress/done on task list
- Filter list by status
- Show status badge on each task
- Persist status in database
```

**Output prd.json:**
```json
{
"project": "TaskApp",
"branchName": "ralph/task-status",
"description": "Task Status Feature - Track task progress with status indicators",
"userStories": [
{
"id": "US-001",
"title": "Add status field to tasks table",
"description": "As a developer, I need to store task status in the database.",
"acceptanceCriteria": [
"Add status column: 'pending' | 'in_progress' | 'done' (default 'pending')",
"Generate and run migration successfully",
"Typecheck passes"
],
"priority": 1,
"passes": false,
"notes": ""
},
{
"id": "US-002",
"title": "Display status badge on task cards",
"description": "As a user, I want to see task status at a glance.",
"acceptanceCriteria": [
"Each task card shows colored status badge",
"Badge colors: gray=pending, blue=in_progress, green=done",
"Typecheck passes",
"Verify in browser using dev-browser skill"
],
"priority": 2,
"passes": false,
"notes": ""
},
{
"id": "US-003",
"title": "Add status toggle to task list rows",
"description": "As a user, I want to change task status directly from the list.",
"acceptanceCriteria": [
"Each row has status dropdown or toggle",
"Changing status saves immediately",
"UI updates without page refresh",
"Typecheck passes",
"Verify in browser using dev-browser skill"
],
"priority": 3,
"passes": false,
"notes": ""
},
{
"id": "US-004",
"title": "Filter tasks by status",
"description": "As a user, I want to filter the list to see only certain statuses.",
"acceptanceCriteria": [
"Filter dropdown: All | Pending | In Progress | Done",
"Filter persists in URL params",
"Typecheck passes",
"Verify in browser using dev-browser skill"
],
"priority": 4,
"passes": false,
"notes": ""
}
]
}
```

---

## Archiving Previous Runs

**Before writing a new prd.json, check if there is an existing one from a different feature:**

1. Read the current `prd.json` if it exists
2. Check if `branchName` differs from the new feature's branch name
3. If different AND `progress.txt` has content beyond the header:
- Create archive folder: `archive/YYYY-MM-DD-feature-name/`
- Copy current `prd.json` and `progress.txt` to archive
- Reset `progress.txt` with fresh header

**The ralph.sh script handles this automatically** when you run it, but if you are manually updating prd.json between runs, archive first.

---

## Checklist Before Saving

Before writing prd.json, verify:

- [ ] **Previous run archived** (if prd.json exists with different branchName, archive it first)
- [ ] Each story is completable in one iteration (small enough)
- [ ] Stories are ordered by dependency (schema to backend to UI)
- [ ] Every story has "Typecheck passes" as criterion
- [ ] UI stories have "Verify in browser using dev-browser skill" as criterion
- [ ] Acceptance criteria are verifiable (not vague)
- [ ] No story depends on a later story
Loading
Loading