diff --git a/SKILL.md b/SKILL.md index ece5ac6..ecb4858 100644 --- a/SKILL.md +++ b/SKILL.md @@ -17,12 +17,25 @@ description: >- # Codebase Analysis Extract architectural conventions from open source repositories. -Output: Gitea repos under `rodin/-conventions`. +Output: convention repos (one per project analyzed). + +## Configuration + +These are provided by the invoker's environment (TOOLS.md, AGENTS.md, +or invocation context): + +- **CLONE_DIR** — where to clone repos (e.g., `~/src/analysis/`) +- **CLONE_HOST** — which machine to clone on (needs disk + git) +- **GIT_REMOTE** — where convention repos are pushed (e.g., Gitea, GitHub) +- **GIT_ORG** — organization/user for convention repos +- **GIT_TOKEN_PATH** — path to auth token for pushing + +If not explicitly provided, infer from workspace context. ## Naming -- `*-patterns` = language-level (go-patterns, elixir-patterns) -- `*-conventions` = project-specific (temporal-conventions, etc.) +- `*-patterns` = language-level (how the language wants you to write) +- `*-conventions` = project-specific (how a codebase chose to do it) ## Thinking Framework @@ -61,7 +74,7 @@ Skip patterns that are: ### Phase 1: Shape (5 min) -Clone on forge (`~/src/analysis/`). Full clone — never shallow. +Clone to `CLONE_DIR/` on `CLONE_HOST`. Full clone — never shallow. Measure: size, files, commits, contributors, top-level dirs. @@ -226,7 +239,7 @@ See `references/pattern-breaks.md` for real examples with git history. ## Output Repos -Push to Gitea under `rodin/-conventions`. See +Push to `GIT_REMOTE` under `GIT_ORG/-conventions`. See `references/commands.md` for repo creation and push commands. ## Fallbacks @@ -244,7 +257,7 @@ Push to Gitea under `rodin/-conventions`. See ## Execution Notes -- Clone on **forge** (`host="node", node="forge"`) -- `gh api` for GitHub PR lookups (authenticated on all nodes) +- Clone on `CLONE_HOST` — needs disk space for full git history +- `gh api` for GitHub PR lookups (requires authenticated `gh` CLI) - One repo at a time for focused analysis - Markdownlint all output before pushing diff --git a/references/commands.md b/references/commands.md index 3e4327f..f79c7bb 100644 --- a/references/commands.md +++ b/references/commands.md @@ -9,7 +9,7 @@ syntax — the SKILL.md tells you WHAT to look for; this tells you HOW. ```bash # Clone (always full — never --depth 1) -cd ~/src/analysis && git clone +cd $CLONE_DIR && git clone # Dimensions du -sh @@ -103,20 +103,23 @@ gh api repos///issues//comments \ ## Output: Repo Creation & Push -```bash -GITEA_TOKEN=$(cat ~/.openclaw/credentials/gitea-rodin) +Adapt to your git remote (Gitea, GitHub, GitLab, etc.): -# Create repo -curl -s -X POST "https://gitea.weiker.me/api/v1/user/repos" \ +```bash +# Gitea example: +GITEA_TOKEN=$(cat $GIT_TOKEN_PATH) +curl -s -X POST "https:///api/v1/user/repos" \ -H "Authorization: token $GITEA_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "-conventions", "auto_init": true, "default_branch": "master", "license": "MIT"}' +# GitHub example: +gh repo create $GIT_ORG/-conventions --public --clone + # Clone, add content, push -git clone "https://rodin:${GITEA_TOKEN}@gitea.weiker.me/rodin/-conventions.git" cd -conventions -git config user.name "Rodin" -git config user.email "rodin@forgedthought.ai" +git config user.name "" +git config user.email "" # ... add files ... git add -A && git commit -m "docs: initial conventions from /" && git push ```