@alexandrealvaro/agentic 0.1.0-beta.1 → 0.3.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +116 -55
  2. package/WORKFLOW.md +15 -2
  3. package/package.json +5 -3
  4. package/prompts/agents.md +12 -4
  5. package/prompts/architecture.md +13 -3
  6. package/prompts/task.md +26 -0
  7. package/src/commands/init.js +246 -71
  8. package/src/commands/update.js +251 -0
  9. package/src/index.js +13 -5
  10. package/src/lib/detect.js +113 -1
  11. package/src/lib/install.js +353 -0
  12. package/src/lib/rootdoc.js +123 -0
  13. package/src/lib/state.js +80 -0
  14. package/src/skills/claude-code/agentic-adr/SKILL.md +69 -0
  15. package/src/skills/claude-code/agentic-architecture/SKILL.md +112 -0
  16. package/src/skills/claude-code/agentic-audit/SKILL.md +66 -0
  17. package/src/skills/claude-code/agentic-bootstrap/SKILL.md +161 -0
  18. package/src/skills/claude-code/agentic-design/SKILL.md +71 -0
  19. package/src/skills/claude-code/agentic-philosophy/SKILL.md +103 -0
  20. package/src/skills/claude-code/agentic-review/SKILL.md +52 -0
  21. package/src/skills/claude-code/agentic-review/agents/fresh-context-reviewer.md +50 -0
  22. package/src/skills/claude-code/agentic-review/manifest.json +3 -0
  23. package/src/skills/claude-code/agentic-skill/SKILL.md +51 -0
  24. package/src/skills/claude-code/agentic-subagent/SKILL.md +59 -0
  25. package/src/skills/claude-code/agentic-task/SKILL.md +101 -0
  26. package/src/skills/codex/agentic-adr/SKILL.md +59 -0
  27. package/src/skills/codex/agentic-adr/agents/openai.yaml +5 -0
  28. package/src/skills/codex/agentic-architecture/SKILL.md +95 -0
  29. package/src/skills/codex/agentic-architecture/agents/openai.yaml +5 -0
  30. package/src/skills/codex/agentic-audit/SKILL.md +53 -0
  31. package/src/skills/codex/agentic-audit/agents/openai.yaml +5 -0
  32. package/src/skills/codex/agentic-bootstrap/SKILL.md +145 -0
  33. package/src/skills/codex/agentic-bootstrap/agents/openai.yaml +5 -0
  34. package/src/skills/codex/agentic-design/SKILL.md +55 -0
  35. package/src/skills/codex/agentic-design/agents/openai.yaml +5 -0
  36. package/src/skills/codex/agentic-philosophy/SKILL.md +39 -0
  37. package/src/skills/codex/agentic-philosophy/agents/openai.yaml +5 -0
  38. package/src/skills/codex/agentic-review/SKILL.md +77 -0
  39. package/src/skills/codex/agentic-review/agents/openai.yaml +5 -0
  40. package/src/skills/codex/agentic-skill/SKILL.md +42 -0
  41. package/src/skills/codex/agentic-skill/agents/openai.yaml +5 -0
  42. package/src/skills/codex/agentic-task/SKILL.md +89 -0
  43. package/src/skills/codex/agentic-task/agents/openai.yaml +5 -0
  44. package/templates/agents-project.md +5 -9
  45. package/templates/task.md +43 -0
  46. package/src/lib/render.js +0 -66
  47. package/templates/agents-general.md +0 -82
package/README.md CHANGED
@@ -2,106 +2,167 @@
2
2
 
3
3
  A starter kit for engineering production code with LLMs. Lean templates and init prompts grounded in established standards: [Anthropic Skills](https://code.claude.com/docs/en/skills), [Claude Code subagents](https://code.claude.com/docs/en/sub-agents), [agents.md](https://agents.md), Nygard ADRs, and [Google Labs DESIGN.md](https://github.com/google-labs-code/design.md).
4
4
 
5
- > **Status:** v0.1.0-betaearly. The CLI works for AGENTS.md bootstrap (`npx @alexandrealvaro/agentic@beta init`); other artifact commands are in development. The manual workflow below stays fully usable for everything. Report rough edges via [GitHub Issues](https://github.com/alexandremendoncaalvaro/agentic-development/issues).
5
+ > **Status:** v0.2 in development on the `cli` branch the CLI installs the full skill set (universal: `agentic-bootstrap`, `agentic-philosophy`, `agentic-architecture`, `agentic-adr`, `agentic-task`, `agentic-audit`, `agentic-review`; conditional: `agentic-design` for frontend, `agentic-subagent` for Claude Code, `agentic-skill` opt-in) into Claude Code or Codex. Each skill produces its artifact (or runs its operation) via the agent's native conversational UI. v0.1.0-beta on npm still prints prompts; the v0.2 release ships once the polish chunk lands. Report rough edges via [GitHub Issues](https://github.com/alexandremendoncaalvaro/agentic-development/issues).
6
6
 
7
7
  ## Prerequisites
8
8
 
9
9
  An agentic coding tool that reads markdown files. Examples here use **Claude Code** and **Codex CLI** (primary tools the author uses); the kit also works with [Antigravity](https://antigravity.google), [Gemini CLI](https://github.com/google-gemini/gemini-cli), Cursor, Continue, Aider, and any other tool that follows the [agents.md](https://agents.md) open standard.
10
10
 
11
- For the CLI path: Node.js 18+ (only needed if you use `npx`/`npm install`; the manual workflow has no runtime dependencies).
11
+ For the CLI path: Node.js 18+. The CLI is the recommended path. Paste-into-agent prompts (see [Manual prompts](#manual-prompts) below) remain as an alternative for users who don't want to run an installer — same artifacts, same patterns.
12
12
 
13
- ## What's here
13
+ For the philosophy and full reasoning behind the kit, see [WORKFLOW.md](WORKFLOW.md).
14
14
 
15
- - **[WORKFLOW.md](WORKFLOW.md)** the philosophy: how to engineer with LLMs without vibe-coding. Read this first.
16
- - **[templates/](templates/)** — pure templates. Copy and fill, or have your agent fill them via the matching prompt.
17
- - **[prompts/](prompts/)** — init prompts to paste into your agent. Each generates one artifact from its template.
15
+ ## Install & use
18
16
 
19
- ## How to use
17
+ ```bash
18
+ cd your-project
19
+ npx @alexandrealvaro/agentic@beta init
20
+ ```
21
+
22
+ The CLI installs the universal skill set into your agent's native location, plus conditional skills based on what your project needs:
23
+
24
+ * **Claude Code:** `.claude/skills/<skill-name>/SKILL.md` (plus `.claude/agents/<name>.md` for skills that ship a subagent)
25
+ * **Codex:** `.agents/skills/<skill-name>/SKILL.md` (+ `agents/openai.yaml`)
20
26
 
21
- This kit is a **reference repository, not a per-project dependency.** Templates and prompts stay here; only the generated artifacts (AGENTS.md, ARCHITECTURE.md, ADRs, etc.) end up in your target project. The pattern matches how [GitHub's spec-kit](https://github.com/github/spec-kit) and [cookiecutter](https://cookiecutter.readthedocs.io/) handle distribution templates in one place, outputs in another, never mixed.
27
+ Two categories ([ADR-0007](doc/adr/0007-workflow-operational-skills.md)) and two installation modes (universal = always; conditional = depends on project signals or opt-in):
22
28
 
23
- ### Quickstart (CLI, beta)
29
+ | Skill | Category | Installs | What it does | Invoke |
30
+ | --- | --- | --- | --- | --- |
31
+ | `agentic-bootstrap` | spec-driven | universal | Scans the repo, writes `AGENTS.md` ≤150 lines | `/agentic-bootstrap` |
32
+ | `agentic-architecture` | spec-driven | universal | Scans the code, writes `ARCHITECTURE.md` | `/agentic-architecture` |
33
+ | `agentic-adr` | spec-driven | universal | Drafts `doc/adr/NNNN-<slug>.md` from the conversation | `/agentic-adr` |
34
+ | `agentic-task` | spec-driven | universal | Drafts `doc/tasks/NNNN-<slug>.md` (checkbox + Notes format) | `/agentic-task` |
35
+ | `agentic-audit` | spec-driven | universal | Read-only drift report (AGENTS.md / ARCHITECTURE.md / ADRs) | `/agentic-audit` |
36
+ | `agentic-philosophy` | workflow-operational | universal | Universal agent guardrails — auto-loads on non-trivial work | implicit |
37
+ | `agentic-review` | workflow-operational | universal | Fresh-context code review per WORKFLOW §10; structured findings, no "approve" | `/agentic-review <range>` |
38
+ | `agentic-design` | spec-driven | auto if frontend detected | Bootstrap `DESIGN.md` from existing tokens (Figma, tailwind.config, tokens.json, CSS custom props) | `/agentic-design` |
39
+ | `agentic-subagent` | spec-driven | auto if installing for Claude Code | Drafts `.claude/agents/<name>.md` (Claude Code only — Codex has no subagent primitive) | `/agentic-subagent` |
40
+ | `agentic-skill` | spec-driven | opt-in only | Drafts a new Claude Code or Codex skill at the appropriate path | `/agentic-skill` |
24
41
 
25
- For AGENTS.md bootstrap, the fastest path is the CLIno clone needed:
42
+ A short TUI shows the detected mode, agent, and feature signals (frontend / `.claude/` / `.agents/` presence) and lets you toggle the conditional skills. Non-interactive flags: `--agent claude-code | codex | both`, `--yes` to skip confirmations — auto-checked conditionals (e.g., `agentic-design` if the project has React) install; `agentic-skill` stays opt-in. Re-running on an installed project is idempotent unchanged files report `·`, divergent ones prompt to replace.
43
+
44
+ If your project already has an `AGENTS.md` (or `CLAUDE.md`), the installer appends a managed `Skills installed by agentic` section bracketed by `<!-- agentic-managed-skills:start -->` / `:end -->` markers. User content outside those markers is byte-preserved; re-runs update only the managed block.
45
+
46
+ ## Updating an existing project
47
+
48
+ To pull upstream kit changes into a project that already has agentic skills installed:
26
49
 
27
50
  ```bash
28
51
  cd your-project
29
- npx @alexandrealvaro/agentic@beta init
52
+ npx @alexandrealvaro/agentic@beta update
30
53
  ```
31
54
 
32
- The CLI auto-detects greenfield/brownfield/audit mode, then prints a self-contained prompt (templates inlined) for you to paste into your agent. Add `--mode greenfield|brownfield|audit` to override detection.
55
+ `update` is a separate command from `init` (clearer intent) and runs a three-way diff against a state file the kit writes at install time:
56
+
57
+ * `.claude/agentic-state.json` — for Claude Code installs.
58
+ * `.agents/agentic-state.json` — for Codex installs.
33
59
 
34
- > **Beta scope:** Only `init` (AGENTS.md) is in v0.1.0-beta. For ARCHITECTURE.md, ADRs, design tokens, skills, and subagents, use the [manual workflow](#manual-workflow) below until those CLI commands ship.
60
+ These state files are committed to your repo so the whole team shares one view of what skill version is in place. They record kit version, per-skill version, and the SHA of every shipped file at the time of last install. The three-way diff uses those SHAs to distinguish *user-edited* files from *kit-changed* files and acts accordingly:
35
61
 
36
- ### Manual workflow
62
+ | File state | Action |
63
+ | --- | --- |
64
+ | New file in the kit | install |
65
+ | Kit unchanged, you didn't touch it | report unchanged |
66
+ | Kit unchanged, you edited it | keep your edits |
67
+ | Kit changed, you didn't touch it | silent update |
68
+ | Kit changed, you also edited it | prompt with diff (default: skip) |
69
+ | Skill removed from the kit or de-selected | prompt before removing your file (default: keep) |
37
70
 
38
- Required for every artifact except AGENTS.md right now, and useful as a fallback for `init` if you want to run prompts directly without the CLI.
71
+ Useful flags:
39
72
 
40
- #### Setup (once)
73
+ * `--dry-run` — print the action plan without writing anything. Always start here when you're not sure what will happen.
74
+ * `--force` — overwrite user-edited files on conflict (non-interactive default: no). Escape hatch when you genuinely want kit-side content to win.
75
+ * `--agent claude-code | codex | both` — restrict the update to one agent.
76
+ * `--yes` — non-interactive, accepts defaults (skip on conflict, keep orphans). Combine with `--force` if you want overwrites in CI.
41
77
 
42
- 1. Read [`WORKFLOW.md`](WORKFLOW.md) the philosophy that everything else follows from.
43
- 2. Clone this repo to a location outside your projects:
78
+ If the project was installed with a kit version older than v0.3 (no state file present), the first `update` falls back to today's byte-compare behavior, then writes the state file so subsequent runs use the three-way diff.
44
79
 
45
- ```bash
46
- git clone https://github.com/alexandremendoncaalvaro/agentic-development.git ~/dev/agentic-development
47
- ```
80
+ The `agentic-review` skill writes the assembled WORKFLOW §10 handoff to `.agentic/reviews/<ISO-timestamp>-<scope>.md` before delegating to the fresh-context reviewer (Claude Code) or before instructing you to `/clear` and paste (Codex). These files are ephemeral audit artifacts — add `.agentic/reviews/` to your `.gitignore`.
48
81
 
49
- **Never copy this kit into your target project.** Only the generated artifacts go there.
82
+ For persistent install:
50
83
 
51
- #### Give the agent access to templates
84
+ ```bash
85
+ npm install -g @alexandrealvaro/agentic@beta
86
+ agentic init
87
+ ```
52
88
 
53
- When you paste a prompt from `prompts/`, the agent needs to read the matching template in `templates/`. Two ways to grant access:
89
+ ## Manual prompts
54
90
 
55
- - **Recommended** start the agent with the kit added. In Claude Code, from your target project's directory:
56
- ```
57
- claude --add-dir <path-to-this-kit>
58
- ```
59
- The agent can then read templates via the relative paths the prompts use.
60
- - **Standalone** — copy the content of both `prompts/<X>.md` and `templates/<X>.md` into the agent session. No setup, slightly more friction.
91
+ If you prefer to skip the installer, the same artifacts can be generated by pasting prompts directly into your agent. Each prompt file has the literal text to copy, plus the matching template structure:
92
+
93
+ | Artifact | Prompt | Template | Lives at |
94
+ | --- | --- | --- | --- |
95
+ | `AGENTS.md` | [prompts/agents.md](prompts/agents.md) | [agents-project](templates/agents-project.md) | repo root |
96
+ | `ARCHITECTURE.md` | [prompts/architecture.md](prompts/architecture.md) | [architecture](templates/architecture.md) | repo root |
97
+ | ADR | [prompts/adr.md](prompts/adr.md) | [adr](templates/adr.md) | `doc/adr/NNNN-<title>.md` |
98
+ | Task | [prompts/task.md](prompts/task.md) | [task](templates/task.md) | `doc/tasks/NNNN-<slug>.md` |
99
+ | `DESIGN.md` | [prompts/design.md](prompts/design.md) | (no template — bootstrap from existing tokens) | repo root |
100
+ | Skill | [prompts/skill.md](prompts/skill.md) | [skill](templates/skill.md) | `.claude/skills/<name>/SKILL.md` |
101
+ | Subagent | [prompts/subagent.md](prompts/subagent.md) | [subagent](templates/subagent.md) | `.claude/agents/<name>.md` |
61
102
 
62
- #### Workflows by scenario
103
+ Prompts reference templates by relative path. Two ways to give your agent access:
63
104
 
64
- **New project (greenfield).** Initialize git and set up the project structure, then paste `prompts/agents.md`. The agent interviews you about stack, build, test, conventions, and security boundaries, then writes `AGENTS.md` at the repo root. As architectural and design decisions emerge, use `prompts/architecture.md`, `prompts/adr.md`, `prompts/design.md`, `prompts/skill.md`, and `prompts/subagent.md` for each new artifact.
105
+ - **Browse on GitHub.** Open the prompt and template files in tabs, copy both into your agent session. No install.
106
+ - **Use the npm-installed package as a kit folder.** If you ran `npm install -g @alexandrealvaro/agentic@beta`, the kit is already on disk. For Claude Code from your project's directory:
107
+ ```bash
108
+ claude --add-dir "$(npm root -g)/@alexandrealvaro/agentic"
109
+ ```
110
+ The agent then reads the templates locally via the paths the prompts use.
65
111
 
66
- **Existing project (brownfield).** Same prompts. The project-wide ones (`prompts/agents.md`, `prompts/architecture.md`) instruct the agent to read the codebase, verify what you told them, and flag any mismatch before writing — so contradictions get surfaced instead of trusted. The per-artifact prompts (ADR, design, skill, subagent) work on a single decision or asset and don't need this verification. Backfill ADRs only for decisions that matter going forward; don't try to rewrite history.
112
+ ## Workflows by scenario
67
113
 
68
- **Revisiting / auditing existing specs.** When specs may have drifted from code, paste:
114
+ **New project (greenfield).** Initialize git and project structure, then run `agentic init` to install the universal skill set plus any auto-detected conditional skills. From inside Claude Code or Codex: `/agentic-bootstrap` produces `AGENTS.md`, `/agentic-architecture` produces `ARCHITECTURE.md`, `/agentic-adr` records each binding decision, `/agentic-task` opens trackable work items, `/agentic-audit` flags drift, `/agentic-review <range>` runs a fresh-context review of a diff, `/agentic-design` bootstraps `DESIGN.md` from your tokens (frontend projects), `/agentic-subagent` and `/agentic-skill` scaffold custom subagents and skills. `agentic-philosophy` auto-loads on non-trivial work.
69
115
 
70
- > *"Read AGENTS.md (or ARCHITECTURE.md). Compare with the current state of the codebase. For every place where the spec disagrees with the code, list the disagreement and suggest whether the spec or the code should change. Do not rewrite the spec yourself flag and wait."*
116
+ **Existing project (brownfield).** Same flow. The project-wide skills (`/agentic-bootstrap`, `/agentic-architecture`) follow a **scan-first pattern**: the agent reads the codebase first, pre-fills every placeholder it can verify, then asks you only about the genuine gaps and conflicts no philosophical questions, no interview-by-section. The per-artifact skills (`/agentic-adr`, `/agentic-task`, `/agentic-design`, `/agentic-skill`, `/agentic-subagent`) work on a single decision or asset and don't need codebase-wide verification. Backfill ADRs only for decisions that matter going forward.
71
117
 
72
- Apply judgment manually; don't let the agent rewrite specs unattended.
118
+ **Revisiting / auditing existing specs.** Run `/agentic-audit` from inside Claude Code or Codex. The skill reads `AGENTS.md`, `ARCHITECTURE.md`, and `doc/adr/` and produces a drift list — one finding per line, format `[file or section]: spec says X, code says Y. Suggested resolution: change spec / change code / discuss.` Read-only — never rewrites specs. Apply judgment manually before changing anything.
73
119
 
74
- **Project already built with agents.** Treat missing artifacts as brownfield (generate via the relevant prompt) and existing artifacts as audit (run the comparison prompt above).
120
+ **Reviewing your own diff.** Run `/agentic-review <range>` (e.g. `/agentic-review main..HEAD` or `/agentic-review PR#42`). The skill assembles the diff, the relevant spec slice (`AGENTS.md`, applicable ADRs, the task's Acceptance Criteria), and delegates to a fresh-context reviewer subagent — no inherited bias from the session that wrote the code (WORKFLOW §10). Returns structured findings grouped Blocker / Concern / Note. Codex variant uses `/clear` + paste handoff since Codex has no subagent primitive.
75
121
 
76
- #### What ends up in your target project
122
+ **Project already built with agents.** Treat missing artifacts as brownfield (run the relevant skill) and existing artifacts as audit (`/agentic-audit`).
123
+
124
+ ## What ends up in your target project
77
125
 
78
126
  Only the generated outputs — never templates, prompts, or this guide:
79
127
 
80
128
  ```
81
129
  your-project/
82
- ├── AGENTS.md
130
+ ├── AGENTS.md (with a managed "Skills installed by agentic" section
131
+ │ appended below your content if AGENTS.md already existed)
83
132
  ├── ARCHITECTURE.md
84
- ├── DESIGN.md (optional, UI projects)
133
+ ├── DESIGN.md (optional, frontend projects)
85
134
  ├── doc/
86
- └── adr/
87
- └── NNNN-<title>.md
88
- └── .claude/
89
- ├── skills/<name>/SKILL.md
90
- └── agents/<name>.md
135
+ ├── adr/
136
+ └── NNNN-<title>.md
137
+ └── tasks/
138
+ │ └── NNNN-<slug>.md
139
+ ├── .agentic/
140
+ │ └── reviews/ (gitignored — ephemeral §10 review handoffs)
141
+ ├── .claude/ (Claude Code targets)
142
+ │ ├── agentic-state.json (kit install state — committed)
143
+ │ ├── skills/agentic-*/SKILL.md
144
+ │ └── agents/fresh-context-reviewer.md
145
+ └── .agents/ (Codex targets, cc-sdd convention)
146
+ ├── agentic-state.json (kit install state — committed)
147
+ └── skills/agentic-*/{SKILL.md, agents/openai.yaml}
91
148
  ```
92
149
 
93
- ### Reference table
150
+ The pattern matches how [GitHub's spec-kit](https://github.com/github/spec-kit) and [cookiecutter](https://cookiecutter.readthedocs.io/) handle distribution — templates in one place, outputs in another, never mixed.
151
+
152
+ ## Develop or fork
153
+
154
+ Want to contribute, fork, or run the CLI from source?
94
155
 
95
- | Artifact | Template | Prompt | Lives at |
96
- | ----------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------- | --------------------------------- |
97
- | `AGENTS.md` | [agents-general](templates/agents-general.md) + [agents-project](templates/agents-project.md) | [prompts/agents.md](prompts/agents.md) | repo root |
98
- | `ARCHITECTURE.md` | [architecture](templates/architecture.md) | [prompts/architecture.md](prompts/architecture.md) | repo root |
99
- | ADR | [adr](templates/adr.md) | [prompts/adr.md](prompts/adr.md) | `doc/adr/NNNN-<title>.md` |
100
- | `DESIGN.md` | (no template — bootstrap from existing tokens) | [prompts/design.md](prompts/design.md) | repo root |
101
- | Skill | [skill](templates/skill.md) | [prompts/skill.md](prompts/skill.md) | `.claude/skills/<name>/SKILL.md` |
102
- | Subagent | [subagent](templates/subagent.md) | [prompts/subagent.md](prompts/subagent.md) | `.claude/agents/<name>.md` |
156
+ ```bash
157
+ git clone https://github.com/alexandremendoncaalvaro/agentic-development.git
158
+ cd agentic-development
159
+ npm install
160
+ node bin/agentic.js init
161
+ ```
103
162
 
104
- Templates carry pure structure. Prompts carry the spec links, conventions, and the literal text to paste.
163
+ Branch layout:
164
+ - `main` — manual workflow source of truth (no CLI code; the npm package gets promoted here when mature).
165
+ - `cli` — CLI development (you're here). Beta releases are published from this branch.
105
166
 
106
167
  ## License
107
168
 
package/WORKFLOW.md CHANGED
@@ -49,7 +49,20 @@ Avoid putting implementation code in docs unless it's executable, generated, or
49
49
 
50
50
  The split is simple. **Docs are for the *why*** — decisions, not history. Git tracks history; docs explain the reasoning that won't survive otherwise. **Code is for the *what*** — clean naming and small units make logic self-evident, and the more your code does this work, the less your docs need to.
51
51
 
52
- Comments are exceptions. They justify *why* a non-obvious choice was made — never *what* the line does. No commented-out code, and no orphan `TODO` or `FIXME`: every deferred item references an issue, ADR, or explicit follow-up.
52
+ Comments are exceptions. They justify *why* a non-obvious choice was made — never *what* the line does. No commented-out code, and no orphan `TODO` or `FIXME`: every deferred item references a tracked work item — a GitHub Issue or a per-task file under `doc/tasks/NNNN-*.md`.
53
+
54
+ ### Documentation Discipline
55
+
56
+ Eight rules apply to every document the agent or the human writes in the project. They are framed against the failure modes the kit has actually seen — bloated `AGENTS.md`, README pages that drift into changelogs, decision artifacts diluted by speculation.
57
+
58
+ 1. **Definitions and decisions only.** Documentation captures what is true now and the decisions that brought it there. Speculation, history, and unfounded plans are out. A deferred decision is in scope when it is *recorded* — an accepted ADR or a task file is fundamentação; "we might do X later" without a record is speculation and is cut.
59
+ 2. **No dates, version stamps, `DRAFT` markers, or changelogs in narrative documents.** Applies to `README.md`, `AGENTS.md` / `CLAUDE.md`, `ARCHITECTURE.md`, `DESIGN.md`, specs, and any prose page. **Decision-record artifacts are exempt** — ADRs under `doc/adr/` (Nygard `Status` lifecycle requires a date) and tasks under `doc/tasks/` (append-only `Notes` log is the auditability surface). Use git history for narrative-doc evolution; keep the dated lifecycle inside the artifacts that need it.
60
+ 3. **No emoji anywhere.** Not in docs, code, source comments, commit messages, PR bodies, or skill outputs. Severity tags use plain words (`Blocker / Concern / Note`); status uses words (`accepted / superseded`); structural cues use Markdown.
61
+ 4. **Business context first.** Every document opens with *why* — the problem, the constraint, the user — before *what* and *how*. The first paragraph answers "what would break if this document didn't exist".
62
+ 5. **One scope per document. No duplication.** If two documents would say the same thing, link instead of copying. The canonical location owns the content; everywhere else references it.
63
+ 6. **Code is the primary documentation of behavior.** Comments justify *why* a non-obvious choice was made — never restate *what* the line does. If the comment is needed to explain *what*, rename or refactor.
64
+ 7. **No commented-out code; no orphan `TODO` / `FIXME` in source.** Every deferred item references a tracked work item — a GitHub Issue, or a per-task file under `doc/tasks/NNNN-*.md` (the kit's file-based tracking surface). The trace must be addressable from the source line.
65
+ 8. **Tests are living documentation of behavior.** Test names and assertions should read as the spec they enforce. When the spec changes, the test changes; when the test changes, the spec it documents must already have changed.
53
66
 
54
67
  ## 3. Format by Evidence
55
68
 
@@ -89,7 +102,7 @@ Cite specific files, not "the codebase." Use just-in-time retrieval: pass paths
89
102
  For non-trivial changes, four phases:
90
103
 
91
104
  1. **Explore (read-only).** Plan mode in your agent. Read, build a mental model, no edits.
92
- 2. **Plan.** Agent writes a Markdown plan. You edit before approving.
105
+ 2. **Plan.** Agent writes a Markdown plan. You edit before approving. For non-trivial multi-step work, structure the plan as a per-task file (`doc/tasks/<NNNN>-<slug>.md`) with checkbox acceptance criteria and execution steps — the agent toggles checkboxes as it works rather than rewriting paragraphs, keeping edits cheap and resumable across sessions.
93
106
  3. **Implement.** Execute the approved plan; verify each step before moving to the next.
94
107
  4. **Commit.** One logical change per commit.
95
108
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexandrealvaro/agentic",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.3.0-beta.1",
4
4
  "description": "Bootstrap and audit AGENTS.md, ARCHITECTURE.md, ADRs, skills, and subagents for engineering production code with LLMs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "scripts": {
22
22
  "start": "node bin/agentic.js",
23
- "test": "node bin/agentic.js --help && node bin/agentic.js init --help",
23
+ "test": "node bin/agentic.js --help && node bin/agentic.js init --help && node bin/agentic.js update --help && node --test test/*.test.js",
24
24
  "prepublishOnly": "npm test"
25
25
  },
26
26
  "keywords": [
@@ -48,7 +48,9 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@clack/prompts": "^1.3.0",
51
- "clipboardy": "^5.3.1",
52
51
  "commander": "^12.1.0"
52
+ },
53
+ "devDependencies": {
54
+ "js-yaml": "^4.1.0"
53
55
  }
54
56
  }
package/prompts/agents.md CHANGED
@@ -4,10 +4,18 @@ Open standard: [agents.md](https://agents.md) (Linux Foundation / Agentic AI Fou
4
4
 
5
5
  ## Paste to your agent
6
6
 
7
- > Read [`templates/agents-general.md`](../templates/agents-general.md) and [`templates/agents-project.md`](../templates/agents-project.md). Interview me one section at a time to fill `agents-project.md`'s placeholders: stack, build/test/lint commands, repo layout (only what's not obvious from the tree), commit conventions, security boundaries, real gotchas you can confirm by reading the code.
7
+ > Read [`templates/agents-project.md`](../templates/agents-project.md). Your job: produce a single `AGENTS.md` at the repo root, ≤150 lines, every line operational. Generic agent behavior (think-before-coding, verify-before-done, etc.) does **not** belong here that lives in the `agentic-philosophy` skill.
8
8
  >
9
- > **Do not invent values.** When I don't know something, leave `<TODO>` and move on. After the interview, read the codebase to verify what I told you and flag any mismatch.
9
+ > **Step 1 Scan.** Read `package.json` / `pyproject.toml` / `Cargo.toml` / `go.mod` / equivalent, `README.md`, top-level directories, `doc/` and `doc/adr/` if present, `.claude/` if present, lockfiles, hook configs (`.husky/`, `.pre-commit-config.yaml`, `.github/workflows/`), `git remote -v`. Build a model of stack, entry points, build/test commands, conventions, quality gates, security boundaries, gotchas confirmed by code.
10
10
  >
11
- > Output a single `AGENTS.md` at the repo root: filled `agents-project.md` content first, then `agents-general.md` content appended (drop its H1`agents-project.md`'s `# AGENTS.md` owns the merged document).
11
+ > **Step 2 Pre-fill.** For every `<placeholder>` in [`templates/agents-project.md`](../templates/agents-project.md), fill it from observed signals. No fabrication. If a section has no signal, mark `<TODO: not yet wired>` in one line and move on do not write meta-prose explaining the gap.
12
12
  >
13
- > Cut every line you can bloat makes the agent ignore rules.
13
+ > **Step 3 Show me only the gaps.** Print:
14
+ > - (a) placeholders you could not fill from repo signals;
15
+ > - (b) signals that conflict (e.g. two test commands, two style configs).
16
+ >
17
+ > One question per gap. Skip everything you filled confidently. Do **not** ask philosophical questions ("is this doc primarily for agents or humans?", "what's the most important quality bar?") — those are decisions, not interview material.
18
+ >
19
+ > **Step 4 — On my confirmation, write `AGENTS.md`.** Cut every line that does not change agent behavior. No "External Resources" section (the agent derives URLs from `git remote` / `package.json`). No marketing prose. No appended Universal Agent Behavior block.
20
+ >
21
+ > If something I say contradicts what the code shows, surface the conflict. Don't silently trust me; don't silently trust the code. Flag and wait.
@@ -4,8 +4,18 @@ Pairs with ADRs in `doc/adr/`. Architecture is the binding pattern; ADRs are ind
4
4
 
5
5
  ## Paste to your agent
6
6
 
7
- > Read [`templates/architecture.md`](../templates/architecture.md). Interview me one section at a time to fill its placeholders: overview, layers and boundaries, patterns (data access, HTTP handlers, async/messaging, errors, validation), naming, observability, deployment topology.
7
+ > Read [`templates/architecture.md`](../templates/architecture.md). Your job: produce `ARCHITECTURE.md` at the repo root.
8
8
  >
9
- > Before writing each section, read the codebase to verify the claim is real. **Do not invent.** Leave `<TODO>` for unknowns.
9
+ > **Step 1 Scan the code.** Read top-level dirs, the main entry points (servers, CLI, jobs), boundary code (handlers, repos, gateways, middleware), config and env loading, observability hooks, deploy config (`Dockerfile`, `compose.yml`, `k8s/`, `terraform/`, GitHub Actions). Existing ADRs in `doc/adr/` are binding — read them all.
10
10
  >
11
- > Output `ARCHITECTURE.md` at the repo root. At the end, list any decision that should become an ADR don't write them yet, just flag.
11
+ > **Step 2 Pre-fill.** For each placeholder, fill from what the code actually does: layers and boundaries, data access pattern, HTTP middleware chain, async/messaging, error and validation patterns, naming, logging/metrics/tracing, deployment topology. No fabrication.
12
+ >
13
+ > **Step 3 — Show me only the gaps.** Print:
14
+ > - (a) placeholders without a code signal;
15
+ > - (b) places where the code shows two competing patterns (e.g. some handlers go through middleware, some don't).
16
+ >
17
+ > One question per gap.
18
+ >
19
+ > **Step 4 — On my confirmation, write the file.** Cut every line that does not lock a binding pattern. At the end, list any decision that should become an ADR — flag, do not write the ADR yet.
20
+ >
21
+ > If something I say contradicts what the code shows, surface the conflict. Don't silently trust me; don't silently trust the code.
@@ -0,0 +1,26 @@
1
+ # Bootstrap a Task
2
+
3
+ A per-task tracking file optimized for LLM editing: status changes via single checkbox toggles, append-only Notes log, no rewrites of large blocks.
4
+
5
+ ## Where it lives
6
+
7
+ `doc/tasks/<NNNN>-<short-slug>.md` — sequential numbering, kebab-case slug, mirrors the ADR convention (`doc/adr/`).
8
+
9
+ ## Why this format
10
+
11
+ Toggling a checkbox is a single-character `Edit` operation. Rewriting a paragraph is risky and expensive in tokens. Markdown checklists make the LLM's edits cheap, reviewable, and idempotent. Pattern documented in [spec-kit's tasks.md](https://github.com/github/spec-kit/blob/main/templates/commands/tasks.md), [taskmd](https://medium.com/@driangle/taskmd-task-management-for-the-ai-era-92d8b476e24e), [Backlog.md](https://github.com/MrLesk/Backlog.md), and [Claude Code's Tasks API](https://platform.claude.com/docs/en/agent-sdk/todo-tracking).
12
+
13
+ ## Paste to your agent
14
+
15
+ > Use [`templates/task.md`](../templates/task.md) to draft `doc/tasks/<NNNN>-<short-slug>.md` (next available number) for the task: `<one-line task description>`.
16
+ >
17
+ > Interview me to fill:
18
+ > - Context: why this task, what problem it solves
19
+ > - Acceptance Criteria: measurable conditions per [WORKFLOW.md §1](../WORKFLOW.md), each as a checkbox — pass/fail must be observable, not aspirational ("loads in under 2s" not "fast enough")
20
+ > - Plan: concrete sequential steps with file paths where applicable, each as a checkbox
21
+ >
22
+ > Status starts at `proposed`. Created: today. Owner: ask me. Board ref: leave blank unless I provide one. Leave Notes empty (it gets filled during execution). Definition of Done section stays as in the template.
23
+ >
24
+ > **Do not invent values.** When I don't know something, leave `<TODO>` and ask. Stop after writing the file. Wait for me to start work.
25
+ >
26
+ > When working on the task later, edit the file by toggling checkboxes (`- [ ]` → `- [x]`) and appending to Notes — never rewrite existing sections.