Skip to content

/configure command — interactive project setup #35

@jdelfino

Description

@jdelfino

What

Add a /configure slash command — the interactive setup entry point for projects adopting agent-workflow. Runs in a Claude Code terminal after install.sh copies the workflow files.

Responsibilities

/configure handles everything that requires interaction or project-specific decisions:

1. Branch protection (replaces setup.sh — #24)

  • Configure branch protection on main via gh api
  • Require PRs (no direct pushes)
  • Require status checks: orchestrator, all enabled guardrails
  • Enable auto-merge
  • Idempotent — safe to re-run

2. Claude authentication

  • Run /install-github-app to set up CLAUDE_CODE_OAUTH_TOKEN as a repo secret
  • Skip if already configured

3. Git hooks

  • Install pre-commit hook (compile, fast tests, lint)
  • Install commit-msg hook (conventional commits format)
  • Ask what commands to use for compile/test/lint (or detect from codebase)
  • Speed constraint: hook commands must complete in <30s

4. Guardrail configuration

  • Walk through .github/agent-workflow/config.yaml
  • Enable/disable guardrails based on project needs
  • Set thresholds (e.g., test-ratio threshold)

5. CLAUDE.md population

  • Explore codebase to detect build tooling (package.json, Makefile, pyproject.toml, etc.)
  • Populate machine-generated sections:
    • Repository Structure — key directories and their purposes
    • Commands — install, dev server, build, test, lint
    • Git Hooks — compile, fast test, lint commands
  • Leave human-authored sections untouched

Template Convention

Machine-populated sections are marked with sentinel comments:

<!-- auto-generated -->
...content Claude regenerates...
<!-- end auto-generated -->

/configure overwrites content between these markers. Everything outside them is preserved.

When to Run

  • After initial install.sh copies the template (first-time setup)
  • When build tooling changes (e.g., migrating from Jest to Vitest)
  • When adding/removing guardrails
  • Any time the developer wants to refresh configuration

Why

Separating install (deterministic file copy) from configuration (Claude-assisted, interactive) gives clean separation of concerns. The install script is dumb and scriptable. The interesting setup work — branch protection, auth, project-specific configuration — happens in /configure where Claude can ask questions and make intelligent decisions.

Replaces the originally planned setup.sh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions