alignfirst 0.1.0-beta.2 → 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
@@ -44,11 +44,11 @@ The guide installs the selected components and configures the repository. Remove
44
44
  - `config` — Report the effective project configuration.
45
45
  - `doctor` — Diagnose an AlignFirst setup.
46
46
 
47
- 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
48
 
49
49
  ## Agent skills
50
50
 
51
- Eight optional Agent Skill stubs expose the CLI to GitHub Copilot, Cursor, Claude Code, and Codex. The skills contain no protocols; they invoke `npx alignfirst guide`.
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
52
 
53
53
  Install them globally:
54
54
 
@@ -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.2",
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.",
@@ -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`.