refactor: parameterize environment — no hardcoded paths
Configuration (CLONE_DIR, CLONE_HOST, GIT_REMOTE, GIT_ORG, GIT_TOKEN_PATH) provided by invoker's workspace context. Commands reference shows Gitea + GitHub examples.
This commit is contained in:
@@ -17,12 +17,25 @@ description: >-
|
||||
# Codebase Analysis
|
||||
|
||||
Extract architectural conventions from open source repositories.
|
||||
Output: Gitea repos under `rodin/<project>-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/<name>`). Full clone — never shallow.
|
||||
Clone to `CLONE_DIR/<name>` 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/<project>-conventions`. See
|
||||
Push to `GIT_REMOTE` under `GIT_ORG/<project>-conventions`. See
|
||||
`references/commands.md` for repo creation and push commands.
|
||||
|
||||
## Fallbacks
|
||||
@@ -244,7 +257,7 @@ Push to Gitea under `rodin/<project>-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
|
||||
|
||||
Reference in New Issue
Block a user