SUMMARY, STATE, ROADMAP, and REQUIREMENTS updates for pkg/dorks foundation + custom_dorks storage (DORK-01, DORK-03).
7.5 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | duration | completed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 08-dork-engine | 01 | dork-engine |
|
|
|
|
|
|
|
|
|
~15min | 2026-04-05 |
Phase 08 Plan 01: Dork Engine Foundation Summary
pkg/dorks package mirroring the pkg/providers go:embed pattern with Registry, Executor interface, Runner dispatch, and custom_dorks SQLite CRUD — ready for Wave 2 YAML batches and the Plan 08-05 GitHub executor.
Performance
- Duration: ~15 min
- Started: 2026-04-05
- Completed: 2026-04-05
- Tasks: 2
- Files created: 9
- Files modified: 1
Accomplishments
pkg/dorkspackage compiles and exposesNewRegistry,NewRegistryFromDorks,Get,List,ListBySource,ListByCategory,Stats,Runner,Executor,Match,ErrSourceNotImplemented,ErrMissingAuthgo:embed definitions/*loader tolerates an empty tree (only.gitkeep), so Wave 2 plans can drop YAML files intopkg/dorks/definitions/{source}/with zero loader changescustom_dorkstable + CRUD fully exercised via round-trip tests onstorage.Open(":memory:")- All tests green,
go build ./...clean, no regressions in existing storage tests
Task Commits
- Task 1: pkg/dorks foundation (schema, loader, registry, executor, tests) —
fd6efbb(feat) - Task 2: custom_dorks storage table + CRUD + tests —
01062b8(feat)
Note: Tests were co-located with implementation in a single commit per task; NewRegistryFromDorks served as the synthetic-fixture entry point so the embedded FS was never required during testing.
Files Created/Modified
pkg/dorks/schema.go—Dorkstruct,ValidSources/ValidCategories,Validate(),Statspkg/dorks/loader.go—//go:embed definitions/*loader tolerating empty tree, validates every parsed dork, wraps errors with file pathpkg/dorks/registry.go—RegistrywithbyID,bySource,byCategoryindexes andList/Get/ListBySource/ListByCategory/Statspkg/dorks/executor.go—Match,Executorinterface,Runnerdispatcher,ErrSourceNotImplemented,ErrMissingAuthpkg/dorks/registry_test.go— 9 test functions covering registry methods,Validate,Runnerdispatch, empty-treeNewRegistrypkg/dorks/definitions/.gitkeep— keeps embed directive valid pre-YAMLdorks/.gitkeep— placeholder at repo root per plan layoutpkg/storage/schema.sql— addedcustom_dorksCREATE TABLE +idx_custom_dorks_source+idx_custom_dorks_categorypkg/storage/custom_dorks.go—CustomDorkstruct +SaveCustomDork / ListCustomDorks / GetCustomDork / GetCustomDorkByDorkID / DeleteCustomDork, JSON-encoded tags, sharedrowScannerhelperpkg/storage/custom_dorks_test.go— 7 tests: round-trip, newest-first list, not-found, by-dork-id lookup, delete + double-delete no-op, unique constraint, schema migration idempotency
Decisions Made
definitions/*instead ofdefinitions/*.yaml: The.yaml-only form fails compilation when the directory contains only.gitkeep. Using*and filtering by extension at walk time allows the foundation plan to ship with zero YAML and for Wave 2 plans to add files incrementally.- Separate
RunnerfromRegistry: The executor plumbing is its own type so downstream plans (08-05 GitHub, 09-16 OSINT) can register implementations without coupling to the YAML index.Registrystays read-only and cache-safe. - Tags as JSON TEXT, not a join table: A junction table for ~150 user-authored rows worth of tags is not justified.
encoding/jsonround-trip is trivial and keeps the CRUD API flat. dork_idUNIQUE at SQL layer: Enforces user-visible ID uniqueness deterministically; tested via duplicate-insert failure.
Deviations from Plan
None — plan executed exactly as written. The only nuance was the deliberate use of //go:embed definitions/* instead of //go:embed definitions (the plan action step called out this exact contingency and the implementation picked the tolerant form).
Issues Encountered
None.
User Setup Required
None — no external service configuration required for this plan.
Next Phase Readiness
- Wave 2 plans (08-02 / 08-03 / 08-04 / 08-07) can drop YAML files into
pkg/dorks/definitions/{source}/and they will load automatically viaNewRegistry() - Plan 08-05 (GitHub live executor) can implement
dorks.ExecutorandRunner.Registerwithout modifying registry code - Plan 08-06 (CLI
dorks add/list/delete/info) haspkg/storage.CustomDorkCRUD available immediately ErrSourceNotImplementedgives Plan 08-05's CLI a clean error path for non-GitHub sources until OSINT phases 9-16 arrive
Self-Check: PASSED
- pkg/dorks/schema.go — FOUND
- pkg/dorks/loader.go — FOUND
- pkg/dorks/registry.go — FOUND
- pkg/dorks/executor.go — FOUND
- pkg/dorks/registry_test.go — FOUND
- pkg/dorks/definitions/.gitkeep — FOUND
- dorks/.gitkeep — FOUND
- pkg/storage/schema.sql — FOUND (modified)
- pkg/storage/custom_dorks.go — FOUND
- pkg/storage/custom_dorks_test.go — FOUND
- commit
fd6efbb— FOUND - commit
01062b8— FOUND go build ./...— PASSEDgo test ./pkg/dorks/... ./pkg/storage/...— PASSED
Phase: 08-dork-engine Completed: 2026-04-05