Skip to content

Commit ea89f18

Browse files
refactoring
1 parent be0a7a9 commit ea89f18

29 files changed

Lines changed: 1957 additions & 57 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,4 @@ htmlcov/
103103
# Backup files
104104
*.bak
105105
*.backup
106+
examples/workspace/report.csv

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
## [Unreleased]
22

3+
### Fixed
4+
- `workspace compare`: do not flag `import-makefile-hint` as a missing
5+
common task/workflow in projects without a `Makefile` — the hint is
6+
meaningless there (it only echoes a tip to run `taskfile import Makefile`).
7+
Eliminates false-positive recommendations in mixed-project workspaces.
8+
9+
### Added — `taskfile workspace` (multi-project group operations)
10+
- New module `taskfile.workspace` providing discovery, filtering, and group
11+
operations across many local projects under a given path.
12+
- New CLI command tree `taskfile workspace`:
13+
- `list` — list matching projects with filters (`--has-task`,
14+
`--has-workflow`, `--taskfile-only`, `--doql-only`, `--docker-only`,
15+
`--name REGEX`).
16+
- `status` — one-row-per-project overview (git, Taskfile, doql, Docker).
17+
- `tasks` / `workflows` — frequency tables across projects.
18+
- `validate` — report manifest issues (empty workflows, missing `app{}`, …).
19+
- `analyze [-o FILE.csv]` — full metrics + issues + recommendations.
20+
- `compare -r ROOT [-r ROOT …] [-o FILE.csv]` — peer-benchmarked
21+
comparison across multiple roots (missing common tasks/workflows,
22+
sync issues, median delta).
23+
- `fix [--dry-run]` — repair manifests (remove `import-makefile-hint`
24+
when no Makefile, fill empty workflows, drop orphans, add missing
25+
workflows from Taskfile tasks).
26+
- `run TASK [--dry-run --fail-fast --name REGEX]` — run a task in every
27+
project that has it.
28+
- `doctor` — run `taskfile doctor` in every project.
29+
- `deploy` — group `taskfile up` / `docker compose up -d`.
30+
- Python API: `discover_projects`, `filter_projects`, `validate_project`,
31+
`analyze_project`, `compare_projects`, `fix_project`, `run_in_project`,
32+
`run_task_in_projects`, `Project`, `CommandResult`, `FixResult`.
33+
- Respects `--depth N` (default 2) and a fixed exclusion list
34+
(`venv`, `.venv`, `node_modules`, `dist`, `build`, hidden dirs, …).
35+
- New docs: `docs/WORKSPACE.md` with full command reference, Python API
36+
reference, and CSV column spec for `compare`.
37+
38+
### Added — `doql workspace` (companion command)
39+
- The sister project `doql` now exposes an equivalent `workspace` command
40+
focused on `app.doql.css` manifests. Core commands
41+
(`list`/`analyze`/`validate`/`run`) work without external dependencies;
42+
`fix` delegates to `taskfile.workspace` when `taskfile` is installed.
43+
- Analysis columns surface DOQL-specific data: workflows, entities,
44+
databases, interfaces.
45+
46+
### Docs
47+
- `README.md` + `docs/WORKSPACE.md`: new "Workspace" section + Python API
48+
examples + full CSV column reference.
49+
- `docs/WORKSPACE.md`: sibling command note for `doql workspace`.
50+
51+
### Removed
52+
- Dropped ad-hoc scripts `analyze_projects.py`, `fix_projects.py`,
53+
`update_projects.py`, and the generated `projects_analysis.csv`
54+
functionality now lives in `taskfile.workspace` and `taskfile workspace`
55+
CLI.
56+
357
## [0.3.88] - 2026-04-17
458

559
### Docs

README.md

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,11 @@ taskfile workspace validate --root ~/github/semcod
903903
# Generate CSV analysis report
904904
taskfile workspace analyze --root ~/github/semcod -o semcod_analysis.csv
905905

906+
# Peer-benchmarked comparison across MULTIPLE roots (missing common tasks,
907+
# sync issues, median comparison) — CSV is the intended source of truth
908+
taskfile workspace compare -r ~/github/semcod -r ~/github/oqlos \
909+
-o ~/github/projects_report.csv
910+
906911
# Fix manifest errors (empty workflows, orphan workflows, …)
907912
taskfile workspace fix --root ~/github/semcod --dry-run
908913
taskfile workspace fix --root ~/github/semcod
@@ -1254,7 +1259,7 @@ my-project/
12541259
12551260
---
12561261
1257-
## Examples (24 total)
1262+
## Examples (56 total)
12581263
12591264
### Getting Started
12601265
@@ -1264,6 +1269,8 @@ my-project/
12641269
| [saas-app](examples/saas-app/) | ⭐⭐ | local/staging/prod with pipeline |
12651270
| [multiplatform](examples/multiplatform/) | ⭐⭐⭐ | Web + Desktop, CI/CD generation |
12661271
| [codereview.pl](examples/codereview.pl/) | ⭐⭐⭐⭐ | 6 CI platforms, Quadlet, docker-compose |
1272+
| [workspace](examples/workspace/) | ⭐⭐ | `taskfile workspace` — multi-project operations |
1273+
| [enhanced-error-reporting](examples/enhanced-error-reporting/) | ⭐⭐ | `--teach`, `--explain`, error diagnostics |
12671274
12681275
### Publishing
12691276
@@ -1274,6 +1281,8 @@ my-project/
12741281
| [publish-cargo](examples/publish-cargo/) | crates.io | Rust |
12751282
| [publish-docker](examples/publish-docker/) | GHCR + Docker Hub | any (multi-arch) |
12761283
| [publish-github](examples/publish-github/) | GitHub Releases | Go (binaries + checksums) |
1284+
| [publish-desktop](examples/publish-desktop/) | AppImage / .deb / .dmg / .msi | Electron / Tauri |
1285+
| [publish-mobile](examples/publish-mobile/) | App Store + Google Play | React Native / Flutter |
12771286
| [multi-artifact](examples/multi-artifact/) | 5 registries | Python + Rust + Node.js + Docker |
12781287
12791288
### Fleet & IoT
@@ -1283,15 +1292,35 @@ my-project/
12831292
| [fleet-rpi](examples/fleet-rpi/) | 6 RPi, `hosts:` shorthand, rolling/canary groups |
12841293
| [edge-iot](examples/edge-iot/) | IoT gateways, `hosts:`, `ssh_port: 2200`, all 3 group strategies, `condition` |
12851294
1286-
### Infrastructure & Cloud
1295+
### Infrastructure & Cloud (IaC)
12871296
12881297
| Example | Features |
12891298
|---------|----------|
12901299
| [ci-pipeline](examples/ci-pipeline/) | `pipeline` section, `stage` field, `taskfile ci generate/run/preview`, `condition`, `silent` |
12911300
| [kubernetes-deploy](examples/kubernetes-deploy/) | Helm, multi-cluster (staging + prod-eu + prod-us), canary groups |
1292-
| [iac-terraform](examples/iac-terraform/) | `dir` (working_dir), `env_file`, Terraform plan/apply/destroy, `condition` |
1293-
| [cloud-aws](examples/cloud-aws/) | Lambda + ECS + S3, multi-region, `env_file`, `environment_groups` |
1294-
| [quadlet-podman](examples/quadlet-podman/) | `service_manager: quadlet`, `compose` section, `ssh_port: 2222`, `taskfile deploy/setup` |
1301+
| [iac-terraform](examples/iac-terraform/) | Terraform plan/apply/destroy, `dir`, `env_file`, `condition` |
1302+
| [iac-opentofu](examples/iac-opentofu/) | OpenTofu (open-source Terraform fork) |
1303+
| [iac-terragrunt](examples/iac-terragrunt/) | Terragrunt multi-module IaC |
1304+
| [iac-pulumi](examples/iac-pulumi/) | Pulumi IaC (TypeScript/Python/Go) |
1305+
| [iac-ansible](examples/iac-ansible/) | Ansible playbook integration |
1306+
| [iac-cloudformation](examples/iac-cloudformation/) | AWS CloudFormation stacks |
1307+
| [iac-cdk-aws](examples/iac-aws-cdk/) | AWS CDK (Cloud Development Kit) |
1308+
| [iac-cdktf](examples/iac-cdktf/) | CDK for Terraform |
1309+
| [iac-bicep](examples/iac-bicep/) | Azure Bicep deployments |
1310+
| [iac-helm](examples/iac-helm/) | Helm chart management |
1311+
| [iac-kustomize](examples/iac-kustomize/) | Kustomize overlays |
1312+
| [iac-argocd](examples/iac-argocd/) | ArgoCD GitOps |
1313+
| [iac-fluxcd](examples/iac-fluxcd/) | FluxCD GitOps |
1314+
| [iac-crossplane](examples/iac-crossplane/) | Crossplane Kubernetes-native IaC |
1315+
| [iac-nomad](examples/iac-nomad/) | HashiCorp Nomad jobs |
1316+
| [iac-serverless](examples/iac-serverless/) | Serverless Framework (AWS Lambda) |
1317+
| [iac-packer](examples/iac-packer/) | Packer image builds |
1318+
| [iac-vagrant](examples/iac-vagrant/) | Vagrant VM management |
1319+
| [iac-nixos](examples/iac-nixos/) | NixOS declarative config |
1320+
| [iac-docker-compose](examples/iac-docker-compose/) | Docker Compose multi-env |
1321+
| [iac-gcp-deployment-manager](examples/iac-gcp-deployment-manager/) | GCP Deployment Manager |
1322+
| [cloud-aws](examples/cloud-aws/) | Lambda + ECS + S3, multi-region, `environment_groups` |
1323+
| [quadlet-podman](examples/quadlet-podman/) | `service_manager: quadlet`, Podman → systemd |
12951324
12961325
### Patterns & Import
12971326
@@ -1309,8 +1338,21 @@ my-project/
13091338
|---------|----------|
13101339
| [monorepo-microservices](examples/monorepo-microservices/) | `platforms`, `build_cmd`/`deploy_cmd`, `condition`, `dir`, `stage`, `platform` filter |
13111340
| [fullstack-deploy](examples/fullstack-deploy/) | **ALL CLI commands**: deploy, setup, release, init, validate, info, ci, --dry-run |
1341+
| [mega-saas](examples/mega-saas/) | Large SaaS with full pipeline, environments, groups |
13121342
| [mega-saas-v2](examples/mega-saas-v2/) | `hosts:`, `deploy:`, `addons:`, smart defaults — **70% less YAML** vs mega-saas |
13131343
1344+
### 🤖 AI Tools
1345+
1346+
| Example | Tool |
1347+
|---------|------|
1348+
| [ai-aider](examples/ai-aider/) | Aider — TDD, review, lint-fix |
1349+
| [ai-claude-code](examples/ai-claude-code/) | Claude Code — piped review, refactor |
1350+
| [ai-codex](examples/ai-codex/) | OpenAI Codex — autonomous, sandbox |
1351+
| [ai-copilot](examples/ai-copilot/) | GitHub Copilot — explain, suggest, PR |
1352+
| [ai-cursor](examples/ai-cursor/) | Cursor — rules, Composer, workflows |
1353+
| [ai-windsurf](examples/ai-windsurf/) | Windsurf — rules, Cascade workflows |
1354+
| [ai-gemini-cli](examples/ai-gemini-cli/) | Gemini CLI — multimodal, piped review |
1355+
13141356
```bash
13151357
# CI pipeline — generate + run locally
13161358
cd examples/ci-pipeline
@@ -1626,7 +1668,7 @@ taskfile/
16261668
│ ├── scaffold/ # Template generation
16271669
│ └── cigen/ # CI/CD generators
16281670
├── tests/ # Test suite
1629-
├── examples/ # Example configurations (24 examples)
1671+
├── examples/ # Example configurations (56 examples)
16301672
├── docs/ # Documentation
16311673
└── Taskfile.yml # Project's own tasks
16321674
```
@@ -1685,7 +1727,7 @@ pytest --cov=taskfile -m "not slow"
16851727

16861728
### Test Performance Summary
16871729

1688-
- **Full suite**: ~24s (876 tests including e2e SSH tests)
1730+
- **Full suite**: ~22s (918 tests including e2e SSH tests)
16891731
- **Fast tests only**: ~15s (skips slow SSH integration tests)
16901732
- **Slow tests**: e2e SSH connectivity tests (5+ seconds each)
16911733

ROADMAP.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Roadmap
2+
3+
The high-level direction for `taskfile`. For day-to-day follow-ups see
4+
[`TODO.md`](TODO.md). For shipped items see
5+
[`CHANGELOG.md`](CHANGELOG.md).
6+
7+
## Principles
8+
9+
- **One YAML file** describes environments, tasks, groups, and deploy targets.
10+
- **Zero new DSL** — leans on existing YAML + familiar shell.
11+
- **Local first** — everything works offline before it reaches CI.
12+
- **Incremental adoption** — you can import Makefiles, GitHub Actions,
13+
GitLab CI, and shell scripts instead of rewriting them.
14+
- **Group operations** — a single command should scale from one project
15+
to a folder full of them.
16+
17+
---
18+
19+
## Shipped (highlights)
20+
21+
### 0.3.x
22+
- Environments, tasks, environment groups, fleet management.
23+
- Multi-platform deploy (Docker Compose, Podman Quadlet, Kubernetes).
24+
- CI/CD generation (GitHub Actions, GitLab CI, Jenkins, CircleCI, Drone).
25+
- Registry authentication and multi-registry publishing.
26+
- Scaffold templates (`taskfile scaffold <name>`).
27+
- Diagnostics (`taskfile doctor`, `taskfile validate`, `taskfile watch`,
28+
`taskfile graph`).
29+
- REST API server (`taskfile serve`).
30+
- Package management (`taskfile pkg install / search`).
31+
- Interactive mode, tab completion, colorised output.
32+
33+
### Current (Unreleased)
34+
- **`taskfile workspace`** — multi-project group operations
35+
(`list`, `status`, `tasks`, `workflows`, `validate`, `analyze`, `compare`,
36+
`fix`, `run`, `doctor`, `deploy`).
37+
- **`doql workspace`** — companion command focused on `.doql.css`.
38+
- Peer-benchmarking across multiple roots with CSV export.
39+
- Manifest fixing (empty workflows, orphans, missing workflows).
40+
41+
---
42+
43+
## Near-term (next minor)
44+
45+
### Workspace
46+
- `workspace run --parallel N` — parallel execution across projects.
47+
- `workspace graph` — dependency graph across projects (mermaid/DOT).
48+
- `workspace compare --format {json,markdown}` — richer output formats.
49+
- `workspace search QUERY` — grep across task commands and workflow bodies.
50+
- Per-project "score" column (0–100) summarising health + peer conformance.
51+
52+
### Core
53+
- First-class JSON output for `doctor` (needed by `workspace doctor`).
54+
- Structured logs (`--log-format json`) for all commands.
55+
- Better error messages when Taskfile references undefined environments.
56+
57+
### Docs
58+
- Dedicated "Recipes" section in `docs/WORKSPACE.md` (common multi-root
59+
flows, rollback, staged rollout across many services).
60+
- Asciinema demos: workspace compare, fleet rolling deploy.
61+
62+
---
63+
64+
## Medium-term
65+
66+
### Workspace
67+
- `workspace sync-manifests` — interactive: propagate common tasks from
68+
peers back into outliers.
69+
- `workspace install` — parallel bootstrap (`pip install -e .`,
70+
`npm install`, `cargo fetch`) for a folder of freshly cloned projects.
71+
- Plugin system for custom analyzers (e.g. security scan, license check)
72+
that appear as extra columns in `workspace compare` output.
73+
74+
### Core
75+
- OpenAPI 3.1 generator for `taskfile serve` (separate from the existing
76+
informal REST API).
77+
- Native Windows support (currently Linux/macOS-first; some shell-isms).
78+
- Task-level caching with explicit cache keys (like Turbo/Nx).
79+
80+
### Ecosystem
81+
- VS Code extension: inline `taskfile` runner + environment switcher +
82+
workspace explorer view.
83+
- pre-commit hooks that run `workspace validate` automatically.
84+
85+
---
86+
87+
## Long-term / exploratory
88+
89+
- **Distributed execution** — run the same task across a fleet of dev
90+
machines or CI runners with a single command.
91+
- **Task marketplace**`taskfile pkg install` already works; a curated
92+
registry of reusable task bundles (lint, test, deploy-to-k8s, …) would
93+
accelerate adoption.
94+
- **Self-hosted web UI** — on top of `taskfile serve` with environment
95+
groups, fleet status, and workspace reports.
96+
- **Speculative execution** — for `workspace compare` style analyses,
97+
compute against a snapshot instead of re-scanning every project.
98+
99+
---
100+
101+
## Non-goals
102+
103+
- Replacing Make/CMake/Bazel for heavy build orchestration —
104+
`taskfile` is a glue layer, not a build system.
105+
- Implementing a new DSL; YAML + shell + embedded functions is enough.
106+
- Becoming a CI system — we generate CI configs, we don't host runners.
107+
- Package-manager semantics — `taskfile pkg` installs task bundles, not
108+
application dependencies.

TODO.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,50 @@
11
# TODO
22

3-
**Generated by:** prefact v0.1.41
4-
**Generated on:** 2026-04-17T12:56:29.759225
5-
**Total issues:** 0 active, 0 completed
3+
Active follow-ups for the `taskfile` package.
64

75
---
86

7+
## Workspace (multi-project operations)
8+
9+
### Stability
10+
- [ ] `workspace run` — add `--parallel N` to run tasks in parallel across
11+
multiple projects (current impl is serial).
12+
- [ ] `workspace run` — honor per-project timeout overrides from
13+
Taskfile (`env.timeout` or task metadata).
14+
- [ ] `workspace doctor` — parse structured output from `taskfile doctor`
15+
(JSON mode) instead of string-matching keywords.
16+
17+
### Features
18+
- [ ] `workspace graph` — render a DOT/mermaid graph of task dependencies
19+
across many projects; highlight shared/unique tasks.
20+
- [ ] `workspace install` — run `pip install -e .` / `npm install` in every
21+
project in parallel (bootstrap a fresh clone).
22+
- [ ] `workspace sync-manifests` — inverse of `fix`: propagate tasks that
23+
exist in most peers back into outliers (interactive).
24+
- [ ] `workspace search QUERY` — grep task commands, descriptions, and
25+
workflow bodies across all projects.
26+
27+
### CSV / reporting
28+
- [ ] `workspace compare` — add `--format json` and `--format markdown` in
29+
addition to CSV.
30+
- [ ] `workspace compare` — emit a per-project recommendations file
31+
(`<project>/WORKSPACE_RECS.md`) when `--write-recs` is passed.
32+
- [ ] `workspace analyze` / `compare` — add a "score" column (0–100) based
33+
on completeness + peer conformance.
34+
35+
### Documentation / examples
36+
- [ ] Add `examples/workspace/` with multiple tiny projects + a Makefile
37+
target that runs the full workspace flow. ← DONE
38+
- [ ] Add `docs/WORKSPACE.md` section "Recipes": common multi-root flows.
39+
- [ ] Record an asciinema demo of `workspace compare` producing a CSV.
40+
41+
## doql companion command
42+
- [ ] Add `doql workspace doctor` that runs `doql validate` in each project
43+
and aggregates errors.
44+
- [ ] Add `doql workspace build --parallel` for monorepo-scale builds.
45+
46+
## Tests
47+
- [ ] Add end-to-end test that spins up 3 fake projects in `tmp_path`,
48+
runs `workspace compare`, and asserts CSV header + row count.
49+
- [ ] Smoke-test `workspace compare` against `~/github/semcod` in CI when
50+
the folder is present (skip otherwise).

0 commit comments

Comments
 (0)