Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 12 additions & 125 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,174 +1,61 @@
version: '3'

vars:
DETECTED_LANGUAGES: Go, Bun/Node
DETECTED_LANGUAGE: Go

tasks:
default:
desc: List common tasks for detected language targets.
desc: List available tasks.
cmds:
- task --list

build:
desc: Build every detected language target ({{.DETECTED_LANGUAGES}}).
cmds:
- task: build:go
- task: build:chat
- task: build:docs

build:go:
internal: true
status:
- test ! -f go.mod
desc: Build the {{.DETECTED_LANGUAGE}} binary.
cmds:
- |
bash -euo pipefail -c '
export GOCACHE="$PWD/.cache/go-build"
export GOTMPDIR="$PWD/.cache/go-tmp"
mkdir -p "$GOCACHE"
mkdir -p "$GOTMPDIR"
go build -o ./agentapi ./main.go
'

build:chat:
internal: true
status:
- test ! -f package.json
dir: chat
cmds:
- |
bash -euo pipefail -c '
if [ ! -d node_modules ]; then
bun install --frozen-lockfile
fi
rm -f .next/lock
bun run build
'

build:docs:
internal: true
status:
- test ! -f package.json || test ! -d ../vendor/phenodocs/packages/docs
dir: docs
cmds:
- |
bash -euo pipefail -c '
npm ci --ignore-scripts
node ./node_modules/vitepress/dist/node/cli.js build .
'

test:
desc: Run tests for detected language targets ({{.DETECTED_LANGUAGES}}).
cmds:
- task: test:go

test:go:
internal: true
status:
- test ! -f go.mod
desc: Run the {{.DETECTED_LANGUAGE}} test suite.
cmds:
- |
bash -euo pipefail -c '
export GOCACHE="$PWD/.cache/go-build"
export GOTMPDIR="$PWD/.cache/go-tmp"
mkdir -p "$GOCACHE"
mkdir -p "$GOTMPDIR"
go test -short ./...
'

lint:
desc: Run linters for detected language targets ({{.DETECTED_LANGUAGES}}).
cmds:
- task: lint:go
- task: lint:chat

lint:go:
internal: true
status:
- test ! -f go.mod
desc: Run {{.DETECTED_LANGUAGE}} vet checks.
cmds:
- task --list >/dev/null
- |
bash -euo pipefail -c '
export GOCACHE="$PWD/.cache/go-build"
export GOTMPDIR="$PWD/.cache/go-tmp"
mkdir -p "$GOCACHE"
mkdir -p "$GOTMPDIR"
git ls-files "*.go" ":!:agentapi-plusplus/**" | xargs gofmt -l | tee /tmp/agentapi-gofmt.out
test ! -s /tmp/agentapi-gofmt.out
go list ./... | xargs go vet
'

lint:chat:
internal: true
status:
- test ! -f chat/package.json
cmds:
- |
bash -euo pipefail -c '
cd chat
if [ ! -d node_modules ]; then
bun install --frozen-lockfile
fi
bun run lint
go list ./... | grep -Ev "/agentapi-plusplus($|/)" | xargs go vet
'

clean:
desc: Remove generated build artifacts for detected language targets ({{.DETECTED_LANGUAGES}}).
cmds:
- task: clean:go
- task: clean:chat
- task: clean:docs

clean:go:
internal: true
status:
- test ! -f go.mod
desc: Remove generated {{.DETECTED_LANGUAGE}} build artifacts.
Comment on lines 6 to +44
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Architect Review — HIGH

Taskfile now exposes only default, build, test, lint, and clean, but WARP.md still instructs contributors to run task lint:arch, task quality, task setup, and task dev, so following the documented workflows results in task: Task "…" not found errors.

Suggestion: Either add compatibility wrapper tasks (aliases/composed tasks) for the documented commands or update WARP.md in this PR so the documented workflows match the new Go-only Taskfile surface.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is an **Architect / Logical Review** comment left during a code review. These reviews are first-class, important findings — not optional suggestions. Do NOT dismiss this as a 'big architectural change' just because the title says architect review; most of these can be resolved with a small, localized fix once the intent is understood.

**Path:** Taskfile.yml
**Line:** 6:44
**Comment:**
	*HIGH: Taskfile now exposes only `default`, `build`, `test`, `lint`, and `clean`, but WARP.md still instructs contributors to run `task lint:arch`, `task quality`, `task setup`, and `task dev`, so following the documented workflows results in `task: Task "…" not found` errors.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative instruction. If no explicit code suggestion is given, you MUST still draft and apply your own minimal, localized fix — do not punt back with 'no suggestion provided, review manually'. Keep the change as small as possible: add a guard clause, gate on a loading state, reorder an await, wrap in a conditional, etc. Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix

cmds:
- |
python3 - <<'PY'
from pathlib import Path
import os
from pathlib import Path
import shutil
import subprocess

os.environ["GOCACHE"] = str(Path(".cache/go-build").resolve())
os.environ["GOTMPDIR"] = str(Path(".cache/go-tmp").resolve())
Path(os.environ["GOCACHE"]).mkdir(parents=True, exist_ok=True)
Path(os.environ["GOTMPDIR"]).mkdir(parents=True, exist_ok=True)
subprocess.run(["go", "clean", "-cache", "-testcache"], check=True)
for path in [Path("agentapi"), Path(".cache/go-build"), Path(".cache/go-tmp")]:
subprocess.run(["go", "clean", "-cache", "-testcache"], check=False)
for path in [Path("agentapi"), Path(".cache/go-build")]:
if path.is_file() or path.is_symlink():
path.unlink()
elif path.is_dir():
shutil.rmtree(path)
PY

clean:chat:
internal: true
status:
- test ! -f chat/package.json
cmds:
- |
python3 - <<'PY'
from pathlib import Path
import shutil

for path in [Path("chat/.next"), Path("chat/out"), Path("chat/.turbo")]:
if path.exists():
shutil.rmtree(path)
PY

clean:docs:
internal: true
status:
- test ! -f docs/package.json
cmds:
- |
python3 - <<'PY'
from pathlib import Path
import shutil

for path in [Path("docs/.vitepress/cache")]:
if path.exists():
shutil.rmtree(path)
shutil.rmtree(path, ignore_errors=True)
PY
Loading