Blueprint Analysis: DupFind
Commander Expectations
- assert the product finds and reports exact duplicate files under a directory.
- assert the product reports reclaimable space and never modifies examined files.
- assert the supplied grader passes.
Crew
| Crew | Charge |
|---|---|
| Commander | Defines intent and decides what done means. |
| Team Lead | Confirms epic completeness and stakeholder expectations. |
| Planning Crew | Authors atomic specifications and the ordered Manifest. |
| Shipyard Crew | Builds the tickets without synchronous Commander access. |
Story List
Feature: Command and Directory Scanning
| ID | Story | High-level AC |
|---|---|---|
| CLI-001 | Parse command options and validate arguments | Accept the documented options and one directory; reject malformed arguments with the documented exit code and no standard output. |
| CLI-002 | Scan files and identify duplicate groups | Recursively examine regular files, skip unreadable files with a warning, ignore zero-byte files, and group same-size files by SHA-256 digest. |
| CLI-003 | Order duplicate groups and paths | Order groups by reclaimable bytes descending then digest ascending, and paths by byte value ascending; emit relative paths with / separators. |
Feature: Duplicate Results
| ID | Story | High-level AC |
|---|---|---|
| OUT-001 | Write duplicate listing as CSV | Emit the specified CSV header and one row per duplicate file, quoting fields as RFC 4180 requires. |
| OUT-002 | Write duplicate summary | With --summary, emit the specified header and totals for groups, duplicate files, and reclaimable bytes. |
Feature: Build and Verification
| ID | Story | High-level AC |
|---|---|---|
| DEL-001 | Build the command-line executable | From the application root, go build ./cmd/dupfind produces the executable using only the standard library. |
| DEL-002 | Run the Go quality suite | Provide POSIX-compatible bin/test.sh that exits zero only when go vet ./... and go test ./... pass. |
| DEL-003 | Pass the supplied conformance grader | Run the complete supplied grader; every supplied case passes. This terminal verification story depends on all implementation stories. |
Story Guidance
Named stories planning must produce. Authoritative record: STORY_GUIDANCE.json.
None.
Surfaced Acceptance Criteria
| ID | Story ID | Criterion |
|---|---|---|
| AC-001 | CLI-001 | Provide help text describing the command and its options. |
Source Inventory
| Path | Content kind | Disposition | Reason |
|---|---|---|---|
sources/INSTRUCTIONS.md | markdown | analyzed | readable UTF-8 |
sources/run.sh | code | analyzed | readable UTF-8 |
Relationship Model
| Source or group | Relationship type | Related source or group | Evidence | Delivery implication |
|---|---|---|---|---|
sources/INSTRUCTIONS.md | instruction-to-test | sources/run.sh | The instructions define the command behavior; the harness builds ./cmd/dupfind and checks command output and exit codes. | Implement the specified behavior and stage the harness for terminal verification. |
sources/run.sh | test-kit-to-implementation | cmd/dupfind | The harness invokes the built executable against a fixed directory tree. | Build the executable before running the grader. |
sources/INSTRUCTIONS.md | dependency | bin/test.sh | The instructions require go vet ./... and go test ./... through the project script. | Implement the script and its test suite as part of delivery. |
cmd/dupfind | dependency | DEL-003 | The grader builds and exercises the executable. | Terminal verification follows all implementation stories. |
Source Roles
| Path | Role | Plan disposition | Build disposition |
|---|---|---|---|
sources/INSTRUCTIONS.md | author intent | prompt-only | none |
sources/run.sh | conformance harness | context | stage |
Planning Instructions
Delivery Shape
A standard-library Go command-line application takes options and a directory path, recursively scans regular files, groups exact duplicates, and writes either a CSV listing or summary to standard output. Diagnostics go to standard error; exit codes distinguish usage errors from operational failures. The required execution flow is build, parse and validate arguments, scan and group files, format results, then verify the complete supplied grader.
Story Realization Map
| Story ID | Durable Blueprint scope | Evidence | Related files | Requires |
|---|---|---|---|---|
| CLI-001 | Option parsing, validation, usage | sources/INSTRUCTIONS.md command and exit-code sections | cmd/dupfind | capability, focused tests |
| CLI-002 | Recursive traversal, regular-file handling, size and digest grouping, unreadable-file handling | sources/INSTRUCTIONS.md rules 1–3 and 6 | cmd/dupfind | capability, focused tests |
| CLI-003 | Group and path ordering; relative path formatting | sources/INSTRUCTIONS.md rules 4–5 | cmd/dupfind | capability, focused tests |
| OUT-001 | Listing CSV output | sources/INSTRUCTIONS.md Output: Listing | cmd/dupfind | capability, focused tests |
| OUT-002 | Summary CSV output | sources/INSTRUCTIONS.md Output: Summary | cmd/dupfind | capability, focused tests |
| DEL-001 | Go module and executable build | sources/INSTRUCTIONS.md Stack and Run Harness | go.mod, cmd/dupfind | build gate |
| DEL-002 | Vet and automated test entry point | sources/INSTRUCTIONS.md Tests | bin/test.sh, Go tests | test harness |
| DEL-003 | Full supplied grader run | sources/run.sh | staged sources/run.sh, built cmd/dupfind | acceptance contract; depends on CLI-001–CLI-003, OUT-001–OUT-002, DEL-001–DEL-002 |
Test and Acceptance Strategy
Use focused tests with temporary directory trees for argument validation, traversal rules, grouping, ordering, CSV formatting, summaries, and exit codes. bin/test.sh runs vet and the automated tests. The terminal verification story runs the complete supplied grader and declares Suite: full; its acceptance is bounded to the harness result. Sea Trial st-001 records the same project-level full-grader proof.
Sequencing and Dependencies
Build the Go module and executable before exercising the command. Implement argument handling before scanning; scanning and grouping precede ordering and output formatting. The listing and summary depend on the same duplicate results. The automated test script runs vet and tests. The terminal verification story follows every implementation story and runs the staged grader from the application root.
Source Conflicts and Gaps
No source conflicts or blockers. The CLI baseline’s help-text gap is recorded as surfaced acceptance criterion AC-001.
Analysis Notes
generated: 2026-10-24 blueprint: /mnt/c/Users/barlo/projects/drydock/uat/DupFind/runs/20261024.140514/workspace/targets/DupFind/blueprint
Quality: Ready blockers: 0 questions: 0 features: 3 stories: 8 stack: Go 1.22 or newer; standard library only display_name: not proposed short_description: not proposed
None.