How this command is triggered — by the user, by Claude, or both
Slash command
/engineer-agent:add-projecthaikuThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Engineer Agent: Add Project
Register the current project directory in the user-level engineer-agent config.
## Steps
### 1. Load Config
Read `~/.claude/engineer-agent/engineer.yaml`. If missing, tell the user to run `/engineer-agent setup` first and stop.
### 2. Check for Duplicate
Get the absolute path of the current directory via `pwd`.
Check if any existing project entry in `projects` already has a `path` matching this directory. If so, report:
> This project is already registered as "{slug}". Run `/engineer-agent status` to check health.
Stop here.
### 3. Auto-Detect Project ...Register the current project directory in the user-level engineer-agent config.
Read ~/.claude/engineer-agent/engineer.yaml. If missing, tell the user to run /engineer-agent setup first and stop.
Get the absolute path of the current directory via pwd.
Check if any existing project entry in projects already has a path matching this directory. If so, report:
This project is already registered as "{slug}". Run
/engineer-agent statusto check health.
Stop here.
basename $(pwd) to derive a default sluggit remote get-url origin 2>/dev/null to detect the GitHub remoteowner and repo nameAsk the user to confirm or customize:
assignee (default: GitHub username from gh api user --jq .login), optional labels filter. Write tracker: github-issues and github.issues sub-config.assignee and statuses. Write tracker: jira and jira section with sources array.tracker: none, skip ticket tracker config.For each integration the user wants to configure, ask for the required fields. For integrations they skip, omit that section from the project entry.
Jira source loop (when user selects Jira as tracker):
gh api user --jq .email or ask)["To Do", "In Progress"])Use Edit to append the new project entry to the projects map in ~/.claude/engineer-agent/engineer.yaml.
The new entry should follow this structure:
{slug}:
path: "{absolute_path}"
tracker: "{github-issues|jira|none}"
github:
owner: "{owner}"
repos: ["{repo}"]
review_requested_for: "{username}"
ignore_labels: ["wip", "draft"]
# Include issues section only if tracker is github-issues
issues:
assignee: "{username}"
labels: []
# Include jira section only if tracker is jira
jira:
sources:
- project: "{JIRA_KEY}"
components: ["{component}"] # omit if empty
labels: ["{label}"] # omit if empty
# additional sources if configured
assignee: "{email}"
statuses: ["{status1}", "{status2}"]
# Include slack/slite sections only if the user configured them
Read ~/.claude/engineer-agent/state/last-poll.yaml. Add entries for the new project:
projects.<slug> entry with initial state:projects:
{slug}:
github:
last_checked: "1970-01-01T00:00:00Z"
seen_prs: []
slack:
last_checked_ts: "0"
jira:
seen_tickets: []
github_issues:
last_checked: "1970-01-01T00:00:00Z"
seen_issues: []
slite:
last_checked: "1970-01-01T00:00:00Z"
seen_docs: []
Only include sections for integrations the user configured. Include github_issues if tracker is github-issues, jira if tracker is jira.
jira, also add entries to the top-level jira_projects section for each Jira project key in the sources (if not already present):jira_projects:
{JIRA_KEY}:
last_checked: "1970-01-01T00:00:00Z"
Project "{slug}" registered!
Path: {absolute_path}
GitHub: {owner}/{repo}
Tracker: {GitHub Issues | Jira | not configured}
Slack: {configured | not configured}
Slite: {configured | not configured}
Run /engineer-agent poll to start polling this project's sources.
npx claudepluginhub tomharris/engineer-agent --plugin engineer-agent/add-projectLinks a new board project to the current workspace by writing workspace ID and project ID to project.json. Requires --project <UUID>. Prints confirmation.