paqad-ai 0.0.1 → 0.0.5

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.
Files changed (29) hide show
  1. package/README.md +217 -11
  2. package/dist/cli/index.js +1944 -308
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/index.d.ts +197 -23
  5. package/dist/index.js +1967 -282
  6. package/dist/index.js.map +1 -1
  7. package/package.json +16 -14
  8. package/runtime/domains/_shared/agents/doc-maintainer.md +5 -0
  9. package/runtime/domains/_shared/rules/documentation.md +5 -0
  10. package/runtime/domains/_shared/skills/documentation-workflow/SKILL.md +28 -0
  11. package/runtime/hooks/block-destructive.sh +26 -2
  12. package/runtime/hooks/context-hit-tracker.sh +20 -5
  13. package/runtime/hooks/pre-commit-check.sh +19 -8
  14. package/runtime/hooks/pre-compact-preserve.sh +8 -2
  15. package/runtime/hooks/pre-migrate-check.sh +0 -0
  16. package/runtime/hooks/pre-write-check-spec.sh +0 -0
  17. package/runtime/hooks/skill-cache-check.mjs +12 -0
  18. package/runtime/hooks/skill-cache-check.sh +0 -0
  19. package/runtime/hooks/track-file-changes.sh +8 -2
  20. package/runtime/templates/agent-configs/junie.md.hbs +14 -0
  21. package/runtime/templates/module-scaffold/business.md.hbs +29 -0
  22. package/runtime/templates/module-scaffold/technical.md.hbs +37 -0
  23. package/runtime/templates/runner-scripts/analyze-context-hits.sh.hbs +20 -5
  24. package/runtime/templates/runner-scripts/build-handover-package.sh.hbs +3 -0
  25. package/runtime/templates/runner-scripts/check-stack-drift.sh.hbs +3 -0
  26. package/runtime/templates/runner-scripts/export-theme.sh.hbs +3 -0
  27. package/runtime/templates/runner-scripts/extract-ui-inventory.sh.hbs +3 -0
  28. package/runtime/templates/runner-scripts/refresh-design-docs.sh.hbs +3 -0
  29. package/runtime/templates/runner-scripts/verify.sh.hbs +39 -5
package/README.md CHANGED
@@ -1,27 +1,233 @@
1
1
  # paqad-ai
2
2
 
3
- Documentation-first AI agency framework for Laravel, Flutter, and short-video workflows.
3
+ `paqad-ai` is a documentation-first AI agency framework for Laravel and Flutter workflows. It scaffolds project rules, documentation, registries, health checks, and agent-facing entry files so teams can run a consistent workflow across Claude Code, Codex CLI, Gemini CLI, and Junie.
4
4
 
5
- ## Install
5
+ ## About paqad-ai
6
+
7
+ Modern AI-assisted delivery breaks down when every repository invents its own prompts, rules, and folder conventions. `paqad-ai` standardizes that layer by generating framework-owned project artifacts that keep implementation, documentation, and verification aligned.
8
+
9
+ The framework is designed to help teams:
10
+
11
+ - onboard projects into a repeatable AI workflow
12
+ - keep project rules and architecture guidance visible to coding agents
13
+ - generate structured documentation scaffolds instead of ad hoc notes
14
+ - wire in stack-aware MCP defaults for supported environments
15
+ - run health checks and refresh framework-managed artifacts safely
16
+
17
+ ## Supported Adapters
18
+
19
+ `paqad-ai` currently supports:
20
+
21
+ - Claude Code
22
+ - Codex CLI
23
+ - Gemini CLI
24
+ - Junie for JetBrains IDEs and Junie CLI
25
+
26
+ Junie support is intentionally limited to the documented repo-managed surface:
27
+
28
+ - `.junie/AGENTS.md`
29
+ - `.junie/mcp/mcp.json`
30
+
31
+ ## Installation
32
+
33
+ Install globally:
6
34
 
7
35
  ```bash
8
- npx paqad-ai install
9
- # or
10
36
  npm install -g paqad-ai
11
37
  ```
12
38
 
13
- ## Quickstart
39
+ Or run it directly with `npx`:
40
+
41
+ ```bash
42
+ npx paqad-ai install
43
+ ```
44
+
45
+ ## Quick Start
46
+
47
+ Bootstrap the framework into an existing project:
14
48
 
15
49
  ```bash
16
50
  paqad-ai onboard --project-root .
51
+ ```
52
+
53
+ Run framework health checks:
54
+
55
+ ```bash
17
56
  paqad-ai doctor --project-root .
57
+ ```
58
+
59
+ Refresh framework-managed artifacts:
60
+
61
+ ```bash
18
62
  paqad-ai update --project-root .
19
63
  ```
20
64
 
21
- ## Commands
65
+ ## What paqad-ai Generates
66
+
67
+ Depending on the detected stack and selected options, `paqad-ai` can generate:
68
+
69
+ - adapter entry files such as `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, and `.junie/AGENTS.md`
70
+ - project profile and onboarding metadata under `.agency/`
71
+ - project rules under `docs/rules/`
72
+ - module scaffolds and registries under `docs/`
73
+ - design-system and architecture guidance
74
+ - stack-aware MCP configuration for supported adapters
75
+ - runnable project health-check scripts
76
+
77
+ ## Documentation Workflow
78
+
79
+ `paqad-ai` no longer exposes a standalone `document` command.
80
+
81
+ Documentation creation is handled through the framework workflow after onboarding. The active agent can receive a request such as "create documentation" and the workflow will:
82
+
83
+ - start from the onboarded project state in `.agency/`
84
+ - re-check the real application from `composer.json`, `package.json`, and stack manifests
85
+ - update the effective stack context if the live application disagrees with stored onboarding metadata
86
+ - create canonical docs step by step
87
+ - keep `.agency/doc-progress.json` as the canonical progress ledger
88
+
89
+ ## Command Reference
90
+
91
+ ### `install`
92
+
93
+ Bootstraps the framework into a project and writes framework metadata.
94
+
95
+ ```bash
96
+ paqad-ai install --project-root .
97
+ ```
98
+
99
+ Options:
100
+
101
+ - `--project-root <path>`: target project directory. Defaults to the current working directory.
102
+
103
+ Behavior:
104
+
105
+ - creates the framework home directory if needed
106
+ - writes framework version metadata for the target project
107
+ - prints a JSON result with `framework_home`, `project_root`, and `version`
108
+
109
+ ### `onboard`
110
+
111
+ Runs full project onboarding and generates the framework-managed scaffold.
112
+
113
+ ```bash
114
+ paqad-ai onboard --project-root .
115
+ ```
116
+
117
+ Examples:
118
+
119
+ ```bash
120
+ paqad-ai onboard --project-root . --domain coding --stack laravel --capability boost
121
+ paqad-ai onboard --project-root . --domain coding --stack flutter
122
+ ```
123
+
124
+ Options:
125
+
126
+ - `--project-root <path>`: target project directory. Defaults to the current working directory.
127
+ - `--domain <domain>`: force the target domain. Current values are `coding` and `content`.
128
+ - `--stack <stack>`: force the target stack. Current values are `laravel`, `flutter`, and `short-video`.
129
+ - `--capability <capability...>`: add one or more capabilities such as `boost`.
130
+
131
+ Behavior:
132
+
133
+ - runs project detection
134
+ - resolves rules, agents, skills, MCP configs, templates, and scripts
135
+ - generates adapter entry files including Junie support
136
+ - writes `.agency/project-profile.yaml`, `.agency/onboarding-manifest.json`, and related framework artifacts
137
+
138
+ ### `doctor`
139
+
140
+ Runs framework health checks and prints a machine-readable report.
141
+
142
+ ```bash
143
+ paqad-ai doctor --project-root .
144
+ ```
145
+
146
+ Options:
147
+
148
+ - `--project-root <path>`: target project directory. Defaults to the current working directory.
149
+
150
+ Behavior:
151
+
152
+ - validates framework artifacts, profile schema, docs scaffold, indexes, scripts, hooks, adapter config, MCP config, and other generated assets
153
+ - prints a JSON health report
154
+ - exits with code `1` when overall status is `fail`, otherwise `0`
155
+
156
+ ### `refresh`
157
+
158
+ Refreshes derived framework artifacts without running full onboarding.
159
+
160
+ ```bash
161
+ paqad-ai refresh --project-root .
162
+ ```
163
+
164
+ Examples:
165
+
166
+ ```bash
167
+ paqad-ai refresh --project-root . --design-system
168
+ paqad-ai refresh --project-root . --stack
169
+ ```
170
+
171
+ Options:
172
+
173
+ - `--project-root <path>`: target project directory. Defaults to the current working directory.
174
+ - `--design-system`: refresh design-system markdown from design tokens.
175
+ - `--stack`: refresh the cached stack snapshot.
176
+
177
+ Behavior:
178
+
179
+ - refreshes design-system docs when enabled
180
+ - refreshes stack introspection snapshots when enabled
181
+ - when no specific refresh flags are passed, both refresh paths run
182
+
183
+ ### `update`
184
+
185
+ Regenerates framework-managed artifacts for an already onboarded project.
186
+
187
+ ```bash
188
+ paqad-ai update --project-root .
189
+ ```
190
+
191
+ Options:
192
+
193
+ - `--project-root <path>`: target project directory. Defaults to the current working directory.
194
+
195
+ Behavior:
196
+
197
+ - reads the existing project profile and onboarding manifest
198
+ - regenerates framework-owned artifacts in a temporary workspace
199
+ - updates auto-managed files in the target project
200
+ - prints a JSON report with regenerated files, skipped files, and new scripts
201
+
202
+ Use `update` when the package version changes or when framework-managed scaffolding needs to be refreshed without re-running project setup decisions.
203
+
204
+ ## Development
205
+
206
+ Install dependencies:
207
+
208
+ ```bash
209
+ pnpm install
210
+ ```
211
+
212
+ Run the full project checks:
213
+
214
+ ```bash
215
+ pnpm run ci
216
+ ```
217
+
218
+ Useful local commands:
219
+
220
+ ```bash
221
+ pnpm run test
222
+ pnpm run typecheck
223
+ pnpm run lint
224
+ pnpm run build
225
+ ```
226
+
227
+ ## Contributing
228
+
229
+ Contributions that improve framework reliability, adapter support, documentation quality, or stack coverage are welcome. Keep changes aligned with the framework’s documentation-first approach and ensure generated artifacts, validation logic, and tests remain consistent.
230
+
231
+ ## License
22
232
 
23
- - `install`: bootstrap stable framework metadata into a project
24
- - `onboard`: generate framework-owned project scaffolding
25
- - `doctor`: run health checks
26
- - `refresh`: refresh framework indexes and registries
27
- - `update`: regenerate framework-managed artifacts
233
+ `paqad-ai` is open-sourced software licensed under the [MIT license](LICENSE).