# Feature Loop

> Coding agent for the project-level harness — one feature per session, must verify, must be mergeable.

- **Type:** Skill
- **Install:** `agentstack add skill-demondamon-agenticx-feature-loop`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [DemonDamon](https://agentstack.voostack.com/s/demondamon)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [DemonDamon](https://github.com/DemonDamon)
- **Source:** https://github.com/DemonDamon/AgenticX/tree/main/agenticx/skills/bundled/feature-loop
- **Website:** https://www.agxbuilder.com/

## Install

```sh
agentstack add skill-demondamon-agenticx-feature-loop
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Feature Loop

Use when `session_mode == feature_loop` and the project is past the Initializer phase (system prompt will say "Coding 阶段").

## Iron rules

1. **One feature per session.** Multiple `in_progress` features are forbidden by the store; do not bypass.
2. **Always verify before commit.** `feature_complete` rejects features that have not been promoted to `verified` via `verify_run`.
3. **Keep the branch mergeable.** Each commit must compile, pass `verify.yaml`, and not depend on uncommitted local state.

## Loop

1. **Sync from disk.** Call `project_status` first thing every session — it reads `feature_list.json` / `status.json` / `progress.md` and reseeds your understanding from the single source of truth.
2. **Pick a feature.**
   - If `status.active_feature_id` is already set, resume that one (the prompt block will tell you).
   - Otherwise call `feature_select` with no arguments to auto-pick the highest-priority pending feature with satisfied dependencies, or pass `feature_id` when the user names one.
3. **Implement using code_dev phases** (Explore → Read → Author):
   - Explore with `code_outline`, `grep`, optional `code_search`.
   - Read with `file_read` slices (start/end line). Track files you have read in scratchpad.
   - Author with `file_write` skeletons first, then section-by-section appends.
4. **Run the gate.** Call `verify_run feature_id=`. If any step fails:
   - **Do not call `feature_complete`.**
   - Log a `progress_append` with the failing step name and root cause.
   - Decide: fix and rerun `verify_run`, or escalate to the user with the specific failure.
5. **Commit via shell.**
   ```
   git add -A
   git commit -m "feat(): "
   ```
   Capture the resulting sha (`git rev-parse HEAD`).
6. **Promote to committed.** Call `feature_complete feature_id= commit_sha=`. The store writes an immutable archive snapshot under `.agx/project/archive/feature_.json`.
7. **Decide next step.** Either call `feature_select` for the next feature in the same session, or stop and tell the user the loop closed cleanly.

## Failure modes

- **verify_run timeouts**: do not retry blindly. Inspect the log under `.agx/project/archive/`, fix the root cause, then rerun.
- **Dependency missed**: `feature_select` will reject features whose `depends_on` isn't `committed`. Either pick a different feature or finish the prerequisite first.
- **Lost context after window compaction**: re-call `project_status`. Disk is the source of truth.
- **Cold start (new machine, fresh session)**: `project_status` + `feature_select` is enough to resume. No memory of previous turns is required.

## Forbidden

- Editing files inside `.agx/project/archive/` (immutable).
- Calling `project_init` outside the Initializer phase.
- Skipping `verify_run` because "tests are too slow".

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [DemonDamon](https://github.com/DemonDamon)
- **Source:** [DemonDamon/AgenticX](https://github.com/DemonDamon/AgenticX)
- **License:** Apache-2.0
- **Homepage:** https://www.agxbuilder.com/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-demondamon-agenticx-feature-loop
- Seller: https://agentstack.voostack.com/s/demondamon
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
