feat: workspace profile command — declarative setup + goal-as-arg - #12
Merged
Merged
Conversation
- 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.
…lds /D:/ on win32)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 treeadlc-cli workspace setup|init|status: profile-driven workspace assembly (.adlc/workspace-profile.yml, path, or URL; arg >ADLC_WORKSPACE_PROFILEenv > local file)agent runsrc/utils/yaml.mjs)runcompat alias — the ADR-368 runtime invocation contract silently printed help + exit 0 after the agent-tree renamerunTasksyncsenv.PWDto spawn cwd — agents resolving project dir fromenv.PWD(opencode) otherwise land in the parent's cwd (docker WORKDIR)-ypropagation for non-interactive profile-driven installs2.
41900f0— goal ≡ agent-run arg; workspace.dirs; brownfield e2eadlc-cli agent run "<prompt>"(AX binding model)workspace.dirs[]: greenfield empty-dir scaffolding (mkdir -p, traversal-rejected, ignored by discovery/linking).events.jsonnever 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 runTesting
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)agentic-containerMR) — in-container profile application + real agent task verified🤖 Generated with opencode