@sabaiway/agent-workflow-kit 19.5.0 → 20.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/CHANGELOG.md +67 -0
- package/README.md +18 -10
- package/SKILL.md +6 -6
- package/bin/install.mjs +1 -1
- package/capability.json +1 -1
- package/migrations/1.1.0-communication-language.md +2 -4
- package/migrations/1.2.0-agent-attribution.md +1 -3
- package/migrations/5.0.0-kit-text-in-kit-files.md +30 -0
- package/migrations/README.md +2 -2
- package/package.json +1 -1
- package/references/advisor-writers.md +1 -1
- package/references/contracts.md +9 -11
- package/references/modes/bootstrap.md +2 -4
- package/references/modes/hook.md +1 -1
- package/references/modes/procedures.md +1 -1
- package/references/modes/recommendations.md +1 -1
- package/references/modes/rules.md +4 -3
- package/references/modes/upgrade.md +23 -49
- package/references/modes/velocity.md +1 -1
- package/references/reference-profile.json +0 -6
- package/references/rules/communication.md +22 -0
- package/references/rules/project-layout.md +2 -0
- package/references/rules/story-sessions.md +14 -0
- package/references/shared/composition-handoff.md +24 -59
- package/references/shared/deploy-tail.md +2 -2
- package/references/templates/AGENTS.md +0 -10
- package/references/templates/agent_rules.md +0 -33
- package/tools/cheap-agents-read.mjs +1 -1
- package/tools/delegation.mjs +5 -8
- package/tools/engine-source.mjs +13 -11
- package/tools/family-registry.mjs +4 -5
- package/tools/inject-methodology.mjs +153 -493
- package/tools/migration-blocks.mjs +0 -6
- package/tools/orchestration-readme.mjs +1 -1
- package/tools/payload-prune.mjs +48 -8
- package/tools/profile-gap-screen.mjs +2 -6
- package/tools/profile-gaps.mjs +19 -100
- package/tools/project-rules/index.mjs +1 -2
- package/tools/project-rules/rules-ensure.mjs +37 -6
- package/tools/project-rules/rules-priors.mjs +1 -0
- package/tools/project-rules/themes.mjs +13 -5
- package/tools/transition/index.mjs +214 -0
- package/tools/upgrade-runlist.mjs +2 -17
- package/tools/velocity-profile.mjs +1 -1
- package/tools/lens-region.mjs +0 -281
- package/tools/project-rules/memory-map-row.mjs +0 -81
- package/tools/rules-insert.mjs +0 -203
- package/tools/rules-regions.mjs +0 -190
package/tools/delegation.mjs
CHANGED
|
@@ -87,9 +87,8 @@ export const handoffPlan = (delegate) =>
|
|
|
87
87
|
? {
|
|
88
88
|
mode: 'delegate',
|
|
89
89
|
memoryWrites: ['docs/ai/', 'AGENTS.md', 'docs/ai/.memory-version'],
|
|
90
|
-
// The
|
|
91
|
-
|
|
92
|
-
kitWrites: ['AGENTS.md pointer slots (methodology / orchestration / autonomy)', 'docs/ai/agent_rules.md Communication, story-sessions and lens regions', 'docs/ai/.workflow-version'],
|
|
90
|
+
// The kit block and the rules themes run AFTER the substrate deploy, over memory's seed.
|
|
91
|
+
kitWrites: ['AGENTS.md kit block', 'docs/ai/rules/ theme files', 'docs/ai/.workflow-version'],
|
|
93
92
|
stampsPresent: ['.memory-version', '.workflow-version'],
|
|
94
93
|
memoryRaisesCommitGate: false,
|
|
95
94
|
commitGate: 'kit-only-after-injection',
|
|
@@ -97,11 +96,9 @@ export const handoffPlan = (delegate) =>
|
|
|
97
96
|
: {
|
|
98
97
|
mode: 'fallback',
|
|
99
98
|
memoryWrites: [],
|
|
100
|
-
// Fallback
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
// runs after the fallback-template copy of docs/ai (same reconcile, both paths — AD-041).
|
|
104
|
-
kitWrites: ['docs/ai/', 'AGENTS.md', 'AGENTS.md pointer slots (methodology / orchestration / autonomy)', 'docs/ai/agent_rules.md Communication, story-sessions and lens regions', 'docs/ai/.workflow-version'],
|
|
99
|
+
// Fallback ships the kit's OWN AGENTS.md; the kit block is written into it exactly as on the
|
|
100
|
+
// delegate path, so both paths end with the same block.
|
|
101
|
+
kitWrites: ['docs/ai/', 'AGENTS.md', 'AGENTS.md kit block', 'docs/ai/rules/ theme files', 'docs/ai/.workflow-version'],
|
|
105
102
|
stampsPresent: ['.workflow-version'],
|
|
106
103
|
memoryRaisesCommitGate: false,
|
|
107
104
|
commitGate: 'kit-only-after-injection',
|
package/tools/engine-source.mjs
CHANGED
|
@@ -37,12 +37,10 @@ export const PROCEDURES_FRAGMENT_REL = 'references/procedures.md';
|
|
|
37
37
|
// `status` caveat it) instead of discarding the methodology/orchestration fills. readEngineFragment
|
|
38
38
|
// accepts an arbitrary `rel`, so no further plumbing is needed beyond this constant.
|
|
39
39
|
export const AUTONOMY_FRAGMENT_REL = 'references/autonomy-slot.md';
|
|
40
|
-
// The
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
export const LENS_FRAGMENT_REL = 'references/agent-rules-lens.md';
|
|
45
|
-
export const LENS_PRIORS_REL = 'references/agent-rules-lens-priors.md';
|
|
40
|
+
// The lens rules theme — the template of the engine-homed project-rules theme `lens`. The rules op
|
|
41
|
+
// lays it down as docs/ai/rules/lens.md and the kit block's table names its effective file; an engine that lacks it leaves the
|
|
42
|
+
// theme unlaid with a line, and `status` caveats it.
|
|
43
|
+
export const LENS_THEME_REL = 'references/rules/lens.md';
|
|
46
44
|
const ENGINE_DEFAULT_REL = '.claude/skills/agent-workflow-engine';
|
|
47
45
|
|
|
48
46
|
const defaultStatType = (path) => {
|
|
@@ -134,9 +132,13 @@ export const readEngineFragment = (engineDir, deps = {}) => {
|
|
|
134
132
|
if (!detection.ok) throw installMe(detection.reason);
|
|
135
133
|
const read = deps.readFileSync ?? readFileSync;
|
|
136
134
|
const fragmentRel = deps.rel ?? ENGINE_FRAGMENT_REL;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
const text = (() => {
|
|
136
|
+
try {
|
|
137
|
+
return read(join(engineDir, fragmentRel), 'utf8');
|
|
138
|
+
} catch (err) {
|
|
139
|
+
throw installMe(`a required engine file is unreadable (${fragmentRel}): ${err.message}`);
|
|
140
|
+
}
|
|
141
|
+
})();
|
|
142
|
+
if (text.trim() === '') throw installMe(`a required engine file is blank (${fragmentRel})`);
|
|
143
|
+
return text;
|
|
142
144
|
};
|
|
@@ -27,7 +27,7 @@ import { isDirectRun } from './direct-run.mjs';
|
|
|
27
27
|
import { parseSemver, compareSemver } from './semver-lite.mjs';
|
|
28
28
|
import { validateManifest, readAuthoritativeVersion, UNSUPPORTED, INVALID } from './manifest/validate.mjs';
|
|
29
29
|
import { START_MARKER, excludePath, inferVisibility } from './hide-footprint.mjs';
|
|
30
|
-
import { readEngineFragment, ORCHESTRATION_FRAGMENT_REL, PROCEDURES_FRAGMENT_REL, AUTONOMY_FRAGMENT_REL,
|
|
30
|
+
import { readEngineFragment, ORCHESTRATION_FRAGMENT_REL, PROCEDURES_FRAGMENT_REL, AUTONOMY_FRAGMENT_REL, LENS_THEME_REL } from './engine-source.mjs';
|
|
31
31
|
import { ACTIVITIES, resolveActivityRecipe, composeReadiness, safeLine } from './recipes.mjs';
|
|
32
32
|
// The config reader lives in orchestration-config.mjs (the single config contract). The read-only status
|
|
33
33
|
// settings-survey reuses THIS reader (one strict-JSON + loud-on-malformed contract), not a second copy.
|
|
@@ -181,14 +181,13 @@ export const classifyMember = (member, deps = {}) => {
|
|
|
181
181
|
// the manifest AND reads the fragment — so an absent, non-file, OR present-but-unreadable fragment all
|
|
182
182
|
// surface (status never claims "ok" for a fragment a reconcile / the procedures CLI would STOP on), and
|
|
183
183
|
// a current, readable fragment never gets the caveat. Read-only, best-effort.
|
|
184
|
-
// Each caveat names the rel
|
|
185
|
-
//
|
|
186
|
-
// caveat keys on both — an engine missing only the prior store must never report healthy.
|
|
184
|
+
// Each caveat names the rel its consumer actually needs: the lens caveat keys on the lens rules theme
|
|
185
|
+
// the rules op lays down, so an engine lacking it never reports healthy.
|
|
187
186
|
const ENGINE_FRAGMENT_CAVEATS = [
|
|
188
187
|
{ rels: [ORCHESTRATION_FRAGMENT_REL], caveat: 'engine present but does not supply the recipes pointer (too old / incomplete) — run `npx @sabaiway/agent-workflow-engine@latest init`' },
|
|
189
188
|
{ rels: [AUTONOMY_FRAGMENT_REL], caveat: 'engine present but does not supply the autonomy pointer (too old / incomplete) — run `npx @sabaiway/agent-workflow-engine@latest init`' },
|
|
190
189
|
{ rels: [PROCEDURES_FRAGMENT_REL], caveat: 'engine present but does not ship the activity-procedures canon (too old / incomplete) — run `npx @sabaiway/agent-workflow-engine@latest init`' },
|
|
191
|
-
{ rels: [
|
|
190
|
+
{ rels: [LENS_THEME_REL], caveat: 'engine present but does not ship the lens rules theme (too old / incomplete) — run `npx @sabaiway/agent-workflow-engine@latest init`' },
|
|
192
191
|
];
|
|
193
192
|
|
|
194
193
|
// The orchestration-config TEMPLATE a current memory ships (added in memory 1.2.0; absent in older
|