metaphasor
Docs menu

Importing a Git project

Initialize a Phasor project from a Git commit. The imported files become the project's code baseline. Intent is then written, or drafted from the existing code and documents, and adopted.

Import a revision

Run phasor import in a new, empty folder. Name a branch, a tag or a commit. The default is HEAD.

mkdir todo
cd todo
phasor import ../todo-git main
Imported Git commit 1e6b20efbef9 into /home/ada/todo: 0 intent files, 2 files of code
2 files of code and 0 files of tests are in .phasor/work/; 0 files of intent at the project root
no intent yet: 2 files are baseline code; write intent at the root, or have an agent draft it from README and docs, then adopt

Establish intent

The imported code is a baseline with no intent recorded for it. The project's requirements may well exist elsewhere. Phasor holds none until intent is written and adopted.

phasor adopt

Adoption is accepted only from the project's owner: see Adoption. Each adopted file is then open work.

Where the existing code already meets a requirement, the work is closed without a code change. phasor land --outcome no-change records a landing that names the files that implement the requirement, with --binds, and a check already in the record that verifies them, with --check. The check's passing result is evidence that the check passes on the imported code. It does not establish that the code meets the requirement beyond what the check exercises.

Export a Git mirror

phasor export writes the project's history as Git commits, one for each step, into a mirror repository. Running it again adds the steps made since.

phasor export
{
  … the commits written
  "mirror": "git",
  "ok": true,
  "path": "/home/ada/todo/.phasor/git/git",
  "signed": false,
  … the tags written
}

Import subsequent Git changes

A commit made in Git after the first import comes in as a draft: its changes are held under a name, and nothing is recorded until the draft is landed, as any other work is.

phasor import ../todo-git feature --draft feature
Imported Git commit 6f0dc28b4e74 as draft feature