Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .project-kit/_lib.just
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
# .project-kit/_lib.just — universal helpers, identical in every adopter
# .project-kit/_lib.just, generated shared helpers for drape

# Resolve the real execution host before any host-dependent action. Named
# targets are generic and can be reused by any managed subsystem.
context TARGET="":
#!/usr/bin/env bash
set -euo pipefail
execution_host="$(hostname -s | tr '[:upper:]' '[:lower:]')"
requested_target="{{TARGET}}"
printf 'host=%s\nrepo=%s\n' "$execution_host" "$(pwd)"
matched=false
if [ -n "$requested_target" ] && [ "$matched" != true ]; then
printf 'error=unknown execution target: %s\n' "$requested_target" >&2
exit 2
fi

[private]
_skip LABEL:
@echo "[skip] {{LABEL}} not configured for this repo"

[private]
_step N TOTAL MSG:
@echo "[{{N}}/{{TOTAL}}] {{MSG}}"
@echo "[{{N}}/{{TOTAL}}] {{MSG}}..."
12 changes: 9 additions & 3 deletions .project-kit/answers.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"custom_command": null,
"enabled": false,
"homelab_app": null,
"host": null,
"pypi_package": null,
"ssh_alias": null,
"target": "none"
},
"docs": {
Expand All @@ -44,6 +46,9 @@
"source_dir": "docs"
},
"domain": "",
"execution": {
"targets": {}
},
"language": "python",
"managed_subsystems": [
"release"
Expand All @@ -62,14 +67,15 @@
},
"project_name": "drape",
"public": true,
"refreshed_at": "2026-06-27",
"refreshed_at": "2026-08-04",
"release": {
"enabled": true,
"install_command": "uv tool install drape=={version}",
"litellm_base_url": "",
"litellm_model": "deepseek-v4-pro-cloud",
"prod_homelab_env": "",
"prod_source": "none"
"prod_pypi_package": "drape",
"prod_source": "pypi"
},
"setup": {
"backend": null,
Expand All @@ -78,7 +84,7 @@
"hooks": true,
"precommit": false
},
"skill_version": "0.1.0",
"skill_version": "0.2.0",
"test": {
"backend": {
"cmd": null,
Expand Down
9 changes: 7 additions & 2 deletions .project-kit/release.just
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# .project-kit/release.just — generated for drape
# Generated by project-kit (skill version: 0.1.0)
# Last refreshed: 2026-06-27
# Generated by project-kit (skill version: 0.2.0)
# Last refreshed: 2026-08-04

release LEVEL="patch":
@just context
@uv run .project-kit/scripts/release.py cut {{LEVEL}}

release-dry LEVEL="patch":
@just context
@uv run .project-kit/scripts/release.py cut {{LEVEL}} --dry-run

changelog:
@just context
@uvx git-cliff@latest --config .project-kit/cliff.toml --output CHANGELOG.md

notes TAG:
@just context
@uv run .project-kit/scripts/release.py notes --tag {{TAG}}

# Print local latest tag + deployed prod version (resolved per prod_source).
version:
@just context
@uv run .project-kit/scripts/release.py version
35 changes: 8 additions & 27 deletions .project-kit/scripts/doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

Checks subsystem health for this adopter. Stdlib only.
"""

from __future__ import annotations

import os
import shutil
import subprocess
import sys
from pathlib import Path

EXPECTED_JUST = [
"_lib", "preview", "release", "test", "deploy",
"build", "db", "setup", "docs", "clean",
"_lib",
"release",
]


Expand Down Expand Up @@ -51,7 +51,7 @@ def _check_cmd(layer: str, cmd: str) -> int:

def main() -> int:
repo = Path.cwd()
print(f"project-kit doctor — drape\n")
print("project-kit doctor — drape\n")
print("configuration:")
pk = repo / ".project-kit"
if not pk.is_dir():
Expand All @@ -76,7 +76,10 @@ def main() -> int:
if shutil.which("just"):
proc = subprocess.run(
["just", "--justfile", str(jf), "--summary"],
capture_output=True, text=True, cwd=str(repo),
capture_output=True,
text=True,
cwd=str(repo),
check=False,
)
if proc.returncode == 0:
_ok("root justfile parses (just --summary)")
Expand All @@ -101,28 +104,6 @@ def main() -> int:
else:
_warn("gh CLI not on $PATH")
warns += 1
print("\nhooks:")
hooks_dir = repo / ".project-kit" / "hooks"
for hook in ("pre-commit", "pre-push"):
hp = hooks_dir / hook
if hp.is_file() and os.access(hp, os.X_OK):
_ok(f".project-kit/hooks/{hook} present and executable")
elif hp.is_file():
_fail(f".project-kit/hooks/{hook} present but not executable (chmod +x)")
fails += 1
else:
_fail(f".project-kit/hooks/{hook} missing")
fails += 1
hp_proc = subprocess.run(
["git", "config", "--local", "core.hooksPath"],
capture_output=True, text=True, cwd=str(repo),
)
configured = hp_proc.stdout.strip()
if configured == ".project-kit/hooks":
_ok("core.hooksPath -> .project-kit/hooks")
else:
_warn(f"core.hooksPath not set to .project-kit/hooks (got {configured!r}); run `just setup-hooks`")
warns += 1

print(f"\n{fails} failures, {warns} warnings.")
if fails:
Expand Down
Loading
Loading