Discovery and architecture proposal. No production implementation has started.
Baseline inspected: PackmindHub/packmind@0da8745c7eb7ecb4e137131aa72756180eff2b30 on 2026-07-28.
Reimplement the public Packmind application incrementally with AdonisJS while preserving observable OSS behavior and keeping the existing frontend and CLI compatible during migration.
The target is one deployable modular monolith with independently testable business modules, explicit ports and adapters, domain-driven boundaries, strict RED-GREEN-REFACTOR, and the Adonis IoC container as the only composition root.
- No big-bang rewrite.
- No mechanical NestJS-to-Adonis controller translation.
- No direct port of every historical TypeORM migration to Lucid without a data strategy.
- No claim of Enterprise feature parity: several implementations are absent from the public repository.
- No new generic registry, service locator, or oversized shared package.
- No frontend redesign during backend parity work.
The inspected repository contains approximately:
- 4,012 tracked files.
- 23 Nx packages.
- 3,156 TypeScript files.
- 496 to 534 test files, depending on inclusion rules.
- 29 API controllers and roughly 145 HTTP handlers.
- 68 frontend route modules.
- About 40 application persistence schemas and 124 business migrations.
- 38 CLI command files and 16 root CLI commands.
- 9 GitHub Actions workflows.
- 34 public MDX documentation pages.
A realistic OSS-parity estimate is 56–89 person-weeks for a team already competent with TypeScript, Adonis, DDD and migration work. This excludes a frontend redesign and complete reconstruction of unavailable proprietary modules. A solo implementation should expect a multi-quarter programme, not a framework sprint.
- Web API under the current
/api/v0contract. - React frontend behavior and payload expectations.
- Distributed Packmind CLI compatibility.
- PostgreSQL data and tenant isolation.
- Redis-backed cache, jobs and SSE behavior where externally observable.
- GitHub and GitLab integrations.
- Coding-agent rendering for AGENTS.md, Claude, Cursor, Copilot, Codex, OpenCode, Continue, Junie, GitLab Duo and source formats.
- Docker, release, documentation and operational workflows.
Users, authentication, social login, invitations, password reset, API keys, CLI login codes, organizations and organization membership.
Spaces, visibility, membership, roles, pinned spaces, global space and access policies. Tenant and space isolation must be enforced below HTTP controllers and covered by negative database tests.
The core artifact library: Standards, Commands and Skills, their immutable versions, rules, examples, files, slugs, moves and soft deletion. These remain separate aggregates inside one coherent context unless implementation evidence requires independent modules.
Change proposals, review, accept/reject, conflicts, outdated versions, audit and application of approved changes.
Packages, artifact membership, targets, deployment requests, distributed versions, history, drift, dashboards and progress.
Pure, deterministic conversion of canonical artifacts to agent-specific file sets, including merge markers, scopes, default skills, previews and lockfiles.
GitHub PAT/App, GitLab, repositories, branches, remote files, commits, installation tokens and credential vaulting.
Linter execution, AST parsing, detection programmes, LLM configuration and provider adapters.
Marketplace repositories, plugin rendering, rolling synchronization PRs, adoption and installation tracking. Public parity is blocked by proprietary implementation gaps.
Transactions, outbox/inbox, jobs, cache, SSE, clock, identifiers, encryption, logging, metrics and feature flags. This module contains no business vocabulary.
- Sign-up or invitation → organization/global space → CLI authentication.
- Create/version Standards, Commands or Skills → attach them to Packages.
- Install locally → render agent files → write lockfile → track distribution.
- Connect GitHub/GitLab → select target → render → commit → record distribution → notify through SSE.
- Stage local playbook changes → submit proposal → review → apply versioned changes.
- Define examples and detection hints → generate/test/activate deterministic linter programmes → execute through CLI.
- Configure an LLM provider → resolve an organization-scoped adapter without returning secrets through the API.
| Workstream | Main deliverables | Estimate |
|---|---|---|
| Contract characterization | OpenAPI baseline, errors, cookies, SSE, CLI and job contracts, golden fixtures | 3–5 pw |
| Adonis foundation | App bootstrap, providers, module rules, error mapping, configuration, health and architecture tests | 3–5 pw |
| Identity, tenancy and spaces | Authentication bridge, organizations, membership, policies, invitations, API keys | 5–8 pw |
| Playbook | Standards, rules, Commands, Skills, versions, files, move/delete/import | 10–15 pw |
| Governance | Change proposals, conflicts, decisions, audit and application | 6–9 pw |
| Packages, distribution, rendering and Git | Planning, snapshots, workers, renderers, source-control adapters, drift | 10–16 pw |
| Quality and LLM | AST/linter execution, sandboxing, provider configuration and adapters | 6–10 pw |
| HTTP, CLI and jobs composition | Compatible endpoints, Ace operations, distributed CLI contract, queue adapters | 5–8 pw |
| Data migration and cutover | Lucid baseline, dump validation, reconciliation, routing and rollback | 6–10 pw |
| Security and operations | Tenant tests, encryption, rate limits, metrics, traces, readiness and DLQ | 5–8 pw |
The rows overlap slightly in execution but represent 56–89 person-weeks in aggregate.
- Proprietary implementations are absent for analytics, jobs, parts of linter generation, plugins/marketplaces, advanced spaces and playbook change management.
- The public stubs are not evidence of complete OSS behavior.
- Recipes-to-Commands compatibility still appears in routes and migrations.
- No generated OpenAPI contract was found despite documentation references.
- The final schema is spread across approximately 124 TypeORM migrations.
- Distribution state semantics overlap across deployment, distribution, distributed package and target status.
- Durable atomicity between database updates and Git publication is not guaranteed by the current in-memory event flow.
- Secret encryption and rotation behavior requires explicit verification.
- SSE ordering, reconnection and delivery guarantees need a compatibility decision.
- Linter JavaScript sandbox limits, timeouts and memory constraints need a new threat model.
| Risk | Control |
|---|---|
| Hidden invariants in oversized use cases | Characterization tests before extraction |
| Cross-tenant data exposure | Mandatory tenant IDs in ports, policy checks, negative integration tests |
| API/CLI regression | Contract fixtures and differential tests against the legacy runtime |
| Lost or duplicated side effects | Transactional outbox/inbox, idempotency keys, retries and DLQ |
| Rendering regressions | Golden files and shadow rendering before publication |
| Data corruption during migration | Baseline from a fully migrated database and rehearsal on anonymized dumps |
| Endless dual runtime | Capability-by-capability ownership and explicit retirement gates |
| IoC replaced by another service locator | Adonis providers only; constructor injection everywhere else |
| DDD ceremony without isolation | Architecture tests and public contracts per module |
| Proprietary scope accidentally promised | Separate parity matrix: public evidence, hypothesis, excluded scope |
- User-visible Gherkin scenario written first.
- Unit or application test written and observed failing for the expected reason.
- Minimal implementation makes it pass.
- Adapter contract tests pass against memory and real infrastructure implementations.
- HTTP/job/CLI integration test passes.
- Architecture rules and full module suite pass.
- Tenant isolation, authorization, idempotence and failure behavior are covered where relevant.
- RED and GREEN commands are preserved in the pull request evidence.
- Documentation, migration and rollback notes are updated.
- No production code is merged without a prior failing test.
Start with contract characterization, not an Adonis scaffold. The first migrated vertical slice should be read/create/version of a Standard because it exercises domain modeling, authorization, persistence, transactions, error mapping and HTTP compatibility without starting with the highest-risk distribution workflow.