@cleocode/core 2026.4.11 → 2026.4.13
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/dist/codebase-map/analyzers/architecture.d.ts.map +1 -1
- package/dist/codebase-map/analyzers/architecture.js +0 -1
- package/dist/codebase-map/analyzers/architecture.js.map +1 -1
- package/dist/conduit/local-transport.d.ts +18 -8
- package/dist/conduit/local-transport.d.ts.map +1 -1
- package/dist/conduit/local-transport.js +23 -13
- package/dist/conduit/local-transport.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -1
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +19 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +6 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.js +175 -68950
- package/dist/index.js.map +1 -7
- package/dist/init.d.ts +1 -2
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +1 -2
- package/dist/init.js.map +1 -1
- package/dist/internal.d.ts +8 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +13 -6
- package/dist/internal.js.map +1 -1
- package/dist/memory/learnings.d.ts +2 -2
- package/dist/memory/patterns.d.ts +6 -6
- package/dist/output.d.ts +32 -11
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +67 -67
- package/dist/output.js.map +1 -1
- package/dist/paths.js +80 -14
- package/dist/paths.js.map +1 -1
- package/dist/skills/dynamic-skill-generator.d.ts +0 -2
- package/dist/skills/dynamic-skill-generator.d.ts.map +1 -1
- package/dist/skills/dynamic-skill-generator.js.map +1 -1
- package/dist/store/agent-registry-accessor.d.ts +203 -12
- package/dist/store/agent-registry-accessor.d.ts.map +1 -1
- package/dist/store/agent-registry-accessor.js +618 -100
- package/dist/store/agent-registry-accessor.js.map +1 -1
- package/dist/store/api-key-kdf.d.ts +73 -0
- package/dist/store/api-key-kdf.d.ts.map +1 -0
- package/dist/store/api-key-kdf.js +84 -0
- package/dist/store/api-key-kdf.js.map +1 -0
- package/dist/store/cleanup-legacy.js +171 -0
- package/dist/store/cleanup-legacy.js.map +1 -0
- package/dist/store/conduit-sqlite.d.ts +184 -0
- package/dist/store/conduit-sqlite.d.ts.map +1 -0
- package/dist/store/conduit-sqlite.js +570 -0
- package/dist/store/conduit-sqlite.js.map +1 -0
- package/dist/store/global-salt.d.ts +78 -0
- package/dist/store/global-salt.d.ts.map +1 -0
- package/dist/store/global-salt.js +147 -0
- package/dist/store/global-salt.js.map +1 -0
- package/dist/store/migrate-signaldock-to-conduit.d.ts +81 -0
- package/dist/store/migrate-signaldock-to-conduit.d.ts.map +1 -0
- package/dist/store/migrate-signaldock-to-conduit.js +555 -0
- package/dist/store/migrate-signaldock-to-conduit.js.map +1 -0
- package/dist/store/nexus-sqlite.js +28 -3
- package/dist/store/nexus-sqlite.js.map +1 -1
- package/dist/store/signaldock-sqlite.d.ts +122 -19
- package/dist/store/signaldock-sqlite.d.ts.map +1 -1
- package/dist/store/signaldock-sqlite.js +401 -251
- package/dist/store/signaldock-sqlite.js.map +1 -1
- package/dist/store/sqlite-backup.js +122 -4
- package/dist/store/sqlite-backup.js.map +1 -1
- package/dist/system/backup.d.ts +0 -26
- package/dist/system/backup.d.ts.map +1 -1
- package/dist/system/runtime.d.ts +0 -2
- package/dist/system/runtime.d.ts.map +1 -1
- package/dist/system/runtime.js +3 -3
- package/dist/system/runtime.js.map +1 -1
- package/dist/tasks/add.d.ts +1 -1
- package/dist/tasks/add.d.ts.map +1 -1
- package/dist/tasks/add.js +98 -23
- package/dist/tasks/add.js.map +1 -1
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +4 -1
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/find.d.ts.map +1 -1
- package/dist/tasks/find.js +4 -1
- package/dist/tasks/find.js.map +1 -1
- package/dist/tasks/labels.d.ts.map +1 -1
- package/dist/tasks/labels.js +4 -1
- package/dist/tasks/labels.js.map +1 -1
- package/dist/tasks/relates.d.ts.map +1 -1
- package/dist/tasks/relates.js +16 -4
- package/dist/tasks/relates.js.map +1 -1
- package/dist/tasks/show.d.ts.map +1 -1
- package/dist/tasks/show.js +4 -1
- package/dist/tasks/show.js.map +1 -1
- package/dist/tasks/update.d.ts.map +1 -1
- package/dist/tasks/update.js +32 -6
- package/dist/tasks/update.js.map +1 -1
- package/dist/validation/engine.d.ts.map +1 -1
- package/dist/validation/engine.js +16 -4
- package/dist/validation/engine.js.map +1 -1
- package/dist/validation/param-utils.d.ts +5 -3
- package/dist/validation/param-utils.d.ts.map +1 -1
- package/dist/validation/param-utils.js +8 -6
- package/dist/validation/param-utils.js.map +1 -1
- package/dist/validation/protocols/_shared.d.ts.map +1 -1
- package/dist/validation/protocols/_shared.js +13 -6
- package/dist/validation/protocols/_shared.js.map +1 -1
- package/package.json +9 -7
- package/src/adapters/__tests__/manager.test.ts +0 -1
- package/src/codebase-map/analyzers/architecture.ts +0 -1
- package/src/conduit/__tests__/local-credential-flow.test.ts +20 -18
- package/src/conduit/__tests__/local-transport.test.ts +14 -12
- package/src/conduit/local-transport.ts +23 -13
- package/src/config.ts +0 -1
- package/src/errors.ts +24 -0
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.ts +2 -5
- package/src/init.ts +1 -2
- package/src/internal.ts +96 -2
- package/src/lifecycle/cant/lifecycle-rcasd.cant +133 -0
- package/src/memory/__tests__/engine-compat.test.ts +2 -2
- package/src/memory/__tests__/pipeline-manifest-sqlite.test.ts +4 -4
- package/src/observability/__tests__/index.test.ts +4 -4
- package/src/observability/__tests__/log-filter.test.ts +4 -4
- package/src/output.ts +73 -75
- package/src/sessions/__tests__/session-grade.integration.test.ts +1 -1
- package/src/sessions/__tests__/session-grade.test.ts +2 -2
- package/src/skills/__tests__/dynamic-skill-generator.test.ts +0 -2
- package/src/skills/dynamic-skill-generator.ts +0 -2
- package/src/store/__tests__/agent-registry-accessor.test.ts +807 -0
- package/src/store/__tests__/api-key-kdf.test.ts +113 -0
- package/src/store/__tests__/backup-crypto.test.ts +101 -0
- package/src/store/__tests__/backup-pack.test.ts +491 -0
- package/src/store/__tests__/backup-unpack.test.ts +298 -0
- package/src/store/__tests__/conduit-sqlite.test.ts +413 -0
- package/src/store/__tests__/global-salt.test.ts +195 -0
- package/src/store/__tests__/migrate-signaldock-to-conduit.test.ts +715 -0
- package/src/store/__tests__/regenerators.test.ts +234 -0
- package/src/store/__tests__/restore-conflict-report.test.ts +274 -0
- package/src/store/__tests__/restore-json-merge.test.ts +521 -0
- package/src/store/__tests__/signaldock-sqlite.test.ts +652 -0
- package/src/store/__tests__/sqlite-backup-global.test.ts +307 -3
- package/src/store/__tests__/sqlite-backup.test.ts +5 -1
- package/src/store/__tests__/t310-integration.test.ts +1150 -0
- package/src/store/__tests__/t310-readiness.test.ts +111 -0
- package/src/store/__tests__/t311-integration.test.ts +661 -0
- package/src/store/agent-registry-accessor.ts +847 -140
- package/src/store/api-key-kdf.ts +104 -0
- package/src/store/backup-crypto.ts +209 -0
- package/src/store/backup-pack.ts +739 -0
- package/src/store/backup-unpack.ts +583 -0
- package/src/store/conduit-sqlite.ts +655 -0
- package/src/store/global-salt.ts +175 -0
- package/src/store/migrate-signaldock-to-conduit.ts +669 -0
- package/src/store/regenerators.ts +243 -0
- package/src/store/restore-conflict-report.ts +317 -0
- package/src/store/restore-json-merge.ts +653 -0
- package/src/store/signaldock-sqlite.ts +431 -254
- package/src/store/sqlite-backup.ts +185 -10
- package/src/store/t310-readiness.ts +119 -0
- package/src/system/backup.ts +2 -62
- package/src/system/runtime.ts +4 -6
- package/src/tasks/__tests__/error-hints.test.ts +256 -0
- package/src/tasks/add.ts +99 -9
- package/src/tasks/complete.ts +4 -1
- package/src/tasks/find.ts +4 -1
- package/src/tasks/labels.ts +4 -1
- package/src/tasks/relates.ts +16 -4
- package/src/tasks/show.ts +4 -1
- package/src/tasks/update.ts +32 -3
- package/src/validation/__tests__/error-hints.test.ts +97 -0
- package/src/validation/engine.ts +16 -1
- package/src/validation/param-utils.ts +10 -7
- package/src/validation/protocols/_shared.ts +14 -6
- package/src/validation/protocols/cant/architecture-decision.cant +80 -0
- package/src/validation/protocols/cant/artifact-publish.cant +95 -0
- package/src/validation/protocols/cant/consensus.cant +74 -0
- package/src/validation/protocols/cant/contribution.cant +82 -0
- package/src/validation/protocols/cant/decomposition.cant +92 -0
- package/src/validation/protocols/cant/implementation.cant +67 -0
- package/src/validation/protocols/cant/provenance.cant +88 -0
- package/src/validation/protocols/cant/release.cant +96 -0
- package/src/validation/protocols/cant/research.cant +66 -0
- package/src/validation/protocols/cant/specification.cant +67 -0
- package/src/validation/protocols/cant/testing.cant +88 -0
- package/src/validation/protocols/cant/validation.cant +65 -0
- package/src/validation/protocols/protocols-markdown/decomposition.md +0 -4
- package/templates/config.template.json +0 -1
- package/templates/global-config.template.json +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: protocol
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
id: IMPL
|
|
5
|
+
title: "Implementation Protocol"
|
|
6
|
+
status: active
|
|
7
|
+
type: base
|
|
8
|
+
audience: "llm-agent"
|
|
9
|
+
tags: "implementation, coding, development"
|
|
10
|
+
skillRef: ct-task-executor
|
|
11
|
+
lastUpdated: 2026-02-24
|
|
12
|
+
enforcement: strict
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Implementation Protocol
|
|
16
|
+
#
|
|
17
|
+
# Provenance: @task T3155, @epic T3147
|
|
18
|
+
# Type: Conditional Protocol
|
|
19
|
+
# Max Active: 3 protocols (including base)
|
|
20
|
+
#
|
|
21
|
+
# Trigger Conditions
|
|
22
|
+
#
|
|
23
|
+
# This protocol activates when the task involves:
|
|
24
|
+
# Building: "implement", "build", "create", "develop"
|
|
25
|
+
# Coding: "code", "write", "program"
|
|
26
|
+
# Fixing: "fix", "bug", "patch", "repair"
|
|
27
|
+
# Enhancement: "improve", "enhance", "optimize"
|
|
28
|
+
#
|
|
29
|
+
# Explicit Override: --protocol implementation flag on task creation.
|
|
30
|
+
#
|
|
31
|
+
# Requirements (RFC 2119)
|
|
32
|
+
#
|
|
33
|
+
# MUST:
|
|
34
|
+
# IMPL-001: MUST include tests for new functionality
|
|
35
|
+
# IMPL-002: MUST follow project code style conventions
|
|
36
|
+
# IMPL-003: MUST include JSDoc/docstring provenance tags
|
|
37
|
+
# IMPL-004: MUST verify changes pass existing tests
|
|
38
|
+
# IMPL-005: MUST document breaking changes
|
|
39
|
+
# IMPL-006: MUST write implementation summary to manifest
|
|
40
|
+
# IMPL-007: MUST set agent_type: "implementation" in manifest
|
|
41
|
+
#
|
|
42
|
+
# SHOULD:
|
|
43
|
+
# IMPL-010: SHOULD add inline comments for complex logic
|
|
44
|
+
# IMPL-011: SHOULD refactor duplicated code
|
|
45
|
+
# IMPL-012: SHOULD update related documentation
|
|
46
|
+
# IMPL-013: SHOULD consider error handling edge cases
|
|
47
|
+
#
|
|
48
|
+
# MAY:
|
|
49
|
+
# IMPL-020: MAY propose architectural improvements
|
|
50
|
+
# IMPL-021: MAY add performance benchmarks
|
|
51
|
+
# IMPL-022: MAY suggest follow-up enhancements
|
|
52
|
+
#
|
|
53
|
+
# Provenance Thresholds:
|
|
54
|
+
# New code: 100% coverage required
|
|
55
|
+
# Existing code: 80% coverage required
|
|
56
|
+
# Legacy code: 50% coverage required
|
|
57
|
+
#
|
|
58
|
+
# Exit Codes:
|
|
59
|
+
# EXIT_PROTOCOL_IMPLEMENTATION (64) - Implementation protocol violation
|
|
60
|
+
#
|
|
61
|
+
# Anti-Patterns:
|
|
62
|
+
# - Code without tests (regression risk)
|
|
63
|
+
# - Missing provenance (lost attribution)
|
|
64
|
+
# - Skipping validation (quality regression)
|
|
65
|
+
# - Undocumented breaking changes (surprise failures)
|
|
66
|
+
# - No error handling (silent failures)
|
|
67
|
+
# - Hardcoded values (maintenance burden)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: protocol
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
id: PROV
|
|
5
|
+
title: "Provenance Protocol"
|
|
6
|
+
status: active
|
|
7
|
+
type: cross-cutting
|
|
8
|
+
audience: "llm-agent, orchestrator"
|
|
9
|
+
tags: "provenance, traceability, lineage"
|
|
10
|
+
skillRef: ct-provenance-keeper
|
|
11
|
+
lastUpdated: 2026-04-07
|
|
12
|
+
enforcement: advisory
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Provenance Protocol
|
|
16
|
+
#
|
|
17
|
+
# Type: Conditional Protocol
|
|
18
|
+
# Max Active: 3 protocols (including base)
|
|
19
|
+
#
|
|
20
|
+
# Trigger Conditions
|
|
21
|
+
#
|
|
22
|
+
# This protocol activates when the task involves:
|
|
23
|
+
# Supply Chain: "provenance", "supply chain", "chain of custody"
|
|
24
|
+
# Attestation: "attest", "attestation", "in-toto", "SLSA"
|
|
25
|
+
# SBOM: "sbom", "bill of materials", "cyclonedx", "spdx"
|
|
26
|
+
# Signing: "sign", "cosign", "sigstore", "verify signature"
|
|
27
|
+
# Checksums: "checksum", "digest", "sha256", "integrity"
|
|
28
|
+
#
|
|
29
|
+
# Explicit Override: --protocol provenance flag on task creation.
|
|
30
|
+
#
|
|
31
|
+
# Requirements (RFC 2119)
|
|
32
|
+
#
|
|
33
|
+
# MUST:
|
|
34
|
+
# PROV-001: MUST record provenance chain from source commit to published artifact
|
|
35
|
+
# PROV-002: MUST compute SHA-256 digest for every produced artifact
|
|
36
|
+
# PROV-003: MUST generate attestation in in-toto Statement v1 format
|
|
37
|
+
# PROV-004: MUST record SLSA Build Level achieved (L1 minimum)
|
|
38
|
+
# PROV-005: MUST store provenance record in .cleo/releases.json via record_release()
|
|
39
|
+
# PROV-006: MUST verify provenance chain integrity before publishing attestation
|
|
40
|
+
# PROV-007: MUST set agent_type: "provenance" in manifest
|
|
41
|
+
#
|
|
42
|
+
# SHOULD:
|
|
43
|
+
# PROV-010: SHOULD generate SBOM (CycloneDX or SPDX) for artifacts with dependencies
|
|
44
|
+
# PROV-011: SHOULD sign attestations using keyless signing (sigstore/cosign)
|
|
45
|
+
# PROV-012: SHOULD publish provenance attestation alongside artifact
|
|
46
|
+
# PROV-013: SHOULD verify all input materials have provenance
|
|
47
|
+
#
|
|
48
|
+
# MAY:
|
|
49
|
+
# PROV-020: MAY achieve SLSA Build Level 3 or 4
|
|
50
|
+
# PROV-021: MAY use key-based signing (GPG) as alternative to keyless
|
|
51
|
+
# PROV-022: MAY generate multiple SBOM formats (both CycloneDX and SPDX)
|
|
52
|
+
#
|
|
53
|
+
# Provenance Chain Model:
|
|
54
|
+
# commit -> build -> artifact -> attestation -> registry
|
|
55
|
+
#
|
|
56
|
+
# Chain Integrity Rules:
|
|
57
|
+
# Each link MUST reference previous link's output
|
|
58
|
+
# No link MAY be modified after creation (append-only)
|
|
59
|
+
# Missing links MUST be recorded as incomplete
|
|
60
|
+
# Chain MUST be verifiable offline
|
|
61
|
+
#
|
|
62
|
+
# SLSA Compliance Levels:
|
|
63
|
+
# L1: Provenance exists
|
|
64
|
+
# L2: Provenance signed + build on hosted platform
|
|
65
|
+
# L3: Non-falsifiable provenance
|
|
66
|
+
# L4: All deps have provenance + hermetic reproducible build
|
|
67
|
+
#
|
|
68
|
+
# Signing Methods:
|
|
69
|
+
# sigstore (default): cosign sign-blob --yes <artifact>
|
|
70
|
+
# gpg: gpg --detach-sign --armor -u <key-id> <artifact>
|
|
71
|
+
# none: Skip signing (SLSA L1 only)
|
|
72
|
+
#
|
|
73
|
+
# Error Codes (90-94):
|
|
74
|
+
# 90: E_PROVENANCE_CONFIG_INVALID
|
|
75
|
+
# 91: E_SIGNING_KEY_MISSING
|
|
76
|
+
# 92: E_SIGNATURE_INVALID
|
|
77
|
+
# 93: E_DIGEST_MISMATCH
|
|
78
|
+
# 94: E_ATTESTATION_INVALID
|
|
79
|
+
#
|
|
80
|
+
# Anti-Patterns:
|
|
81
|
+
# - Skipping digest computation (breaks chain integrity)
|
|
82
|
+
# - Hardcoding signing keys in config (security risk)
|
|
83
|
+
# - Generating attestation without matching digest
|
|
84
|
+
# - Publishing artifact before signing
|
|
85
|
+
# - Modifying provenance records after creation
|
|
86
|
+
# - Skipping SBOM for artifacts with dependencies
|
|
87
|
+
# - Using SHA-1 or MD5 for digests (cryptographically broken)
|
|
88
|
+
# - Storing private keys in .cleo/ directory
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: protocol
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
id: REL
|
|
5
|
+
title: "Release Protocol"
|
|
6
|
+
status: active
|
|
7
|
+
type: conditional
|
|
8
|
+
audience: "llm-agent, orchestrator"
|
|
9
|
+
tags: "release, semver, changelog"
|
|
10
|
+
skillRef: ct-release-orchestrator
|
|
11
|
+
lastUpdated: 2026-04-07
|
|
12
|
+
enforcement: strict
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Release Protocol
|
|
16
|
+
#
|
|
17
|
+
# Provenance: @task T3155, @epic T3147
|
|
18
|
+
# Type: Conditional Protocol
|
|
19
|
+
# Max Active: 3 protocols (including base)
|
|
20
|
+
#
|
|
21
|
+
# Trigger Conditions
|
|
22
|
+
#
|
|
23
|
+
# This protocol activates when the task involves:
|
|
24
|
+
# Version: "release", "version", "v1.x.x"
|
|
25
|
+
# Publish: "publish", "deploy", "ship"
|
|
26
|
+
# Changelog: "changelog", "release notes"
|
|
27
|
+
# Tag: "tag", "milestone", "GA"
|
|
28
|
+
#
|
|
29
|
+
# Explicit Override: --protocol release flag on task creation.
|
|
30
|
+
#
|
|
31
|
+
# Requirements (RFC 2119)
|
|
32
|
+
#
|
|
33
|
+
# MUST:
|
|
34
|
+
# RLSE-001: MUST follow semantic versioning (semver)
|
|
35
|
+
# RLSE-002: MUST update changelog with all changes
|
|
36
|
+
# RLSE-003: MUST pass all validation gates before release
|
|
37
|
+
# RLSE-004: MUST tag release in version control
|
|
38
|
+
# RLSE-005: MUST document breaking changes with migration path
|
|
39
|
+
# RLSE-006: MUST verify version consistency across files
|
|
40
|
+
# RLSE-007: MUST set agent_type: "documentation" in manifest
|
|
41
|
+
#
|
|
42
|
+
# SHOULD:
|
|
43
|
+
# RLSE-010: SHOULD include upgrade instructions
|
|
44
|
+
# RLSE-011: SHOULD verify documentation is current
|
|
45
|
+
# RLSE-012: SHOULD test installation process
|
|
46
|
+
# RLSE-013: SHOULD create backup before release
|
|
47
|
+
# RLSE-014: SHOULD run test suite for major/minor releases
|
|
48
|
+
# RLSE-015: SHOULD verify tests pass before tagging
|
|
49
|
+
#
|
|
50
|
+
# MAY:
|
|
51
|
+
# RLSE-020: MAY include performance benchmarks
|
|
52
|
+
# RLSE-021: MAY announce on communication channels
|
|
53
|
+
# RLSE-022: MAY batch minor fixes into single release
|
|
54
|
+
#
|
|
55
|
+
# State Machine:
|
|
56
|
+
# create -> planned -> active -> released (immutable)
|
|
57
|
+
#
|
|
58
|
+
# Ship Workflow (10 steps):
|
|
59
|
+
# 1. Auto-populate release tasks
|
|
60
|
+
# 1.5. Run release guards
|
|
61
|
+
# 2. Bump version (if --bump-version)
|
|
62
|
+
# 3. Ensure [Unreleased] section in CHANGELOG.md
|
|
63
|
+
# 4. Generate changelog from task metadata
|
|
64
|
+
# 5. Validate changelog content
|
|
65
|
+
# 6. Append to CHANGELOG.md + platform outputs
|
|
66
|
+
# 7. Run validation gates
|
|
67
|
+
# 8. Create release commit
|
|
68
|
+
# 9. Create annotated tag (if --create-tag)
|
|
69
|
+
# 10. Push to remote (if --push)
|
|
70
|
+
# 11. Update release status to released
|
|
71
|
+
#
|
|
72
|
+
# Composition with Sub-Protocols:
|
|
73
|
+
# artifact-publish: Conditional, triggered when release config has artifact handlers
|
|
74
|
+
# provenance: Conditional, invoked transitively via artifact-publish for signing
|
|
75
|
+
#
|
|
76
|
+
# Error Codes (50-59):
|
|
77
|
+
# 50: E_RELEASE_NOT_FOUND
|
|
78
|
+
# 51: E_RELEASE_EXISTS
|
|
79
|
+
# 52: E_RELEASE_LOCKED
|
|
80
|
+
# 53: E_INVALID_VERSION
|
|
81
|
+
# 54: E_VALIDATION_FAILED
|
|
82
|
+
# 55: E_VERSION_BUMP_FAILED
|
|
83
|
+
# 56: E_TAG_CREATION_FAILED
|
|
84
|
+
# 57: E_CHANGELOG_GENERATION_FAILED
|
|
85
|
+
# 58: E_TAG_EXISTS
|
|
86
|
+
# 59: E_TASKS_INCOMPLETE
|
|
87
|
+
#
|
|
88
|
+
# Anti-Patterns:
|
|
89
|
+
# - Skipping version bump (version confusion)
|
|
90
|
+
# - Missing changelog entry (lost history)
|
|
91
|
+
# - Undocumented breaking changes (user frustration)
|
|
92
|
+
# - No release tag (cannot reference version)
|
|
93
|
+
# - Incomplete checklist (missed steps)
|
|
94
|
+
# - Major releases without --run-tests (quality risk)
|
|
95
|
+
# - Ignoring epic completeness warnings
|
|
96
|
+
# - Overusing --force (bypasses guards)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: protocol
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
id: RSCH
|
|
5
|
+
title: "Research Protocol"
|
|
6
|
+
status: active
|
|
7
|
+
type: base
|
|
8
|
+
audience: "llm-agent, orchestrator"
|
|
9
|
+
tags: "research, investigation, evidence"
|
|
10
|
+
skillRef: ct-research-agent
|
|
11
|
+
lastUpdated: 2026-02-24
|
|
12
|
+
enforcement: strict
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Research Protocol
|
|
16
|
+
#
|
|
17
|
+
# Provenance: @task T3155, @epic T3147
|
|
18
|
+
# Type: Conditional Protocol
|
|
19
|
+
# Max Active: 3 protocols (including base)
|
|
20
|
+
#
|
|
21
|
+
# Trigger Conditions
|
|
22
|
+
#
|
|
23
|
+
# This protocol activates when the task involves:
|
|
24
|
+
# Investigation: "research", "investigate", "explore", "study"
|
|
25
|
+
# Analysis: "analyze", "compare", "evaluate", "assess"
|
|
26
|
+
# Discovery: "find out", "discover", "learn about"
|
|
27
|
+
# Documentation: "document findings", "report on"
|
|
28
|
+
#
|
|
29
|
+
# Explicit Override: --protocol research flag on task creation.
|
|
30
|
+
#
|
|
31
|
+
# Requirements (RFC 2119)
|
|
32
|
+
#
|
|
33
|
+
# MUST:
|
|
34
|
+
# RSCH-001: MUST NOT implement code or make changes to codebase
|
|
35
|
+
# RSCH-002: MUST document all sources with citations
|
|
36
|
+
# RSCH-003: MUST write findings to claudedocs/agent-outputs/
|
|
37
|
+
# RSCH-004: MUST append entry to MANIFEST.jsonl
|
|
38
|
+
# RSCH-005: MUST return only completion message (no content in response)
|
|
39
|
+
# RSCH-006: MUST include 3-7 key findings in manifest entry
|
|
40
|
+
# RSCH-007: MUST set agent_type: "research" in manifest
|
|
41
|
+
#
|
|
42
|
+
# SHOULD:
|
|
43
|
+
# RSCH-010: SHOULD use multiple independent sources
|
|
44
|
+
# RSCH-011: SHOULD cross-reference findings for accuracy
|
|
45
|
+
# RSCH-012: SHOULD include confidence levels for claims
|
|
46
|
+
# RSCH-013: SHOULD identify gaps or areas needing further research
|
|
47
|
+
# RSCH-014: SHOULD link research to relevant tasks
|
|
48
|
+
#
|
|
49
|
+
# MAY:
|
|
50
|
+
# RSCH-020: MAY propose follow-up research tasks
|
|
51
|
+
# RSCH-021: MAY include visual diagrams or tables
|
|
52
|
+
# RSCH-022: MAY compare multiple approaches or solutions
|
|
53
|
+
#
|
|
54
|
+
# Tool Allowlist:
|
|
55
|
+
# Allowed: Read, Grep, Glob, Bash (read-only commands only)
|
|
56
|
+
# Prohibited: Write, Edit, any code compilation or execution
|
|
57
|
+
#
|
|
58
|
+
# Exit Codes:
|
|
59
|
+
# EXIT_PROTOCOL_RESEARCH (60) - Research protocol violation
|
|
60
|
+
#
|
|
61
|
+
# Anti-Patterns:
|
|
62
|
+
# - Implementing code during research (pollutes context, mixes concerns)
|
|
63
|
+
# - Returning findings in response (wastes orchestrator context)
|
|
64
|
+
# - Single-source conclusions (risk of bias or error)
|
|
65
|
+
# - Vague findings without evidence (not actionable)
|
|
66
|
+
# - Skipping manifest entry (breaks orchestrator workflow)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: protocol
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
id: SPEC
|
|
5
|
+
title: "Specification Protocol"
|
|
6
|
+
status: active
|
|
7
|
+
type: conditional
|
|
8
|
+
audience: "llm-agent, orchestrator"
|
|
9
|
+
tags: "specification, requirements, rfc2119"
|
|
10
|
+
skillRef: ct-spec-writer
|
|
11
|
+
lastUpdated: 2026-02-24
|
|
12
|
+
enforcement: strict
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Specification Protocol
|
|
16
|
+
#
|
|
17
|
+
# Provenance: @task T3155, @epic T3147
|
|
18
|
+
# Type: Conditional Protocol
|
|
19
|
+
# Max Active: 3 protocols (including base)
|
|
20
|
+
#
|
|
21
|
+
# Trigger Conditions
|
|
22
|
+
#
|
|
23
|
+
# This protocol activates when the task involves:
|
|
24
|
+
# Design: "spec", "specification", "design", "architect"
|
|
25
|
+
# Contract: "contract", "interface", "API", "schema"
|
|
26
|
+
# Definition: "define", "formalize", "standardize"
|
|
27
|
+
# Protocol: "protocol", "workflow", "process"
|
|
28
|
+
#
|
|
29
|
+
# Explicit Override: --protocol specification flag on task creation.
|
|
30
|
+
#
|
|
31
|
+
# Requirements (RFC 2119)
|
|
32
|
+
#
|
|
33
|
+
# MUST:
|
|
34
|
+
# SPEC-001: MUST use RFC 2119 keywords for requirements
|
|
35
|
+
# SPEC-002: MUST include version number and status
|
|
36
|
+
# SPEC-003: MUST define scope and authority
|
|
37
|
+
# SPEC-004: MUST include conformance criteria
|
|
38
|
+
# SPEC-005: MUST document related specifications
|
|
39
|
+
# SPEC-006: MUST use structured format (tables, schemas)
|
|
40
|
+
# SPEC-007: MUST set agent_type: "specification" in manifest
|
|
41
|
+
#
|
|
42
|
+
# SHOULD:
|
|
43
|
+
# SPEC-010: SHOULD include examples for each requirement
|
|
44
|
+
# SPEC-011: SHOULD document failure modes
|
|
45
|
+
# SPEC-012: SHOULD specify error handling
|
|
46
|
+
# SPEC-013: SHOULD include changelog
|
|
47
|
+
#
|
|
48
|
+
# MAY:
|
|
49
|
+
# SPEC-020: MAY include implementation guidance
|
|
50
|
+
# SPEC-021: MAY reference external standards
|
|
51
|
+
# SPEC-022: MAY define extension points
|
|
52
|
+
#
|
|
53
|
+
# Version Semantics:
|
|
54
|
+
# Major (X.0.0): Breaking changes to requirements
|
|
55
|
+
# Minor (X.Y.0): New requirements, backward compatible
|
|
56
|
+
# Patch (X.Y.Z): Clarifications, typo fixes
|
|
57
|
+
#
|
|
58
|
+
# Status Lifecycle:
|
|
59
|
+
# DRAFT -> ACTIVE -> DEPRECATED
|
|
60
|
+
# \-> SUPERSEDED (by new spec)
|
|
61
|
+
#
|
|
62
|
+
# Anti-Patterns:
|
|
63
|
+
# - Vague requirements without levels (cannot verify compliance)
|
|
64
|
+
# - Missing version number (cannot track changes)
|
|
65
|
+
# - Undefined scope (unclear authority)
|
|
66
|
+
# - No examples (hard to implement correctly)
|
|
67
|
+
# - Skipping RFC 2119 declaration (ambiguous requirement levels)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: protocol
|
|
3
|
+
version: 2.0.0
|
|
4
|
+
id: TEST
|
|
5
|
+
title: "Testing Protocol (Project-Agnostic IVT Loop)"
|
|
6
|
+
status: active
|
|
7
|
+
type: base
|
|
8
|
+
audience: "llm-agent, orchestrator"
|
|
9
|
+
tags: "testing, ivt-loop, autonomous, framework-agnostic, compliance"
|
|
10
|
+
skillRef: ct-ivt-looper
|
|
11
|
+
lastUpdated: 2026-04-07
|
|
12
|
+
enforcement: strict
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Testing Protocol - Project-Agnostic IVT Loop
|
|
16
|
+
#
|
|
17
|
+
# Provenance: @task T260 (replaces T3155 BATS-locked v1)
|
|
18
|
+
# Type: Base Protocol
|
|
19
|
+
# Stage: IVTR - T (Testing, the closure of the IVT loop)
|
|
20
|
+
# Skill: ct-ivt-looper
|
|
21
|
+
#
|
|
22
|
+
# Core Principle:
|
|
23
|
+
# The loop converges on the spec, not on "tests pass".
|
|
24
|
+
# Passing tests that don't cover the spec are a failure.
|
|
25
|
+
#
|
|
26
|
+
# Project-Agnostic Mandate:
|
|
27
|
+
# MUST work in any project. MUST NOT assume a specific language,
|
|
28
|
+
# test framework, directory layout, or test command.
|
|
29
|
+
#
|
|
30
|
+
# Trigger Conditions
|
|
31
|
+
#
|
|
32
|
+
# This protocol activates when the task involves:
|
|
33
|
+
# Loop Closure: "ivt loop", "implement and verify", "ship this task"
|
|
34
|
+
# Test Execution: "run tests", "verify", "test this"
|
|
35
|
+
# Coverage: "coverage", "test coverage", "missing tests"
|
|
36
|
+
# Spec Compliance: "satisfy spec", "verify against spec"
|
|
37
|
+
# Release Gate: "before release", "pre-PR validation", "ship verified"
|
|
38
|
+
#
|
|
39
|
+
# Explicit Override: --protocol testing flag on task creation.
|
|
40
|
+
# Lifecycle Position: After Validation (V), before Release (R)
|
|
41
|
+
#
|
|
42
|
+
# Requirements (RFC 2119)
|
|
43
|
+
#
|
|
44
|
+
# MUST:
|
|
45
|
+
# TEST-001: MUST identify project test framework via dynamic detection
|
|
46
|
+
# TEST-002: MUST run IVT loop with explicit iteration counter and MAX_ITERATIONS cap (default 5)
|
|
47
|
+
# TEST-003: MUST trace each MUST requirement from upstream spec to at least one passing test
|
|
48
|
+
# TEST-004: MUST achieve 100% pass rate before exiting with ivtLoopConverged: true
|
|
49
|
+
# TEST-005: MUST exit only when spec is satisfied or MAX_ITERATIONS reached
|
|
50
|
+
# TEST-006: MUST write test summary to manifest key_findings array
|
|
51
|
+
# TEST-007: MUST set agent_type: "testing" in manifest
|
|
52
|
+
# TEST-008: MUST run on feature branch - never on main/master
|
|
53
|
+
# TEST-009: MUST escalate non-convergence to HITL via exit code 65
|
|
54
|
+
#
|
|
55
|
+
# SHOULD:
|
|
56
|
+
# TEST-010: SHOULD test edge cases and error paths
|
|
57
|
+
# TEST-011: SHOULD include setup/teardown fixtures appropriate to framework
|
|
58
|
+
# TEST-012: SHOULD use descriptive test names tied to spec requirement codes
|
|
59
|
+
# TEST-013: SHOULD report coverage percentage when framework supports it
|
|
60
|
+
# TEST-014: SHOULD prefer .cleo/project-context.json testing.command when present
|
|
61
|
+
#
|
|
62
|
+
# MAY:
|
|
63
|
+
# TEST-020: MAY add golden tests for output verification
|
|
64
|
+
# TEST-021: MAY add performance benchmarks
|
|
65
|
+
# TEST-022: MAY add stress/concurrency tests
|
|
66
|
+
# TEST-023: MAY parallelize IVT loop across independent specs
|
|
67
|
+
#
|
|
68
|
+
# Framework Detection Priority:
|
|
69
|
+
# 1. .cleo/project-context.json testing.command (highest)
|
|
70
|
+
# 2. Auto-detection signals (vitest, jest, pytest, cargo test, go test, etc.)
|
|
71
|
+
# 3. Fallback: ask operator to declare in project-context.json
|
|
72
|
+
#
|
|
73
|
+
# Exit Codes:
|
|
74
|
+
# 0: SUCCESS - Loop converged, manifest recorded
|
|
75
|
+
# 65: HANDOFF_REQUIRED - Non-convergence after MAX_ITERATIONS
|
|
76
|
+
# 67: CONCURRENT_SESSION - Generic testing protocol violation
|
|
77
|
+
# 80: LIFECYCLE_GATE_FAILED - Required gate failed
|
|
78
|
+
#
|
|
79
|
+
# Anti-Patterns:
|
|
80
|
+
# - Hardcoding vitest/jest/pytest (violates project-agnostic mandate)
|
|
81
|
+
# - Running tests once and reporting result (testing is a LOOP)
|
|
82
|
+
# - Skipping validation between iterations
|
|
83
|
+
# - Bailing silently on non-convergence (must escalate to HITL)
|
|
84
|
+
# - Marking task complete with failed > 0
|
|
85
|
+
# - Modifying main/master branch
|
|
86
|
+
# - Ignoring spec-requirement traceability
|
|
87
|
+
# - Treating coverage as the convergence metric
|
|
88
|
+
# - Editing test expectations to match broken code
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: protocol
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
id: VALID
|
|
5
|
+
title: "Validation Protocol"
|
|
6
|
+
status: active
|
|
7
|
+
type: base
|
|
8
|
+
audience: "llm-agent, orchestrator"
|
|
9
|
+
tags: "validation, quality, compliance"
|
|
10
|
+
skillRef: ct-validator
|
|
11
|
+
lastUpdated: 2026-02-24
|
|
12
|
+
enforcement: strict
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Validation Protocol
|
|
16
|
+
#
|
|
17
|
+
# Provenance: @task T3155, @epic T3147
|
|
18
|
+
# Type: Conditional Protocol
|
|
19
|
+
# Stage: IVTR - V (Validation)
|
|
20
|
+
# Max Active: 3 protocols (including base)
|
|
21
|
+
#
|
|
22
|
+
# Trigger Conditions
|
|
23
|
+
#
|
|
24
|
+
# This protocol activates when the task involves:
|
|
25
|
+
# Verification: "validate", "verify", "check", "audit"
|
|
26
|
+
# Quality: "quality", "qa", "review"
|
|
27
|
+
# Compliance: "compliance", "conform", "standard"
|
|
28
|
+
# Smoke Test: "smoke", "sanity", "basic test"
|
|
29
|
+
#
|
|
30
|
+
# Explicit Override: --protocol validation flag on task creation.
|
|
31
|
+
# Lifecycle Position: After Implementation (I), before Testing (T)
|
|
32
|
+
#
|
|
33
|
+
# Requirements (RFC 2119)
|
|
34
|
+
#
|
|
35
|
+
# MUST:
|
|
36
|
+
# VALID-001: MUST verify implementation matches specification
|
|
37
|
+
# VALID-002: MUST run existing test suite and report results
|
|
38
|
+
# VALID-003: MUST check protocol compliance via lib/protocol-validation.sh
|
|
39
|
+
# VALID-004: MUST document pass/fail status for each validation check
|
|
40
|
+
# VALID-005: MUST write validation summary to manifest
|
|
41
|
+
# VALID-006: MUST set agent_type: "validation" in manifest
|
|
42
|
+
# VALID-007: MUST block progression if critical validations fail
|
|
43
|
+
#
|
|
44
|
+
# SHOULD:
|
|
45
|
+
# VALID-010: SHOULD verify edge cases identified in specification
|
|
46
|
+
# VALID-011: SHOULD check for regressions in related functionality
|
|
47
|
+
# VALID-012: SHOULD validate error handling paths
|
|
48
|
+
# VALID-013: SHOULD measure against acceptance criteria
|
|
49
|
+
#
|
|
50
|
+
# MAY:
|
|
51
|
+
# VALID-020: MAY perform performance validation
|
|
52
|
+
# VALID-021: MAY verify security constraints
|
|
53
|
+
# VALID-022: MAY suggest additional test cases
|
|
54
|
+
#
|
|
55
|
+
# Exit Codes:
|
|
56
|
+
# 62: Specification mismatch (fix implementation)
|
|
57
|
+
# 64: Implementation protocol violation (fix provenance)
|
|
58
|
+
# 67: Generic protocol violation (review and fix)
|
|
59
|
+
# 68: EXIT_VALIDATION_INCOMPLETE (validation not finished)
|
|
60
|
+
#
|
|
61
|
+
# Anti-Patterns:
|
|
62
|
+
# - Skipping spec compliance check (missed requirements)
|
|
63
|
+
# - Not documenting validation results (lost audit trail)
|
|
64
|
+
# - Ignoring non-critical failures (quality regression)
|
|
65
|
+
# - Running partial validation suite (false confidence)
|
|
@@ -7,10 +7,6 @@ type: conditional
|
|
|
7
7
|
audience: [llm-agent, orchestrator]
|
|
8
8
|
tags: [decomposition, hierarchy, atomicity, planning]
|
|
9
9
|
skillRef: ct-epic-architect
|
|
10
|
-
mcpOperations:
|
|
11
|
-
- tasks.add
|
|
12
|
-
- tasks.update
|
|
13
|
-
- session.start
|
|
14
10
|
lastUpdated: 2026-02-24
|
|
15
11
|
provenanceTask: T3155
|
|
16
12
|
enforcement: strict
|