feat: greenfield wizard and archgate adr sync#302
Merged
Conversation
Deploying archgate-cli with
|
| Latest commit: |
a68ee7a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://843a717d.archgate-cli.pages.dev |
| Branch Preview URL: | https://feat-greenfield-wizard-and-s.archgate-cli.pages.dev |
Restore node = "24" in .prototools — the problem was never Node, it was proto 0.56.4. Pin proto to 0.56.3 in the Windows smoke test workflow to avoid the starbase_archive 0.13.0 regression that prevents Node 24 from extracting on Windows Server 2025 runners. Remove the proto pin once proto 0.57+ ships with the fix. See: moonrepo/proto#1006 Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Greenfield wizard (Phase D): - Add stack-detect helper to detect project languages, runtimes, and frameworks from project files (tsconfig.json, package.json, go.mod, etc.) - Add pack-recommend helper to match detected stack against registry pack tags and return sorted recommendations - Extend `archgate init` to show an interactive wizard when no ADRs exist, offering to import recommended starter packs - Add telemetry events for wizard shown, packs imported, and wizard skipped ADR sync command (Phase E): - Add `archgate adr sync` command to check imported ADRs for upstream updates, with --check (CI mode), --yes, and --json flags - Supports source filtering, per-ADR diff summaries, and interactive keep/take/skip prompts - Register sync command in the adr command group Tests: - Add stack-detect tests covering all language/runtime/framework detection heuristics - Add pack-recommend tests covering tag matching, relevance sorting, ADR counting, and edge cases - Add sync command tests covering registration, empty state, JSON output, missing project, and source filtering Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
- Flatten else-if chain in sync.ts to fix no-lonely-if - Add oxlint-disable-line for intentionally sequential awaits in sync.ts - Collapse JSDoc comments in telemetry.ts to stay within 500-line limit Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
774975a to
a4a8afe
Compare
trackPackImportedAtInit now only collects pack names for official registry sources (packs/...). Third-party sources are counted but their paths are never sent — avoids leaking private repo addresses. Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
- Regenerate docs/public/llms-full.txt for new adr sync command - Fix oxlint disable comments to use block-level directives (formatter moves inline comments to new lines) - Compact telemetry test helpers to stay within 500-line limit Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Import now reads each ADR's domain field and resolves it to the project's prefix for that domain (e.g. frontend → FE, backend → BE). Each domain gets its own ID counter, so importing packs with mixed domains produces correctly prefixed IDs without collisions. The --prefix flag still works as an explicit override that forces a single prefix for all imported ADRs (backwards compatible). Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Domain-aware remapping is now the only behavior — each ADR's domain field determines its prefix automatically. The --prefix override added unnecessary complexity with no real use case. Also updates EN and PT-BR docs to reflect the new remapping behavior. Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
archgate init: when no existing ADRs are detected, offers interactive pack picker powered by stack detection and registry recommendationsarchgate adr synccommand: checks for upstream updates to imported ADRs and offers interactive keep/take/skip per ADRadr sync) from the ADR registry planGreenfield wizard (
archgate init)src/helpers/stack-detect.ts— detects languages (TypeScript, JavaScript, Python, Go, Rust), runtimes (Node, Bun, Deno), and frameworks (Next.js, Remix, Vite, Fastify, Express, Hono, React) from project filessrc/helpers/pack-recommend.ts— matches detected stack against pack tags in the registry, returns sorted recommendations with relevance levels (high for language/runtime/framework, medium for concern tags)archgate adr import --yesgreenfield_wizard_shown,pack_imported_at_init,wizard_skippedarchgate adr sync [source...]imports.json, re-fetches upstream repos, compares content (stripping remapped IDs)--checkflag for CI (exit 1 if upstream has updates)--yesflag to auto-accept all upstream changes--jsonflag for machine outputarchgate adr sync packs/typescript-strictsyncs only matching importsTests
stack-detect,pack-recommend, andsync(14 + 9 + 5)archgate check: 26/26 rules pass, 0 violationsTest plan
archgate initin a fresh Next.js project — wizard should detect TypeScript + Node + Next.js and recommend matching packsarchgate initin an existing project with ADRs — wizard should NOT appeararchgate initwith--editor claudein non-TTY — wizard should NOT appeararchgate adr sync— should show the diff and offer keep/take/skiparchgate adr sync --checkin CI — should exit 1 if upstream has updates, 0 if up to datearchgate adr sync --json— should output structured JSONarchgate adr syncwith no imports — should print "No imported ADRs found."bun test— all tests passarchgate check— all rules pass