@2amtech/hai
v0.0.3
Published
Helper AI (HAI) is an AI environment initializer setting up a standardized AI workflow supporting multiple AI providers.
Maintainers
Readme
@2amtech/hai
Helper AI (HAI) is an npm CLI that sets up a standardized AI-assisted development workflow for your project. It syncs tickets and specs from platforms like Jira and Confluence into a local (git ignored) .ai/ directory and exposes an MCP server to your AI, and installs purpose-built prompts and subagents into your AI coding environment — so your AI assistant can plan, research, and implement work with full project context and easily pull tickets and specification in AI readable MD files.
Installation
npm install -g @2amtech/haiQuick start
hai init # Interactive wizard — pick your AI provider, ticket source, and spec source
hai pull # Sync tickets and specs to .ai/That's it. Your AI assistant now has access to your project's tickets, specs, prompts, and agents.
MCP server will automatically be added for your provider. If you need add mcp server manually you can add it as:
hai mcp .Commands
| Command | Description |
| --------------- | -------------------------------------------------------------- |
| hai init | Interactive setup wizard — select providers, enter credentials |
| hai pull | Sync tickets and specs to .ai/ |
| hai status | Show sync status (ticket counts, last sync time) |
| hai get <KEY> | Fetch a specific ticket (e.g. PROJ-123) |
| hai mcp [dir] | Start the MCP server over stdio |
Flags
| Flag | Commands | Description |
| ------------------- | -------- | ------------------------------------- |
| --tickets, -t | pull | Sync tickets only |
| --specs, -s | pull | Sync specs only |
| --dry-run | pull | Preview changes without writing |
| --update-local | pull | Remove local files not found remotely |
| --recursive, -r | get | Also fetch linked issues |
Supported AI providers
HAI integrates with the following AI coding environments:
| Provider | ID | MCP config location | Prompts installed to | Agents installed to |
| ------------------ | ---------------- | ------------------- | -------------------- | ------------------- |
| Claude Code | claude-code | .mcp.json | .claude/commands/ | .claude/agents/ |
| GitHub Copilot | vscode-copilot | .vscode/mcp.json | .github/prompts/ | .github/agents/ |
| Cursor | cursor | .cursor/mcp.json | .cursor/commands/ | .cursor/agents/ |
| Other | other | (manual setup) | .ai/prompts/ | .ai/agents/ |
All providers register the HAI MCP server and install the full set of prompts and agents into the appropriate directories for that environment.
Supported ticket and spec providers
| Provider | ID | Capabilities | Description |
| ------------- | ----------- | --------------- | -------------------------------------- |
| Atlassian | atlassian | Tickets + Specs | Jira for tickets, Confluence for specs |
| Local | local | Tickets + Specs | Read from local filesystem directories |
| None | none | Tickets + Specs | Disabled / no-op provider |
Atlassian provider
- Jira: Fetches active and done tickets by project, supports recursive linked-issue fetching, custom fields, and comments
- Confluence: Fetches pages by space (optionally scoped to an ancestor page), converts Atlassian Document Format (ADF) to Markdown, and preserves page hierarchy
Prompts
HAI ships with 7 built-in prompts that are installed into your AI editor as commands:
| Prompt | Description | | ------------------ | ---------------------------------------------------------------------------------------------------------------------- | | implement | Full implementation workflow — fetches tickets, researches context, plans, and spawns dev agents in parallel by domain | | pull | Pull both tickets and specs from remote via MCP | | pull-tickets | Pull only tickets from remote via MCP | | pull-specs | Pull only specs from remote via MCP | | document | Generate implementation documentation from recent git changes | | optimize-ai | Optimize AI agents and prompts for your project needs | | review-changes | Review recent code changes |
The implement workflow
The implement prompt orchestrates a multi-phase, domain-parallel coding workflow:
- Fetch — pulls the target ticket(s) via MCP with recursive linking
- Research — spawns a
researchersubagent to read tickets, specs, and codebase patterns - Plan — enters plan mode, creates structured TODOs grouped by domain (backend, frontend, etc.)
- Implement — spawns
backend-devandfrontend-devsubagents in parallel for each domain - Verify — validates each subagent's output and collects implementation decisions
Agents
HAI installs 7 specialized subagents that prompts can orchestrate:
| Agent | Role | Writes code? | | --------------------- | ----------------------------------------------------- | ------------ | | researcher | Read-only exploration of specs, tickets, and codebase | No | | architect | Designs detailed implementation plans from research | No | | backend-dev | Implements backend tasks | Yes | | frontend-dev | Implements frontend tasks | Yes | | refactorer | Refactors existing code | Yes | | security-reviewer | Reviews code for security issues | No | | verifier | Verification and QA | No |
Dev agents (backend-dev, frontend-dev) automatically spawn a researcher subagent first to gather context before writing code.
MCP server
The MCP server (hai mcp) exposes project context to AI assistants over stdio. It provides two tools:
| Tool | Description |
| --------------- | -------------------------------------------------------------- |
| pull | Sync tickets and/or specs from remote to .ai/ |
| ticket_pull | Pull a specific ticket by key, with optional recursive linking |
The server also provides instructions that direct AI assistants to read .ai/specification-index.md and .ai/ticket-index.md for discovering available project context.
The .ai/ directory
After running hai pull, your project contains:
.ai/
├── ticket-index.md # Index of all synced tickets
├── specification-index.md # Index of all synced specs
├── AGENTS.md # Auto-generated agent info
├── tickets/ # Provider dependent structure (example is for Atlassian)
│ └── <PROJECT>/
│ ├── PROJ-101.md
│ ├── PROJ-102.md
│ └── ...
└── specs/ # Provider dependent structure (example is for Atlassian)
└── <SPACE>/
├── page-title.md
└── subfolder/
└── nested-page.mdTicket files include: summary, status, assignee, priority, description, comments, and links. Spec files contain the page content converted to Markdown with hierarchy preserved.
Configuration
Running hai init creates a hai.json at the project root (should be gitignored) that stores provider configuration:
{
"plugins": [
{
"plugin": "atlassian",
"provides": ["tickets", "specs"],
"host": "https://your-org.atlassian.net",
"email": "[email protected]",
"token": "...",
"projects": ["PROJ"],
"spaces": ["TEAM"]
},
{
"plugin": "claude-code",
"provides": ["ai"]
}
]
}Use hai init again to reconfigure at any time.
License
Copyright 2026 2am.tech
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.