@mindexed/cfact 1.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Josito
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,110 @@
1
+ # CFacT 🏭
2
+
3
+ An agentic software development framework that translates human ideas into highly structured, matrix-aligned codebases using a multi-agent SDLC pipeline.
4
+
5
+ CFacT automates software engineering by partitioning the codebase into strict layers, assigning specialized AI subagents (with scoped permissions and tools) to each layer, and checking compliance via automated quality gates.
6
+
7
+ ---
8
+
9
+ ## 📐 The 5-Layer Orthogonal Architecture Matrix
10
+
11
+ All code developed within this framework must strictly align with one of five architectural layers:
12
+
13
+ | Layer | Directory | Zone Focus | Key Constraints (Non-Negotiables) |
14
+ | :--- | :--- | :--- | :--- |
15
+ | **1: Presentation** | `app/`, `components/` | UI/UX, forms, API actions | Max 300 lines for components, Max 100 lines for actions/controllers. |
16
+ | **2: Application** | `src/application/` | Use cases, DTOs, orchestration | Pure orchestration. Zero direct DB or infrastructure imports. |
17
+ | **3: Domain** | `src/domain/` | Domain logic, DDD, entities | **Purity Blocker:** Absolutely zero I/O, DB, HTTP, logging, or external imports. |
18
+ | **4: Infrastructure** | `src/infrastructure/` | Repositories, SDK adapters, APIs | Implements Application ports. Zero hardcoded secrets (validated via Zod). |
19
+ | **5: Database** | `supabase/` | Schemas, migrations, RLS | 100% Row-Level Security (RLS) coverage on public tables. |
20
+
21
+ ---
22
+
23
+ ## 🤖 The Software Factory Departments
24
+
25
+ Development is orchestrated across five specialized agent roles, each with strict directory and tool boundaries:
26
+
27
+ * **Architect:** Owns Phase 1 (Planning & Tech Spec). Translates PRD requirements into Layer 2 Application Port interfaces.
28
+ * **Domain Engineer:** Owns Phase 2a (Domain Layer). Writes pure, side-effect-free business logic. *Explicitly blocked from database or network access.*
29
+ * **Integration Developer:** Owns Phase 2b (Infrastructure/Database). Builds repositories, adapters, and Supabase migrations.
30
+ * **Frontend Developer:** Owns Phase 3 (User Experience). Builds React Server Components (RSC) and coordinates client hooks.
31
+ * **Security/QA:** Owns Phase 4 (Verification & Release). Audits environment schemas, verifies RLS, and executes tests.
32
+
33
+ ---
34
+
35
+ ## 📂 Project Structure
36
+
37
+ This repo **is** the framework — the pieces a consuming project resolves through its git-ignored `.claude/engine/` symlink live at the root here, not nested inside `.claude/`. Consumers track nothing framework-shaped: the pointer-symlinks are generated locally by `maintainer-hooks/setup-local.sh` (ADR-0047). New device? `bash maintainer-hooks/bootstrap-system.sh` installs the system (framework + the agentic-os dashboard) as siblings under one workspace root. See [`FRAMEWORK.md`](FRAMEWORK.md) for the full contract.
38
+
39
+ ```bash
40
+ ├── FRAMEWORK.md # What this repo is, and how consuming projects install it
41
+ ├── CONTRIBUTING.md # Branch-per-change flow, the eleven self-consistency gates
42
+ ├── matrix.json # The 6-layer / 36-zone Orthogonal Architecture Matrix schema
43
+ ├── agents/ # The five phase-owning subagent definitions
44
+ ├── commands/ # Custom orchestrator prompts (/build-feature, /audit-matrix)
45
+ ├── rules/ # Path-scoped constraints for Layers 1-5
46
+ ├── hooks/ # Quality-gate scripts + PreToolUse/PostToolUse enforcement
47
+ ├── scripts/ # Full-codebase audits (validate-zone.js, sync-env.js)
48
+ ├── skills/ # Reusable agent tools (verify-domain, audit-rls AST parser)
49
+ ├── registry/ # Node declarations for everything that is NOT a markdown file here
50
+ ├── maintainer-hooks/ # This repo's own git hooks for syncing consumers
51
+ ├── consumers.json # Path-independent registry (name + repo) of projects that resolve this engine
52
+ ├── cfact-docs/ # This repo's own generated project docs (ACTIVE_PRD.md,
53
+ │ # TECH_SPEC.md, PROJECT_STATUS.json, sot-templates/) — same
54
+ │ # spot any consumer's own generated docs live, see FRAMEWORK.md
55
+ ├── .mcp.json # Model Context Protocol (MCP) server definitions
56
+ ├── .claude/
57
+ │ ├── CLAUDE.md # Router containing Global Hard Rules & path-scoped rule routes
58
+ │ ├── settings.json # Automated hooks (PreToolUse/PostSave) and verification scripts
59
+ │ ├── state/ # Symlink -> ../cfact-docs (compat path every
60
+ │ │ # command/hook still reads/writes)
61
+ │ ├── rules/, agents/, commands/ # Symlinks back to the root folders above, so Claude Code's
62
+ │ │ # `.claude/...`-only autodiscovery picks them up
63
+ │ └── skills/ # Per-skill symlinks back to the root skills/ folder
64
+ └── docs/
65
+ └── claude-factory/ # In-depth design and framework documentation
66
+ ```
67
+
68
+ ---
69
+
70
+ ## ⚡ Verification & Quality Gates
71
+
72
+ The workspace includes custom verification commands to enforce architectural integrity locally and during CI/CD:
73
+
74
+ * `/audit-matrix domain` — Checks that `src/domain/` has no external dependencies or I/O.
75
+ * `/audit-matrix components` — Identifies UI components exceeding the 300-line SRP limit.
76
+ * `/audit-matrix controllers` — Audits API routes/actions exceeding the 100-line controller limit.
77
+ * `/audit-matrix rls` — Scans the Supabase schema to ensure 100% RLS policy coverage.
78
+
79
+ ---
80
+
81
+ ## 🖥️ CFacT Agentic OS
82
+
83
+ The framework features an interactive **Agentic OS** UI control center that runs entirely on your Portable SSD and dynamically adapts to any open development workspace.
84
+
85
+ ### Key Visual Features:
86
+ * **30-Zone Grid Visualizer:** A 6x5 matrix displaying the real-time compliance status (file size, boundary violations) of each zone.
87
+ * **Multi-Project Selector:** Sidebar dropdown dynamically listing all `.claude` projects on the SSD for quick visual switching.
88
+ * **Phase & Gate Control Panel:** Visually monitor SDLC stages and toggle Phase/HITL locks.
89
+ * **Config Editor:** Interactive form to edit and sync `variables.local.json` environment settings.
90
+
91
+ ### How to Run:
92
+ Start the local Next.js Visual OS from the framework root:
93
+ ```bash
94
+ npm run start-os
95
+ ```
96
+ Open **`http://localhost:3099`** in your browser to access the control panel.
97
+
98
+ ---
99
+
100
+ ## 🤝 Contributing
101
+
102
+ CFacT is consumed from a local clone (a git-ignored `.claude/engine`
103
+ symlink), so a change here reaches every **symlinked** consumer the moment the
104
+ clone is pulled — a **vendored** consumer follows when a maintainer blesses the
105
+ team pin (`rules/engine-promotion.md`). Read [`CONTRIBUTING.md`](CONTRIBUTING.md)
106
+ before opening a PR — it covers the resolution modes, the `fw/<short-desc>`
107
+ branch-per-change flow, and the eleven self-consistency gates that keep
108
+ `matrix.json` and its prose docs from drifting.
109
+ Licensed under [MIT](LICENSE).
110
+