opencastle 1.6.3 → 1.7.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 +9 -9
- package/bin/cli.mjs +6 -4
- package/dist/cli/adapters/adapter-contract.test.js +1 -1
- package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
- package/dist/cli/adapters/single-file-base.js +2 -12
- package/dist/cli/adapters/single-file-base.js.map +1 -1
- package/dist/cli/bootstrap.d.ts.map +1 -1
- package/dist/cli/bootstrap.js +32 -10
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/bootstrap.test.js +10 -0
- package/dist/cli/bootstrap.test.js.map +1 -1
- package/dist/cli/command-namespace.test.js +4 -21
- package/dist/cli/command-namespace.test.js.map +1 -1
- package/dist/cli/convoy/engine.js +2 -2
- package/dist/cli/convoy/engine.js.map +1 -1
- package/dist/cli/convoy/read-model.d.ts +8 -15
- package/dist/cli/convoy/read-model.d.ts.map +1 -1
- package/dist/cli/convoy/read-model.js +9 -68
- package/dist/cli/convoy/read-model.js.map +1 -1
- package/dist/cli/convoy/read-model.test.js +6 -25
- package/dist/cli/convoy/read-model.test.js.map +1 -1
- package/dist/cli/convoy/spec-builder.d.ts +2 -2
- package/dist/cli/convoy/spec-builder.d.ts.map +1 -1
- package/dist/cli/convoy/spec-builder.js +1 -1
- package/dist/cli/dashboard.js +1 -1
- package/dist/cli/dashboard.test.js +10 -2
- package/dist/cli/dashboard.test.js.map +1 -1
- package/dist/cli/detect.d.ts.map +1 -1
- package/dist/cli/detect.js +32 -0
- package/dist/cli/detect.js.map +1 -1
- package/dist/cli/detect.test.js +23 -0
- package/dist/cli/detect.test.js.map +1 -1
- package/dist/cli/dispatcher.test.js +5 -2
- package/dist/cli/dispatcher.test.js.map +1 -1
- package/dist/cli/docs-accuracy.test.js +5 -1
- package/dist/cli/docs-accuracy.test.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +0 -25
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/init.js +3 -3
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/layers.d.ts.map +1 -1
- package/dist/cli/layers.js +3 -1
- package/dist/cli/layers.js.map +1 -1
- package/dist/cli/pipeline.d.ts +1 -1
- package/dist/cli/pipeline.flow.test.js +77 -77
- package/dist/cli/pipeline.flow.test.js.map +1 -1
- package/dist/cli/pipeline.js +24 -24
- package/dist/cli/pipeline.js.map +1 -1
- package/dist/cli/plan.d.ts +8 -2
- package/dist/cli/plan.d.ts.map +1 -1
- package/dist/cli/plan.js +18 -12
- package/dist/cli/plan.js.map +1 -1
- package/dist/cli/plan.test.js +17 -19
- package/dist/cli/plan.test.js.map +1 -1
- package/dist/cli/project-facts-lang.d.ts +36 -0
- package/dist/cli/project-facts-lang.d.ts.map +1 -0
- package/dist/cli/project-facts-lang.js +323 -0
- package/dist/cli/project-facts-lang.js.map +1 -0
- package/dist/cli/project-facts.d.ts +5 -0
- package/dist/cli/project-facts.d.ts.map +1 -1
- package/dist/cli/project-facts.js +28 -11
- package/dist/cli/project-facts.js.map +1 -1
- package/dist/cli/project-facts.test.js +70 -0
- package/dist/cli/project-facts.test.js.map +1 -1
- package/dist/cli/stack-config-update.test.js +21 -1
- package/dist/cli/stack-config-update.test.js.map +1 -1
- package/dist/cli/stack-config.d.ts +20 -0
- package/dist/cli/stack-config.d.ts.map +1 -1
- package/dist/cli/stack-config.js +36 -0
- package/dist/cli/stack-config.js.map +1 -1
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +4 -61
- package/dist/cli/update.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/adapters/adapter-contract.test.ts +1 -1
- package/src/cli/adapters/single-file-base.ts +2 -11
- package/src/cli/bootstrap.test.ts +11 -0
- package/src/cli/bootstrap.ts +32 -10
- package/src/cli/command-namespace.test.ts +5 -22
- package/src/cli/convoy/engine.ts +2 -2
- package/src/{orchestrator/prompts/assess-complexity.prompt.md → cli/convoy/prompts/convoy-assess.prompt.md} +0 -3
- package/src/{orchestrator/prompts/fix-convoy.prompt.md → cli/convoy/prompts/convoy-plan-fix.prompt.md} +0 -3
- package/src/{orchestrator/prompts/validate-convoy.prompt.md → cli/convoy/prompts/convoy-plan-review.prompt.md} +0 -3
- package/src/{orchestrator/prompts/generate-convoy.prompt.md → cli/convoy/prompts/convoy-plan.prompt.md} +0 -2
- package/src/{orchestrator/prompts/fix-prd.prompt.md → cli/convoy/prompts/convoy-prd-fix.prompt.md} +0 -3
- package/src/{orchestrator/prompts/validate-prd.prompt.md → cli/convoy/prompts/convoy-prd-review.prompt.md} +0 -3
- package/src/{orchestrator/prompts/generate-prd.prompt.md → cli/convoy/prompts/convoy-prd.prompt.md} +0 -3
- package/src/cli/convoy/read-model.test.ts +5 -29
- package/src/cli/convoy/read-model.ts +11 -71
- package/src/cli/convoy/spec-builder.ts +2 -2
- package/src/cli/dashboard/dashboard.js +2 -4
- package/src/cli/dashboard.test.ts +10 -2
- package/src/cli/dashboard.ts +1 -1
- package/src/cli/detect.test.ts +27 -0
- package/src/cli/detect.ts +29 -0
- package/src/cli/dispatcher.test.ts +6 -2
- package/src/cli/docs-accuracy.test.ts +5 -1
- package/src/cli/doctor.ts +0 -26
- package/src/cli/init.ts +3 -3
- package/src/cli/layers.ts +2 -1
- package/src/cli/pipeline.flow.test.ts +78 -78
- package/src/cli/pipeline.ts +25 -25
- package/src/cli/plan.test.ts +18 -20
- package/src/cli/plan.ts +18 -12
- package/src/cli/project-facts-lang.ts +338 -0
- package/src/cli/project-facts.test.ts +75 -0
- package/src/cli/project-facts.ts +31 -11
- package/src/cli/stack-config-update.test.ts +25 -1
- package/src/cli/stack-config.ts +36 -0
- package/src/cli/update.ts +4 -70
- package/src/orchestrator/agent-workflows/README.md +10 -18
- package/src/orchestrator/agent-workflows/data-pipeline.md +7 -140
- package/src/orchestrator/agent-workflows/database-migration.md +7 -153
- package/src/orchestrator/agent-workflows/performance-optimization.md +6 -119
- package/src/orchestrator/agent-workflows/refactoring.md +8 -137
- package/src/orchestrator/agent-workflows/schema-changes.md +8 -159
- package/src/orchestrator/agent-workflows/security-audit.md +7 -142
- package/src/orchestrator/agent-workflows/shared-delivery-phase.md +8 -25
- package/src/orchestrator/agents/architect.agent.md +2 -14
- package/src/orchestrator/agents/content-engineer.agent.md +8 -10
- package/src/orchestrator/agents/data-engineer.agent.md +8 -8
- package/src/orchestrator/agents/developer.agent.md +3 -10
- package/src/orchestrator/agents/devops-expert.agent.md +0 -3
- package/src/orchestrator/agents/performance-expert.agent.md +2 -3
- package/src/orchestrator/agents/security-expert.agent.md +10 -12
- package/src/orchestrator/agents/team-lead.agent.md +31 -75
- package/src/orchestrator/agents/testing-expert.agent.md +3 -6
- package/src/orchestrator/agents/ui-ux-expert.agent.md +1 -4
- package/src/orchestrator/agents/writer.agent.md +0 -3
- package/src/orchestrator/customizations/README.md +3 -4
- package/src/orchestrator/customizations/agents/agent-registry.md +3 -3
- package/src/orchestrator/customizations/agents/skill-matrix.json +6 -42
- package/src/orchestrator/instructions/general.instructions.md +10 -37
- package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +4 -6
- package/src/orchestrator/prompts/brainstorm.prompt.md +7 -12
- package/src/orchestrator/prompts/bug-fix.prompt.md +19 -100
- package/src/orchestrator/prompts/convoy.prompt.md +20 -0
- package/src/orchestrator/prompts/create-skill.prompt.md +1 -5
- package/src/orchestrator/prompts/implement-feature.prompt.md +22 -93
- package/src/orchestrator/prompts/resolve-pr-comments.prompt.md +1 -5
- package/src/orchestrator/skills/api-patterns/SKILL.md +21 -18
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +1 -1
- package/src/orchestrator/skills/fast-review/SKILL.md +28 -65
- package/src/orchestrator/skills/frontend-design/REFERENCE.md +0 -1
- package/src/orchestrator/skills/frontend-design/SKILL.md +3 -1
- package/src/orchestrator/skills/git-workflow/SKILL.md +18 -34
- package/src/orchestrator/skills/panel-majority-vote/SKILL.md +16 -46
- package/src/orchestrator/skills/security-hardening/SKILL.md +20 -19
- package/src/orchestrator/skills/self-improvement/LESSON-CATEGORIES.md +2 -2
- package/src/orchestrator/skills/self-improvement/SKILL.md +21 -46
- package/src/orchestrator/skills/technical-writing/SKILL.md +3 -1
- package/src/orchestrator/skills/technical-writing/TEMPLATES.md +23 -0
- package/src/orchestrator/skills/testing-workflow/SKILL.md +21 -23
- package/src/orchestrator/skills/validation-gates/REFERENCE.md +2 -14
- package/src/orchestrator/skills/validation-gates/SKILL.md +10 -88
- package/dist/cli/log.d.ts +0 -44
- package/dist/cli/log.d.ts.map +0 -1
- package/dist/cli/log.js +0 -336
- package/dist/cli/log.js.map +0 -1
- package/dist/cli/log.test.d.ts +0 -2
- package/dist/cli/log.test.d.ts.map +0 -1
- package/dist/cli/log.test.js +0 -208
- package/dist/cli/log.test.js.map +0 -1
- package/src/cli/log.test.ts +0 -228
- package/src/cli/log.ts +0 -374
- package/src/orchestrator/agent-workflows/bug-fix.md +0 -130
- package/src/orchestrator/agent-workflows/feature-implementation.md +0 -232
- package/src/orchestrator/instructions/ai-optimization.instructions.md +0 -17
- package/src/orchestrator/prompts/quick-refinement.prompt.md +0 -110
- package/src/orchestrator/skills/agent-hooks/HOOKS-REFERENCE.md +0 -44
- package/src/orchestrator/skills/agent-hooks/SKILL.md +0 -80
- package/src/orchestrator/skills/agent-memory/KNOWLEDGE-GRAPH.md +0 -49
- package/src/orchestrator/skills/agent-memory/SKILL.md +0 -50
- package/src/orchestrator/skills/code-commenting/SKILL.md +0 -18
- package/src/orchestrator/skills/context-map/REFERENCE.md +0 -67
- package/src/orchestrator/skills/context-map/SKILL.md +0 -71
- package/src/orchestrator/skills/decomposition/SKILL.md +0 -103
- package/src/orchestrator/skills/documentation-standards/SKILL.md +0 -33
- package/src/orchestrator/skills/fast-review/REFERENCE.md +0 -28
- package/src/orchestrator/skills/memory-merger/SKILL.md +0 -77
- package/src/orchestrator/skills/observability-logging/LOG-SCHEMA.md +0 -238
- package/src/orchestrator/skills/observability-logging/SKILL.md +0 -73
- package/src/orchestrator/skills/orchestration-protocols/REFERENCE.md +0 -38
- package/src/orchestrator/skills/orchestration-protocols/SKILL.md +0 -120
- package/src/orchestrator/skills/panel-majority-vote/REFERENCE.md +0 -49
- package/src/orchestrator/skills/panel-majority-vote/panel-report.template.md +0 -38
- package/src/orchestrator/skills/performance-optimization/SKILL.md +0 -23
- package/src/orchestrator/skills/project-consistency/SKILL.md +0 -80
- package/src/orchestrator/skills/project-consistency/TEMPLATES.md +0 -35
- package/src/orchestrator/skills/react-development/SKILL.md +0 -24
- package/src/orchestrator/skills/session-checkpoints/CHECKPOINT-TEMPLATE.md +0 -56
- package/src/orchestrator/skills/session-checkpoints/SKILL.md +0 -40
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +0 -126
|
@@ -1,55 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: panel-majority-vote
|
|
3
|
-
description: "Three isolated reviewers vote PASS or BLOCK; the majority decides. Use
|
|
3
|
+
description: "Three isolated reviewers vote PASS or BLOCK on a high-risk change; the majority decides, and every MUST-FIX any of them raises is fixed. Use for changes to auth, payments, data migrations or anything that deletes data, after a third fast-review FAIL, or when someone asks for an independent panel."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Panel Majority Vote
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
For changes where a missed defect is expensive: auth and permissions, payments, data migrations, anything that deletes data. Everything else gets one reviewer (**fast-review**).
|
|
9
9
|
|
|
10
|
-
**
|
|
10
|
+
1. **Ask one question** — "Is this change safe to merge?" — with what answers it: the diff, the acceptance criteria, the test results, the files involved.
|
|
11
|
+
2. **Three reviewers, in parallel, in isolation.** Three sub-agents dispatched as the **Reviewer** with the identical prompt; none sees another's answer or the conversation. Each answers in exactly these sections:
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
```text
|
|
14
|
+
VERDICT: PASS | BLOCK
|
|
15
|
+
MUST-FIX: <defects that block, each with file:line>
|
|
16
|
+
SHOULD-FIX: <improvements>
|
|
17
|
+
QUESTIONS: <what the reviewer could not decide>
|
|
18
|
+
```
|
|
17
19
|
|
|
20
|
+
Where it can, a reviewer exercises the change — runs the entrypoint, the migration, the request — rather than only reading the diff.
|
|
21
|
+
3. **Count.** PASS when two or three say PASS; otherwise BLOCK.
|
|
22
|
+
4. **Fix the union.** Every MUST-FIX any reviewer raised is fixed, or answered with evidence: one reviewer's catch counts, whatever the vote. Mark each with how many raised it (`2/3`).
|
|
23
|
+
5. **On BLOCK,** change the work and run the panel again with the same question — never reword it to get a PASS. Blocked a second time: stop, and tell the user what blocks it.
|
|
18
24
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
1. **Validate scope** — every artifact path under `<runRoot>`; list sufficient to answer question.
|
|
22
|
-
|
|
23
|
-
2. **Spawn 3 reviewers in parallel** — three sub-agent dispatches with identical prompts (same question, artifact list, constraints), each isolated. Required reviewer output sections (no others): `VERDICT: PASS | BLOCK`, `MUST-FIX:`, `SHOULD-FIX:`, `QUESTIONS:`, `TEST IDEAS:`, `CONFIDENCE: low | med | high`.
|
|
24
|
-
|
|
25
|
-
3. **Persist outputs** — write `<panelDir>/<panelKey>-reviewer-outputs.md` with a header (run root, panel key, question, artifacts) and each reviewer output verbatim, separated.
|
|
26
|
-
|
|
27
|
-
4. **Consolidate** — parse each reviewer output for its `VERDICT:` line and count PASS votes. Overall verdict = PASS if pass_count ≥ 2; otherwise BLOCK. Deduplicate `MUST-FIX:` and `SHOULD-FIX:` items and annotate each item with `(N/3 reviewers)`.
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
# count PASS/BLOCK from combined outputs
|
|
31
|
-
pass_count=$(grep -o "VERDICT: PASS" panel/run123-reviewer-outputs.md | wc -l)
|
|
32
|
-
block_count=$(grep -o "VERDICT: BLOCK" panel/run123-reviewer-outputs.md | wc -l)
|
|
33
|
-
verdict=$([ "$pass_count" -ge 2 ] && echo PASS || echo BLOCK)
|
|
34
|
-
|
|
35
|
-
# emit a minimal JSON summary using jq (install jq if needed)
|
|
36
|
-
jq -n --arg panel_key "run123-panel" --arg verdict "$verdict" --argjson pass_count $pass_count --argjson block_count $block_count '{panel_key:$panel_key, verdict:$verdict, pass_count:$pass_count, block_count:$block_count}' > panel/run123-summary.json
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
5. **Write report** — create `<panelDir>/<panelKey>.md` from [panel-report.template.md](./panel-report.template.md), referencing the generated summary. Minimal structure:
|
|
40
|
-
|
|
41
|
-
- Title: Panel `<panelKey>` — Verdict: `PASS | BLOCK` (pass_count/block_count)
|
|
42
|
-
- Highlights: top deduplicated `MUST-FIX` and `SHOULD-FIX` items
|
|
43
|
-
- Evidence: paths to reviewer outputs and `panel/run123-summary.json`
|
|
44
|
-
|
|
45
|
-
6. **Print summary** — overall verdict + vote tally + report path.
|
|
46
|
-
|
|
47
|
-
7. **Log (⛔ hard gate)** — call the **observability-logging** skill with `panel_key`, `verdict`, `pass_count`, `block_count`, `must_fix`, `should_fix`, `reviewer_model`, `weighted`, `attempt`, `tracker_issue`, `artifacts_count`, `report_path` for verification.
|
|
48
|
-
|
|
49
|
-
## Notes
|
|
50
|
-
|
|
51
|
-
- On BLOCK: change underlying work; re-run; do not re-word question.
|
|
52
|
-
- After 3 consecutive BLOCKs on the same panel key: create a dispute record per **team-lead-reference** § Dispute Protocol.
|
|
53
|
-
- Model selection: same model for all 3 reviewers. See **team-lead-reference** for model routing.
|
|
54
|
-
- Weighted consensus variant (domain-expertise weighting): see [REFERENCE.md](./REFERENCE.md).
|
|
55
|
-
|
|
25
|
+
Report the verdict, the tally, and each MUST-FIX with what was done about it.
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: security-hardening
|
|
3
|
-
description: "Security rules for authentication, authorization,
|
|
3
|
+
description: "Security rules for authentication, authorization, data access policies, input handling, headers and CSP, secrets and scheduled routes. Use when building an auth flow, adding an endpoint or handler, writing access policies, setting security headers, handling user input, or auditing security."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Security Hardening
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
These hold whatever the stack. The stack's own rules — its auth library, its database's access policies, its framework's middleware — are in the skills bound to the **database** and **framework** slots of `.opencastle/agents/skill-matrix.json`.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Authentication and sessions
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
12
|
+
- Sign-in, sign-up and sign-out go through server-side handlers with CSRF protection: POST only, Origin checked.
|
|
13
|
+
- Sessions live in HTTP-only, `Secure`, `SameSite` cookies, and are refreshed and checked on the server for every protected route — never only in the client.
|
|
14
|
+
- Roles and permissions are stored server-side, where the client cannot write them.
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Authorization and data access
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
- Check on the server, for every read and write, who is asking and whether they may touch *this* record. Hiding a button is not access control.
|
|
19
|
+
- Identity comes from the verified session, never from a request parameter.
|
|
20
|
+
- Where the data layer has policies (row-level security, rules), enable them on every table, deny by default and allow explicitly — and keep a test that proves another user reads nothing.
|
|
19
21
|
|
|
20
|
-
##
|
|
22
|
+
## Input and output
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
- Validate every handler's input with a schema before it reaches the database or another service. Client-side validation is feedback, not protection.
|
|
25
|
+
- Parameterized queries only. Sanitize user-supplied HTML (DOMPurify or the equivalent) before rendering it.
|
|
26
|
+
- Errors sent to the client carry no stack trace, query or internal id.
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
- `auth.uid()` for auth checks, EXISTS subqueries for role checks.
|
|
26
|
-
- Never disable RLS in production; never rely on client-side authorization alone.
|
|
27
|
-
- CI gate: assert `SELECT relrowsecurity FROM pg_class WHERE relname = 'your_table'` is true, plus a positive/negative row-visibility test (other role must read 0 rows). Block merges on failure.
|
|
28
|
+
## Headers and CSP
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
Least privilege: allow only the origins each directive needs, and nonces or hashes in production instead of `'unsafe-inline'` or `'unsafe-eval'`. Check what actually ships with `curl -I` against a preview URL: CSP, `Strict-Transport-Security`, `X-Content-Type-Options: nosniff`, `Referrer-Policy`.
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
## Secrets and scheduled routes
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
- Secrets live in environment variables — never in code, logs or the client bundle. A value the browser needs is public.
|
|
35
|
+
- A cron or webhook route checks a shared secret (`authorization: Bearer <secret>`, generated with `openssl rand -hex 32`) or the provider's signature, and answers 401 otherwise.
|
|
36
|
+
- Check a new dependency's audit (`npm audit`, or the project's equivalent) before adding it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lesson Categories & Severity
|
|
2
2
|
|
|
3
|
-
The values `opencastle lesson` accepts. Anything else is refused.
|
|
3
|
+
The values `npx opencastle lesson` accepts. Anything else is refused.
|
|
4
4
|
|
|
5
5
|
## Categories
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@ The values `opencastle lesson` accepts. Anything else is refused.
|
|
|
29
29
|
|
|
30
30
|
## What a lesson file looks like
|
|
31
31
|
|
|
32
|
-
`opencastle lesson` writes `.opencastle/lessons/<id>.md`:
|
|
32
|
+
`npx opencastle lesson` writes `.opencastle/lessons/<id>.md`:
|
|
33
33
|
|
|
34
34
|
```markdown
|
|
35
35
|
---
|
|
@@ -1,72 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: self-improvement
|
|
3
|
-
description: "Records, searches
|
|
3
|
+
description: "Records, searches, re-verifies and graduates lessons in .opencastle/lessons/ with npx opencastle lesson. Use when a retry succeeds or a task fails, before work past lessons may cover, when doctor reports a lesson's cited code changed, or when the lessons index grows long."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Self-Improvement
|
|
6
|
+
# Self-Improvement
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
When a retry with a different approach works, record what you learned before you move on. A lesson is a file in `.opencastle/lessons/`; `.opencastle/LESSONS-LEARNED.md` is the index every agent reads first, rewritten from those files by every sync — never edit it by hand.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Writing a Lesson
|
|
13
|
-
|
|
14
|
-
> **⛔ HARD GATE — Use the CLI. Never write in `LESSONS-LEARNED.md`: it is rewritten from `lessons/` by every sync.**
|
|
10
|
+
## Record a lesson
|
|
15
11
|
|
|
16
12
|
```sh
|
|
17
|
-
opencastle lesson --title "Short descriptive title" --category
|
|
13
|
+
npx opencastle lesson --title "Short descriptive title" --category terminal --severity high \
|
|
18
14
|
--problem "What was observed" --wrong "Failing approach" --correct "Working solution" \
|
|
19
15
|
--why "Root cause" --cite src/lib/payments.ts:42
|
|
20
16
|
```
|
|
21
17
|
|
|
22
|
-
Required: `--title`, `--category`, `--severity`, `--problem
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
After writing: if the lesson reveals a gap in a skill or instruction file, update that file too (prevents the pitfall at source).
|
|
29
|
-
|
|
30
|
-
## Workflow
|
|
18
|
+
- Required: `--title`, `--category`, `--severity`, `--problem`. Fill `--wrong` and `--correct` too: the contrast is what makes a lesson usable. The categories, and when each applies: [LESSON-CATEGORIES.md](LESSON-CATEGORIES.md).
|
|
19
|
+
- `--cite` the code the lesson is about. When that code changes, `doctor` says the lesson may no longer hold.
|
|
20
|
+
- Exact error messages and commands, in code blocks. Never a token, key or password: describe it instead ("the Stripe test key in `.env`").
|
|
21
|
+
- One lesson per command. It prints the new id, and refuses a lesson holding a credential or citing a file that does not exist.
|
|
22
|
+
- A lesson that shows a gap in a skill or an instruction file: fix that file too.
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
2. Attempt task with conservative flags/options informed by lessons.
|
|
34
|
-
3. On failure: retry with modified approach (up to threshold); capture error details, context.
|
|
35
|
-
4. On success: run `opencastle lesson` to record the working approach.
|
|
36
|
-
5. Verify: the command printed an id, and `.opencastle/lessons/<id>.md` holds the title, category and severity you gave. If malformed → fix the flags and run it again, then delete the bad file.
|
|
37
|
-
6. If the lesson indicates a needed skill/instruction update: draft the change; propose a PR.
|
|
38
|
-
|
|
39
|
-
Search the lessons themselves, not the index — the index has titles only:
|
|
24
|
+
Search the lessons themselves first — the index has titles only — so you do not record one twice:
|
|
40
25
|
|
|
41
26
|
```bash
|
|
42
27
|
rg -i "CRON_SECRET" .opencastle/lessons/ || true
|
|
43
28
|
```
|
|
44
29
|
|
|
45
|
-
## When code
|
|
30
|
+
## When cited code has changed
|
|
46
31
|
|
|
47
|
-
`doctor` names it: `<id> cites <file>, which has changed since it was verified`. Read the lesson against the code
|
|
32
|
+
`doctor` names it: `<id> cites <file>, which has changed since it was verified`. Read the lesson against the code:
|
|
48
33
|
|
|
49
34
|
| Still true? | Run |
|
|
50
35
|
|-------------|-----|
|
|
51
|
-
| Yes
|
|
52
|
-
| Yes, but the code moved | `opencastle lesson verify <id> --cite <new/path.ts>` |
|
|
53
|
-
| No longer
|
|
54
|
-
|
|
55
|
-
## Categories & Severity
|
|
56
|
-
|
|
57
|
-
Valid `--category` and `--severity` values: [LESSON-CATEGORIES.md](LESSON-CATEGORIES.md).
|
|
58
|
-
|
|
59
|
-
## Quality Rules
|
|
60
|
-
|
|
61
|
-
- Include exact error messages, commands, tool parameters
|
|
62
|
-
- Always fill both `--wrong` and `--correct` — the contrast is what makes the lesson usable
|
|
63
|
-
- One lesson per command; code blocks mandatory for commands
|
|
64
|
-
- Never paste a token, key or password — describe it ("the Stripe test key in `.env`")
|
|
36
|
+
| Yes | `npx opencastle lesson verify <id>` |
|
|
37
|
+
| Yes, but the code moved | `npx opencastle lesson verify <id> --cite <new/path.ts>` |
|
|
38
|
+
| No longer | `npx opencastle lesson archive <id> --into <file that now covers it>` |
|
|
65
39
|
|
|
66
|
-
##
|
|
40
|
+
## Graduate lessons
|
|
67
41
|
|
|
68
|
-
|
|
42
|
+
Every agent reads every active lesson before every task, so a lesson that has proven itself belongs in the skill or instruction file it is about, where only the agents that need it read it. `doctor` warns when the index passes about 2,000 tokens. Candidates: older than 60 days and still true, a problem two lessons describe, or `severity: high`.
|
|
69
43
|
|
|
70
|
-
|
|
44
|
+
1. Rewrite it as a rule or an example in that file, beside the rules it belongs with — a rule, not an incident report, and no new file.
|
|
45
|
+
2. `npx opencastle lesson archive <id> --into <that file>`. The lesson keeps its file and moves to the index's Archived section; never delete one.
|
|
71
46
|
|
|
72
|
-
|
|
47
|
+
Resolve two lessons that contradict each other before you merge either.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: technical-writing
|
|
3
|
-
description: "Standard for technical prose in four layers: Diataxis document modes, Google developer style, Simplified Technical English and Global English. Use when writing or reviewing docs, RFCs, README files, PR descriptions or commit messages."
|
|
3
|
+
description: "Standard for technical prose in four layers: Diataxis document modes, Google developer style, Simplified Technical English and Global English, with templates for ADRs, changelogs and known issues. Use when writing or reviewing docs, RFCs, README files, ADRs, changelog entries, PR descriptions or commit messages."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Technical Writing
|
|
@@ -9,6 +9,8 @@ The goal is writing a tired engineer understands on the first read. Four layers
|
|
|
9
9
|
|
|
10
10
|
Word-level cuts (filler, fancy synonyms, passive voice, hedging, AI vocabulary) are **unslop**'s job. One rule sits above the layers: **when a rule makes a sentence worse, fix it another way or leave it alone.** A sentence that follows every rule and sounds machine written has failed.
|
|
11
11
|
|
|
12
|
+
Templates for an ADR, a changelog entry, a known issue and a Mermaid diagram: [TEMPLATES.md](TEMPLATES.md).
|
|
13
|
+
|
|
12
14
|
The codebase is the word list. Write the real symbol, file, flag, or command name, never a synonym or a description of it. Do not invent jargon; use the words a developer says out loud.
|
|
13
15
|
|
|
14
16
|
## Layer 1: pick the mode (Diataxis)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Document Templates
|
|
2
|
+
|
|
3
|
+
Shapes for the documents a project keeps. Write the prose in each by the rest of **technical-writing**, then run **unslop**. The project's own documents are listed under Key Documentation in `.opencastle/project.instructions.md`.
|
|
4
|
+
|
|
5
|
+
**Known issue** (`.opencastle/KNOWN-ISSUES.md`) — `### ISSUE-ID: Brief Description`, then: Status (Known Limitation | Fixed | Workaround Available), Severity (Critical | High | Medium | Low), Impact, Problem, Root Cause, Solution Options (numbered, each with pros and cons), Related Files (path — what it does).
|
|
6
|
+
|
|
7
|
+
**ADR** — `## ADR-NNN: Decision Title`, then: Date, Status (Accepted | Superseded | Deprecated), Context, Decision, Consequences, Alternatives Considered.
|
|
8
|
+
|
|
9
|
+
**Changelog** — under a `## [1.2.0] - YYYY-MM-DD` heading, group changes as Added / Changed / Fixed / Removed, one imperative line per change with its PR or issue number, most recent version first. Breaking changes lead their group.
|
|
10
|
+
|
|
11
|
+
**Roadmap entry done** — mark it complete with the date and owner, the files it changed, and the command that verified it; then move it to the Completed section with a one-line release note.
|
|
12
|
+
|
|
13
|
+
## Mermaid diagrams
|
|
14
|
+
|
|
15
|
+
One concern per diagram, at most 10–12 nodes. `flowchart TD` for pipelines, `LR` for request flows, `sequenceDiagram` for API flows, `erDiagram` for data models. Verbs on the arrows; a `%% Title: ...` line on a complex diagram.
|
|
16
|
+
|
|
17
|
+
## Check before committing
|
|
18
|
+
|
|
19
|
+
Run the project's formatter on the docs (Key Commands), and check the links:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx markdown-link-check docs/**/*.md
|
|
23
|
+
```
|
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: testing-workflow
|
|
3
|
-
description: "
|
|
3
|
+
description: "How to test a change: test first, what to cover, what to mock, and the anti-patterns that let tests pass without proving anything. Use when writing or planning tests, mocking a dependency, fixing a flaky test, or checking coverage."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Testing Workflow
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The project's test runner, its config and its commands are in the Project Context (Key Commands) and the skill bound to the **testing** slot; browser and E2E tests, in the skill bound to **e2e-testing**, and **browser-testing**.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Test first
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
| Max 3 screenshots | per session |
|
|
16
|
-
| `evaluate_script()` over `take_snapshot()` | returns less data |
|
|
17
|
-
| Reload between flows | clears state |
|
|
18
|
-
| Report results | in the session output: suite, pass/fail counts, failures with their evidence |
|
|
12
|
+
1. Write the test for the behaviour you are about to add or fix, and watch it fail, for the reason you expect. A test that has never failed proves nothing.
|
|
13
|
+
2. Write the least code that makes it pass.
|
|
14
|
+
3. Clean up with the test green.
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
A bug fix starts with a test that reproduces the bug.
|
|
21
17
|
|
|
22
|
-
##
|
|
18
|
+
## What to cover
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
| E2E (journeys, interactions, errors) | all critical paths |
|
|
20
|
+
- **Behaviour, not implementation:** inputs and outputs, what the user sees, what is stored. A refactor that keeps the behaviour keeps the tests green.
|
|
21
|
+
- **Past the happy path:** empty results, the boundaries, invalid input, a failing network or dependency, the same action twice.
|
|
22
|
+
- **That interactions change something:** assert that a control changes the result — not only that it renders — and assert the values, not a screenshot.
|
|
23
|
+
- **Coverage** at the threshold in the project's test config; integration tests at each boundary (API, database, URL state); E2E tests on the critical journeys.
|
|
29
24
|
|
|
30
|
-
|
|
25
|
+
## Mocks
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
Mock what you do not own — external APIs, the clock, randomness — at the boundary. Never mock the module under test, and never assert on a mock's own behaviour: that tests the mock.
|
|
33
28
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
## Flaky tests
|
|
30
|
+
|
|
31
|
+
No `sleep`: wait for the condition (`waitFor`, an assertion that polls). Reset state between tests. A test that fails one run in ten is a bug — fix it or delete it; never retry it into green.
|
|
32
|
+
|
|
33
|
+
## E2E in an agent session
|
|
34
|
+
|
|
35
|
+
One suite per session, at most three screenshots, a reload between flows, and the results in your answer: the suite, the counts, and each failure with its evidence.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# New Dependencies: the Full Check
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
For a JavaScript project; other ecosystems have the same checks under their own tools.
|
|
4
4
|
|
|
5
5
|
| Check | Tool / Command | Pass Criteria | On Failure |
|
|
6
6
|
|-------|---------------|---------------|------------|
|
|
@@ -11,15 +11,3 @@
|
|
|
11
11
|
| Maintenance | Check npm page / GitHub | Last publish <18 months; >100 weekly downloads | Evaluate alternatives |
|
|
12
12
|
| Peer deps | `npm ls --depth=0` | No unmet peer dependencies | Fix before merge |
|
|
13
13
|
| Type coverage | `npx @arethetypeswrong/cli <pkg>` | No `false` CJS/ESM resolution | SHOULD-FIX for new deps |
|
|
14
|
-
|
|
15
|
-
## Gate 7: Viewport Presets
|
|
16
|
-
|
|
17
|
-
When the project names no breakpoints of its own (`.opencastle/stack/testing-config.md`):
|
|
18
|
-
|
|
19
|
-
| Preset | Width × Height |
|
|
20
|
-
|--------|---------------|
|
|
21
|
-
| `mobile` | 375 × 812 |
|
|
22
|
-
| `tablet` | 768 × 1024 |
|
|
23
|
-
| `desktop` | 1440 × 900 |
|
|
24
|
-
|
|
25
|
-
Resize with `resize_page`, check console errors with `list_console_messages`; the rest is in the **browser-testing** skill.
|
|
@@ -1,95 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: validation-gates
|
|
3
|
-
description: "
|
|
3
|
+
description: "The checks a change passes before it is done or merged: secrets, the project's tests, lint and build, size, new dependencies, the browser for UI, review, regression and a smoke test. Use when deciding which checks a change needs, or whether work is ready to merge or deploy."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Validation Gates
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Every command here is the project's own: Key Commands in `.opencastle/project.instructions.md`, or the task runner's skill (Nx, Turborepo). Never a guessed `npm run …`. Run them in this order; when one fails, fix it and start again.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
| 7 | Browser Testing | UI changes |
|
|
19
|
-
| 8 | Regression Testing | Every delegation |
|
|
20
|
-
| 9 | Panel Review | High-stakes changes only |
|
|
21
|
-
| 10 | Final Smoke Test | Feature completion (after all tasks Done) |
|
|
22
|
-
|
|
23
|
-
## Gate 1: Secret Scanning
|
|
24
|
-
|
|
25
|
-
**Secret scan (Constitution rule 1).** Block on any token, key, password, or
|
|
26
|
-
connection string in code, logs, commits, or terminal output.
|
|
27
|
-
|
|
28
|
-
Scan for: AWS keys (`AKIA...`), API tokens (`sk-...`, `ghp_...`), private keys,
|
|
29
|
-
database URIs, hardcoded `password`/`secret`/`api_key`/`token` assignments
|
|
30
|
-
(assignments, not references), `.env` contents pasted into source, and
|
|
31
|
-
base64-encoded secrets.
|
|
32
|
-
|
|
33
|
-
On a hit: block, name the file and line, and re-delegate with an instruction to use
|
|
34
|
-
an environment variable. Already committed? Rotate it - git history is permanent.
|
|
35
|
-
|
|
36
|
-
Not a hit: obviously fake test fixtures (`sk-test-1234567890`), documentation
|
|
37
|
-
placeholders (`YOUR_API_KEY_HERE`), and pattern matches inside explanatory
|
|
38
|
-
comments.
|
|
39
|
-
|
|
40
|
-
Scan every diff **before** any other gate: `gitleaks git --redact --log-opts="main..HEAD"` for the branch's commits, `gitleaks dir <path>` for uncommitted files (or the CI equivalent). Fail on any finding.
|
|
41
|
-
|
|
42
|
-
## Gate 2: Deterministic Checks
|
|
43
|
-
|
|
44
|
-
Run the project's own lint (with auto-fix), test and build commands for every affected project. All must pass with zero errors.
|
|
45
|
-
|
|
46
|
-
## Gate 3: Blast Radius Check
|
|
47
|
-
|
|
48
|
-
| Metric | Normal | Warning | Escalate |
|
|
49
|
-
|--------|--------|---------|----------|
|
|
50
|
-
| Lines changed | ≤200 | 201–500 | >500 |
|
|
51
|
-
| Files changed | ≤5 | 6–10 | >10 |
|
|
52
|
-
| Projects affected | ≤1 | 2 | >2 |
|
|
53
|
-
|
|
54
|
-
- **Normal** — proceed
|
|
55
|
-
- **Warning** — log; investigate partition drift
|
|
56
|
-
- **Escalate** — STOP; verify partition; split or revert; no auto-PASS
|
|
57
|
-
|
|
58
|
-
**Sensitive files** (always Warning): `**/auth/**`, DB migrations, `next.config.*`, `.env*`, `.github/workflows/**`, lockfiles — also triggers Gate 4.
|
|
59
|
-
|
|
60
|
-
## Gate 4: Dependency Audit
|
|
61
|
-
|
|
62
|
-
> Runs only when `package.json`, `yarn.lock`, `package-lock.json`, `pnpm-lock.yaml`, or similar lockfiles are modified.
|
|
63
|
-
|
|
64
|
-
- **Vulnerability:** `npm audit --audit-level=high` — no new high/critical, else BLOCK (patched version or alternative).
|
|
65
|
-
- **Bundle size:** frontend pkgs ≤50KB gzipped (project policy) — SHOULD-FIX; blocking if >200KB.
|
|
66
|
-
|
|
67
|
-
Full checklist (license, duplicates, maintenance, peer deps, type coverage) with commands: [REFERENCE.md](REFERENCE.md).
|
|
68
|
-
|
|
69
|
-
## Gate 5: Fast Review
|
|
70
|
-
|
|
71
|
-
Spawn a reviewer sub-agent (load **fast-review**). Auto-PASS rules, retries and escalation: the **fast-review** Handle Verdict table.
|
|
72
|
-
|
|
73
|
-
## Gate 6: Cache Clearing
|
|
74
|
-
|
|
75
|
-
Skip unless a stale cache is the suspect: the browser shows old output, or a build reports files that no longer exist. Then clear the framework cache (e.g. `.next/cache`, `node_modules/.cache`) and the project's own build output directory, named in its build config, and rebuild.
|
|
76
|
-
|
|
77
|
-
## Gate 7: Browser Testing
|
|
78
|
-
|
|
79
|
-
UI changes are verified in Chrome with the **browser-testing** skill (Chrome DevTools MCP: `navigate_page`, `take_snapshot`, `evaluate_script` with a `function`). Start the dev server → verify ACs → every project breakpoint → at most 3 screenshots, as evidence.
|
|
80
|
-
|
|
81
|
-
## Gate 8: Regression Testing
|
|
82
|
-
|
|
83
|
-
1. Full test suite for all affected projects.
|
|
84
|
-
2. Browser-test adjacent pages (navigation, routing, back-button) — find them via `rg "href=\"/changed-path|import .*from '@/components/changed'"`.
|
|
85
|
-
3. Find consuming apps/packages via `rg "from '@/components/PriceRange'|@my-org/ui-package"`; run their tests or smoke builds.
|
|
86
|
-
|
|
87
|
-
## Gate 9: Panel Review
|
|
88
|
-
|
|
89
|
-
Load **panel-majority-vote** — 3 isolated reviewers, majority (2/3) wins. Use for: the 3rd fast-review FAIL, security-sensitive changes, DB migrations.
|
|
90
|
-
|
|
91
|
-
## Gate 10: Final Smoke Test
|
|
92
|
-
|
|
93
|
-
> Runs once after ALL tasks are Done.
|
|
94
|
-
|
|
95
|
-
The project's full build and test commands, its E2E suite included, from a clean state → E2E browser walkthrough → cross-task integration check → responsive sweep (if UI). On failure: re-delegate specific failing integration only.
|
|
10
|
+
1. **Secrets.** No token, key, password or connection string in the diff, the logs or the output. With gitleaks installed: `gitleaks git --redact --log-opts="main..HEAD"` for the branch's commits, `gitleaks dir <path>` for files not yet committed. Without it, read the diff for keys (`AKIA…`, `sk-…`, `ghp_…`), private keys, connection strings and `password = "…"` assignments; fake fixtures and placeholders are not hits. A real secret that was committed must be rotated: git history keeps it.
|
|
11
|
+
2. **Tests, lint, build** for every project the change touches, with zero errors. Lint with auto-fix first.
|
|
12
|
+
3. **Size.** Over 500 changed lines, 10 files or 2 projects: stop and check the change has not drifted beyond its task, and split it if it can be split.
|
|
13
|
+
4. **New dependencies** — when a manifest or lockfile changed: the package manager's audit at high severity (`npm audit --audit-level=high`, `pnpm audit`, `pip-audit`) finds nothing new, and the package is maintained, its licence fits, and it does not duplicate one already used ([REFERENCE.md](REFERENCE.md) has the commands).
|
|
14
|
+
5. **Browser** — UI changes only: it works in a browser at every breakpoint the project uses, with no console errors (**browser-testing**). A stale page, or a build that lists deleted files: clear the framework's cache and rebuild first.
|
|
15
|
+
6. **Review** — **fast-review**; **panel-majority-vote** for auth, payments, migrations or deleting data.
|
|
16
|
+
7. **Regression** — the whole test suite of every project that uses what changed, not only the tests you touched.
|
|
17
|
+
8. **Smoke test** — when a feature is complete: walk its main path end to end, from a clean build, as a user would.
|
package/dist/cli/log.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { CliContext } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* `opencastle log` — append one agent record to `.opencastle/logs/events.ndjson`.
|
|
4
|
-
*
|
|
5
|
-
* Agents call this from generated instructions, so a record it accepts is a
|
|
6
|
-
* record every reader of the log has to cope with. It used to accept anything:
|
|
7
|
-
* `--type session` with no fields, `--outcome banana`, a value-less `--model`
|
|
8
|
-
* stored as `true`, `--task 007` stored as the number 7, `--agnet`, and a
|
|
9
|
-
* caller-supplied `--timestamp yesterday`. Each record type is now checked
|
|
10
|
-
* against the schema in `skills/observability-logging/LOG-SCHEMA.md`, field by field, and a
|
|
11
|
-
* record that does not match is refused with every reason at once.
|
|
12
|
-
*/
|
|
13
|
-
type Kind = 'text' | 'count' | 'number' | 'boolean' | 'list';
|
|
14
|
-
interface Field {
|
|
15
|
-
kind: Kind;
|
|
16
|
-
required: boolean;
|
|
17
|
-
/** The only values a text field may take. */
|
|
18
|
-
values?: readonly string[];
|
|
19
|
-
/** Smallest value of a count. */
|
|
20
|
-
min?: number;
|
|
21
|
-
}
|
|
22
|
-
/** The record schemas, as `skills/observability-logging/LOG-SCHEMA.md` documents them. `log.test.ts` holds the two together. */
|
|
23
|
-
export declare const LOG_RECORDS: Record<string, Record<string, Field>>;
|
|
24
|
-
export type ParsedLog = {
|
|
25
|
-
ok: true;
|
|
26
|
-
help: true;
|
|
27
|
-
} | {
|
|
28
|
-
ok: true;
|
|
29
|
-
help: false;
|
|
30
|
-
record: Record<string, unknown>;
|
|
31
|
-
logsDir: string | null;
|
|
32
|
-
dryRun: boolean;
|
|
33
|
-
} | {
|
|
34
|
-
ok: false;
|
|
35
|
-
errors: string[];
|
|
36
|
-
type: string | null;
|
|
37
|
-
};
|
|
38
|
-
/** Read `opencastle log` arguments into a checked record, or every reason it is not one. */
|
|
39
|
-
export declare function parseLogArgs(args: string[], now?: Date): ParsedLog;
|
|
40
|
-
/** Append a structured event record to events.ndjson. */
|
|
41
|
-
export declare function appendEvent(record: Record<string, unknown>, logsDir?: string | null): Promise<void>;
|
|
42
|
-
export default function log({ args }: CliContext): Promise<void>;
|
|
43
|
-
export {};
|
|
44
|
-
//# sourceMappingURL=log.d.ts.map
|
package/dist/cli/log.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/cli/log.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;;;;;;;;;GAUG;AAEH,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;AAE5D,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,OAAO,CAAA;IACjB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAQD,gIAAgI;AAChI,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAiE7D,CAAA;AA8DD,MAAM,MAAM,SAAS,GACjB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACnG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAExD,4FAA4F;AAC5F,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,IAAiB,GAAG,SAAS,CA6F9E;AA6DD,yDAAyD;AACzD,wBAAsB,WAAW,CAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GACtB,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED,wBAA8B,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BrE"}
|