Smart detection of project type, build tools, test frameworks, and CI requirements
Analyzes a project directory to detect its type, build tools, test framework, and recommend appropriate CI configuration.
/plugin marketplace add Data-Wise/craft/plugin install data-wise-craft@Data-Wise/craftci/Analyze a project directory to detect its type, build tools, test framework, and recommend appropriate CI configuration.
/craft:ci:detect # Analyze current directory
/craft:ci:detect ./my-project # Analyze specific directory
/craft:ci:detect --json # Output as JSON for automation
| Category | Detection |
|---|---|
| Project Type | Python, Node, R, Rust, Go, Claude Plugin |
| Build Tool | uv, poetry, pip, npm, pnpm, yarn, cargo |
| Test Framework | pytest, jest, vitest, testthat, cargo test |
| Linting | ruff, eslint, lintr, clippy |
| Type Checking | mypy, pyright, typescript |
| Documentation | mkdocs, sphinx, docusaurus, quarto |
| Existing CI | GitHub Actions, GitLab CI, CircleCI |
Projects are detected in priority order (first match wins):
.claude-plugin/plugin.jsonpackage.json + @modelcontextprotocol/sdksrc-tauri/tauri.conf.jsonPackage.swift*.xcodeproj or *.xcworkspaceDESCRIPTION + NAMESPACE_quarto.yml + *.qmdpyproject.toml + uv.lockpyproject.toml + poetry.lockpyproject.toml or setup.pyFormula/*.rb or Casks/*.rb*.plugin.zsh or functions/*.zsh*-pkg.el or Caskpackage.json + bun.lockpackage.json + pnpm-lock.yamlpackage.json + yarn.lockpackage.json + package-lock.json (real projects only)Cargo.tomlgo.modNote: Node.js detection requires a "real" project (has
main,bin,dependencies, orexports). Projects with onlydevDependencies(ESLint, Prettier) are skipped to allow ZSH/Homebrew detection.
╭─ Project Detection ─────────────────────────────────────╮
│ │
│ 📦 Type: Python │
│ 🔧 Build: uv (pyproject.toml + uv.lock) │
│ 🧪 Tests: pytest (tests/) │
│ 📊 Coverage: ✓ configured │
│ 🔍 Linting: ruff │
│ 📝 Types: mypy │
│ 📚 Docs: mkdocs │
│ 🔄 CI: ❌ not configured │
│ │
├─────────────────────────────────────────────────────────┤
│ Python Versions: 3.10, 3.11, 3.12 │
│ │
│ Features: │
│ ✅ Tests ✅ Coverage ✅ Linting │
│ ✅ Types ✅ Docs ❌ Docker │
│ │
├─────────────────────────────────────────────────────────┤
│ 📋 Recommended: python-uv-ci.yml │
│ │
│ Next Steps: │
│ → /craft:ci:generate to create workflow │
│ → /craft:ci:validate to check existing CI │
╰─────────────────────────────────────────────────────────╯
/craft:ci:detect --json
{
"project": {
"type": "python",
"variant": "uv",
"path": "/path/to/project"
},
"build": {
"tool": "uv",
"config_file": "pyproject.toml",
"lock_file": "uv.lock"
},
"testing": {
"framework": "pytest",
"directory": "tests/",
"config": "pyproject.toml"
},
"features": {
"tests": true,
"coverage": true,
"linting": true,
"type_checking": true,
"docs": true,
"docker": false
},
"versions": {
"python": ["3.10", "3.11", "3.12"],
"min_python": "3.10"
},
"ci": {
"existing": false,
"recommended_template": "python-uv-ci.yml"
}
}
When you run /craft:ci:detect:
.github/workflows/# Step 1: Check marker files
if [ -f ".claude-plugin/plugin.json" ]; then
TYPE="plugin"
elif [ -f "DESCRIPTION" ] && [ -f "NAMESPACE" ]; then
TYPE="r-package"
elif [ -f "pyproject.toml" ]; then
if [ -f "uv.lock" ]; then
TYPE="python-uv"
elif [ -f "poetry.lock" ]; then
TYPE="python-poetry"
else
TYPE="python-pip"
fi
elif [ -f "package.json" ]; then
if [ -f "pnpm-lock.yaml" ]; then
TYPE="node-pnpm"
elif [ -f "yarn.lock" ]; then
TYPE="node-yarn"
else
TYPE="node-npm"
fi
elif [ -f "Cargo.toml" ]; then
TYPE="rust"
elif [ -f "go.mod" ]; then
TYPE="go"
fi
# Step 2: Detect test framework
if [ "$TYPE" = "python-"* ]; then
if grep -q "pytest" pyproject.toml 2>/dev/null; then
TEST_FRAMEWORK="pytest"
fi
fi
# Step 3: Check for existing CI
if [ -d ".github/workflows" ]; then
HAS_CI=true
fi
For monorepos or multi-project directories:
/craft:ci:detect --recursive
╭─ Multi-Project Detection ───────────────────────────────╮
│ │
│ Found 3 projects: │
│ │
│ 📁 ./backend │
│ Type: Python (uv) Tests: pytest │
│ │
│ 📁 ./frontend │
│ Type: Node (pnpm) Tests: vitest │
│ │
│ 📁 ./shared │
│ Type: TypeScript Tests: jest │
│ │
├─────────────────────────────────────────────────────────┤
│ 📋 Recommended: monorepo-ci.yml │
│ Matrix: python + node │
╰─────────────────────────────────────────────────────────╯
Works with:
/craft:ci:generate - Generate workflow from detection/craft:ci:validate - Validate existing CI configuration/craft:check ci - Quick CI pre-flight check/craft:do "setup ci" - Let orchestrator handle CI setupFor production-ready CI examples, see CI-TEMPLATES.md with templates from exemplary projects:
| Template | Source Project | Key Features |
|---|---|---|
| Python/uv | aiterm, nexus-cli | Multi-OS, Codecov |
| Node/npm | atlas | Multi-Node matrix |
| Tauri | scribe | Rust + Vitest |
| MCP Server | statistical-research | Bun/Node tests |
project-detector - Core detection logictest-strategist - Test framework recommendationsdevops-helper - CI/CD best practices