You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(server): reject non-git URLs at /api/repositories
A leader agent in an empty-remote project improvised `file:///...` as
the repo URL. normalizeGitUrl silently passed it through, extractFullName
returned null, and the daemon looped on `gh repo clone null file:/...`
until the task was cancelled.
Close the contract end-to-end: normalizeGitUrl whitelists https/http/ssh
with at least host/owner/repo, strips trailing .git/slash combinations,
and throws 400 on anything else. extractFullName becomes a contract
function (invariant: input already normalized) and throws 500 on
non-match, tightening full_name from string|null to string. Also fix
findOrCreateRepository to only swallow UNIQUE constraint errors and
apply withFullName to the fetched row.
ak-plan skill Phase 0 now explicitly forbids inventing URLs when
`git remote -v` is empty — stop and ask the user to push first.
Copy file name to clipboardExpand all lines: skills/ak-plan/SKILL.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,12 +45,19 @@ Parse the user's input:
45
45
Check if this is an **existing project** or a **new product**:
46
46
47
47
```bash
48
-
git remote -v 2>/dev/null # has a repo? → existing project
48
+
git remote -v 2>/dev/null # has a remote? → existing project
49
49
ak get repo # registered repos
50
50
```
51
51
52
-
-**Existing project**: has git remote → skip to Phase 1
53
-
-**New product**: no repo → go to Phase 0.5 (Scaffold)
52
+
Three possible states:
53
+
54
+
-**Existing project with remote** → skip to Phase 1
55
+
-**New product (no git init yet)** → go to Phase 0.5 (Scaffold)
56
+
-**Local-only project (git init done, no remote)** → STOP. A registered repo must have a real remote (`https://…` or `git@…`). Tell the user one of:
57
+
1. Push the project to GitHub first: `gh repo create <owner>/<name> --source . --push`
58
+
2. Or: ask them for the intended remote URL before proceeding.
59
+
60
+
**Never invent a URL** (no `file://`, no local paths, no placeholders). The agent-kanban server will reject non-http(s)/ssh URLs with 400, and even if it didn't, the daemon cannot clone local paths.
54
61
55
62
## Phase 0.5: Scaffold (new products only)
56
63
@@ -67,9 +74,9 @@ cd <repo-dir>
67
74
git add -A && git commit -m "feat: project scaffold"&& git push -u origin main
68
75
```
69
76
70
-
Register with agent-kanban:
77
+
Register with agent-kanban (URL MUST come from `git remote get-url origin` — never hand-crafted):
71
78
```bash
72
-
ak create repo --name <name> --url <url>
79
+
ak create repo --name <name> --url "$(git remote get-url origin)"
73
80
```
74
81
75
82
The scaffold must contain enough structure for agents to start writing code immediately.
@@ -306,7 +313,7 @@ When all tasks are done, report the final summary to the user.
306
313
-**Workflow completion is mandatory** — once this skill is invoked, the full lifecycle (plan → create → assign → monitor → review → merge all) MUST run to completion. If you are interrupted mid-workflow (user asks a side question, chat drifts to another topic, tool fails, etc.), handle the interruption and then **immediately resume the workflow from where you left off**. Never ask "should I continue monitoring?" or "do you want me to keep going?" — the answer is always yes. The only way to exit the workflow early is if the user explicitly says to stop, cancel, or abort.
307
314
-**Follow CONTRIBUTING.md** — read the target repo's CONTRIBUTING.md before creating tasks; check PR compliance during review
308
315
-**Prefer text output** — only use `-o json | jq` when extracting fields into variables (e.g. task IDs for `--depends-on`). For display, use default text output.
309
-
-**Always get repo URL from `git remote -v`** — never guess
316
+
-**Always get repo URL from `git remote get-url origin`** — never guess, never improvise. If there is no remote, stop and ask the user to push the repo first (see Phase 0). `file://`, local paths, and placeholder URLs will be rejected by the server with 400.
310
317
-**Discuss the plan with the user before creating tasks** — don't just start creating
311
318
-**Set depends-on at creation time** — don't leave deps for later
312
319
-**Space API calls** — avoid triggering rate limits during batch creation
0 commit comments