Skip to content

feat(cli): cdd add and cdd forget for non-git Projects #68

Closed

Description

@hammadmajid

Part of #61. Covers feature 6 (track non-git directories). Needs ADR 0002, which partly supersedes ADR 0001.

What

  • cdd add [dir] makes a directory a Project even without .git. It defaults to the current directory and records a Visit so the directory shows up at once.
  • cdd forget [dir] hides a Project, git or not, for good. It stays hidden even after cdd scan. cdd add on a forgotten Project brings it back.
  • Both are stored in one durable file next to History (e.g. $XDG_STATE_HOME/cdd/projects) as add <abs path> and forget <abs path> lines; the last line for a path wins. Writes are append-only and safe under concurrency, like History.
  • An added directory is listed in the Picker even with no Visits (after visited ones). It is never Stale while it exists, and it becomes Stale once the directory is gone.
  • Both join the Wrapper passthrough list.

Docs

  • CONTEXT.md: redefine Project (a git repo, or a directory added with cdd add), and update Stale Visit and Scan (Scan skips forgotten Projects).
  • ADR docs/adr/0002-…: Projects can also be added by hand; why a cdd-owned file rather than a marker file in the user's directory (cdd never writes into Projects).
  • README.

Acceptance

  • Add, forget, re-add and last-wins are tested at the store level.
  • Scan does not resurrect a forgotten repo.
  • A non-git added directory shows in the Picker and Jumps.

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified, ready for an AFK agentwayfinder:taskWayfinder ticket: implementation task

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions