Skip to content

manishrawal95/amor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amor

Autonomous product builder -- ships features while you sleep.

Point Amor at your GitHub repo. It figures out what to build next, researches why, writes specs, builds with Claude Code, validates, and asks for your approval via Telegram. Then it does it again.

What's new in v0.2

  • Token optimization -- spec caching (no re-generating specs for retried tasks), codebase scan caching (4h TTL), analytics caching (24h TTL), market research caching (per task), adaptive Claude Code turns based on task effort (small=25, medium=35, large=50)
  • Data-driven product decisions -- product validation gate scores specs against real user signals (GitHub issues, PostHog analytics) before building. Tasks scoring below 40/100 are auto-skipped and deprioritized. Validated tasks are cached per session
  • 4-phase Claude Code prompt -- explore (read codebase, check docs), architect (plan before coding), implement (follow existing patterns), verify (build + browser test). Each phase has explicit instructions
  • MCP plugins -- context7 for looking up library docs before coding, playwright for browser-testing new pages after implementation
  • Auto-run DB migrations -- newly created .sql files and inline SQL from specs are automatically executed before validation
  • E2E smoke tests -- new pages and API endpoints are tested with real HTTP requests. Dynamic route params ([id], [slug]) are resolved with real data from the API
  • Improved Telegram messages -- compact score bars, HTML-safe message splitting, callback data truncation for long branch names, rate limit backoff (429 retry), stream message deleted on completion
  • Reliability -- file locking on state.json and roadmap.json, deploy-sync.sh for auto-deploying staging changes, strategic context capped at 2K chars to save tokens, rejection cooldown prevents retrying recently-rejected tasks

How it works

You sleep
    |
Amor wakes up every 4 hours
    |
Reads your codebase, GitHub issues, analytics
    |
Decides what feature to build next
    |
Writes a detailed spec
    |
Builds it with Claude Code
    |
Runs tests, integration tests, code quality review
    |
Sends you a Telegram message: "Built X. Approve?"
    |
You tap Approve (or Reject with feedback)
    |
Merged to staging. Amor learns. Repeats.

Quick start

pip install amor

# In your project directory
amor init          # scans repo, detects stack, creates amor.yaml
amor start         # daemon mode -- runs 24/7

One-time setup

  1. Telegram bot -- message @BotFather, create a bot, get the token
  2. Gemini API key -- free at ai.google.dev
  3. GitHub token -- settings > developer settings > personal access token (repo scope)

Add to your .env:

GITHUB_TOKEN=ghp_...
TELEGRAM_BOT_TOKEN=123456:ABC...
TELEGRAM_CHAT_ID=your_chat_id
GEMINI_API_KEY=AIza...

Commands

Command What it does
amor init Scan repo, detect stack, create amor.yaml
amor start Daemon mode (24/7 autonomous cycles)
amor run Run one cycle
amor status Show state, roadmap, pending features
amor scores Show validation score history

Telegram commands

Command What it does
/status Current state, cycle count, pending
/roadmap Product roadmap with progress
/memory What Amor has learned (built, rejected, decisions)
/scores Validation score chart
/run Trigger a cycle now
/pause Pause autonomous mode
/resume Resume autonomous mode

What happens in one cycle

  1. Roadmap -- generates or advances a product roadmap
  2. Research -- scans GitHub issues, analytics, market for what to build next
  3. Spec -- writes detailed implementation spec with user stories
  4. Build -- Claude Code implements the feature on a branch
  5. Self-heal -- if build fails, diagnoses errors and retries
  6. Verify -- build, types, lint, tests (stack-aware)
  7. Integration test -- writes and runs real integration tests
  8. Code quality review -- fixes duplicates, accessibility, types
  9. Security scan -- checks for leaked secrets before push
  10. Approve -- sends to Telegram for human approval

Supported stacks

Stack Build Types Lint Tests
Next.js / React npm run build tsc eslint vitest/jest
Python py_compile mypy ruff pytest
Node.js npm run build tsc eslint vitest/jest
Rust cargo build (built-in) clippy cargo test
Generic syntax check -- -- detected

Data sources

Amor needs at least one data source to make good decisions. GitHub issues is always available (free). Analytics are optional.

Source What it provides Required?
GitHub Issues User requests, bug reports, feature votes Default (free)
PostHog Page views, feature usage, retention Optional

Configuration (amor.yaml)

project:
  name: "my-product"
  repo: "owner/repo"
  description: "what this product does"
  stack: "nextjs"          # auto-detected

github:
  main_branch: "main"
  staging_branch: "staging"
  protected_files: [".env", "package-lock.json"]

signals:
  github_issues: true
  posthog:
    api_key: "${POSTHOG_API_KEY}"

cycle:
  interval_hours: 4
  max_features_per_day: 2
  auto_merge_after_cycles: 2
  watchdog_timeout_minutes: 45

Deployment

Option 1: Local (your machine)

pip install amor
cd your-project
amor init
amor start    # runs until you close the terminal

Good for trying it out. Stops when your machine sleeps.

Option 2: Cloud server (24/7 -- recommended)

Any $5-7/month VPS works. Amor needs ~512MB RAM and minimal CPU.

Tested providers:

  • Hetzner CX22 ($4/mo) -- recommended
  • DigitalOcean Basic ($6/mo)
  • AWS Lightsail ($5/mo)
  • Any Ubuntu 22+ VPS

One-command setup:

ssh root@your-server 'bash -s' < setup.sh

This installs Python, Claude Code CLI, creates a systemd service, and starts Amor as a daemon. It runs 24/7, survives reboots, and logs to journald.

Manual setup:

# On your server
git clone https://github.com/your-user/your-product.git /opt/your-product
cd /opt/your-product
pip install amor
amor init

# Create systemd service
cat > /etc/systemd/system/amor.service << EOF
[Unit]
Description=Amor Autonomous Product Builder
After=network.target

[Service]
WorkingDirectory=/opt/your-product
EnvironmentFile=/opt/your-product/.env
ExecStart=/usr/local/bin/amor start
Restart=always
RestartSec=30

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable amor
systemctl start amor

# Monitor logs
journalctl -u amor -f

Server commands:

Command What it does
systemctl status amor Check if running
systemctl restart amor Restart after config change
journalctl -u amor -f Live logs
journalctl -u amor --since "1 hour ago" Recent logs

How Amor learns

Every rejection teaches Amor what NOT to build. When you reject a feature and tell it why, that feedback becomes a permanent design decision. Amor never makes the same mistake twice.

You: [Reject]
Amor: "Why was this rejected?"
You: "Users don't need a calendar view, they need better search filters"
Amor: [Stores as design decision, never builds calendar features again]

License

MIT

About

Autonomous product builder -- ships features while you sleep

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors