openhermes 2.8.0 → 4.0.1
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/CONTEXT.md +18 -0
- package/ETHOS.md +15 -0
- package/README.md +135 -292
- package/bootstrap.mjs +174 -512
- package/harness/agents/openhermes.md +87 -0
- package/harness/codex/CONSTITUTION.md +70 -148
- package/harness/codex/ROUTING.md +126 -0
- package/harness/commands/oh-doctor.md +26 -0
- package/harness/instructions/CONVENTIONS.md +206 -206
- package/harness/instructions/RUNTIME.md +54 -31
- package/harness/skills/oh-builder/SKILL.md +98 -0
- package/harness/skills/oh-caveman/SKILL.md +33 -0
- package/harness/skills/oh-expert/SKILL.md +121 -0
- package/harness/skills/oh-freeze/SKILL.md +28 -0
- package/harness/skills/oh-gauntlet/SKILL.md +119 -0
- package/harness/skills/oh-grill/SKILL.md +77 -0
- package/harness/skills/oh-guard/SKILL.md +33 -0
- package/harness/skills/oh-handoff/SKILL.md +33 -0
- package/harness/skills/oh-health/SKILL.md +90 -0
- package/harness/skills/oh-init/SKILL.md +78 -0
- package/harness/skills/oh-investigate/SKILL.md +35 -0
- package/harness/skills/oh-issue/SKILL.md +36 -0
- package/harness/skills/oh-learn/SKILL.md +28 -0
- package/harness/skills/oh-manifest/SKILL.md +84 -0
- package/harness/skills/oh-plan-review/SKILL.md +128 -0
- package/harness/skills/oh-planner/SKILL.md +159 -0
- package/harness/skills/oh-prd/SKILL.md +35 -0
- package/harness/skills/oh-retro/SKILL.md +33 -0
- package/harness/skills/oh-review/SKILL.md +110 -0
- package/harness/skills/oh-security/SKILL.md +110 -0
- package/harness/skills/oh-ship/SKILL.md +39 -0
- package/harness/skills/oh-skill-craft/SKILL.md +107 -0
- package/harness/skills/oh-skills-link/SKILL.md +29 -0
- package/harness/skills/oh-skills-list/SKILL.md +31 -0
- package/harness/skills/oh-triage/SKILL.md +36 -0
- package/index.mjs +3 -60
- package/lib/harness-resolver.mjs +77 -0
- package/lib/logger.mjs +62 -0
- package/package.json +49 -53
- package/test/plugins-behavioral.test.mjs +64 -0
- package/test/plugins.test.mjs +62 -0
- package/autorecall.mjs +0 -237
- package/curator.mjs +0 -482
- package/harness/commands/build-fix.md +0 -60
- package/harness/commands/checkpoint.md +0 -68
- package/harness/commands/code-review.md +0 -71
- package/harness/commands/doctor.md +0 -42
- package/harness/commands/eval.md +0 -89
- package/harness/commands/go-build.md +0 -87
- package/harness/commands/go-review.md +0 -71
- package/harness/commands/harness-audit.md +0 -90
- package/harness/commands/learn.md +0 -37
- package/harness/commands/loop-start.md +0 -38
- package/harness/commands/loop-status.md +0 -30
- package/harness/commands/memory-search.md +0 -37
- package/harness/commands/model-route.md +0 -32
- package/harness/commands/ohc.md +0 -13
- package/harness/commands/orchestrate.md +0 -88
- package/harness/commands/plan.md +0 -53
- package/harness/commands/quality-gate.md +0 -35
- package/harness/commands/refactor-clean.md +0 -102
- package/harness/commands/rust-build.md +0 -78
- package/harness/commands/rust-review.md +0 -65
- package/harness/commands/security.md +0 -93
- package/harness/commands/setup-pm.md +0 -65
- package/harness/commands/skill-create.md +0 -99
- package/harness/commands/test-coverage.md +0 -80
- package/harness/commands/update-codemaps.md +0 -81
- package/harness/commands/update-docs.md +0 -67
- package/harness/commands/verify.md +0 -68
- package/harness/prompts/architect.txt +0 -189
- package/harness/prompts/build-cpp.md +0 -98
- package/harness/prompts/build-error-resolver.md +0 -44
- package/harness/prompts/build-go.md +0 -340
- package/harness/prompts/build-java.md +0 -140
- package/harness/prompts/build-kotlin.md +0 -137
- package/harness/prompts/build-rust.md +0 -108
- package/harness/prompts/code-reviewer.md +0 -40
- package/harness/prompts/doc-updater.md +0 -206
- package/harness/prompts/docs-lookup.md +0 -71
- package/harness/prompts/e2e-runner.txt +0 -317
- package/harness/prompts/explore.md +0 -42
- package/harness/prompts/harness-optimizer.md +0 -42
- package/harness/prompts/loop-operator.md +0 -53
- package/harness/prompts/planner.md +0 -37
- package/harness/prompts/refactor-cleaner.md +0 -256
- package/harness/prompts/review-cpp.md +0 -81
- package/harness/prompts/review-database.md +0 -261
- package/harness/prompts/review-go.md +0 -257
- package/harness/prompts/review-java.md +0 -113
- package/harness/prompts/review-kotlin.md +0 -143
- package/harness/prompts/review-python.md +0 -101
- package/harness/prompts/review-rust.md +0 -77
- package/harness/prompts/security-reviewer.md +0 -42
- package/harness/prompts/tdd-guide.md +0 -228
- package/harness/rules/audit.md +0 -84
- package/harness/rules/checkpointing.md +0 -75
- package/harness/rules/context-loading.md +0 -33
- package/harness/rules/credential-exposure.md +0 -0
- package/harness/rules/delegation.md +0 -80
- package/harness/rules/handoff.md +0 -267
- package/harness/rules/memory-management.md +0 -28
- package/harness/rules/precedence.md +0 -52
- package/harness/rules/promotion.md +0 -46
- package/harness/rules/ranking.md +0 -64
- package/harness/rules/retrieval.md +0 -94
- package/harness/rules/runtime-guards.md +0 -196
- package/harness/rules/self-heal.md +0 -79
- package/harness/rules/session-start.md +0 -34
- package/harness/rules/skills-management.md +0 -165
- package/harness/rules/state-drift.md +0 -192
- package/harness/rules/verification.md +0 -88
- package/harness/scripts/sync-commands.mjs +0 -259
- package/harness/skills/.bundled_manifest +0 -17
- package/harness/skills/.usage.json +0 -6
- package/harness/skills/api-design/SKILL.md +0 -523
- package/harness/skills/backend-patterns/SKILL.md +0 -598
- package/harness/skills/coding-standards/SKILL.md +0 -549
- package/harness/skills/e2e-testing/SKILL.md +0 -326
- package/harness/skills/frontend-patterns/SKILL.md +0 -642
- package/harness/skills/frontend-slides/SKILL.md +0 -184
- package/harness/skills/security-review/SKILL.md +0 -495
- package/harness/skills/strategic-compact/SKILL.md +0 -131
- package/harness/skills/tdd-workflow/SKILL.md +0 -463
- package/harness/skills/verification-loop/SKILL.md +0 -126
- package/lib/ambient-memory.mjs +0 -167
- package/lib/handoff.mjs +0 -171
- package/lib/hardening.mjs +0 -146
- package/lib/memory-tools-plugin.mjs +0 -368
- package/lib/ohc/block-sync.mjs +0 -69
- package/lib/ohc/compress/search.mjs +0 -152
- package/lib/ohc/compress/state.mjs +0 -76
- package/lib/ohc/config.mjs +0 -185
- package/lib/ohc/message-ids.mjs +0 -178
- package/lib/ohc/notify.mjs +0 -135
- package/lib/ohc/protected-patterns.mjs +0 -55
- package/lib/ohc/prune-apply.mjs +0 -134
- package/lib/ohc/pruner.mjs +0 -608
- package/lib/ohc/reaper.mjs +0 -70
- package/lib/ohc/state.mjs +0 -265
- package/lib/ohc/strategies/deduplication.mjs +0 -72
- package/lib/ohc/strategies/index.mjs +0 -2
- package/lib/ohc/strategies/purge-errors.mjs +0 -43
- package/lib/ohc/token-utils.mjs +0 -26
- package/lib/ohc/updater.mjs +0 -132
- package/lib/paths.mjs +0 -49
- package/lib/schema-validator.mjs +0 -79
- package/lib/search.mjs +0 -48
- package/schemas/audit.schema.json +0 -82
- package/schemas/backlog.schema.json +0 -63
- package/schemas/checkpoint.schema.json +0 -65
- package/schemas/constraint.schema.json +0 -62
- package/schemas/decision.schema.json +0 -63
- package/schemas/instinct.schema.json +0 -63
- package/schemas/loop-state.schema.json +0 -33
- package/schemas/mistake.schema.json +0 -64
- package/schemas/verification_receipt.schema.json +0 -88
- package/skill-builder.mjs +0 -88
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Verification Receipt",
|
|
4
|
-
"description": "Cached verification result keyed by artifact identity + fingerprint. Stored in memory\\verification_receipts\\.",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": ["id", "class", "artifact", "artifact_type", "fingerprint", "method", "result", "provenance", "created_at", "status"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": { "type": "string", "description": "Unique identifier, recommended pattern: v:<artifact-path-or-logical-id>" },
|
|
9
|
-
"class": { "type": "string", "const": "verification_receipt" },
|
|
10
|
-
"project": { "type": ["string", "null"], "description": "Project identifier; null for global/openhermes scope" },
|
|
11
|
-
"scope": { "type": "string", "enum": ["project", "global", "session", "harness"], "description": "Scope of applicability" },
|
|
12
|
-
"summary": { "type": "string", "description": "One-line description of what was verified" },
|
|
13
|
-
"tags": { "type": "array", "items": { "type": "string" }, "description": "Searchable tags" },
|
|
14
|
-
"source": { "type": "string", "enum": ["user", "agent", "audit", "migration", "repair"], "description": "Origin of this record" },
|
|
15
|
-
"provenance": {
|
|
16
|
-
"type": "object",
|
|
17
|
-
"required": ["session_id"],
|
|
18
|
-
"properties": {
|
|
19
|
-
"session_id": { "type": "string" },
|
|
20
|
-
"task_id": { "type": "string" },
|
|
21
|
-
"db_refs": { "type": "array", "items": { "type": "string" } },
|
|
22
|
-
"file_refs": { "type": "array", "items": { "type": "string" } },
|
|
23
|
-
"log_refs": { "type": "array", "items": { "type": "string" } },
|
|
24
|
-
"harness_root": { "type": "string" },
|
|
25
|
-
"project_root": { "type": "string" }
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"created_at": { "type": "string", "format": "date-time", "description": "ISO-8601 timestamp" },
|
|
29
|
-
"updated_at": { "type": "string", "format": "date-time", "description": "ISO-8601 timestamp" },
|
|
30
|
-
"expires_at": { "type": ["string", "null"], "format": "date-time", "description": "ISO-8601 — receipt invalid after this time regardless of fingerprint" },
|
|
31
|
-
"confidence": { "type": "number", "minimum": 0, "maximum": 1, "default": 1.0 },
|
|
32
|
-
"signal": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
|
|
33
|
-
"visibility": { "type": "string", "enum": ["implicit", "selective", "explicit"] },
|
|
34
|
-
"status": { "type": "string", "enum": ["active", "superseded", "archived", "closed", "open", "expired"] },
|
|
35
|
-
"refs": { "type": "array", "items": { "type": "string" }, "description": "Related object IDs or file paths" },
|
|
36
|
-
"review_at": { "type": ["string", "null"], "format": "date-time", "description": "ISO-8601 or null" },
|
|
37
|
-
"decay_at": { "type": ["string", "null"], "format": "date-time", "description": "ISO-8601 or null" },
|
|
38
|
-
"archived_at": { "type": ["string", "null"], "format": "date-time", "description": "ISO-8601 or null" },
|
|
39
|
-
"artifact": { "type": "string", "description": "Full path or logical identity of the verified artifact" },
|
|
40
|
-
"artifact_type": { "type": "string", "enum": ["file", "command", "config", "dependency", "memory", "state", "other"], "description": "Type of artifact verified" },
|
|
41
|
-
"fingerprint": {
|
|
42
|
-
"type": "object",
|
|
43
|
-
"required": ["path"],
|
|
44
|
-
"properties": {
|
|
45
|
-
"path": { "type": "string", "description": "Normalized file path or logical ID" },
|
|
46
|
-
"mtime": { "type": "string", "description": "File modification time (ISO-8601)" },
|
|
47
|
-
"size": { "type": "integer", "description": "File size in bytes" },
|
|
48
|
-
"sha256": { "type": "string", "description": "SHA-256 hash (optional but preferred)" }
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"environment": {
|
|
52
|
-
"type": "object",
|
|
53
|
-
"properties": {
|
|
54
|
-
"cwd": { "type": "string" },
|
|
55
|
-
"os": { "type": "string" },
|
|
56
|
-
"shell": { "type": "string", "default": "cmd.exe" },
|
|
57
|
-
"provider": { "type": "string" },
|
|
58
|
-
"model": { "type": "string" }
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"method": { "type": "string", "enum": ["command", "read", "test", "schema-validate", "manual-inspection", "bash", "grep", "live-hook-run", "permission-regression", "end-to-end-run", "external-test", "runtime-proof"], "description": "Verification method used. runtime-proof = linked to runtime_proof record for executable evidence." },
|
|
62
|
-
"command": { "type": "string", "description": "The command or action executed to verify" },
|
|
63
|
-
"result": { "type": "string", "enum": ["pass", "fail", "unknown"], "description": "Verification outcome" },
|
|
64
|
-
"result_detail": { "type": "string", "description": "Detailed result description or output summary" },
|
|
65
|
-
"supersedes": { "type": "array", "items": { "type": "string" }, "description": "Receipt IDs this receipt supersedes" },
|
|
66
|
-
"superseded_by": { "type": "array", "items": { "type": "string" }, "description": "Receipt IDs that supersede this one" },
|
|
67
|
-
"invalidation_reason": { "type": "string", "description": "If status is expired/superseded, why the receipt was invalidated" },
|
|
68
|
-
"description": { "type": "string", "description": "Optional description" },
|
|
69
|
-
"environment_fingerprint": {
|
|
70
|
-
"type": "object",
|
|
71
|
-
"description": "System fingerprint at creation time",
|
|
72
|
-
"properties": {
|
|
73
|
-
"cwd": { "type": "string" },
|
|
74
|
-
"harness_root": { "type": "string" },
|
|
75
|
-
"project_root": { "type": "string" },
|
|
76
|
-
"project": { "type": "string" },
|
|
77
|
-
"session_id": { "type": "string" },
|
|
78
|
-
"os": { "type": "string" },
|
|
79
|
-
"release": { "type": "string" },
|
|
80
|
-
"arch": { "type": "string" },
|
|
81
|
-
"shell": { "type": "string" },
|
|
82
|
-
"provider": { "type": "string" },
|
|
83
|
-
"model": { "type": "string" },
|
|
84
|
-
"sha256": { "type": "string" }
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
package/skill-builder.mjs
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import path from "node:path"
|
|
2
|
-
import fs from "node:fs"
|
|
3
|
-
import os from "node:os"
|
|
4
|
-
import { atomicWriteJson, buildEnvironmentFingerprint, readJson, sanitizeRecord } from "./lib/hardening.mjs"
|
|
5
|
-
import { getDataRoot, getMemoryRoot } from "./lib/paths.mjs"
|
|
6
|
-
|
|
7
|
-
const COMPLEXITY_THRESHOLD = { toolCalls: 8, subagents: 2 }
|
|
8
|
-
let sessionStats = { toolCalls: 0, subagents: 0, startTime: Date.now() }
|
|
9
|
-
|
|
10
|
-
export const SkillBuilderPlugin = async ({ project, directory }) => {
|
|
11
|
-
return {
|
|
12
|
-
"tool.execute.after": async (input, output) => {
|
|
13
|
-
sessionStats.toolCalls++
|
|
14
|
-
if (input.tool === "task") sessionStats.subagents++
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
event: async ({ event }) => {
|
|
18
|
-
if (event.type === "session.created") {
|
|
19
|
-
sessionStats = { toolCalls: 0, subagents: 0, startTime: Date.now() }
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (event.type === "session.idle") {
|
|
23
|
-
const stats = { ...sessionStats }
|
|
24
|
-
sessionStats = { toolCalls: 0, subagents: 0, startTime: Date.now() }
|
|
25
|
-
|
|
26
|
-
const durationMin = Math.round((Date.now() - stats.startTime) / 60000)
|
|
27
|
-
const isComplex = stats.toolCalls >= COMPLEXITY_THRESHOLD.toolCalls
|
|
28
|
-
|| stats.subagents >= COMPLEXITY_THRESHOLD.subagents
|
|
29
|
-
|
|
30
|
-
if (isComplex) {
|
|
31
|
-
try {
|
|
32
|
-
const root = getDataRoot()
|
|
33
|
-
const ts = new Date().toISOString()
|
|
34
|
-
const id = `bl_skill_candidate_${ts.replace(/[:.]/g, "-")}`
|
|
35
|
-
const backlogIndexPath = path.join(root, "memory", "backlog", "index.json")
|
|
36
|
-
const backlogIndex = readJson(backlogIndexPath, [])
|
|
37
|
-
const hasOpenCandidate = Array.isArray(backlogIndex)
|
|
38
|
-
? backlogIndex.some(e => e.status === "open" && String(e.summary || "").includes("[skill-candidate]"))
|
|
39
|
-
: false
|
|
40
|
-
if (hasOpenCandidate) return
|
|
41
|
-
const environmentFingerprint = buildEnvironmentFingerprint(root, directory, project)
|
|
42
|
-
const record = {
|
|
43
|
-
id,
|
|
44
|
-
class: "backlog",
|
|
45
|
-
scope: "global",
|
|
46
|
-
summary: `[skill-candidate] Complex session: ${stats.toolCalls} tool calls, ${stats.subagents} subagents, ${durationMin}min`,
|
|
47
|
-
description: `Session exceeded complexity thresholds (toolCalls>=${COMPLEXITY_THRESHOLD.toolCalls} or subagents>=${COMPLEXITY_THRESHOLD.subagents}). Session had ${stats.toolCalls} tool calls and ${stats.subagents} subagent spawns over ${durationMin} minutes.`,
|
|
48
|
-
title: `Skill candidate: Complex session (${stats.toolCalls} tool calls${stats.subagents ? `, ${stats.subagents} subagents`:""})`,
|
|
49
|
-
priority: "medium",
|
|
50
|
-
trigger: "drift",
|
|
51
|
-
status: "open",
|
|
52
|
-
provenance: {
|
|
53
|
-
session_id: project?.session_id || `session-${Date.now()}`,
|
|
54
|
-
harness_root: root,
|
|
55
|
-
project_root: directory,
|
|
56
|
-
},
|
|
57
|
-
tags: ["skill-candidate", "auto-detected"],
|
|
58
|
-
source: "agent",
|
|
59
|
-
created_at: ts,
|
|
60
|
-
updated_at: ts,
|
|
61
|
-
project: project?.name || path.basename(directory),
|
|
62
|
-
environment_fingerprint: environmentFingerprint,
|
|
63
|
-
}
|
|
64
|
-
const dir = path.join(root, "memory", "backlog")
|
|
65
|
-
fs.mkdirSync(dir, { recursive: true })
|
|
66
|
-
const safeRecord = sanitizeRecord(record, { maxStringLength: 4000 })
|
|
67
|
-
atomicWriteJson(path.join(dir, `${id}.json`), safeRecord)
|
|
68
|
-
|
|
69
|
-
const index = Array.isArray(backlogIndex) ? backlogIndex : []
|
|
70
|
-
index.push({
|
|
71
|
-
id,
|
|
72
|
-
summary: safeRecord.summary,
|
|
73
|
-
title: safeRecord.title,
|
|
74
|
-
status: "open",
|
|
75
|
-
updated_at: ts,
|
|
76
|
-
path: `openhermes/memory/backlog/${id}.json`,
|
|
77
|
-
priority: "medium",
|
|
78
|
-
trigger: "drift",
|
|
79
|
-
environment_fingerprint: environmentFingerprint,
|
|
80
|
-
})
|
|
81
|
-
atomicWriteJson(path.join(dir, "index.json"), index)
|
|
82
|
-
|
|
83
|
-
} catch (err) { process.stderr.write(`[skill-builder] backlog write error: ${err?.message || err}\n`) }
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
}
|
|
88
|
-
}
|