@mmerterden/multi-agent-pipeline 16.4.0 → 16.6.0

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.
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # website-deploy-commit.sh - commit and push the website sync under the identity
4
+ # the deploy platform will actually build, then prove the build happened.
5
+ #
6
+ # Why this is a script and not three lines in the sync doc: the deploy platform
7
+ # refuses to build a commit whose author is not a contributor on the project. The
8
+ # push still succeeds, the deployment is created and sits at UNKNOWN with a 0ms
9
+ # build (API `readyState: BLOCKED`), and the live site keeps serving the previous
10
+ # version. v16.4.0 and v16.5.0 were both pushed that way and neither was built,
11
+ # while the sync reported the website as synced both times.
12
+ #
13
+ # Usage:
14
+ # website-deploy-commit.sh <identity-name> <identity-email> <version> [repo-dir]
15
+ #
16
+ # Env:
17
+ # WEBSITE_SYNC_NO_PUSH=1 commit and verify locally, never push (smoke/dry-run)
18
+ # WEBSITE_SYNC_NO_VERIFY=1 skip the deployment check (offline, or no CLI)
19
+ # WEBSITE_SYNC_WAIT=<sec> how long to wait for a Ready build (default 45)
20
+ #
21
+ # Exit: 0 committed+pushed (or nothing to do), 1 wrong author (nothing pushed),
22
+ # 2 usage or environment, 3 pushed but no Ready production build.
23
+
24
+ set -uo pipefail
25
+
26
+ NAME="${1:-}"
27
+ EMAIL="${2:-}"
28
+ VERSION="${3:-}"
29
+ DIR="${4:-$PWD}"
30
+
31
+ if [ -z "$NAME" ] || [ -z "$EMAIL" ] || [ -z "$VERSION" ]; then
32
+ echo "usage: website-deploy-commit.sh <identity-name> <identity-email> <version> [repo-dir]" >&2
33
+ exit 2
34
+ fi
35
+
36
+ # An empty fourth argument is a caller bug, not a request for the current
37
+ # directory: falling back to $PWD there commits whatever repo the caller happens
38
+ # to be standing in.
39
+ [ -n "$DIR" ] || { echo "FAIL: empty repo directory argument" >&2; exit 2; }
40
+ cd "$DIR" 2>/dev/null || { echo "FAIL: cannot enter $DIR" >&2; exit 2; }
41
+ git rev-parse --git-dir >/dev/null 2>&1 || { echo "FAIL: $DIR is not a git repository" >&2; exit 2; }
42
+
43
+ # Read before writing. The website clone's own config is usually already correct,
44
+ # and overwriting it with whatever identity the caller passed is the failure mode
45
+ # this guard exists to prevent, not a convenience.
46
+ [ "$(git config user.email || true)" = "$EMAIL" ] || git config user.email "$EMAIL"
47
+ [ "$(git config user.name || true)" = "$NAME" ] || git config user.name "$NAME"
48
+
49
+ git add -A
50
+ if git diff --cached --quiet; then
51
+ echo "website: already in sync, nothing to commit"
52
+ exit 0
53
+ fi
54
+
55
+ git commit -q -m "chore: sync pipeline v${VERSION}" || { echo "FAIL: commit failed" >&2; exit 2; }
56
+
57
+ # git config loses to an exported GIT_AUTHOR_EMAIL, so the recorded author is read
58
+ # back off the commit itself. Anything else is a hope, not a check.
59
+ ACTUAL="$(git log -1 --format=%ae)"
60
+ if [ "$ACTUAL" != "$EMAIL" ]; then
61
+ echo "HALT: website commit authored by $ACTUAL, expected $EMAIL." >&2
62
+ echo "Nothing was pushed. Re-author it (git commit --amend --reset-author) and run this again;" >&2
63
+ echo "a commit the deploy platform does not recognise is accepted by the push and never built." >&2
64
+ exit 1
65
+ fi
66
+
67
+ if [ "${WEBSITE_SYNC_NO_PUSH:-0}" = "1" ]; then
68
+ echo "website: committed as $ACTUAL (push skipped)"
69
+ exit 0
70
+ fi
71
+
72
+ git push -q origin HEAD || { echo "FAIL: push rejected" >&2; exit 2; }
73
+ echo "website: pushed v${VERSION} as $ACTUAL"
74
+
75
+ # A push is not a deploy.
76
+ if [ "${WEBSITE_SYNC_NO_VERIFY:-0}" = "1" ] || ! command -v vercel >/dev/null 2>&1 \
77
+ || [ ! -f "$DIR/.vercel/project.json" ]; then
78
+ echo "website: deployment not verified (no CLI or verification skipped)"
79
+ exit 0
80
+ fi
81
+
82
+ WAIT="${WEBSITE_SYNC_WAIT:-45}"
83
+ ELAPSED=0
84
+ while [ "$ELAPSED" -lt "$WAIT" ]; do
85
+ ROW="$(vercel ls --yes 2>/dev/null | grep -m1 'Production' || true)"
86
+ case "$ROW" in
87
+ *Ready*) echo "website: production build Ready"; exit 0 ;;
88
+ *Error*) break ;;
89
+ esac
90
+ sleep 5
91
+ ELAPSED=$((ELAPSED + 5))
92
+ done
93
+
94
+ echo "website: no Ready production build after ${WAIT}s -> ${ROW:-no deployment listed}" >&2
95
+ echo "UNKNOWN with a 0ms build means the commit author was rejected: fix the author and push again," >&2
96
+ echo "or deploy from the CLI with: (cd \"$DIR\" && vercel --prod --yes)" >&2
97
+ exit 3
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: multi-agent-analysis
3
3
  language: en
4
- description: "Standalone feature-spec analysis (v3 template). Platform-agnostic concept layer with repo-driven convention extraction and per-platform Pass B render. 23 sections in Full mode; 8 of them in Lite mode (auto for small features). Collects Figma / Swagger / Confluence / Jira / Standards / Firebase / repo inputs, then stops. Does not chain into dev or create branches. Use when a feature needs a written specification before any code, from Figma, Swagger, Confluence, Jira or repo inputs."
4
+ description: "Standalone feature-spec analysis. Two profiles picked at intake: global (23-section development handoff, 8 of them in Lite mode) or corporate (IG/UC/FG requirements document with traceability matrices). Platform-agnostic concept layer with repo-driven convention extraction and per-platform Pass B render; stack selection is optional. Collects Figma / Swagger / Confluence / Jira / Standards / Firebase / repo inputs, then stops. Does not chain into dev or create branches. Use when a feature needs a written specification before any code."
5
5
  user-invocable: true
6
6
  argument-hint: "[\"<analysis-name>\"] [--lite | --full] [--no-cache] [--preview-conventions]"
7
7
  ---
@@ -20,6 +20,21 @@ Produces a stakeholder-ready, platform-agnostic feature-spec document set (one m
20
20
  - To refresh a stale Confluence spec page
21
21
  - For API-only work (no Figma) or frontend-only work (no API) - the omission rule keeps the output clean
22
22
 
23
+ ## Profile
24
+
25
+ Phase 0 Step 1b picks the analysis standard, and that selects the template. Both profiles read the same evidence; only the projection differs, which is what keeps them from drifting into two products.
26
+
27
+ | Profile | Template | Shape |
28
+ |---|---|---|
29
+ | `global` (default) | `analysis-template.md` | Development handoff. Business rules with Gherkin acceptance criteria, architecture, files, tests. Zero-evidence sections drop. |
30
+ | `corporate` | `analysis-template-corporate.md` | Requirements document. `IG -> UC -> FG` spine with three traceability matrices, current and target state with impact analysis, then technical and development analysis. The Part A backbone always renders, carrying `N/A` or `EKLENECEK`, and each `EKLENECEK` owes an open-question row. |
31
+
32
+ One run emits one profile. A missing input never blocks either: the gap is written as `EKLENECEK` and raised as an open question instead of halting the run.
33
+
34
+ **Stack is optional.** With no platform selected the run still completes: everything that does not need a target repository renders in full, only the development layer and the Pass B projection are skipped, and the output is a single file at `~/Desktop/multiAgentAnalysis/<feature-name>/<feature>.md` (never the current working directory, which for a repo-less run is arbitrary).
35
+
36
+ **References are built, not written.** `build-references.mjs` projects `state.analysisSpec.evidence.*` into Section 21, carrying a precision anchor per row (Figma node id, Confluence pageId plus version, repo commit sha) and an access cell, so a source that could not be fetched is listed as unreachable rather than dropped. A coverage gate blocks dispatch on a consumed-but-unlisted source and on an invented row.
37
+
23
38
  ## Template (v3)
24
39
 
25
40
  Full mode renders 23 sections (Glossary, Changelog, References). Lite mode renders 7 sections (Summary, Goals + Non-Goals, User Stories, API Contracts, Architecture, Files to Add, References) and auto-activates for small features via three scored signals; `--lite` / `--full` flags always win.
@@ -44,7 +59,8 @@ When the rendered Section 20 (Risks and Open Questions) has open rows, the repor
44
59
  ## Detailed implementation
45
60
 
46
61
  Full steps: `$HOME/.claude/commands/multi-agent/analysis/SKILL.md`.
47
- Template master copy: `$HOME/.claude/multi-agent-refs/analysis-template.md`.
62
+ Template master copies: `$HOME/.claude/multi-agent-refs/analysis-template.md` (global) and `$HOME/.claude/multi-agent-refs/analysis-template-corporate.md` (corporate).
63
+ References builder: `$HOME/.claude/scripts/build-references.mjs`.
48
64
  Schema: `$HOME/.claude/schemas/analysis-spec.schema.json`.
49
65
  Convention extractor: `$HOME/.claude/lib/extract-conventions.sh` (output contract: `$HOME/.claude/schemas/conventions-output.schema.json`).
50
66
 
@@ -175,7 +175,7 @@ npm publish --userconfig "$NPMRC"
175
175
 
176
176
  ## Website Sync (Step 4)
177
177
 
178
- Propagate the pipeline version, phase count, model count, and feature descriptions to the website.
178
+ Propagate version, phase and model counts and feature descriptions to the website.
179
179
 
180
180
  ```bash
181
181
  gh auth switch --user {owner}
@@ -190,9 +190,10 @@ cd "$WEBSITE_DIR" && git pull origin main
190
190
  | `src/data/projects.ts` | Version number, tagline, description, feature list |
191
191
 
192
192
  ```bash
193
- cd "$WEBSITE_DIR"
194
- git add -A && git commit -m "chore: sync pipeline v{VERSION}"
195
- git push origin main # Vercel auto-deploy
193
+ # A commit the platform does not recognise is pushed fine and never built, so the site
194
+ # keeps the old version. {identity} is the one routed to {owner}, not the run's own.
195
+ # Why, signature, recovery: `$HOME/.claude/multi-agent-refs/website-deploy.md`.
196
+ bash "$HOME/.claude/scripts/website-deploy-commit.sh" "{identity.name}" "{identity.email}" "{VERSION}" "$WEBSITE_DIR"
196
197
  ```
197
198
 
198
199
 
@@ -208,7 +209,7 @@ When invoked with the `release` argument:
208
209
  5. Commit + TAG git commit + git tag v{VERSION}
209
210
  6. PUSH git push --tags -> release.yml auto-publish
210
211
  7. DEV-TOOLKIT Ship the companion MCP server if it moved (Step 3d gates, then publish)
211
- 8. WEBSITE Version + features -> {website-host}
212
+ 8. WEBSITE Version + features -> {website-host} (maintainer identity, build verified Ready)
212
213
  9. COPILOT Copilot CLI instructions + skills sync
213
214
  9b. CODEX Codex CLI router skill + refs + agent TOML (node install.js --codex)
214
215
  10. Report Summary: version, touched repos, deploy status