recall-os 0.1.0 → 0.2.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/README.md +52 -20
- package/dist/cli.js +1291 -547
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1291 -547
- package/dist/index.js.map +1 -1
- package/examples/generated-laravel-api/.recall/config.json +17 -0
- package/examples/generated-laravel-api/.recall/hooks/pre-commit +9 -0
- package/examples/generated-laravel-api/AGENTS.md +15 -0
- package/examples/generated-laravel-api/CLAUDE.md +9 -0
- package/examples/generated-laravel-api/README.md +11 -0
- package/examples/generated-laravel-api/docs/00-product/BRD.md +9 -0
- package/examples/generated-laravel-api/docs/00-product/PRD.md +13 -0
- package/examples/generated-laravel-api/docs/10-architecture/ARCHITECTURE.md +11 -0
- package/examples/generated-laravel-api/docs/10-architecture/FILE_WRITE_POLICY.md +8 -0
- package/examples/generated-laravel-api/docs/10-architecture/MEMORY_ENGINE.md +16 -0
- package/examples/generated-laravel-api/docs/20-security/SECURITY_MODEL.md +11 -0
- package/examples/generated-laravel-api/docs/20-security/THREAT_MODEL.md +7 -0
- package/examples/generated-laravel-api/docs/30-modules/README.md +17 -0
- package/examples/generated-laravel-api/docs/40-features/README.md +22 -0
- package/examples/generated-laravel-api/docs/50-quality/QUALITY_GATES.md +11 -0
- package/examples/generated-laravel-api/docs/50-quality/TESTING_STRATEGY.md +5 -0
- package/examples/generated-laravel-api/docs/60-engineering/AI_AGENT_RULES.md +6 -0
- package/examples/generated-laravel-api/docs/60-engineering/ENGINEERING_STANDARDS.md +11 -0
- package/examples/generated-laravel-api/docs/adrs/README.md +9 -0
- package/examples/generated-laravel-api/docs/adrs/proposed/ADR-PROPOSED-laravel-api-api-design-rest.md +31 -0
- package/examples/generated-laravel-api/docs/adrs/proposed/ADR-PROPOSED-laravel-api-application-structure.md +30 -0
- package/examples/generated-laravel-api/docs/adrs/proposed/ADR-PROPOSED-laravel-api-auth-sanctum.md +30 -0
- package/examples/generated-laravel-api/docs/adrs/proposed/ADR-PROPOSED-laravel-api-database-eloquent.md +31 -0
- package/examples/generated-laravel-api/docs/adrs/proposed/ADR-PROPOSED-laravel-api-framework.md +29 -0
- package/examples/generated-laravel-api/docs/adrs/proposed/ADR-PROPOSED-laravel-api-queues-horizon.md +29 -0
- package/examples/generated-laravel-api/docs/adrs/proposed/ADR-PROPOSED-laravel-api-testing-pest.md +30 -0
- package/examples/generated-laravel-api/docs/adrs/proposed/ADR-PROPOSED-laravel-api-validation-authorization.md +30 -0
- package/examples/generated-laravel-api/docs/ai/AI_AGENTS_SKILLS_MCP_STRATEGY.md +7 -0
- package/examples/generated-laravel-api/docs/ai/MCP_STRATEGY.md +6 -0
- package/examples/generated-laravel-api/docs/ai/RECALL_COMMANDS.md +133 -0
- package/examples/generated-laravel-api/docs/ai/presets/laravel-api-guidance.md +62 -0
- package/examples/generated-laravel-react/.recall/config.json +17 -0
- package/examples/generated-laravel-react/.recall/hooks/pre-commit +9 -0
- package/examples/generated-laravel-react/AGENTS.md +15 -0
- package/examples/generated-laravel-react/CLAUDE.md +9 -0
- package/examples/generated-laravel-react/README.md +11 -0
- package/examples/generated-laravel-react/docs/00-product/BRD.md +9 -0
- package/examples/generated-laravel-react/docs/00-product/PRD.md +13 -0
- package/examples/generated-laravel-react/docs/10-architecture/ARCHITECTURE.md +11 -0
- package/examples/generated-laravel-react/docs/10-architecture/FILE_WRITE_POLICY.md +8 -0
- package/examples/generated-laravel-react/docs/10-architecture/MEMORY_ENGINE.md +16 -0
- package/examples/generated-laravel-react/docs/20-security/SECURITY_MODEL.md +11 -0
- package/examples/generated-laravel-react/docs/20-security/THREAT_MODEL.md +7 -0
- package/examples/generated-laravel-react/docs/30-modules/README.md +17 -0
- package/examples/generated-laravel-react/docs/40-features/README.md +22 -0
- package/examples/generated-laravel-react/docs/50-quality/QUALITY_GATES.md +11 -0
- package/examples/generated-laravel-react/docs/50-quality/TESTING_STRATEGY.md +5 -0
- package/examples/generated-laravel-react/docs/60-engineering/AI_AGENT_RULES.md +6 -0
- package/examples/generated-laravel-react/docs/60-engineering/ENGINEERING_STANDARDS.md +11 -0
- package/examples/generated-laravel-react/docs/adrs/README.md +9 -0
- package/examples/generated-laravel-react/docs/adrs/proposed/ADR-PROPOSED-laravel-react-application-structure.md +30 -0
- package/examples/generated-laravel-react/docs/adrs/proposed/ADR-PROPOSED-laravel-react-auth-sanctum.md +31 -0
- package/examples/generated-laravel-react/docs/adrs/proposed/ADR-PROPOSED-laravel-react-database-eloquent.md +31 -0
- package/examples/generated-laravel-react/docs/adrs/proposed/ADR-PROPOSED-laravel-react-framework.md +29 -0
- package/examples/generated-laravel-react/docs/adrs/proposed/ADR-PROPOSED-laravel-react-frontend-inertia-react.md +31 -0
- package/examples/generated-laravel-react/docs/adrs/proposed/ADR-PROPOSED-laravel-react-queues-horizon.md +29 -0
- package/examples/generated-laravel-react/docs/adrs/proposed/ADR-PROPOSED-laravel-react-testing-pest.md +30 -0
- package/examples/generated-laravel-react/docs/adrs/proposed/ADR-PROPOSED-laravel-react-validation-authorization.md +30 -0
- package/examples/generated-laravel-react/docs/ai/AI_AGENTS_SKILLS_MCP_STRATEGY.md +7 -0
- package/examples/generated-laravel-react/docs/ai/MCP_STRATEGY.md +6 -0
- package/examples/generated-laravel-react/docs/ai/RECALL_COMMANDS.md +133 -0
- package/examples/generated-laravel-react/docs/ai/presets/laravel-react-guidance.md +64 -0
- package/examples/generated-laravel-vue/.recall/config.json +17 -0
- package/examples/generated-laravel-vue/.recall/hooks/pre-commit +9 -0
- package/examples/generated-laravel-vue/AGENTS.md +15 -0
- package/examples/generated-laravel-vue/CLAUDE.md +9 -0
- package/examples/generated-laravel-vue/README.md +11 -0
- package/examples/generated-laravel-vue/docs/00-product/BRD.md +9 -0
- package/examples/generated-laravel-vue/docs/00-product/PRD.md +13 -0
- package/examples/generated-laravel-vue/docs/10-architecture/ARCHITECTURE.md +11 -0
- package/examples/generated-laravel-vue/docs/10-architecture/FILE_WRITE_POLICY.md +8 -0
- package/examples/generated-laravel-vue/docs/10-architecture/MEMORY_ENGINE.md +16 -0
- package/examples/generated-laravel-vue/docs/20-security/SECURITY_MODEL.md +11 -0
- package/examples/generated-laravel-vue/docs/20-security/THREAT_MODEL.md +7 -0
- package/examples/generated-laravel-vue/docs/30-modules/README.md +17 -0
- package/examples/generated-laravel-vue/docs/40-features/README.md +22 -0
- package/examples/generated-laravel-vue/docs/50-quality/QUALITY_GATES.md +11 -0
- package/examples/generated-laravel-vue/docs/50-quality/TESTING_STRATEGY.md +5 -0
- package/examples/generated-laravel-vue/docs/60-engineering/AI_AGENT_RULES.md +6 -0
- package/examples/generated-laravel-vue/docs/60-engineering/ENGINEERING_STANDARDS.md +11 -0
- package/examples/generated-laravel-vue/docs/adrs/README.md +9 -0
- package/examples/generated-laravel-vue/docs/adrs/proposed/ADR-PROPOSED-laravel-vue-application-structure.md +30 -0
- package/examples/generated-laravel-vue/docs/adrs/proposed/ADR-PROPOSED-laravel-vue-auth-sanctum.md +31 -0
- package/examples/generated-laravel-vue/docs/adrs/proposed/ADR-PROPOSED-laravel-vue-database-eloquent.md +31 -0
- package/examples/generated-laravel-vue/docs/adrs/proposed/ADR-PROPOSED-laravel-vue-framework.md +29 -0
- package/examples/generated-laravel-vue/docs/adrs/proposed/ADR-PROPOSED-laravel-vue-frontend-inertia-vue.md +31 -0
- package/examples/generated-laravel-vue/docs/adrs/proposed/ADR-PROPOSED-laravel-vue-queues-horizon.md +29 -0
- package/examples/generated-laravel-vue/docs/adrs/proposed/ADR-PROPOSED-laravel-vue-testing-pest.md +30 -0
- package/examples/generated-laravel-vue/docs/adrs/proposed/ADR-PROPOSED-laravel-vue-validation-authorization.md +30 -0
- package/examples/generated-laravel-vue/docs/ai/AI_AGENTS_SKILLS_MCP_STRATEGY.md +7 -0
- package/examples/generated-laravel-vue/docs/ai/MCP_STRATEGY.md +6 -0
- package/examples/generated-laravel-vue/docs/ai/RECALL_COMMANDS.md +133 -0
- package/examples/generated-laravel-vue/docs/ai/presets/laravel-vue-guidance.md +64 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Proposed ADR: Validate with Form Requests and authorize with Policies
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
Proposed
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
Input validation and authorization must be consistent and centralized, not scattered across
|
|
10
|
+
controllers.
|
|
11
|
+
|
|
12
|
+
## Decision
|
|
13
|
+
|
|
14
|
+
Consider Form Requests for validation (and request-level authorization) plus Policies and Gates for
|
|
15
|
+
per-model and per-action permission checks, awaiting human acceptance.
|
|
16
|
+
|
|
17
|
+
## Alternatives Considered
|
|
18
|
+
|
|
19
|
+
- Inline validation and authorization in controllers.
|
|
20
|
+
- A third-party permissions package layered on top.
|
|
21
|
+
|
|
22
|
+
## Consequences
|
|
23
|
+
|
|
24
|
+
- Controllers stay thin; validation and authorization are testable in isolation.
|
|
25
|
+
- Every state-changing action must have an explicit authorization path.
|
|
26
|
+
|
|
27
|
+
## Related Documents
|
|
28
|
+
|
|
29
|
+
- `docs/ai/presets/laravel-vue-guidance.md` — the proposed Laravel stack guidance.
|
|
30
|
+
- `docs/10-architecture/ARCHITECTURE.md` — record the accepted architecture here once promoted.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Recall OS Commands
|
|
2
|
+
|
|
3
|
+
This document records the Recall OS commands available to humans and AI agents.
|
|
4
|
+
|
|
5
|
+
## Completion Gate
|
|
6
|
+
|
|
7
|
+
Before claiming implementation work is complete, run:
|
|
8
|
+
|
|
9
|
+
```txt
|
|
10
|
+
pnpm test:run
|
|
11
|
+
pnpm typecheck
|
|
12
|
+
recall doctor
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
If `recall doctor` reports errors, fix them or report why they cannot be fixed. If it reports
|
|
16
|
+
warnings, address them or record why they are acceptable.
|
|
17
|
+
|
|
18
|
+
Package binary behavior is covered by binary integration tests.
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
### `recall init`
|
|
23
|
+
|
|
24
|
+
Initialize neutral repository memory.
|
|
25
|
+
|
|
26
|
+
Options:
|
|
27
|
+
|
|
28
|
+
- `--preset <id>`: apply optional preset guidance and proposed decisions.
|
|
29
|
+
- `--dry-run`: show planned writes without writing files.
|
|
30
|
+
- `--force`: overwrite existing files explicitly.
|
|
31
|
+
- `--reinit`: required with `--force` to overwrite an existing Recall OS installation (a directory
|
|
32
|
+
that already has `.recall/config.json`). Without it, `--force` refuses, protecting existing
|
|
33
|
+
repository memory.
|
|
34
|
+
|
|
35
|
+
Init also generates a tracked pre-commit hook at `.recall/hooks/pre-commit` that runs
|
|
36
|
+
`recall doctor` plus any `preCommitGates` in `.recall/config.json`. Init proposes, but does not run,
|
|
37
|
+
the activation command `git config core.hooksPath .recall/hooks`.
|
|
38
|
+
|
|
39
|
+
### `recall adopt`
|
|
40
|
+
|
|
41
|
+
Inspect an existing repository through read-only manifest and marker files, then write a proposed
|
|
42
|
+
adoption report and proposed framework ADRs for human review. Adopt never executes repository code
|
|
43
|
+
and never produces accepted memory.
|
|
44
|
+
|
|
45
|
+
Options:
|
|
46
|
+
|
|
47
|
+
- `--dry-run`: show planned writes without writing files.
|
|
48
|
+
- `--force`: overwrite existing files explicitly.
|
|
49
|
+
|
|
50
|
+
### `recall skill create <name>`
|
|
51
|
+
|
|
52
|
+
Generate a portable AI agent skill as `SKILL.md` for both Claude Code (`.claude/skills/`) and the
|
|
53
|
+
portable Agent Skills target (`.agents/skills/`). Known names use the built-in catalog; unknown
|
|
54
|
+
names produce a valid skeleton. Generated skills contain no scripts.
|
|
55
|
+
|
|
56
|
+
Options:
|
|
57
|
+
|
|
58
|
+
- `--dry-run`: show planned writes without writing files.
|
|
59
|
+
- `--force`: overwrite existing files explicitly.
|
|
60
|
+
|
|
61
|
+
### `recall skill list`
|
|
62
|
+
|
|
63
|
+
List the built-in catalog skills.
|
|
64
|
+
|
|
65
|
+
### `recall mcp add <server>`
|
|
66
|
+
|
|
67
|
+
Generate offline, proposed memory for an MCP server (for example `figma`) as
|
|
68
|
+
`docs/ai/mcp/<server>.md` plus a proposed adoption ADR. Recall OS never connects to the MCP server
|
|
69
|
+
or makes network calls; the agent records durable MCP-derived context into the generated memory for
|
|
70
|
+
human review. It also installs a `capture-mcp-context` agent skill that prompts the agent to record
|
|
71
|
+
that context.
|
|
72
|
+
|
|
73
|
+
Options:
|
|
74
|
+
|
|
75
|
+
- `--dry-run`: show planned writes without writing files.
|
|
76
|
+
- `--force`: overwrite existing files explicitly.
|
|
77
|
+
|
|
78
|
+
### `recall preset list`
|
|
79
|
+
|
|
80
|
+
List built-in presets.
|
|
81
|
+
|
|
82
|
+
### `recall feature create <name>`
|
|
83
|
+
|
|
84
|
+
Create feature memory docs under the configured features directory.
|
|
85
|
+
|
|
86
|
+
Options:
|
|
87
|
+
|
|
88
|
+
- `--dry-run`: show planned writes without writing files.
|
|
89
|
+
- `--force`: overwrite existing files explicitly.
|
|
90
|
+
|
|
91
|
+
### `recall adr create <title>`
|
|
92
|
+
|
|
93
|
+
Create a proposed ADR under the configured ADR directory.
|
|
94
|
+
|
|
95
|
+
Options:
|
|
96
|
+
|
|
97
|
+
- `--dry-run`: show planned writes without writing files.
|
|
98
|
+
- `--force`: overwrite existing files explicitly.
|
|
99
|
+
|
|
100
|
+
### `recall adr accept <name>`
|
|
101
|
+
|
|
102
|
+
Promote a proposed ADR to accepted repository memory. A proposal under
|
|
103
|
+
`docs/adrs/proposed/ADR-PROPOSED-<slug>.md` becomes a numbered, accepted `ADR-####-<slug>.md` and
|
|
104
|
+
the proposal is removed; an existing numbered Proposed ADR is accepted in place.
|
|
105
|
+
|
|
106
|
+
Options:
|
|
107
|
+
|
|
108
|
+
- `--dry-run`: show planned writes without writing files.
|
|
109
|
+
- `--force`: overwrite existing files explicitly.
|
|
110
|
+
|
|
111
|
+
### `recall module create <name>`
|
|
112
|
+
|
|
113
|
+
Create module memory docs under the configured modules directory.
|
|
114
|
+
|
|
115
|
+
Options:
|
|
116
|
+
|
|
117
|
+
- `--dry-run`: show planned writes without writing files.
|
|
118
|
+
- `--force`: overwrite existing files explicitly.
|
|
119
|
+
|
|
120
|
+
### `recall doctor`
|
|
121
|
+
|
|
122
|
+
Check whether repository memory is structurally healthy enough for AI-assisted work, whether basic
|
|
123
|
+
engineering evidence is present, and whether memory references decisions that exist and are
|
|
124
|
+
accepted.
|
|
125
|
+
|
|
126
|
+
Doctor also runs deterministic drift checks: feature or module memory that references a missing ADR
|
|
127
|
+
is an error, and memory that references a not-yet-accepted ADR is a warning.
|
|
128
|
+
|
|
129
|
+
Exit codes:
|
|
130
|
+
|
|
131
|
+
- `0`: healthy
|
|
132
|
+
- `1`: warnings only
|
|
133
|
+
- `2`: errors
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Laravel Preset Guidance (Vue via Inertia)
|
|
2
|
+
|
|
3
|
+
This is proposed guidance, not accepted. Convert any architecture choice into a proposed ADR, then
|
|
4
|
+
an accepted ADR, before treating it as repository truth. Repository rules override model preference.
|
|
5
|
+
|
|
6
|
+
## The stack (proposed)
|
|
7
|
+
|
|
8
|
+
- Laravel 12 on PHP 8.3+, using the official conventions and directory layout.
|
|
9
|
+
- Frontend: Inertia 2 + Vue 3 (script setup) + TypeScript + Tailwind, built with Vite (the official
|
|
10
|
+
Vue starter kit).
|
|
11
|
+
- Database: PostgreSQL (MySQL is the alternative) through Eloquent and migrations.
|
|
12
|
+
- Auth: Laravel Sanctum for first-party SPA and mobile clients (Passport only if you need
|
|
13
|
+
third-party OAuth2).
|
|
14
|
+
- Background work: queues, with Redis and Laravel Horizon when throughput grows.
|
|
15
|
+
- Tests: Pest, with database factories and feature tests over real routes.
|
|
16
|
+
|
|
17
|
+
The app is a server-driven SPA: Laravel controllers return Inertia responses with typed props; there
|
|
18
|
+
is no separate REST client for first-party screens.
|
|
19
|
+
|
|
20
|
+
## Decision forks this stack forces
|
|
21
|
+
|
|
22
|
+
- Frontend delivery: Inertia (server-driven SPA) vs a decoupled API + separate SPA vs Blade +
|
|
23
|
+
Livewire.
|
|
24
|
+
- Auth: Sanctum (first-party SPA and mobile) vs Passport (third-party OAuth2) vs a managed identity
|
|
25
|
+
provider.
|
|
26
|
+
- Database: PostgreSQL vs MySQL, and where read scaling and queues live (Redis vs database driver).
|
|
27
|
+
- Authorization: Policies and Gates vs ad-hoc checks; validation via Form Requests vs inline.
|
|
28
|
+
- Business logic: thin controllers with Action/Service classes vs fat controllers and models.
|
|
29
|
+
- Testing: Pest vs PHPUnit.
|
|
30
|
+
|
|
31
|
+
## Recommended structure (proposed)
|
|
32
|
+
|
|
33
|
+
- Keep controllers thin: they validate, authorize, delegate, and return a response — nothing more.
|
|
34
|
+
- Put request validation **and** authorization in Form Requests (`authorize()` + `rules()`).
|
|
35
|
+
- Put per-model and per-action permission logic in Policies and Gates, not in controllers.
|
|
36
|
+
- Put business logic in single-purpose Action or Service classes, not in controllers or models.
|
|
37
|
+
- Shape every outbound payload with API Resources (or typed Inertia props), never raw models.
|
|
38
|
+
- Declare `$fillable` (or `$guarded`) explicitly on every Eloquent model to stop mass assignment.
|
|
39
|
+
|
|
40
|
+
## Data and performance (proposed)
|
|
41
|
+
|
|
42
|
+
- Eager-load relationships (`with(...)`) to avoid N+1 queries; enable `Model::preventLazyLoading()`
|
|
43
|
+
in local and CI.
|
|
44
|
+
- Wrap multi-write operations in database transactions.
|
|
45
|
+
- Paginate list endpoints; never return unbounded collections.
|
|
46
|
+
- Move email, exports, third-party calls, and other slow work into queued jobs.
|
|
47
|
+
- Cache expensive reads deliberately, with explicit invalidation.
|
|
48
|
+
|
|
49
|
+
## Testing (proposed)
|
|
50
|
+
|
|
51
|
+
- Write Pest feature tests that exercise real routes end to end, using `RefreshDatabase`.
|
|
52
|
+
- Build state with model factories, not hand-rolled fixtures.
|
|
53
|
+
- Test authorization explicitly: a forbidden action must assert a 403, not just a happy path.
|
|
54
|
+
- Cover validation failures, not only the success case.
|
|
55
|
+
|
|
56
|
+
## Security considerations (proposed)
|
|
57
|
+
|
|
58
|
+
- Validate every inbound request through Form Requests; persist only validated data.
|
|
59
|
+
- Authorize every state-changing action through a Policy or Gate.
|
|
60
|
+
- Keep secrets in `.env`; never commit `.env` or hardcode credentials.
|
|
61
|
+
- Apply rate limiting to auth and write endpoints.
|
|
62
|
+
- Keep mass assignment locked down and never trust client-supplied IDs without an ownership check.
|
|
63
|
+
- Inertia uses Laravel's session and CSRF protection; keep auth and authorization on the server,
|
|
64
|
+
never the client.
|