alignfirst 0.1.0-beta.1 → 0.1.0-beta.3

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.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # alignfirst
2
2
 
3
- The AlignFirst CLI provides protocols, shared plans and project documentation in one command.
3
+ The AlignFirst CLI provides collaborative software-development workflows, task files, shared plans, project conventions, documentation discovery, and setup diagnostics.
4
+
5
+ ## Installation
4
6
 
5
7
  Install it globally:
6
8
 
@@ -11,10 +13,26 @@ npm install -g alignfirst
11
13
  Or run the current version without installing it:
12
14
 
13
15
  ```sh
14
- npx -y alignfirst
16
+ npx alignfirst
17
+ ```
18
+
19
+ ## Setup with your agent
20
+
21
+ Temporarily install the setup-guide skill:
22
+
23
+ ```sh
24
+ npx skills add https://github.com/paleo/alignfirst --skill alignfirst-setup-guide
25
+ ```
26
+
27
+ Then ask your agent:
28
+
29
+ ```text
30
+ Use your alignfirst-setup-guide skill. Set up AlignFirst in this project. Ask before installing anything globally.
15
31
  ```
16
32
 
17
- Commands:
33
+ The guide installs the selected components and configures the repository. Remove the setup-guide skill when setup is complete.
34
+
35
+ ## Commands
18
36
 
19
37
  - `guide` — Print an AlignFirst protocol.
20
38
  - `ticket` — Resolve a ticket directory and its next file.
@@ -26,6 +44,61 @@ Commands:
26
44
  - `config` — Report the effective project configuration.
27
45
  - `doctor` — Diagnose an AlignFirst setup.
28
46
 
29
- Run `alignfirst --help` for command usage or `alignfirst guide` for the collaboration guide.
47
+ Run `alignfirst --help` for command usage or `alignfirst guide` to choose a protocol. `alignfirst guide <protocol>` prints the selected protocol followed by shared conventions. Add `--protocol-only` when those conventions are already in context.
48
+
49
+ ## Agent skills
50
+
51
+ Eight optional Agent Skill stubs expose the CLI to GitHub Copilot, Cursor, Claude Code, and Codex. They reuse guides already in context and load missing guides through `npx -y alignfirst guide`.
52
+
53
+ Install them globally:
54
+
55
+ ```sh
56
+ npx skills add https://github.com/paleo/alignfirst --global \
57
+ --skill alignfirst --skill al --skill alplan --skill alspec \
58
+ --skill aldescription --skill alreview --skill alcatchup --skill almerge
59
+ ```
60
+
61
+ Restart the agent after installation. Claude Code, GitHub Copilot, and Cursor expose skills with `/`; Codex uses `$`.
62
+
63
+ ## Workflows
64
+
65
+ These examples use the `/` form. Replace it with `$` in Codex.
66
+
67
+ | Workflow | Command | Result |
68
+ | --- | --- | --- |
69
+ | Specification | `/alspec <request>` | Discuss and write a technical specification. |
70
+ | Planning | `/alplan` | Turn a specification into one or more implementation plans. |
71
+ | Align and do | `/al <request>` | Discuss and implement a small change, then write a summary. |
72
+ | Description | `/aldescription` | Summarize the work and propose a commit message. |
73
+ | Review | `/alreview` | Review the current branch against its base. |
74
+ | Merge | `/almerge` | Resolve merge or rebase conflicts. |
75
+ | Catch up | `/alcatchup` | Load the current task history and continue. |
76
+
77
+ To implement a plan, start a fresh agent context and ask it to execute the plan file.
78
+
79
+ AlignFirst stores specifications, plans, and summaries in `.plans/<ticket-id>/`. It normally derives the ticket ID from the request or branch and asks when none is available. Files use a cycle letter and sequence number, such as `A1-spec.md` and `A2-plan.md`.
80
+
81
+ ## Updates
82
+
83
+ ```sh
84
+ npm update -g alignfirst
85
+ npx skills update --global --yes
86
+ ```
87
+
88
+ ## Upgrade from v1, v2, or v3
89
+
90
+ Install the setup-guide skill and ask your agent to run its upgrade route:
91
+
92
+ ```sh
93
+ npx skills add https://github.com/paleo/alignfirst --skill alignfirst-setup-guide
94
+ ```
95
+
96
+ ```text
97
+ Use your alignfirst-setup-guide skill. Upgrade AlignFirst in this project.
98
+ ```
99
+
100
+ _Note: the setup-guide skill can be removed safely after it's done._
101
+
102
+ ## License
30
103
 
31
- `@paleo/alcode` is the companion CLI for the AlignFirst Developer.
104
+ CC0 1.0 Universal.
@@ -102,9 +102,15 @@ function renderGuide(ctx, options) {
102
102
  return applyPlaceholders(readProtocolTemplate(options.protocol), placeholders);
103
103
  const core = renderCoreGuide(ctx, placeholders);
104
104
  if (options.protocol === undefined)
105
- return core;
105
+ return `${readGuideTemplate("selection.md")}\n\n${core}`;
106
106
  const protocol = applyPlaceholders(readProtocolTemplate(options.protocol), placeholders);
107
- return `${core.trimEnd()}\n\n${protocol.trimEnd()}`;
107
+ const [title, ...sections] = protocol.split("\n\n");
108
+ return [
109
+ title,
110
+ "This guide includes the selected protocol and shared conventions. Read both before starting.",
111
+ ...sections,
112
+ core,
113
+ ].join("\n\n");
108
114
  }
109
115
  function renderReviewerGuide(perspective, modules) {
110
116
  const templates = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alignfirst",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.3",
4
4
  "license": "CC0-1.0",
5
5
  "author": "Thomas MUR",
6
6
  "description": "The AlignFirst CLI: protocols, plans and docs in one command.",
@@ -34,7 +34,7 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@paleo/docmap": "~0.9.1",
37
+ "@paleo/docmap": "~0.10.0-beta.0",
38
38
  "arktype": "^2.2.3",
39
39
  "semver": "^7.8.5"
40
40
  },
@@ -1,54 +1,23 @@
1
- # AlignFirst Guide
1
+ # Shared Conventions
2
2
 
3
- An agent that does not know which protocol to use runs `{{CMD}} guide overview`.
3
+ ## Task directory
4
4
 
5
- ## Protocols
6
-
7
- - **Technical Specification** (_spec_, or _alspec_): `{{CMD}} guide spec --protocol-only`
8
- - **Implementation Plans** (_plan_, or _alplan_): `{{CMD}} guide plan --protocol-only`
9
- - **Align-and-Do Protocol** (_AAD_): `{{CMD}} guide aad --protocol-only`
10
- - **Catch Up** (_catchup_, or _alcatchup_): `{{CMD}} guide catchup --protocol-only`
11
- - **Merge** (_merge_, or _almerge_): `{{CMD}} guide merge --protocol-only`
12
- - **Code Review** (_alreview_): `{{CMD}} guide review --protocol-only`
13
- - **Description** (_aldescription_): `{{CMD}} guide description --protocol-only`
14
-
15
- ## TASK_DIR Location
16
-
17
- TASK_DIR holds the work files of a ticket. `{{TICKET_CMD}}` prints it and lists its entries; it creates a missing directory and restores an archived one.
5
+ TASK_DIR holds a ticket's work files. TICKET_ID identifies the task, usually by its issue or ticket number.
18
6
 
19
7
  {{TICKET_CONTEXT}}
20
8
 
21
- {{PLANS_STATE}}
9
+ `{{TICKET_CMD}}` prints TASK_DIR and its entries, creates a missing directory, and restores an archived one. Adding `--next <filename>` also prints the next file path.
22
10
 
23
- **Work without a ticket:** when the user says there is no ticket, run `{{CMD}} ticket --side`. Reuse an existing `side-N` directory when the user refers to that earlier work. Omit the ticket ID from commit messages.
24
-
25
- ## File Naming Convention
26
-
27
- Format: `{CYCLE_LETTER}{FILE_NUMBER}-{FILE_TYPE}.md`
11
+ {{PLANS_STATE}}
28
12
 
29
- **Common file types:**
13
+ When the user says there is no ticket, run `{{CMD}} ticket --side`. Reuse an existing `side-N` directory when the user refers to earlier work. Omit the ticket ID from commit messages.
30
14
 
31
- - `spec` - technical specification
32
- - `plan` - implementation plan
33
- - `AAD.summary` - AAD summary document
34
- - `description` - PR/MR description
35
- - `review` - code review report
36
- - `merge.summary` - merge conflicts resolution summary
15
+ ## Work files
37
16
 
38
- **Example structure:**
17
+ Files use `{CYCLE_LETTER}{FILE_NUMBER}-{FILE_TYPE}.md`, such as `A1-spec.md` or `A2-AAD.summary.md`.
39
18
 
40
- ```text
41
- A1-spec.md
42
- A2-plan.md
43
- A3-AAD.summary.md
44
- B1-spec.md
45
- ```
19
+ Use `{{TICKET_CMD}} --next <filename>` to get the next path in the current cycle, including the extension. For example, `--next spec.md` may return a path ending in `A2-spec.md`. Add `--new-cycle` when the protocol or user calls for a new cycle.
46
20
 
47
- ## Notes
21
+ Common file types are `spec`, `plan`, `AAD.summary`, `description`, `review`, and `merge.summary`. Use another type when needed.
48
22
 
49
- - **TICKET_ID** is a unique identifier for the task, often an issue or ticket number.
50
- - `{{TICKET_CMD}} --next <filename>` prints the path of the next file in the current cycle, the extension included (`--next spec.md` giving `A2-spec.md`).
51
- - `--new-cycle` starts a new cycle.
52
- - The protocol or the user decides whether to continue the current cycle or start a new one.
53
- - Cycle letters and file numbers are internal. Never discuss them with the user.
54
- - New file types are welcome.
23
+ Cycle letters and file numbers are internal. Never discuss them with the user.
@@ -0,0 +1,19 @@
1
+ # AlignFirst Guide
2
+
3
+ Follow the requested protocol if its guide is already in context. Otherwise, load it with the command below. Each named guide includes its protocol and shared conventions; add `--protocol-only` when those conventions are already in context.
4
+
5
+ ## Choose a protocol
6
+
7
+ Use spec → plan → execution for most tasks, especially when the design is uncertain. Use AAD for small changes or follow-up work. Execute a written plan in a fresh agent session.
8
+
9
+ | Protocol | Purpose | Command |
10
+ | --- | --- | --- |
11
+ | Specification (`spec`, `alspec`) | Investigate, discuss, and write a technical specification. | `{{CMD}} guide spec` |
12
+ | Planning (`plan`, `alplan`) | Turn a specification into implementation plans. | `{{CMD}} guide plan` |
13
+ | Align-and-Do (`AAD`, `al`) | Investigate, agree, implement, and summarize a small change. | `{{CMD}} guide aad` |
14
+ | Catch up (`catchup`, `alcatchup`) | Load the task history, then continue or summarize. | `{{CMD}} guide catchup` |
15
+ | Merge (`merge`, `almerge`) | Merge an incoming branch and resolve conflicts. | `{{CMD}} guide merge` |
16
+ | Review (`review`, `alreview`) | Review committed branch changes against a base branch. | `{{CMD}} guide review` |
17
+ | Description (`aldescription`) | Write a concise description of implemented work. | `{{CMD}} guide description` |
18
+
19
+ For more detail on workflows and the ticket lifecycle, read `{{CMD}} guide overview`.