blacksmith-organization-system 1.0.0-dev.3 → 1.2.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/LICENSE +1 -1
- package/README.md +77 -70
- package/dist/bridges/git.d.ts +9 -0
- package/dist/bridges/git.js +30 -0
- package/dist/bridges/git.js.map +1 -0
- package/dist/bridges/github.d.ts +28 -0
- package/dist/bridges/github.js +71 -0
- package/dist/bridges/github.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +53 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/context.d.ts +18 -0
- package/dist/core/context.js +14 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/element.d.ts +49 -0
- package/dist/core/element.js +97 -0
- package/dist/core/element.js.map +1 -0
- package/dist/core/host.d.ts +32 -0
- package/dist/core/host.js +5 -0
- package/dist/core/host.js.map +1 -0
- package/dist/core/paths.d.ts +5 -0
- package/dist/core/paths.js +42 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/procedure.d.ts +11 -0
- package/dist/core/procedure.js +24 -0
- package/dist/core/procedure.js.map +1 -0
- package/dist/core/tool.d.ts +33 -0
- package/dist/core/tool.js +44 -0
- package/dist/core/tool.js.map +1 -0
- package/dist/core/version.d.ts +6 -0
- package/dist/core/version.js +37 -0
- package/dist/core/version.js.map +1 -0
- package/dist/hosts/node.d.ts +21 -0
- package/dist/hosts/node.js +76 -0
- package/dist/hosts/node.js.map +1 -0
- package/dist/hosts/watch-tree.d.ts +8 -0
- package/dist/hosts/watch-tree.js +86 -0
- package/dist/hosts/watch-tree.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +55 -0
- package/dist/main.js +99 -0
- package/dist/main.js.map +1 -0
- package/dist/models/_index.d.ts +20 -0
- package/dist/models/_index.js +22 -0
- package/dist/models/_index.js.map +1 -0
- package/dist/models/archive/class.d.ts +5 -0
- package/dist/models/archive/class.js +7 -0
- package/dist/models/archive/class.js.map +1 -0
- package/dist/models/authors/entry.d.ts +20 -0
- package/dist/models/authors/entry.js +73 -0
- package/dist/models/authors/entry.js.map +1 -0
- package/dist/models/authors/file.d.ts +9 -0
- package/dist/models/authors/file.js +19 -0
- package/dist/models/authors/file.js.map +1 -0
- package/dist/models/craftbook/class.d.ts +10 -0
- package/dist/models/craftbook/class.js +13 -0
- package/dist/models/craftbook/class.js.map +1 -0
- package/dist/models/devarmory/class.d.ts +11 -0
- package/dist/models/devarmory/class.js +8 -0
- package/dist/models/devarmory/class.js.map +1 -0
- package/dist/models/devlog/class.d.ts +19 -0
- package/dist/models/devlog/class.js +61 -0
- package/dist/models/devlog/class.js.map +1 -0
- package/dist/models/forge/class.d.ts +9 -0
- package/dist/models/forge/class.js +24 -0
- package/dist/models/forge/class.js.map +1 -0
- package/dist/models/loop/class.d.ts +16 -0
- package/dist/models/loop/class.js +56 -0
- package/dist/models/loop/class.js.map +1 -0
- package/dist/models/loop/data.d.ts +12 -0
- package/dist/models/loop/data.js +20 -0
- package/dist/models/loop/data.js.map +1 -0
- package/dist/models/loop/load.d.ts +5 -0
- package/dist/models/loop/load.js +14 -0
- package/dist/models/loop/load.js.map +1 -0
- package/dist/models/project/anatomy.d.ts +2 -0
- package/dist/models/project/anatomy.js +15 -0
- package/dist/models/project/anatomy.js.map +1 -0
- package/dist/models/project/around.d.ts +3 -0
- package/dist/models/project/around.js +13 -0
- package/dist/models/project/around.js.map +1 -0
- package/dist/models/project/class.d.ts +21 -0
- package/dist/models/project/class.js +23 -0
- package/dist/models/project/class.js.map +1 -0
- package/dist/models/project/git.d.ts +8 -0
- package/dist/models/project/git.js +26 -0
- package/dist/models/project/git.js.map +1 -0
- package/dist/models/project/version.d.ts +6 -0
- package/dist/models/project/version.js +23 -0
- package/dist/models/project/version.js.map +1 -0
- package/dist/models/scope/class.d.ts +21 -0
- package/dist/models/scope/class.js +49 -0
- package/dist/models/scope/class.js.map +1 -0
- package/dist/models/settings/data.d.ts +12 -0
- package/dist/models/settings/data.js +9 -0
- package/dist/models/settings/data.js.map +1 -0
- package/dist/models/settings/load.d.ts +9 -0
- package/dist/models/settings/load.js +32 -0
- package/dist/models/settings/load.js.map +1 -0
- package/dist/models/system/class.d.ts +16 -0
- package/dist/models/system/class.js +21 -0
- package/dist/models/system/class.js.map +1 -0
- package/dist/models/system/parts.d.ts +21 -0
- package/dist/models/system/parts.js +22 -0
- package/dist/models/system/parts.js.map +1 -0
- package/dist/models/system/storylines.d.ts +39 -0
- package/dist/models/system/storylines.js +42 -0
- package/dist/models/system/storylines.js.map +1 -0
- package/dist/models/workshop/class.d.ts +20 -0
- package/dist/models/workshop/class.js +43 -0
- package/dist/models/workshop/class.js.map +1 -0
- package/dist/models/workshop/locate.d.ts +16 -0
- package/dist/models/workshop/locate.js +54 -0
- package/dist/models/workshop/locate.js.map +1 -0
- package/dist/procedures/_index.d.ts +8 -0
- package/dist/procedures/_index.js +11 -0
- package/dist/procedures/_index.js.map +1 -0
- package/dist/procedures/automerging/_index.d.ts +4 -0
- package/dist/procedures/automerging/_index.js +8 -0
- package/dist/procedures/automerging/_index.js.map +1 -0
- package/dist/procedures/automerging/context.d.ts +11 -0
- package/dist/procedures/automerging/context.js +2 -0
- package/dist/procedures/automerging/context.js.map +1 -0
- package/dist/procedures/automerging/steps.d.ts +4 -0
- package/dist/procedures/automerging/steps.js +34 -0
- package/dist/procedures/automerging/steps.js.map +1 -0
- package/dist/procedures/bootstrapping/_index.d.ts +4 -0
- package/dist/procedures/bootstrapping/_index.js +8 -0
- package/dist/procedures/bootstrapping/_index.js.map +1 -0
- package/dist/procedures/bootstrapping/context.d.ts +5 -0
- package/dist/procedures/bootstrapping/context.js +2 -0
- package/dist/procedures/bootstrapping/context.js.map +1 -0
- package/dist/procedures/bootstrapping/ensure-tree.d.ts +2 -0
- package/dist/procedures/bootstrapping/ensure-tree.js +5 -0
- package/dist/procedures/bootstrapping/ensure-tree.js.map +1 -0
- package/dist/procedures/bootstrapping/record.d.ts +2 -0
- package/dist/procedures/bootstrapping/record.js +12 -0
- package/dist/procedures/bootstrapping/record.js.map +1 -0
- package/dist/procedures/bumping/_index.d.ts +4 -0
- package/dist/procedures/bumping/_index.js +9 -0
- package/dist/procedures/bumping/_index.js.map +1 -0
- package/dist/procedures/bumping/context.d.ts +18 -0
- package/dist/procedures/bumping/context.js +4 -0
- package/dist/procedures/bumping/context.js.map +1 -0
- package/dist/procedures/bumping/steps.d.ts +4 -0
- package/dist/procedures/bumping/steps.js +50 -0
- package/dist/procedures/bumping/steps.js.map +1 -0
- package/dist/procedures/crediting/_index.d.ts +4 -0
- package/dist/procedures/crediting/_index.js +9 -0
- package/dist/procedures/crediting/_index.js.map +1 -0
- package/dist/procedures/crediting/context.d.ts +17 -0
- package/dist/procedures/crediting/context.js +4 -0
- package/dist/procedures/crediting/context.js.map +1 -0
- package/dist/procedures/crediting/steps.d.ts +4 -0
- package/dist/procedures/crediting/steps.js +51 -0
- package/dist/procedures/crediting/steps.js.map +1 -0
- package/dist/procedures/inspecting/_index.d.ts +4 -0
- package/dist/procedures/inspecting/_index.js +11 -0
- package/dist/procedures/inspecting/_index.js.map +1 -0
- package/dist/procedures/inspecting/judge.d.ts +2 -0
- package/dist/procedures/inspecting/judge.js +6 -0
- package/dist/procedures/inspecting/judge.js.map +1 -0
- package/dist/procedures/inspecting/read-areas.d.ts +2 -0
- package/dist/procedures/inspecting/read-areas.js +5 -0
- package/dist/procedures/inspecting/read-areas.js.map +1 -0
- package/dist/procedures/inspecting/read-forge.d.ts +2 -0
- package/dist/procedures/inspecting/read-forge.js +14 -0
- package/dist/procedures/inspecting/read-forge.js.map +1 -0
- package/dist/procedures/inspecting/report.d.ts +32 -0
- package/dist/procedures/inspecting/report.js +11 -0
- package/dist/procedures/inspecting/report.js.map +1 -0
- package/dist/procedures/inspecting/rules.d.ts +12 -0
- package/dist/procedures/inspecting/rules.js +75 -0
- package/dist/procedures/inspecting/rules.js.map +1 -0
- package/dist/procedures/proposing/_index.d.ts +4 -0
- package/dist/procedures/proposing/_index.js +9 -0
- package/dist/procedures/proposing/_index.js.map +1 -0
- package/dist/procedures/proposing/context.d.ts +16 -0
- package/dist/procedures/proposing/context.js +4 -0
- package/dist/procedures/proposing/context.js.map +1 -0
- package/dist/procedures/proposing/steps.d.ts +4 -0
- package/dist/procedures/proposing/steps.js +46 -0
- package/dist/procedures/proposing/steps.js.map +1 -0
- package/dist/procedures/versioning/_index.d.ts +16 -0
- package/dist/procedures/versioning/_index.js +22 -0
- package/dist/procedures/versioning/_index.js.map +1 -0
- package/dist/procedures/watching/_index.d.ts +5 -0
- package/dist/procedures/watching/_index.js +9 -0
- package/dist/procedures/watching/_index.js.map +1 -0
- package/dist/procedures/watching/classify.d.ts +5 -0
- package/dist/procedures/watching/classify.js +30 -0
- package/dist/procedures/watching/classify.js.map +1 -0
- package/dist/procedures/watching/context.d.ts +21 -0
- package/dist/procedures/watching/context.js +2 -0
- package/dist/procedures/watching/context.js.map +1 -0
- package/dist/procedures/watching/start.d.ts +2 -0
- package/dist/procedures/watching/start.js +24 -0
- package/dist/procedures/watching/start.js.map +1 -0
- package/dist/procedures/watching/wait.d.ts +2 -0
- package/dist/procedures/watching/wait.js +12 -0
- package/dist/procedures/watching/wait.js.map +1 -0
- package/dist/tools/_index.d.ts +3 -0
- package/dist/tools/_index.js +25 -0
- package/dist/tools/_index.js.map +1 -0
- package/dist/tools/devlog.d.ts +1 -0
- package/dist/tools/devlog.js +43 -0
- package/dist/tools/devlog.js.map +1 -0
- package/dist/tools/flow.d.ts +1 -0
- package/dist/tools/flow.js +81 -0
- package/dist/tools/flow.js.map +1 -0
- package/dist/tools/project.d.ts +1 -0
- package/dist/tools/project.js +18 -0
- package/dist/tools/project.js.map +1 -0
- package/dist/tools/scope.d.ts +1 -0
- package/dist/tools/scope.js +51 -0
- package/dist/tools/scope.js.map +1 -0
- package/dist/tools/version.d.ts +1 -0
- package/dist/tools/version.js +23 -0
- package/dist/tools/version.js.map +1 -0
- package/dist/tools/workshop.d.ts +1 -0
- package/dist/tools/workshop.js +56 -0
- package/dist/tools/workshop.js.map +1 -0
- package/dist/views/devlog.d.ts +15 -0
- package/dist/views/devlog.js +31 -0
- package/dist/views/devlog.js.map +1 -0
- package/dist/views/event.d.ts +2 -0
- package/dist/views/event.js +6 -0
- package/dist/views/event.js.map +1 -0
- package/dist/views/flow.d.ts +12 -0
- package/dist/views/flow.js +26 -0
- package/dist/views/flow.js.map +1 -0
- package/dist/views/help.d.ts +2 -0
- package/dist/views/help.js +22 -0
- package/dist/views/help.js.map +1 -0
- package/dist/views/project.d.ts +2 -0
- package/dist/views/project.js +11 -0
- package/dist/views/project.js.map +1 -0
- package/dist/views/status.d.ts +5 -0
- package/dist/views/status.js +50 -0
- package/dist/views/status.js.map +1 -0
- package/package.json +31 -54
- package/resources/cli-art/big-logo-title.txt +24 -0
- package/resources/cli-art/big-shortcut-logo-title.txt +10 -0
- package/resources/cli-art/medium-logo-title.txt +13 -0
- package/resources/cli-art/minimenu-header.ptxml +13 -0
- package/resources/cli-art/minimenu-header.txt +11 -0
- package/resources/cli-art/small-logo-title.txt +10 -0
- package/resources/cli-art/wellcome.txt +10 -0
- package/resources/docs-templates/Home.md +7 -0
- package/resources/docs-templates/README.md +14 -0
- package/resources/docs-templates/_Footer.md +1 -0
- package/resources/docs-templates/_Sidebar.md +7 -0
- package/.claude-plugin/marketplace.json +0 -17
- package/.claude-plugin/mcp.json +0 -8
- package/.claude-plugin/plugin.json +0 -16
- package/AGENTS.md +0 -114
- package/CLAUDE.md +0 -1
- package/bin/bos +0 -3
- package/hooks/hooks.json +0 -40
- package/resources/house/HOUSE.md +0 -22
- package/resources/house/bloodlines.json +0 -35
- package/resources/house/children/deepseeks-of-anubis.json +0 -4
- package/resources/house/children/eon.json +0 -7
- package/resources/house/children/hermetic-officer.json +0 -1
- package/resources/house/children/ifrit.json +0 -1
- package/resources/house/children/license-keepers.json +0 -4
- package/resources/house/children/sebas.json +0 -10
- package/resources/house/children/shakespeare.json +0 -10
- package/resources/house/orders/ravensarmy.json +0 -6
- package/resources/house/orders/seiaic-ucdi.json +0 -5
- package/resources/ravens/skryba.md +0 -19
- package/resources/workshop-root/AGENTS.md +0 -92
- package/resources/workshop-root/CLAUDE.md +0 -1
- package/resources/workshop.default.json +0 -6
- package/skills/bos-archive/SKILL.md +0 -28
- package/skills/bos-craftbook/SKILL.md +0 -32
- package/skills/bos-craftset/SKILL.md +0 -36
- package/skills/bos-devarmory/SKILL.md +0 -34
- package/skills/bos-exhibit/SKILL.md +0 -28
- package/skills/bos-forge/SKILL.md +0 -28
- package/skills/bos-house/SKILL.md +0 -52
- package/skills/bos-project/SKILL.md +0 -27
- package/skills/bos-sarcophag/SKILL.md +0 -26
- package/skills/bos-scope/SKILL.md +0 -33
- package/skills/bos-sheme/SKILL.md +0 -38
- package/skills/bos-throwbox/SKILL.md +0 -27
- package/skills/bos-workshop/SKILL.md +0 -65
- package/skills/bos-workshop/assets/.gitkeep +0 -0
- package/skills/bos-workshop/references/bos-codebase.md +0 -116
- package/skills/bos-workshop/references/bos-concept.md +0 -121
- package/skills/bos-workshop/scripts/find-workshop.sh +0 -30
- package/src/agent-hook.mjs +0 -28
- package/src/bridge/_index.mjs +0 -24
- package/src/bridge/bos-instances-link/_index.mjs +0 -18
- package/src/bridge/docker-host/_index.mjs +0 -43
- package/src/bridge/docker-host/container.mjs +0 -32
- package/src/bridge/docker-host/image.mjs +0 -23
- package/src/bridge/docker-host/volume.mjs +0 -12
- package/src/bridge/docker-publish/_index.mjs +0 -24
- package/src/bridge/git-client/_index.mjs +0 -121
- package/src/bridge/git-client/author.mjs +0 -26
- package/src/bridge/gitea-api/_index.mjs +0 -62
- package/src/bridge/github-api/_index.mjs +0 -45
- package/src/bridge/npm-publish/_index.mjs +0 -19
- package/src/bridge/ollama-link/_index.mjs +0 -93
- package/src/bridge/ollama-link/ravens.mjs +0 -29
- package/src/bridge/ssh-link/_index.mjs +0 -33
- package/src/bridge/subprocess-runner/_index.mjs +0 -33
- package/src/cli.mjs +0 -29
- package/src/commands/_index.mjs +0 -51
- package/src/commands/bootstrap/exec.mjs +0 -7
- package/src/commands/bootstrap/help.md +0 -5
- package/src/commands/bootstrap/index.json +0 -7
- package/src/commands/close/exec.mjs +0 -4
- package/src/commands/close/help.md +0 -5
- package/src/commands/close/index.json +0 -7
- package/src/commands/describe/exec.mjs +0 -11
- package/src/commands/describe/help.md +0 -5
- package/src/commands/describe/index.json +0 -7
- package/src/commands/help/exec.mjs +0 -6
- package/src/commands/help/help.md +0 -3
- package/src/commands/help/index.json +0 -6
- package/src/commands/hook/exec.mjs +0 -3
- package/src/commands/hook/help.md +0 -4
- package/src/commands/hook/index.json +0 -7
- package/src/commands/hooks/exec.mjs +0 -5
- package/src/commands/hooks/help.md +0 -4
- package/src/commands/hooks/index.json +0 -7
- package/src/commands/house/exec.mjs +0 -8
- package/src/commands/house/help.md +0 -8
- package/src/commands/house/index.json +0 -7
- package/src/commands/locate/exec.mjs +0 -2
- package/src/commands/locate/help.md +0 -6
- package/src/commands/locate/index.json +0 -6
- package/src/commands/mode/exec.mjs +0 -17
- package/src/commands/mode/help.md +0 -14
- package/src/commands/mode/index.json +0 -8
- package/src/commands/mode/repl.mjs +0 -18
- package/src/commands/open/exec.mjs +0 -5
- package/src/commands/open/help.md +0 -4
- package/src/commands/open/index.json +0 -7
- package/src/commands/promote/exec.mjs +0 -5
- package/src/commands/promote/help.md +0 -6
- package/src/commands/promote/index.json +0 -7
- package/src/commands/repl/exec.mjs +0 -3
- package/src/commands/repl/help.md +0 -4
- package/src/commands/repl/index.json +0 -6
- package/src/commands/seal/exec.mjs +0 -8
- package/src/commands/seal/help.md +0 -4
- package/src/commands/seal/index.json +0 -7
- package/src/commands/sink/exec.mjs +0 -2
- package/src/commands/sink/help.md +0 -6
- package/src/commands/sink/index.json +0 -7
- package/src/commands/skills/exec.mjs +0 -5
- package/src/commands/skills/help.md +0 -5
- package/src/commands/skills/index.json +0 -7
- package/src/commands/status/exec.mjs +0 -2
- package/src/commands/status/help.md +0 -6
- package/src/commands/status/index.json +0 -7
- package/src/commands/status/repl.mjs +0 -14
- package/src/commands/verify/exec.mjs +0 -9
- package/src/commands/verify/help.md +0 -4
- package/src/commands/verify/index.json +0 -7
- package/src/controllers/_index.mjs +0 -5
- package/src/controllers/skills-controll.mjs +0 -13
- package/src/controllers/workshop-controll.mjs +0 -48
- package/src/core/basic-bridge.mjs +0 -29
- package/src/core/basic-controll.mjs +0 -26
- package/src/core/basic-element.mjs +0 -149
- package/src/core/basic-model.mjs +0 -7
- package/src/core/basic-procedure.mjs +0 -37
- package/src/core/basic-submodule.mjs +0 -21
- package/src/core/basic-view.mjs +0 -21
- package/src/core/self.mjs +0 -10
- package/src/index.mjs +0 -24
- package/src/main.ts +0 -82
- package/src/mcp.mjs +0 -8
- package/src/models/_index.mjs +0 -43
- package/src/models/archive/class.mjs +0 -9
- package/src/models/craftbook/class.mjs +0 -11
- package/src/models/craftbook/hang.scrapnotes.mjs +0 -10
- package/src/models/craftset/class.mjs +0 -14
- package/src/models/devarmory/class.mjs +0 -10
- package/src/models/exhibit/class.mjs +0 -8
- package/src/models/forge/class.mjs +0 -19
- package/src/models/house/bloodlines.mjs +0 -27
- package/src/models/house/class.mjs +0 -53
- package/src/models/house/groups.mjs +0 -38
- package/src/models/project/anatomy.mjs +0 -11
- package/src/models/project/class.mjs +0 -20
- package/src/models/sarcophag/class.mjs +0 -8
- package/src/models/scope/class.mjs +0 -19
- package/src/models/sheme/class.mjs +0 -8
- package/src/models/throwbox/class.mjs +0 -9
- package/src/models/workshop/class.mjs +0 -30
- package/src/models/workshop/hang.data.mjs +0 -10
- package/src/models/workshop/hang.nests.mjs +0 -14
- package/src/models/workshop/hang.setup.mjs +0 -10
- package/src/models/workshop/hang.storylines.logs.mjs +0 -10
- package/src/models/workshop/hang.storylines.manifests.mjs +0 -10
- package/src/models/workshop/hang.storylines.mjs +0 -39
- package/src/models/workshop/hang.storylines.ttystories.mjs +0 -10
- package/src/models/workshop/hang.system.mjs +0 -25
- package/src/models/workshop/host-roles.mjs +0 -9
- package/src/models/workshop/locate.mjs +0 -60
- package/src/models/workshop/modes.mjs +0 -31
- package/src/models/workshop/taskfile.mjs +0 -21
- package/src/procedures/_index.mjs +0 -32
- package/src/procedures/agent-recording/_index.mjs +0 -34
- package/src/procedures/agent-recording/situate.mjs +0 -11
- package/src/procedures/bootstrapping/DESCRIPTION.md +0 -6
- package/src/procedures/bootstrapping/_index.mjs +0 -13
- package/src/procedures/bootstrapping/deploy-guides.mjs +0 -15
- package/src/procedures/bootstrapping/ensure-tree.mjs +0 -4
- package/src/procedures/closing/DESCRIPTION.md +0 -6
- package/src/procedures/closing/_index.mjs +0 -11
- package/src/procedures/closing/capture-ttystory.mjs +0 -14
- package/src/procedures/closing/record-closing.mjs +0 -6
- package/src/procedures/describing/DESCRIPTION.md +0 -23
- package/src/procedures/describing/_index.mjs +0 -15
- package/src/procedures/describing/ask-skryba.mjs +0 -82
- package/src/procedures/describing/compose-message.mjs +0 -25
- package/src/procedures/describing/read-staged.mjs +0 -7
- package/src/procedures/describing/scopes.mjs +0 -38
- package/src/procedures/describing/staged-diff.mjs +0 -25
- package/src/procedures/describing/write-message.mjs +0 -15
- package/src/procedures/gathering/DESCRIPTION.md +0 -13
- package/src/procedures/gathering/_index.mjs +0 -13
- package/src/procedures/gathering/list-served.mjs +0 -9
- package/src/procedures/gathering/merge-residents.mjs +0 -31
- package/src/procedures/gathering/read-registry.mjs +0 -7
- package/src/procedures/hooking/DESCRIPTION.md +0 -6
- package/src/procedures/hooking/_index.mjs +0 -12
- package/src/procedures/hooking/hooks.mjs +0 -10
- package/src/procedures/hooking/install-hooks.mjs +0 -34
- package/src/procedures/hooking/record-hook.mjs +0 -13
- package/src/procedures/inspecting/DESCRIPTION.md +0 -3
- package/src/procedures/inspecting/_index.mjs +0 -9
- package/src/procedures/loading/DESCRIPTION.md +0 -4
- package/src/procedures/loading/_index.mjs +0 -15
- package/src/procedures/loading/load-config.mjs +0 -16
- package/src/procedures/loading/validate-mode.mjs +0 -8
- package/src/procedures/loading/validate-role.mjs +0 -8
- package/src/procedures/locating/DESCRIPTION.md +0 -6
- package/src/procedures/locating/_index.mjs +0 -13
- package/src/procedures/locating/locate-self.mjs +0 -7
- package/src/procedures/locating/locate-workshop.mjs +0 -16
- package/src/procedures/locating/read-environment.mjs +0 -12
- package/src/procedures/mode-switching/DESCRIPTION.md +0 -7
- package/src/procedures/mode-switching/_index.mjs +0 -10
- package/src/procedures/mode-switching/record-mode.mjs +0 -8
- package/src/procedures/mode-switching/switch-mode.mjs +0 -16
- package/src/procedures/opening/DESCRIPTION.md +0 -6
- package/src/procedures/opening/_index.mjs +0 -8
- package/src/procedures/opening/record-opening.mjs +0 -4
- package/src/procedures/promoting/DESCRIPTION.md +0 -8
- package/src/procedures/promoting/_index.mjs +0 -14
- package/src/procedures/promoting/apply.mjs +0 -28
- package/src/procedures/promoting/branch-flow.mjs +0 -23
- package/src/procedures/promoting/plan.mjs +0 -14
- package/src/procedures/promoting/read-position.mjs +0 -15
- package/src/procedures/sinking/DESCRIPTION.md +0 -8
- package/src/procedures/sinking/_index.mjs +0 -12
- package/src/procedures/sinking/inventory-forge.mjs +0 -18
- package/src/procedures/sinking/inventory-tools.mjs +0 -7
- package/src/procedures/skilling/DESCRIPTION.md +0 -11
- package/src/procedures/skilling/_index.mjs +0 -15
- package/src/procedures/skilling/collect-models.mjs +0 -15
- package/src/procedures/skilling/compose-skill.mjs +0 -49
- package/src/procedures/skilling/glossary.mjs +0 -23
- package/src/procedures/skilling/register-skills.mjs +0 -21
- package/src/procedures/skilling/write-skills.mjs +0 -19
- package/src/views/_index.mjs +0 -23
- package/src/views/agent/_index.mjs +0 -2
- package/src/views/agent/brief.mjs +0 -34
- package/src/views/help/_index.mjs +0 -41
- package/src/views/house/_index.mjs +0 -56
- package/src/views/inventory/_index.mjs +0 -27
- package/src/views/mcp/_index.mjs +0 -31
- package/src/views/mcp/tools.mjs +0 -87
- package/src/views/mode/_index.mjs +0 -34
- package/src/views/mode/chooser.mjs +0 -37
- package/src/views/promotion/_index.mjs +0 -20
- package/src/views/repl/_index.mjs +0 -30
- package/src/views/skills/_index.mjs +0 -24
- package/src/views/status/_index.mjs +0 -57
- package/src/views/status/tree.mjs +0 -19
- package/src/views/terminal/paint.mjs +0 -22
- package/template/SKILL.md +0 -16
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// A private repository holding a family of projects, shemes and one throwbox (glossary: scope).
|
|
2
|
-
import { existsSync, readdirSync } from "node:fs";
|
|
3
|
-
|
|
4
|
-
import { BOS } from "../../main.ts";
|
|
5
|
-
import Project from "../project/class.mjs";
|
|
6
|
-
|
|
7
|
-
export class Scope extends BOS.Model {
|
|
8
|
-
static type = "scope";
|
|
9
|
-
|
|
10
|
-
// every directory inside that is a git repository counts as a project
|
|
11
|
-
projects() {
|
|
12
|
-
if (!this.exists()) return [];
|
|
13
|
-
return readdirSync(this.path, { withFileTypes: true })
|
|
14
|
-
.filter((entry) => entry.isDirectory() && existsSync(this.file(entry.name, ".git")))
|
|
15
|
-
.map((entry) => new Project(this.file(entry.name), this));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default Scope;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// The workshop: root of crafting on a host or partition (glossary: workshop).
|
|
2
|
-
// Areas are models (they hold assets); .BOS internals are submodules hanging on it.
|
|
3
|
-
import { BOS } from "../../main.ts";
|
|
4
|
-
import Archive from "../archive/class.mjs";
|
|
5
|
-
import Craftbook from "../craftbook/class.mjs";
|
|
6
|
-
import Devarmory from "../devarmory/class.mjs";
|
|
7
|
-
import Forge from "../forge/class.mjs";
|
|
8
|
-
import Data from "./hang.data.mjs";
|
|
9
|
-
import Nests from "./hang.nests.mjs";
|
|
10
|
-
import Setup from "./hang.setup.mjs";
|
|
11
|
-
import Storylines from "./hang.storylines.mjs";
|
|
12
|
-
import System from "./hang.system.mjs";
|
|
13
|
-
import { placeOf, WORKSHOP_DIRNAME } from "./locate.mjs";
|
|
14
|
-
|
|
15
|
-
export class Workshop extends BOS.Model {
|
|
16
|
-
static type = "workshop";
|
|
17
|
-
static dirname = WORKSHOP_DIRNAME;
|
|
18
|
-
static submodules = { system: System, setup: Setup, data: Data, nests: Nests, storylines: Storylines };
|
|
19
|
-
static children = [Devarmory, Forge, Craftbook, Archive];
|
|
20
|
-
|
|
21
|
-
get forge() {
|
|
22
|
-
return new Forge(this.file(Forge.dirname), this);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
placeOf(path) {
|
|
26
|
-
return placeOf(path, this.path);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default Workshop;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// .BOS/data: data BOS works from, e.g. <pack>.gitlist (glossary: data)
|
|
2
|
-
import { BOS } from "../../main.ts";
|
|
3
|
-
|
|
4
|
-
export class Data extends BOS.Submodule {
|
|
5
|
-
static type = "data";
|
|
6
|
-
static ownerType = "workshop";
|
|
7
|
-
static dirname = ".BOS/data";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default Data;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// .BOS/nests: volumes and disks of containers and VMs, always indexed and guarded (glossary: nestrelm).
|
|
2
|
-
import { BOS } from "../../main.ts";
|
|
3
|
-
|
|
4
|
-
export class Nests extends BOS.Submodule {
|
|
5
|
-
static type = "nestrelm";
|
|
6
|
-
static ownerType = "workshop";
|
|
7
|
-
static dirname = ".BOS/nests";
|
|
8
|
-
static descriptors = {
|
|
9
|
-
".index.json": () => ({ nests: {} }),
|
|
10
|
-
".manifest.json": () => ({ files: {} }),
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default Nests;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// .BOS/setup: access and connectivity: keys, VPN, routing, aliases, tokens, setternet (glossary: setup)
|
|
2
|
-
import { BOS } from "../../main.ts";
|
|
3
|
-
|
|
4
|
-
export class Setup extends BOS.Submodule {
|
|
5
|
-
static type = "setup";
|
|
6
|
-
static ownerType = "workshop";
|
|
7
|
-
static dirname = ".BOS/setup";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default Setup;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// .BOS/storylines/manifests (glossary: storylines)
|
|
2
|
-
import { BOS } from "../../main.ts";
|
|
3
|
-
|
|
4
|
-
export class Manifests extends BOS.Submodule {
|
|
5
|
-
static type = "manifests";
|
|
6
|
-
static ownerType = "storylines";
|
|
7
|
-
static dirname = "manifests";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default Manifests;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// .BOS/storylines: records of what happened (glossary: storylines).
|
|
2
|
-
// Not needed to launch; appears with the first recorded event.
|
|
3
|
-
import { appendFileSync } from "node:fs";
|
|
4
|
-
|
|
5
|
-
import { BOS } from "../../main.ts";
|
|
6
|
-
import Logs from "./hang.storylines.logs.mjs";
|
|
7
|
-
import Manifests from "./hang.storylines.manifests.mjs";
|
|
8
|
-
import Ttystories from "./hang.storylines.ttystories.mjs";
|
|
9
|
-
|
|
10
|
-
export class Storylines extends BOS.Submodule {
|
|
11
|
-
static type = "storylines";
|
|
12
|
-
static ownerType = "workshop";
|
|
13
|
-
static dirname = ".BOS/storylines";
|
|
14
|
-
static mandatory = false;
|
|
15
|
-
static submodules = { ttystories: Ttystories, logs: Logs, manifests: Manifests };
|
|
16
|
-
static descriptors = {
|
|
17
|
-
"metadata.json": (_element, context) => ({
|
|
18
|
-
origin: {
|
|
19
|
-
host: context.env?.host ?? null,
|
|
20
|
-
user: context.env?.user ?? null,
|
|
21
|
-
unixusat: context.env?.unixusat ?? Date.now(),
|
|
22
|
-
createdBy: "blacksmith-organization-system",
|
|
23
|
-
},
|
|
24
|
-
}),
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
// one JSON line per event: opening, closing, git hooks…
|
|
28
|
-
record(event, context = {}) {
|
|
29
|
-
const entry = { unixusat: Date.now(), host: context.env?.host ?? null, ...event };
|
|
30
|
-
if (!context.dryRun) appendFileSync(this.logs.file("workshop.jsonl"), `${JSON.stringify(entry)}\n`);
|
|
31
|
-
return entry;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
ttystoryName({ env }) {
|
|
35
|
-
return `ttystory-${env.host}-${env.unixusat}.txt`;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default Storylines;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// .BOS/storylines/ttystories (glossary: storylines)
|
|
2
|
-
import { BOS } from "../../main.ts";
|
|
3
|
-
|
|
4
|
-
export class Ttystories extends BOS.Submodule {
|
|
5
|
-
static type = "ttystories";
|
|
6
|
-
static ownerType = "storylines";
|
|
7
|
-
static dirname = "ttystories";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default Ttystories;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// .BOS: the folder where BOS keeps itself inside a workshop (glossary: system).
|
|
2
|
-
// Its contents hang on the workshop directly: workshop.setup, workshop.storylines…
|
|
3
|
-
import { writeFileSync } from "node:fs";
|
|
4
|
-
|
|
5
|
-
import { BOS } from "../../main.ts";
|
|
6
|
-
import { workshopTaskfile } from "./taskfile.mjs";
|
|
7
|
-
|
|
8
|
-
export class System extends BOS.Submodule {
|
|
9
|
-
static type = "system";
|
|
10
|
-
static ownerType = "workshop";
|
|
11
|
-
static dirname = ".BOS";
|
|
12
|
-
static descriptors = {
|
|
13
|
-
"workshop.json": (_element, context) => context.config ?? {},
|
|
14
|
-
"Taskfile.yaml": workshopTaskfile,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// change some fields of workshop.json, keep every other one
|
|
18
|
-
update(fields, context = {}) {
|
|
19
|
-
const next = { ...this.readJSON("workshop.json", {}), ...fields };
|
|
20
|
-
if (!context.dryRun) writeFileSync(this.file("workshop.json"), `${JSON.stringify(next, null, 2)}\n`);
|
|
21
|
-
return next;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default System;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// What a workshop makes its host in the setternet (glossary: host-role).
|
|
2
|
-
export const HOST_ROLES = {
|
|
3
|
-
"masters-outpost": "remote management of every BOS host in the setternet (Posterunek Mistrza)",
|
|
4
|
-
"forging-point": "development, compilation and similar work (Punkt Kuźniczy)",
|
|
5
|
-
"trial-hall": "virtual machines and testing (Sala Prób)",
|
|
6
|
-
"market-stall": "publication only: automatic posts and announcements (Kram Targowy)",
|
|
7
|
-
"canon-monolith": "the one master archive of all projects (Monolit Kanonu)",
|
|
8
|
-
"side-catacomb": "archive dedicated to one function (Katakumb Poboczny)",
|
|
9
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// Finding workshops on the machine: per user (~/__WORKSHOP) and per partition (/media/**/__WORKSHOP).
|
|
2
|
-
import { existsSync, readdirSync } from "node:fs";
|
|
3
|
-
import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
4
|
-
|
|
5
|
-
export const WORKSHOP_DIRNAME = "__WORKSHOP";
|
|
6
|
-
|
|
7
|
-
export function findAncestorWorkshop(start) {
|
|
8
|
-
let dir = resolve(start);
|
|
9
|
-
while (dir !== dirname(dir)) {
|
|
10
|
-
if (basename(dir) === WORKSHOP_DIRNAME) return dir;
|
|
11
|
-
dir = dirname(dir);
|
|
12
|
-
}
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// the active workshop: first rule that answers wins
|
|
17
|
-
export function resolveWorkshop({ explicit, variable, cwd, self, home }) {
|
|
18
|
-
const rules = [
|
|
19
|
-
["--workshop option", () => explicit && resolve(explicit)],
|
|
20
|
-
["$BOS_WORKSHOP", () => variable && resolve(variable.replace(/^~(?=$|\/)/, home))],
|
|
21
|
-
["ancestor of current directory", () => findAncestorWorkshop(cwd)],
|
|
22
|
-
["ancestor of BOS installation", () => findAncestorWorkshop(self)],
|
|
23
|
-
["default per user", () => join(home, WORKSHOP_DIRNAME)],
|
|
24
|
-
];
|
|
25
|
-
for (const [source, rule] of rules) {
|
|
26
|
-
const root = rule();
|
|
27
|
-
if (root) return { root, source };
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function listWorkshops(home, mediaRoot = "/media", maxDepth = 4) {
|
|
32
|
-
const found = new Set();
|
|
33
|
-
if (existsSync(join(home, WORKSHOP_DIRNAME))) found.add(join(home, WORKSHOP_DIRNAME));
|
|
34
|
-
(function scan(dir, depth) {
|
|
35
|
-
if (depth > maxDepth) return;
|
|
36
|
-
let entries = [];
|
|
37
|
-
try {
|
|
38
|
-
entries = readdirSync(dir, { withFileTypes: true });
|
|
39
|
-
} catch {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
for (const entry of entries.filter((entry) => entry.isDirectory())) {
|
|
43
|
-
const path = join(dir, entry.name);
|
|
44
|
-
if (entry.name === WORKSHOP_DIRNAME) found.add(path);
|
|
45
|
-
else scan(path, depth + 1);
|
|
46
|
-
}
|
|
47
|
-
})(mediaRoot, 1);
|
|
48
|
-
return [...found];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// where a path sits inside a workshop: area, and for forge its scope and project
|
|
52
|
-
export function placeOf(target, workshopRoot) {
|
|
53
|
-
const rel = relative(workshopRoot, resolve(target));
|
|
54
|
-
if (rel === "") return { area: null };
|
|
55
|
-
if (rel.startsWith("..")) return null;
|
|
56
|
-
const [area, ...rest] = rel.split(sep);
|
|
57
|
-
if (area === "forge")
|
|
58
|
-
return { area, scope: rest[0] ?? null, project: rest[1] ?? null, inner: rest.slice(2).join("/") || null };
|
|
59
|
-
return { area, inner: rest.join("/") || null };
|
|
60
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// Modes of work: what kind of need the workshop serves right now (glossary: mode).
|
|
2
|
-
// The digit is the key in the `bos mode` chooser; 0 leaves it.
|
|
3
|
-
export const MODES = {
|
|
4
|
-
almanac: {
|
|
5
|
-
digit: 1,
|
|
6
|
-
title: "ALMANAC",
|
|
7
|
-
covers: "emergency protocols: sinking",
|
|
8
|
-
},
|
|
9
|
-
conform: {
|
|
10
|
-
digit: 2,
|
|
11
|
-
title: "CONFORM",
|
|
12
|
-
covers: "establishing the workshop, migrations, cleaning, verifying, syncing between fortified workshops",
|
|
13
|
-
},
|
|
14
|
-
smeltry: {
|
|
15
|
-
digit: 3,
|
|
16
|
-
title: "SMELTRY",
|
|
17
|
-
covers: "code, development, active editing, publishing changes",
|
|
18
|
-
},
|
|
19
|
-
commandorate: {
|
|
20
|
-
digit: 4,
|
|
21
|
-
title: "COMMANDORATE",
|
|
22
|
-
covers: "rulesets, privileges, roles, switching modes",
|
|
23
|
-
},
|
|
24
|
-
provision: {
|
|
25
|
-
digit: 5,
|
|
26
|
-
title: "PROVISION",
|
|
27
|
-
covers: "presenting what a source of truth delivers, e.g. a repository on GitHub",
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const modeByDigit = (digit) => Object.keys(MODES).find((name) => MODES[name].digit === Number(digit)) ?? null;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// .BOS/Taskfile.yaml: the workshop's own procedures, pointing at this BOS installation.
|
|
2
|
-
import { CLI } from "../../core/self.mjs";
|
|
3
|
-
|
|
4
|
-
export const workshopTaskfile = () => `# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
|
5
|
-
# workshop procedures, generated by BOS bootstrap; edit freely
|
|
6
|
-
version: '3'
|
|
7
|
-
|
|
8
|
-
vars:
|
|
9
|
-
BOS: node ${CLI}
|
|
10
|
-
|
|
11
|
-
tasks:
|
|
12
|
-
status:
|
|
13
|
-
desc: show the state of this workshop
|
|
14
|
-
cmds: ['{{.BOS}} status']
|
|
15
|
-
open:
|
|
16
|
-
desc: open the workshop (bootstrap missing areas, record opening)
|
|
17
|
-
cmds: ['{{.BOS}} open']
|
|
18
|
-
close:
|
|
19
|
-
desc: close the workshop (capture ttystory, record closing)
|
|
20
|
-
cmds: ['{{.BOS}} close']
|
|
21
|
-
`;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Every procedure: steps that close a routed routine. Each lives in its own
|
|
2
|
-
// directory: DESCRIPTION.md (meaning), one file per step, _index.mjs (assembly).
|
|
3
|
-
import bootstrapping from "./bootstrapping/_index.mjs";
|
|
4
|
-
import closing from "./closing/_index.mjs";
|
|
5
|
-
import describing from "./describing/_index.mjs";
|
|
6
|
-
import gathering from "./gathering/_index.mjs";
|
|
7
|
-
import { hooking, installingHooks } from "./hooking/_index.mjs";
|
|
8
|
-
import inspecting from "./inspecting/_index.mjs";
|
|
9
|
-
import loading from "./loading/_index.mjs";
|
|
10
|
-
import locating from "./locating/_index.mjs";
|
|
11
|
-
import modeSwitching from "./mode-switching/_index.mjs";
|
|
12
|
-
import opening from "./opening/_index.mjs";
|
|
13
|
-
import promoting from "./promoting/_index.mjs";
|
|
14
|
-
import sinking from "./sinking/_index.mjs";
|
|
15
|
-
import skilling from "./skilling/_index.mjs";
|
|
16
|
-
|
|
17
|
-
export default {
|
|
18
|
-
locating,
|
|
19
|
-
loading,
|
|
20
|
-
inspecting,
|
|
21
|
-
bootstrapping,
|
|
22
|
-
opening,
|
|
23
|
-
closing,
|
|
24
|
-
sinking,
|
|
25
|
-
hooking,
|
|
26
|
-
installingHooks,
|
|
27
|
-
promoting,
|
|
28
|
-
skilling,
|
|
29
|
-
modeSwitching,
|
|
30
|
-
describing,
|
|
31
|
-
gathering,
|
|
32
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// An agent's work leaves storylines like a person's: its sessions as events, its shell
|
|
2
|
-
// commands as its own ttystory (ttystory-<host>-claude-<session>.txt, one line per command:
|
|
3
|
-
// unixusat, cwd, command). Storylines hold shell history: treat them like .BOS/setup.
|
|
4
|
-
import { appendFileSync } from "node:fs";
|
|
5
|
-
|
|
6
|
-
import { situate } from "./situate.mjs";
|
|
7
|
-
|
|
8
|
-
export async function recordAgentEvent(input, event) {
|
|
9
|
-
const context = await situate(input);
|
|
10
|
-
if (!context) return null;
|
|
11
|
-
const storylines = context.workshop.storylines.ensure(context);
|
|
12
|
-
return storylines.record(
|
|
13
|
-
{
|
|
14
|
-
event,
|
|
15
|
-
agent: "claude",
|
|
16
|
-
session: input.session_id ?? null,
|
|
17
|
-
source: input.source ?? null,
|
|
18
|
-
model: input.model ?? null,
|
|
19
|
-
place: context.workshop.placeOf(input.cwd ?? process.cwd()),
|
|
20
|
-
},
|
|
21
|
-
context,
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export async function recordAgentCommand(input) {
|
|
26
|
-
const command = input.tool_input?.command;
|
|
27
|
-
if (!command) return null;
|
|
28
|
-
const context = await situate(input);
|
|
29
|
-
if (!context) return null;
|
|
30
|
-
const storylines = context.workshop.storylines.ensure(context);
|
|
31
|
-
const file = storylines.ttystories.file(`ttystory-${context.env.host}-claude-${input.session_id ?? "unknown"}.txt`);
|
|
32
|
-
appendFileSync(file, `${Date.now()}\t${input.cwd ?? process.cwd()}\t${command.replace(/\n/g, "\\n")}\n`);
|
|
33
|
-
return file;
|
|
34
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Where an agent session happens: locate and load the workshop from the hook's cwd.
|
|
2
|
-
// Returns null when there is no workshop there; hooks never create one.
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
4
|
-
|
|
5
|
-
import loading from "../loading/_index.mjs";
|
|
6
|
-
|
|
7
|
-
export async function situate(input) {
|
|
8
|
-
if (input.cwd && existsSync(input.cwd)) process.chdir(input.cwd);
|
|
9
|
-
const context = await loading.run({ options: { workshop: process.env.BOS_WORKSHOP } });
|
|
10
|
-
return context.workshop.exists() ? context : null;
|
|
11
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# Bootstrapping Protocol
|
|
2
|
-
|
|
3
|
-
Makes the workshop whole: `.BOS/` with setup, data, nests (+ index and
|
|
4
|
-
manifest), `workshop.json` and `Taskfile.yaml`; devarmory (+ manifest), forge,
|
|
5
|
-
craftbook (+ scrapnotes) and archive; `AGENTS.md` and `CLAUDE.md` at the root.
|
|
6
|
-
It creates only what is missing and never overwrites. With `--dry-run` it only plans.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import loading from "../loading/_index.mjs";
|
|
3
|
-
import { deployGuides } from "./deploy-guides.mjs";
|
|
4
|
-
import { ensureTree } from "./ensure-tree.mjs";
|
|
5
|
-
|
|
6
|
-
export const bootstrapSteps = new BOS.Procedure("bootstrapping", [], {
|
|
7
|
-
description: "create missing areas and descriptors, deploy agent guides",
|
|
8
|
-
})
|
|
9
|
-
.step("ensure workshop tree", ensureTree)
|
|
10
|
-
.step("deploy agent guides", deployGuides);
|
|
11
|
-
|
|
12
|
-
export const bootstrapping = loading.chain(bootstrapSteps, "bootstrapping");
|
|
13
|
-
export default bootstrapping;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { copyFileSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
|
|
4
|
-
import { createIfMissing } from "../../core/basic-element.mjs";
|
|
5
|
-
import { RESOURCES } from "../../core/self.mjs";
|
|
6
|
-
|
|
7
|
-
export const AGENT_GUIDES = ["AGENTS.md", "CLAUDE.md"];
|
|
8
|
-
|
|
9
|
-
// the workshop-root guides for AI agents; an existing one is never replaced
|
|
10
|
-
export const deployGuides = (context) => {
|
|
11
|
-
for (const guide of AGENT_GUIDES) {
|
|
12
|
-
const target = join(context.workshopRoot, guide);
|
|
13
|
-
createIfMissing(target, () => copyFileSync(join(RESOURCES, "workshop-root", guide), target), context);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import loading from "../loading/_index.mjs";
|
|
3
|
-
import { captureTtystory } from "./capture-ttystory.mjs";
|
|
4
|
-
import { recordClosing } from "./record-closing.mjs";
|
|
5
|
-
|
|
6
|
-
const own = new BOS.Procedure("closing")
|
|
7
|
-
.step("capture ttystory", captureTtystory)
|
|
8
|
-
.step("record closing", recordClosing);
|
|
9
|
-
|
|
10
|
-
export const closing = loading.chain(own, "closing");
|
|
11
|
-
export default closing;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { copyFileSync, existsSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
|
|
4
|
-
import { createIfMissing } from "../../core/basic-element.mjs";
|
|
5
|
-
|
|
6
|
-
// bash writes history on exit: run `history -a` first to include the current shell
|
|
7
|
-
export const captureTtystory = (context) => {
|
|
8
|
-
const storylines = context.workshop.storylines.ensure(context);
|
|
9
|
-
const history = process.env.HISTFILE || join(context.env.home, ".bash_history");
|
|
10
|
-
if (!existsSync(history)) return;
|
|
11
|
-
const target = storylines.ttystories.file(storylines.ttystoryName(context));
|
|
12
|
-
createIfMissing(target, () => copyFileSync(history, target), context);
|
|
13
|
-
context.ttystory = target;
|
|
14
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Describing Protocol
|
|
2
|
-
|
|
3
|
-
Part of SMELTRY. A commit should describe its own content. This protocol reads
|
|
4
|
-
the staged changes and drafts a conventional-commit message:
|
|
5
|
-
|
|
6
|
-
- **type**: `docs`, `test`, `ci` or `build` when only that part changed; `feat`
|
|
7
|
-
when new source files appear; otherwise `chore`
|
|
8
|
-
- **scope**: the part of the project (`procedures`, `bridge`, `models`, `docs`, …),
|
|
9
|
-
from `scopes.mjs`
|
|
10
|
-
- **subject**: add / update / remove, plus what the paths are about
|
|
11
|
-
- **body**: every file, marked A / M / D
|
|
12
|
-
|
|
13
|
-
Then **Skryba**, the scribe raven (`resources/ravens/skryba.md`), reads the
|
|
14
|
-
trimmed staged diff through ollama and proposes a better subject and a short
|
|
15
|
-
body. He answers in a fixed JSON shape, so the header is always a valid
|
|
16
|
-
conventional commit, and the file list stays. When ollama or the model is
|
|
17
|
-
missing, or the answer is unusable, the plain draft is used.
|
|
18
|
-
`BOS_SKRYBA=0` turns him off; `BOS_SKRYBA_MODEL` picks another model.
|
|
19
|
-
|
|
20
|
-
Husky's `prepare-commit-msg` runs it (`bos describe --hook`), so a plain
|
|
21
|
-
`git commit` opens the editor with the draft. A message given with `-m`, a
|
|
22
|
-
merge, a squash or an amend is never touched. commitlint then checks the
|
|
23
|
-
format, and semantic-release turns the type into the next version.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import { askSkryba } from "./ask-skryba.mjs";
|
|
3
|
-
import { composeDraft } from "./compose-message.mjs";
|
|
4
|
-
import { readStaged } from "./read-staged.mjs";
|
|
5
|
-
import { writeMessage } from "./write-message.mjs";
|
|
6
|
-
|
|
7
|
-
export const describing = new BOS.Procedure("describing", [], {
|
|
8
|
-
description: "draft a conventional commit message from the staged changes",
|
|
9
|
-
})
|
|
10
|
-
.step("read staged changes", readStaged)
|
|
11
|
-
.step("compose draft", composeDraft)
|
|
12
|
-
.step("ask Skryba", askSkryba)
|
|
13
|
-
.step("write into commit message", writeMessage);
|
|
14
|
-
|
|
15
|
-
export default describing;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
// Skryba, the scribe raven (resources/ravens/skryba.md), rewrites the draft's header
|
|
2
|
-
// and adds a short body. He only proposes: the file list stays, and without ollama,
|
|
3
|
-
// or with a bad answer, the deterministic draft is used as it is.
|
|
4
|
-
import OllamaLink from "../../bridge/ollama-link/_index.mjs";
|
|
5
|
-
import SubprocessRunner from "../../bridge/subprocess-runner/_index.mjs";
|
|
6
|
-
import { stagedDiff } from "./staged-diff.mjs";
|
|
7
|
-
|
|
8
|
-
export const TYPES = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"];
|
|
9
|
-
|
|
10
|
-
export const ANSWER = {
|
|
11
|
-
type: "object",
|
|
12
|
-
properties: {
|
|
13
|
-
type: { type: "string", enum: TYPES },
|
|
14
|
-
scope: { type: "string" },
|
|
15
|
-
subject: { type: "string" },
|
|
16
|
-
body: { type: "string" },
|
|
17
|
-
},
|
|
18
|
-
required: ["type", "scope", "subject", "body"],
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// Skryba's answer + the draft → a message; null when the answer can't be trusted
|
|
22
|
-
export function assemble(answer, draft, signature) {
|
|
23
|
-
let parsed;
|
|
24
|
-
try {
|
|
25
|
-
parsed = typeof answer === "string" ? JSON.parse(answer) : answer;
|
|
26
|
-
} catch {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
const subject = String(parsed?.subject ?? "")
|
|
30
|
-
.trim()
|
|
31
|
-
.replace(/\.$/, "");
|
|
32
|
-
if (!TYPES.includes(parsed?.type) || !subject) return null;
|
|
33
|
-
const scope = String(parsed.scope ?? "")
|
|
34
|
-
.trim()
|
|
35
|
-
.toLowerCase()
|
|
36
|
-
.replace(/[^a-z0-9,._-]/g, "");
|
|
37
|
-
const header = `${parsed.type}${scope ? `(${scope})` : ""}: ${subject}`.slice(0, 100);
|
|
38
|
-
const body = String(parsed.body ?? "")
|
|
39
|
-
.trim()
|
|
40
|
-
.split("\n")
|
|
41
|
-
.map((line) => line.trim())
|
|
42
|
-
.filter(Boolean)
|
|
43
|
-
.join("\n");
|
|
44
|
-
const files = draft.split("\n\n").slice(1).join("\n\n").trim();
|
|
45
|
-
return `${[header, body, files, signature].filter(Boolean).join("\n\n")}\n`;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const askSkryba = async (context) => {
|
|
49
|
-
const wanted = context.options.skryba ?? process.env.BOS_SKRYBA !== "0";
|
|
50
|
-
if (!wanted || !context.message) return;
|
|
51
|
-
const ollama = context.options.ollama ?? new OllamaLink();
|
|
52
|
-
const raven = ollama.raven("skryba");
|
|
53
|
-
const model = process.env.BOS_SKRYBA_MODEL ?? raven.model;
|
|
54
|
-
if (!(await ollama.available(model))) {
|
|
55
|
-
context.skryba = { used: false, reason: `ollama or model ${model} not available` };
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const { stat, diff } = stagedDiff(context.repo);
|
|
59
|
-
const recent = new SubprocessRunner().try("git", ["log", "-8", "--format=%s"], { cwd: context.repo }) ?? "";
|
|
60
|
-
const [, type, scope] = context.message.match(/^(\w+)(?:\(([^)]*)\))?:/) ?? [];
|
|
61
|
-
const prompt = [
|
|
62
|
-
`Hint from the file paths: type "${type}", scope "${scope ?? ""}". Keep them unless the diff clearly shows otherwise.`,
|
|
63
|
-
"Write the subject about the purpose of the change: what it makes possible or fixes, not which files changed.",
|
|
64
|
-
"",
|
|
65
|
-
"Recent commit subjects of this repository (for style):",
|
|
66
|
-
recent || "(none)",
|
|
67
|
-
"",
|
|
68
|
-
"Staged changes, stat:",
|
|
69
|
-
stat,
|
|
70
|
-
"",
|
|
71
|
-
"Staged changes, diff (may be trimmed):",
|
|
72
|
-
diff,
|
|
73
|
-
].join("\n");
|
|
74
|
-
const answer = await ollama.ask("skryba", prompt, {
|
|
75
|
-
format: ANSWER,
|
|
76
|
-
model,
|
|
77
|
-
timeout: context.options.timeout ?? 90000,
|
|
78
|
-
});
|
|
79
|
-
const message = answer && assemble(answer, context.message, `Drafted-by: Skryba (${model} via ollama)`);
|
|
80
|
-
context.skryba = { used: Boolean(message), model, reason: message ? null : "no usable answer" };
|
|
81
|
-
if (message) context.message = message;
|
|
82
|
-
};
|