# Run a project

Make a project, write how it takes changes, open asks, and spend the day's decisions.

## Make a project

In a repo of your own, `myr init --project <owner>/<name>` makes it a project: it finds the repo's checks (its test and lint commands, and its CI), writes the config folder, `.myr/`, and pushes. You are the project's first maintainer.

## How a project is named

A project's name is its owner, then a short name: `<owner>/<name>`, as in `oscabriel/datekit`. The name is the project's address everywhere: `--project` takes it, the web shows the project at `/<owner>/<name>`, and git clones it from `<platform>/<owner>/<name>.git`. You make projects under your own handle; a bare word, as in `myr init --project datekit`, is taken as yours, under the handle `myr login` kept. Owning a namespace is the right to make projects in it and nothing more: who decides stays with the config folder.

## Import a repo

To bring a public repo over HTTPS: `myr init --import <url>`, with `--branch` when its default branch is not the one you want. A repo from `github.com`, `gitlab.com`, `codeberg.org`, `bitbucket.org` is named after its source namespace, `<host>/<account>/<name>`, so `https://github.com/pallets/click` becomes `github.com/pallets/click`; a repo from any other host is named under your handle, after the URL's last segment. `--project` names it otherwise, a bare word again under your handle. On the web, [Import a repo](/import) does the same, and the web address of such a name nobody has imported yet, such as `/github.com/pallets/click`, offers the import. You are an import's first maintainer, as of any project.

## The config folder

How the project takes changes is TypeScript on `main`, in `.myr/`. The platform reads it only from the commit it last landed, in a sandbox with no network and frozen time, so it changes the way everything else does: by a landing.

- `.myr/project.ts`: who decides which paths, the kinds of ask the project takes, the daily budget of decisions, caps on claims and proposals, the commands the checks run, and who must be vouched for to claim.
- `.myr/asks/`: one file per ask.
- `.myr/vouched.td`: who is vouched for, and who is denounced.
- `.myr/visibility.ts`: layers and held-back checks, if any (see [Held-back checks and layers](/docs/held-back-checks)).

```ts
import { kinds, project } from "@myr/cli/rules";

export default project({
  budget: { decisionsPerDay: 5, expire: "14 days" },
  caps: { claimsPerPerson: 3, proposalsPerPerson: 2 },
  deciders: { "**": ["ines-v"], "src/tz.ts": ["okonkwo"] },
  kinds: [kinds.fix],
  run: { checks: { unit: "bun test" }, test: "bun test {path}" },
  vouch: "forCode",
});
```

The project's Policy page shows what the folder evaluated to at the landed commit, and `myr policy --project <owner>/<name>` prints the same.

## Open an ask

An ask is a file in `.myr/asks/` with its check beside it: the want, the territory, what is out of scope, and a test that fails on `main` today. Some kinds also name a mentor, or hold the ask for newcomers.

```ts
import { kinds, territory } from "@myr/cli/rules";

export default kinds.fix.ask({
  want: "The Do token of format prints the day of the month as an English ordinal.",
  path: "test/asks/format-ordinal.test.ts",
  territory: territory.paths("src/format.ts", "test/format.test.ts"),
  reserve: "newcomers",
});
```

`myr ask open <ask> --project <owner>/<name>` lands the ask, but only once its check fails on `main` twice the same way, by an assertion: a check that cannot fail, or fails by not loading, opens nothing. `myr schema ask open` prints what it takes.

## Proposals and drafts

Anyone not denounced may propose an ask: `myr propose --project <owner>/<name> --want "<what should be true>"`. A proposal expires unless a maintainer accepts it. With `--draft`, the platform's agent drafts the ask file and its failing check, runs them red first, and puts the draft to a maintainer with its evidence; `myr proposal <proposal> --project <owner>/<name>` follows it, and `myr ask draft <proposal> --project <owner>/<name>` asks for another round. Nothing lands until a maintainer accepts, and the landing discloses the agent in `Assisted-by`.

## Today

A maintainer's day is a short list of decisions, each with its evidence and a safe default taken if nobody decides before it expires, held to the project's budget. Read it on the web in [your inbox](/inbox), or with `myr today`, and take one with `myr decide --project <owner>/<name> --decision <decision> --choice accept` (or `decline`, `adopt`, `revert`).

## Finish an answer, or land your own change

When an ask's kind requires a finish, a passing answer waits for a maintainer's own commits on top: `myr finish <ask> --project <owner>/<name> --base <base> --head <head>`. They are checked again, and the landing credits you with `Finished-by`.

A maintainer's own change goes through the same gate. Make your working fork, push to it, and land it:

```sh
myr fork --project <owner>/<name>
git push <fork remote> HEAD:main
myr land --project <owner>/<name> --base <base> --head <head>
```

## Vouch

`myr vouch --project <owner>/<name> --handle <handle> --verdict vouch` admits a person to claim, by landing a line in the vouch file; `--verdict denounce` bars them from proposing.
