Hygiene: SCOPE stance sentence, stack/architecture stubs, first-session archive
Record the published fail-closed PEP stance in SCOPE, fill the agent stack and architecture stubs from the shipped layout, and retire the first-session protocol now that USER-WP-0001–0024 exist. Assistant: grok Assistant-Session: 01a04cea-f0d6-7ab3-9ffd-881eb6bea6cb
This commit is contained in:
parent
df976512df
commit
c431915d56
6 changed files with 52 additions and 16 deletions
|
|
@ -1,7 +1,30 @@
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
<!-- TODO: Describe the key design decisions and component structure.
|
Headless Engine (PIP) for users, accounts, and memberships. Same
|
||||||
Key modules, data flows, external integrations, state machines, etc. -->
|
authoritative inputs yield the same result. `access-engine` (`flex-auth`)
|
||||||
|
is the only decision point; this service supplies claims and enforces
|
||||||
|
results on its own mutations (PEP-shaped, same layer).
|
||||||
|
|
||||||
|
```text
|
||||||
|
verified IAM Profile claims
|
||||||
|
-> UserEngineService (domain facts, projections, outbox)
|
||||||
|
-> adapters: Postgres store, flex-auth /v1/check, tenant-engine,
|
||||||
|
provisioning, registration verification, event/mail delivery
|
||||||
|
```
|
||||||
|
|
||||||
|
- `domain/` — persistence-neutral schemas. No HTTP, DB, or SDK imports.
|
||||||
|
- `ports.py` — adapter protocols (store, identity claims, authorization,
|
||||||
|
provisioning, tenant management, secrets, outbox).
|
||||||
|
- `service.py` — headless API. Protected mutations go through `_authorize`
|
||||||
|
then `_record_mutation` in one store transaction.
|
||||||
|
- `adapters/` — Postgres, flex-auth (fail-closed), OIDC claims, HTTP
|
||||||
|
neighbors. `LocalAuthorizationCheckPort` is a standalone/test double.
|
||||||
|
- `runtime.py` / `web.py` — optional WSGI portal over the same APIs.
|
||||||
|
- `layer.yaml` + `pep-stance.yaml` — security-layer declaration and
|
||||||
|
unreachable-engine stance.
|
||||||
|
|
||||||
|
Boundary contract:
|
||||||
|
`~/net-kingdom/canon/standards/user-engine-boundary-contract_v0.1.md`.
|
||||||
|
|
||||||
## Quick Reference
|
## Quick Reference
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
## First Session Protocol
|
## First Session Protocol
|
||||||
|
|
||||||
|
**Retired 2026-08-29.** Work is structured (USER-WP-0001–0024). Kept as
|
||||||
|
history; do not run. Active session flow is `session-protocol.md`.
|
||||||
|
|
||||||
Triggered when `get_domain_summary("communication")` shows **no workplans**.
|
Triggered when `get_domain_summary("communication")` shows **no workplans**.
|
||||||
The project is registered but work has not yet been structured.
|
The project is registered but work has not yet been structured.
|
||||||
|
|
||||||
|
|
@ -52,7 +52,8 @@ For each file with `status: ready`, `active`, or `blocked`, note pending
|
||||||
4. **Suggested next action** — highest-priority open item
|
4. **Suggested next action** — highest-priority open item
|
||||||
5. **SBOM status** — flag if `last_sbom_at` is unset for this repo
|
5. **SBOM status** — flag if `last_sbom_at` is unset for this repo
|
||||||
|
|
||||||
If no workplans: follow First Session Protocol (`first-session.md`).
|
Work is already structured (USER-WP-0001–0024). The first-session
|
||||||
|
protocol is archived at `.claude/rules/archived/first-session.md`.
|
||||||
|
|
||||||
**During work:** `record_decision()` · `add_progress_event()` · `resolve_decision()`
|
**During work:** `record_decision()` · `add_progress_event()` · `resolve_decision()`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,28 @@
|
||||||
## Stack
|
## Stack
|
||||||
|
|
||||||
<!-- TODO: Fill in language, frameworks, and key dependencies -->
|
- **Language:** Python 3.12+ (`requires-python = ">=3.12"`)
|
||||||
- **Language:**
|
- **Layout:** `pyproject.toml` + `src/user_engine/` + stdlib `unittest`
|
||||||
- **Key deps:**
|
- **Runtime:** optional extras only — `psycopg[binary]` (Postgres store),
|
||||||
|
`PyJWT[crypto]` (OIDC). Core domain and in-memory adapters have no
|
||||||
|
third-party deps.
|
||||||
|
- **Entry point:** `user-engine-portal` → `user_engine.runtime:main`
|
||||||
|
|
||||||
## Dev Commands
|
## Dev Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# TODO: Fill in the standard commands for this repo
|
# Orient
|
||||||
|
cat .custodian-brief.md
|
||||||
|
cat INTENT.md
|
||||||
|
cat SCOPE.md
|
||||||
|
ls workplans/
|
||||||
|
|
||||||
# Install dependencies
|
# Tests and layer check
|
||||||
|
make test
|
||||||
|
make check-layer
|
||||||
|
|
||||||
# Run tests
|
# Optional extras
|
||||||
|
pip install -e ".[runtime]"
|
||||||
|
|
||||||
# Lint / type check
|
# After workplan or registry edits
|
||||||
|
statehub fix-consistency
|
||||||
# Build / package (if applicable)
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
@SCOPE.md
|
@SCOPE.md
|
||||||
@.claude/rules/repo-identity.md
|
@.claude/rules/repo-identity.md
|
||||||
@.claude/rules/session-protocol.md
|
@.claude/rules/session-protocol.md
|
||||||
@.claude/rules/first-session.md
|
|
||||||
@.claude/rules/workplan-convention.md
|
@.claude/rules/workplan-convention.md
|
||||||
@.claude/rules/stack-and-commands.md
|
@.claude/rules/stack-and-commands.md
|
||||||
@.claude/rules/architecture.md
|
@.claude/rules/architecture.md
|
||||||
|
|
|
||||||
7
SCOPE.md
7
SCOPE.md
|
|
@ -103,9 +103,10 @@ not become hidden sources of profile or identity-domain truth.
|
||||||
user-engine must not become a hidden source of authorization truth.
|
user-engine must not become a hidden source of authorization truth.
|
||||||
Memberships, hats, and access-control facts are claims. `access-engine`
|
Memberships, hats, and access-control facts are claims. `access-engine`
|
||||||
renders the decision. When `access-engine` is unreachable, shipped
|
renders the decision. When `access-engine` is unreachable, shipped
|
||||||
behaviour is fail-closed for protected mutations; that stance still has
|
behaviour is fail-closed for protected mutations. That stance is published
|
||||||
to be published, tested equal to the code, and recorded as stance
|
in `pep-stance.yaml`, tested equal to `FlexAuthHTTPAdapter`, and recorded
|
||||||
application rather than as a minted local decision id.
|
as stance application (`decision_id` absent) rather than as a minted
|
||||||
|
local decision id.
|
||||||
|
|
||||||
Governing published contracts:
|
Governing published contracts:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue