answer-an-ask.ts
This file
Path
packages/agent-kit/src/docs/answer-an-ask.ts
62 lines · 3.8 KiB · TypeScript
Last changed by
Merge redesign into mainoscabrielbefore adoptioncaedd21
History of this fileTake it
Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 1–2why, one step back1import { Brand } from "@repo/brand";2Merge redesign into mainoscabrielbefore adoptioncaedd21
line 3why, one step back3import { installCommand, pushCommand } from "../install.ts";Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 4–13why, one step back4import { code } from "../text.ts";5import type { DocSource } from "./page.ts";6import { cli, shell } from "./page.ts";78const notesRef = `refs/notes/${Brand.slug}`;910export const answerAnAsk: DocSource = {11 body: ({ platformUrl, webUrl }) => [12 "## Install the CLI and sign in",13 "",Merge build/1311-landing into mainoscabrielbefore adoption18b5418
line 14why, one step back14 ...shell(installCommand(webUrl), `${Brand.cli} login --url ${platformUrl}`),Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 15–19why, one step back15 "",16 "Signing in stores your token, and git uses it from then on through the CLI's credential helper: no token in a URL, and no prompt.",17 "",18 "## Find an ask",19 "",Merge build/1413-docs-and-texts into mainoscabrielbefore adoptionf10338e
line 20why, one step back20 `[The open asks](/asks) list every open ask across projects, each saying what done means and whether you may take it. ${cli("front")} lists the same in a terminal, and ${cli("asks --project <owner>/<name>")} lists one project's. Some asks are held for newcomers, with a mentor named.`,Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
line 21why, one step back21 "",Merge build/1413-docs-and-texts into mainoscabrielbefore adoptionf10338e
line 22why, one step back22 `Read one in full before you claim it: ${cli("ask <ask> --project <owner>/<name>")}. Its brief says the want, the territory (the part of the code you may change), what is out of scope, and the check that fails on \`main\` today.`,Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 23–25why, one step back23 "",24 "## Claim it",25 "",Merge build/1413-docs-and-texts into mainoscabrielbefore adoptionf10338e
line 26why, one step back26 `${cli("claim <ask> --project <owner>/<name>")} gives you the ask alone, for a while: nobody else may answer it while your claim is live. It prints your fork's remote, ${code("<owner>/<name>--<ask>--<handle>")}. Each push keeps the claim alive; a claim with no push for too long lapses, and the ask is open again. Claiming it again returns the claim you hold. To let it go: ${cli("release <ask> --project <owner>/<name>")}.`,Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 27–40why, one step back27 "",28 ...shell(29 `git remote add ${Brand.slug} <remote>`,30 `git fetch ${Brand.slug}`31 ),32 "",33 "## Answer it in git",34 "",35 "Work in plain git, with any editor or agent. Change only the ask's territory, and leave alone the files that decide what the checks do: test and lint config, scripts, CI files, the config folder and `.env.schema`. An answer that touches one, or adds a `.skip` or a lint disable without a reason, is refused at the push.",36 "",37 `Before you push, ${cli("check")} runs the gate's first stage on your machine and prints the same refusals the push would get, every one at once.`,38 "",39 "## Push, and read the verdict",40 "",Merge redesign into mainoscabrielbefore adoptioncaedd21
line 41why, one step back41 ...shell(pushCommand),Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
line 42why, one step back42 "",Merge build/1413-docs-and-texts into mainoscabrielbefore adoptionf10338e
line 43why, one step back43 `The cheap checks answer in git's own output, on its \`remote:\` lines. The rest run on the platform, on the tree your answer makes once merged onto \`main\`, and arrive later: ${cli("status --project <owner>/<name>")} shows your claims and answers and where each stands, and ${cli("verdict <ask> --project <owner>/<name>")} shows the verdict. The answer's page on the web follows it live, and the verdict is also a git note on your head:`,Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 44–53why, one step back44 "",45 ...shell(46 `git fetch ${Brand.slug} ${notesRef}:${notesRef}`,47 `git notes --ref=${Brand.slug} show <head>`48 ),49 "",50 "## When it is refused",51 "",52 "Every refusal says whether trying again can help and names the command to run next. Run it, fix what it names, and push again. [Refusals](/docs/refusals) lists each one with what to do.",53 "",Merge build/1413-docs-and-texts into mainoscabrielbefore adoptionf10338e
line 54why, one step back54 `When \`main\` moved under your answer and it no longer merges, the refusal is \`StaleBase\`. It names each conflicting path and, for each one the platform landed, the landing that last changed it. Rebase onto the new \`main\`, resolve, and push again: ${code(`git pull --rebase ${platformUrl}/<owner>/<name>.git main`)}.`,Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 55–62why, one step back55 "",56 "## Credit",57 "",58 "A landing is the platform's own commit, and it names every person involved in trailers: `Asked-by`, `Signed-off-by` for you, `Decided-by`, `Finished-by` and others. An agent you worked through is disclosed in `Assisted-by`, apart from the credit. Your page lists your landings across projects.",59 "",60 ],61 slug: "answer-an-ask",62};