kb, types, instructions, tools: Benennungsregel - ein GTD-Projekt heißt nach seinem Ergebnis, nie nach dem Artefakt; new project nennt die kb/-Titelkollision im Fehlerfall (#244); 11.0.0-beta.3
CI / verify (push) Successful in 8m59s
CI / pwsh (push) Successful in 3m34s
CI / python314 (push) Successful in 5m47s
Release / converters (push) Successful in 27s
Release / release (push) Successful in 39s
Release / wiki-mirror (push) Skipped

Files changed:
- CHANGES.md
- VERSION
- docs/explanation/knowledge-and-commitment.md
- docs/how-to/run-the-weekly-review.md
- docs/reference/commands/pages.md
- instructions/gtd-weekly-review/SKILL.md
- instructions/kb-profiles.md
- kb/CONVENTIONS.md
- kb/CONVENTIONS.md.template
- tools/CONTRACT.md
- tools/chemenu/commands/new_page.py
- tools/chemenu/tests/test_new_page.py
- types/project.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015uxGFdBAmyA23g1isCtGEY
This commit is contained in:
torbenandClaude Opus 5.5 committed 2026-11-20 22:38:59 +01:00
1 parent 722d2e8085
commit df048ac559
13 files changed
+62 -7

No files matched your search

+2
View File
@@ -214,6 +214,7 @@ Scaffold a new wiki page of any type.
- 1 A `raw_files` path does not exist
- 1 A capture field the type-spec requires is missing, or set to `unknown`
- 1 `--resume` with a type other than `project`
- 1 new project: The name is already the title of a `kb/` page - typically the entity page of the artifact the project concerns
- 1 new project: The name is already taken in the tracker (case-insensitively; for `caldav` against every list in the account)
- 1 new project: The configured access path has no write path (Super Productivity's `access: "snapshot"`)
- 1 new project: The page write failed after the tracker project was confirmed to exist
@@ -226,6 +227,7 @@ Scaffold a new wiki page of any type.
- A `raw_files` path does not exist -> Not transient - fix the path and retry once
- A capture field the type-spec requires is missing, or set to `unknown` -> Pass it explicitly (e.g. `--set fidelity=verbatim --set authority=reporting`), then retry once
- `--resume` with a type other than `project` -> Drop `--resume` and retry once
- new project: The name is already the title of a `kb/` page - typically the entity page of the artifact the project concerns -> Not transient - name the project after its undertaking or outcome (`kb/CONVENTIONS.md` § Naming) and retry once. Nothing was created, no tracker project either
- new project: The name is already taken in the tracker (case-insensitively; for `caldav` against every list in the account) -> Not transient - choose another name. If an earlier run of this exact command asked a human to create the project and they did, re-run with `--resume`
- new project: The configured access path has no write path (Super Productivity's `access: "snapshot"`) -> Not transient - point at the `access: "api"` instance the error names. A `--resume` retry refuses the same way, since nothing about the config changes by asking again
- new project: The page write failed after the tracker project was confirmed to exist -> Fix the write error, then re-run with `--resume` - a plain re-run is refused as a tracker collision
+8
View File
@@ -465,6 +465,14 @@ def _ensure_tracker_project(page_title: str, *, resume: bool) -> Optional[str]:
cause="`--resume` with a type other than `project`",
reaction="Drop `--resume` and retry once",
),
cli_contract.Failure(
label="new project",
cause="The name is already the title of a `kb/` page - typically the entity page of "
"the artifact the project concerns",
reaction="Not transient - name the project after its undertaking or outcome "
"(`kb/CONVENTIONS.md` § Naming) and retry once. Nothing was created, no tracker "
"project either",
),
cli_contract.Failure(
label="new project",
cause="The name is already taken in the tracker (case-insensitively; for `caldav` "
+23
View File
@@ -86,8 +86,10 @@ def _write_sp_backup(root, project_titles: list[str]) -> Path:
def _make_api_handler(state: dict):
class Handler(http.server.BaseHTTPRequestHandler):
posted = False
contacted = False
def do_GET(self): # noqa: N802 - stdlib method name
Handler.contacted = True
if self.path == "/health":
self._reply(200, {"server": "up", "rendererReady": True})
return
@@ -105,6 +107,7 @@ def _make_api_handler(state: dict):
def do_POST(self): # noqa: N802
# `new project` must never attempt this on the API path either -
# there is no POST /projects endpoint upstream (Gitea #124/#133).
Handler.contacted = True
Handler.posted = True
self._reply(404, {"error": "no such endpoint (fixture)"})
@@ -305,6 +308,26 @@ def test_new_project_refuses_a_tracker_collision_without_resume(monkeypatch, kb_
assert not (kb_dir / "gtd/haus/Kueche renovieren.md").exists()
def test_new_project_refuses_a_kb_title_collision_before_touching_the_tracker(monkeypatch, kb_dir):
"""Gitea #244: a project named after the artifact it concerns collides
with that artifact's entity page, since titles are unique across kb/.
The title check runs before the tracker step, so the refusal leaves
nothing behind on either side - no page, and no tracker request at all."""
root = kb_dir.parent
with _api_server([]) as (server, handler_cls):
_write_tasks_config(root, _base_url(server))
result = _invoke_new(monkeypatch, kb_dir, [
"new", "project", "--name", "gdeploy", "--set", "responsibility=haus",
])
assert result.exit_code == 1
assert "already exists" in result.output
assert "entities/tools/gdeploy.md" in result.output
assert not (kb_dir / "gtd/haus/gdeploy.md").exists()
assert handler_cls.contacted is False
assert handler_cls.posted is False
def test_new_project_resume_continues_past_an_existing_tracker_project(monkeypatch, kb_dir):
"""The retry half of the HumanInterventionRequired dance (#126's own
"Schritt 2"): once a human has created the tracker project by hand, a