`dotagent migrate <fish-agent-path>` — auto-generate `agent.toml` from Fish framework
- Dominant language
- Rust
- Stars
- 3
- Forks
- 1
- Avg merge
- 4h 50m
- Merged PRs (30d)
- 1
Description
[`docs/guides/migrating-from-fish.md`](docs/guides/migrating-from-fish.md) walks through migrating an agent from the legacy Fish-based `lib/agent.fish` framework (in `avelino/dotfiles`) to dotagent. The migration is mechanical and repetitive — every agent has a `meta.json` that maps cleanly to an `agent.toml`.
Today the engineer does this by hand.
## Proposal
A new subcommand that scaffolds an `agent.toml` from an existing Fish agent directory:
```
dotagent migrate
```
The command:
1. Reads `meta.json` and `agent.fish` from the given directory.
2. Maps known fields (schedule, args, timeout, notifiers if present) into TOML.
3. Writes `agent.toml` next to the existing `agent.fish` (does not delete anything).
4. Prints any field that could not be migrated automatically and the user must fill in.
The skill [`port-fish-agent`](.claude/skills/port-fish-agent/SKILL.md) already documents the manual workflow — this issue is automating it.
## Acceptance criteria
- [ ] `dotagent migrate path/to/agent` writes a valid `agent.toml` that `doctor` passes.
- [ ] Migration is non-destructive — the original `agent.fish` and `meta.json` are untouched.
- [ ] Unmapped fields are listed in a "needs human review" block at the bottom of the new manifest as commented TODOs.
- [ ] Idempotent — re-running on the same directory updates without losing manual edits (or refuses if `agent.toml` exists, with `--force`).
- [ ] Smoke test with at least one real Fish agent from `avelino/dotfiles`.
## Where to start
- `.claude/skills/port-fish-agent/SKILL.md` — the manual procedure to automate.
- [`docs/guides/migrating-from-fish.md`](docs/guides/migrating-from-fish.md) — field mapping.
## Non-goals
- Migrating arbitrary cron / launchd / systemd units. Fish framework only for v1.
- Translating the `agent.fish` script itself. The manifest points back at the same script.
Contributor guide
Research direction
Read .claude/skills/port-fish-agent/SKILL.md and docs/guides/migrating-from-fish.md first to understand the manual workflow and field mapping. Then identify the existing CLI entry point and doctor checks before designing the migrate command. Done means a real Fish agent produces a valid doctor-passing agent.toml, preserves source files and manual edits, and reports unmapped fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fish, rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100