Skip to content

feat: workspace profile command — declarative setup + goal-as-arg - #12

Merged
kanfil merged 3 commits into
mainfrom
feat/cli-command-restructuring
Sep 23, 2026
Merged

kanfil merged 3 commits into
mainfrom
feat/cli-command-restructuring

Conversation

@kanfil

@kanfil kanfil commented Sep 23, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #11 (merged at 970a9df). Two commits implementing the declarative workspace profile (ADR-386 / ADR-386-amendment, tikalk side):

1. 1b48a65 — workspace command tree

  • adlc-cli workspace setup|init|status: profile-driven workspace assembly (.adlc/workspace-profile.yml, path, or URL; arg > ADLC_WORKSPACE_PROFILE env > local file)
  • Deterministic steps (git clones + ref pins, skills installs) run without an LLM; agent-led steps (init/link, commands) via agent run
  • Minimal zero-dep YAML parser (src/utils/yaml.mjs)
  • Restore top-level run compat alias — the ADR-368 runtime invocation contract silently printed help + exit 0 after the agent-tree rename
  • PWD sync fix: runTask syncs env.PWD to spawn cwd — agents resolving project dir from env.PWD (opencode) otherwise land in the parent's cwd (docker WORKDIR)
  • -y propagation for non-interactive profile-driven installs

2. 41900f0 — goal ≡ agent-run arg; workspace.dirs; brownfield e2e

  • Goal removed from profile: setup converges environment only; intent expressed via adlc-cli agent run "<prompt>" (AX binding model)
  • workspace.dirs[]: greenfield empty-dir scaffolding (mkdir -p, traversal-rejected, ignored by discovery/linking)
  • Fix remote-source events manifest: .events.json never persisted for remote installs (repo-id resolved as local path)
  • tests/e2e-profiles.sh: single brownfield scenario — pre-cloned hermes demo, fixture profile (public HTTPS clone + dirs + remote skills source + team setup), asserts gitlink registration of adopted repos, empty-dir exclusion, post-setup agent run

Testing

  • 176 unit tests pass
  • tests/e2e-workspace.sh — 20 assertions green (real clones w/ branch+ref pins, events wiring, idempotent re-run, agent-led init, direct agent run)
  • tests/e2e-profiles.sh — 24 assertions green (brownfield: hermes + directives gitlinks, remote skills source, team setup)
  • Container e2e (agentic-container MR) — in-container profile application + real agent task verified

🤖 Generated with opencode

- adlc-cli workspace setup|init|status: profile-driven workspace assembly
  (.adlc/workspace-profile.yml, path, or URL; arg > ADLC_WORKSPACE_PROFILE > local file)
- deterministic steps (workspace.git clones + ref pins, skills.sources installs)
  run without an LLM; agent-led steps (init/link, commands, goal) via agent run
- minimal zero-dep YAML parser (src/utils/yaml.mjs)
- restore top-level 'run' compat alias — the ADR-368 runtime invocation
  contract (adlc-cli run <prompt> -a <format> --format json) silently
  printed help and exited 0 after the agent-tree rename
- runTask syncs env.PWD to the spawn cwd — agents that resolve their
  project dir from PWD (opencode) otherwise land in the parent's cwd
- skills add / team setup now run non-interactively (-y) when driven by
  workspace setup; team setup propagates flags.yes
- e2e script (tests/e2e-workspace.sh): real clones w/ branch + ref pins,
  skills + events wiring, idempotent re-run, agent-led goal and workspace init

174 tests pass (17 new).
- remove the profile 'goal' field: setup converges the environment only;
  intent is expressed after setup via 'adlc-cli agent run "<prompt>"'
  (AX-aligned — goal belongs to the binding, not the resource). Setup
  output now ends with a handoff hint. No legacy handling: no old
  profiles exist.
- workspace.dirs[]: deterministic empty-dir scaffolding for greenfield
  (mkdir -p, skip-if-exists, path-traversal rejected, ignored by repo
  discovery and submodule linking)
- fix remote-source events manifest: cmdAdd tried copyFileSync on a
  repo-id resolved as a local path — .events.json was never persisted
  for remote installs (local paths worked by accident). Now the fetched
  manifest is written when no local file exists, so update/remove can
  re-resolve events without re-fetching.
- e2e-profiles.sh: single brownfield scenario — pre-cloned hermes demo,
  fixture profile (public HTTPS directives clone + dirs + remote skills
  source + team setup), asserts .adlc/ tree, events wiring, gitlink
  registration of both adopted repos, empty-dir exclusion, and a
  post-setup agent run marker.
- e2e-workspace.sh part 3: direct agent run instead of profile goal.

176 tests pass; e2e-workspace (20) and e2e-profiles (24) green.

Known gap surfaced by e2e: headless 'team setup' cannot complete the
interactive /team-setup mode selection, so team_ai_directives stays
unwired in unattended runs (init-options gets agent + skills_source
only) — needs a non-interactive mode when the directives path is known.
@kanfil
kanfil merged commit 010ed52 into main Sep 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant