Skip to content

Relocate agent configs and workflow library under COPILOTJ_HOME#211

Draft
yzx9 wants to merge 1 commit into
mainfrom
relocate-configs-workflows
Draft

Relocate agent configs and workflow library under COPILOTJ_HOME#211
yzx9 wants to merge 1 commit into
mainfrom
relocate-configs-workflows

Conversation

@yzx9

@yzx9 yzx9 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Agent TOMLs and the saved-workflow library lived in non-user-editable spots: agent configs were embedded in the Python package (read via file, shipped inside the regenerable python_sources tree, so any customization was wiped on upgrade), and saved workflows sat under $COPILOTJ_HOME/temp (mislabeled ephemeral for long-lived, user-curated data).

Move both into stable homes, mirroring the existing knowledge_bank pattern:

  • agents/ (was copilotj/multiagent/agent_configs/): seed TOMLs ship from the repo root and the loader reads from $COPILOTJ_HOME/agents/. sync_agent_configs seeds on first run and, on upgrade, backs up each customized file as .bak.YYYYMMDD before applying the new default. A per-file baseline (.seed-versions.json) means a release that changes one agent only touches that one agent; unrelated customizations stay live. Disabled templates and user-added configs are never clobbered.

  • workflows/ (was $COPILOTJ_HOME/temp/workflows): the library moves to $COPILOTJ_HOME/workflows/ via a one-time, idempotent migrate_workflow_layout that runs at module import (covers every server entry point, resumes after a partial run, falls back to copy+delete across filesystems). Per-run outputs stay in temp/workflow_runs.

Also: extract a shared bootstrap_dir_if_empty helper (DRY for bootstrap_assets and _bootstrap_kb); delete two dead unreferenced TOMLs (success_case, imagej_macro_help); extend the pom resource include; update DEVELOPMENT, AGENTS, and user-manual docs; gitignore /workflows/.

No Java logic change: partial uninstall already preserves both new dirs (only the regenerable python_sources seed is wiped and re-extracted).

Deferred follow-ups captured in .plans/0005 (knowledge_bank upgrade parity) and .plans/0006 (sync_agent_configs cross-process lock).

Verified: 220 pytest tests pass, ruff clean, mvn clean package ships exactly the 5 agents/*.toml in the JAR.

Assisted-by: Claude-Code:GLM-5.2

Agent TOMLs and the saved-workflow library lived in non-user-editable spots:
agent configs were embedded in the Python package (read via __file__, shipped
inside the regenerable python_sources tree, so any customization was wiped on
upgrade), and saved workflows sat under $COPILOTJ_HOME/temp (mislabeled
ephemeral for long-lived, user-curated data).

Move both into stable homes, mirroring the existing knowledge_bank pattern:

- agents/ (was copilotj/multiagent/agent_configs/): seed TOMLs ship from the
  repo root and the loader reads from $COPILOTJ_HOME/agents/. sync_agent_configs
  seeds on first run and, on upgrade, backs up each customized file as
  <name>.bak.YYYYMMDD before applying the new default. A per-file baseline
  (.seed-versions.json) means a release that changes one agent only touches
  that one agent; unrelated customizations stay live. Disabled templates and
  user-added configs are never clobbered.

- workflows/ (was $COPILOTJ_HOME/temp/workflows): the library moves to
  $COPILOTJ_HOME/workflows/ via a one-time, idempotent migrate_workflow_layout
  that runs at module import (covers every server entry point, resumes after a
  partial run, falls back to copy+delete across filesystems). Per-run outputs
  stay in temp/workflow_runs.

Also: extract a shared bootstrap_dir_if_empty helper (DRY for bootstrap_assets
and _bootstrap_kb); delete two dead unreferenced TOMLs (success_case,
imagej_macro_help); extend the pom resource include; update DEVELOPMENT,
AGENTS, and user-manual docs; gitignore /workflows/.

No Java logic change: partial uninstall already preserves both new dirs (only
the regenerable python_sources seed is wiped and re-extracted).

Deferred follow-ups captured in .plans/0005 (knowledge_bank upgrade parity)
and .plans/0006 (sync_agent_configs cross-process lock).

Verified: 220 pytest tests pass, ruff clean, mvn clean package ships exactly
the 5 agents/*.toml in the JAR.

Assisted-by: Claude-Code:GLM-5.2
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