@memorax/memorax-code 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -12
- package/bin/memorax-code-npm-preinstall.mjs +7 -2
- package/bin/memorax-code-opencode.mjs +4 -0
- package/bin/memorax-code-plugin-postinstall.mjs +342 -93
- package/docs/configuration.md +148 -35
- package/docs/troubleshooting.md +73 -13
- package/lib/dsh-plugin-install.mjs +22 -0
- package/lib/memorax-code-adapter-common/src/hooks/capture-cwd-hook.mjs +21 -14
- package/lib/memorax-code-adapter-common/src/hooks/ensure-backend-runner.mjs +26 -7
- package/lib/memorax-code-adapter-common/src/hooks/memory-skill-reminder-hook.mjs +86 -95
- package/lib/memorax-code-adapter-common/src/hooks/memory-skill-reminder-policy.mjs +58 -0
- package/lib/memorax-code-adapter-common/src/repo-memory/repo-memory-auto-build.mjs +2 -2
- package/lib/memorax-code-adapter-common/src/repo-memory/repo-memory-job-supervisor.mjs +1 -1
- package/lib/memorax-code-adapter-common/src/windows-cli-invocation.mjs +13 -1
- package/lib/memorax-code-backend/dist/app/backend-server.js +210 -0
- package/lib/memorax-code-backend/dist/{server-observability.js → app/memory-observability.js} +4 -4
- package/lib/memorax-code-backend/dist/{backend-state.js → app/state.js} +1 -1
- package/lib/memorax-code-backend/dist/{claude-adapter-lifecycle.js → clients/claude/lifecycle.js} +2 -2
- package/lib/memorax-code-backend/dist/{claude-memory-hook-runtime.js → clients/claude/memory-hook-runtime.js} +7 -7
- package/lib/memorax-code-backend/dist/clients/codex/lifecycle.js +131 -0
- package/lib/memorax-code-backend/dist/{codex-memory-hook-runtime.js → clients/codex/memory-hook-runtime.js} +9 -9
- package/lib/memorax-code-backend/dist/{codex-plugin-hooks.js → clients/codex/plugin-hooks.js} +1 -1
- package/lib/memorax-code-backend/dist/{codex-plugin-install.js → clients/codex/plugin-install.js} +6 -6
- package/lib/memorax-code-backend/dist/clients/dsh/lifecycle.js +75 -0
- package/lib/memorax-code-backend/dist/clients/dsh/memory-hook-runtime.js +258 -0
- package/lib/memorax-code-backend/dist/clients/dsh/session-turn.js +249 -0
- package/lib/memorax-code-backend/dist/clients/opencode/lifecycle.js +54 -0
- package/lib/memorax-code-backend/dist/clients/opencode/memory-hook-runtime.js +277 -0
- package/lib/memorax-code-backend/dist/clients/opencode/message-turn.js +78 -0
- package/lib/memorax-code-backend/dist/codex-adapter-lifecycle.js +1 -131
- package/lib/memorax-code-backend/dist/{memorax-code-config.js → config/memorax-code.js} +32 -4
- package/lib/memorax-code-backend/dist/{server-cli.js → entrypoints/backend-cli.js} +137 -37
- package/lib/memorax-code-backend/dist/jsonl-append.js +1 -75
- package/lib/memorax-code-backend/dist/{active-client-selection.js → lifecycle/active-clients.js} +12 -1
- package/lib/memorax-code-backend/dist/{backend-service-cleanup.js → lifecycle/backend/cleanup.js} +1 -1
- package/lib/memorax-code-backend/dist/{backend-service-record.js → lifecycle/backend/record.js} +1 -1
- package/lib/memorax-code-backend/dist/{backend-service-result.js → lifecycle/backend/result.js} +2 -2
- package/lib/memorax-code-backend/dist/{service.js → lifecycle/backend/service.js} +16 -16
- package/lib/memorax-code-backend/dist/{backend-token-record.js → lifecycle/backend/token-record.js} +1 -1
- package/lib/memorax-code-backend/dist/{backend-service-token.js → lifecycle/backend/token.js} +2 -2
- package/lib/memorax-code-backend/dist/lifecycle/client-plugin-removal.js +109 -0
- package/lib/memorax-code-backend/dist/{client-selection.js → lifecycle/client-selection.js} +11 -5
- package/lib/memorax-code-backend/dist/{backend-lifecycle-lock.js → lifecycle/lock.js} +1 -1
- package/lib/memorax-code-backend/dist/{memorax-code-lifecycle.js → lifecycle/orchestrator.js} +325 -39
- package/lib/memorax-code-backend/dist/memorax-cli.js +1 -1
- package/lib/memorax-code-backend/dist/memorax-code.js +1 -1
- package/lib/memorax-code-backend/dist/{automatic-memory-retrieval.js → memory/automatic-retrieval.js} +3 -3
- package/lib/memorax-code-backend/dist/{automatic-memory-writeback.js → memory/automatic-writeback.js} +75 -21
- package/lib/memorax-code-backend/dist/{memory-cli.js → memory/cli.js} +23 -10
- package/lib/memorax-code-backend/dist/{memory-hook-command.js → memory/hook-command.js} +156 -9
- package/lib/memorax-code-backend/dist/memory/observability.js +1 -0
- package/lib/memorax-code-backend/dist/memory/payload-redaction.js +212 -0
- package/lib/memorax-code-backend/dist/{memory-reminder-trace-recorder.js → memory/reminder-trace-recorder.js} +20 -7
- package/lib/memorax-code-backend/dist/{repository-memory-context.js → memory/repository-session.js} +2 -2
- package/lib/memorax-code-backend/dist/{memory-service.js → memory/service.js} +27 -5
- package/lib/memorax-code-backend/dist/{memory-turn-coordinator.js → memory/turn-coordinator.js} +2 -1
- package/lib/memorax-code-backend/dist/{memory-writeback-buffer.js → memory/writeback-buffer.js} +3 -3
- package/lib/memorax-code-backend/dist/{memory-writeback-chunk.js → memory/writeback-chunk.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-writeback-reconciler.js → memory/writeback-reconciler.js} +6 -6
- package/lib/memorax-code-backend/dist/{memory-writeback-task-projection.js → memory/writeback-task-projection.js} +4 -4
- package/lib/memorax-code-backend/dist/{memorax-adapter.js → provider/memorax/adapter.js} +5 -5
- package/lib/memorax-code-backend/dist/{memorax-config.js → provider/memorax/config.js} +4 -4
- package/lib/memorax-code-backend/dist/{memorax-http.js → provider/memorax/http.js} +1 -1
- package/lib/memorax-code-backend/dist/{repo-memory-readiness.js → repository/readiness.js} +3 -3
- package/lib/memorax-code-backend/dist/server.js +3 -212
- package/lib/memorax-code-backend/dist/service-entrypoint.js +1 -1
- package/lib/memorax-code-backend/dist/{debug-log.js → shared/debug-log.js} +1 -1
- package/lib/memorax-code-backend/dist/shared/jsonl-append.js +75 -0
- package/lib/memorax-code-backend/dist/shared/windows-cli-invocation.js +148 -0
- package/lib/memorax-code-backend/dist/{trace-config.js → trace/config.js} +43 -5
- package/lib/memorax-code-backend/dist/{trace-context.js → trace/context.js} +53 -2
- package/lib/memorax-code-backend/dist/{trace-store.js → trace/store.js} +3 -3
- package/lib/memorax-code-backend/dist/{server-health.js → transport/http/health.js} +1 -1
- package/lib/memorax-code-backend/dist/{server-memory-hook.js → transport/http/memory-hook.js} +3 -3
- package/lib/memorax-code-backend/dist/{server-http.js → transport/http/request.js} +1 -1
- package/lib/memorax-code-backend/dist/{claude-local-transcript.js → viewer/history/claude-transcript.js} +3 -3
- package/lib/memorax-code-backend/dist/{memory-viewer-session-title.js → viewer/history/session-title.js} +1 -1
- package/lib/memorax-code-backend/dist/{server-memory-viewer.js → viewer/http/public-routes.js} +15 -15
- package/lib/memorax-code-backend/dist/viewer/model.js +1 -0
- package/lib/memorax-code-backend/dist/{memory-viewer-activity.js → viewer/projection/activity.js} +2 -2
- package/lib/memorax-code-backend/dist/{memory-viewer-history-projection.js → viewer/projection/history.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-viewer-observability.js → viewer/projection/observability.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-viewer-user-projection.js → viewer/projection/user.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-viewer-writeback-status.js → viewer/projection/writeback-status.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-viewer-store.js → viewer/store.js} +59 -32
- package/lib/memorax-code-backend/dist/{memory-viewer-user-html.js → viewer/ui/user-html.js} +11 -10
- package/lib/memorax-code-backend/dist/windows-cli-invocation.js +1 -148
- package/lib/memorax-code-backend/package.json +3 -3
- package/lib/memorax-code-claude-adapter/.claude-plugin/plugin.json +1 -1
- package/lib/memorax-code-claude-adapter/hooks/runtime-shell.json +1 -1
- package/lib/memorax-code-claude-adapter/package.json +1 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/SKILL.md +11 -2
- package/lib/memorax-code-claude-adapter/skills/memorax-code/defaults.json +8 -5
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/memorax-add.md +1 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/memorax-search.md +37 -9
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/personal-read.md +1 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/personal-write.md +33 -13
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/repo-build.md +62 -13
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/repo-read.md +11 -4
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/repo-templates.md +179 -59
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/repo-update.md +18 -7
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/collect_all.py +122 -39
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/detect_updates.py +73 -10
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/github_resource_facets.py +9 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +9 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/validate_memory.py +23 -1
- package/lib/memorax-code-claude-adapter/src/plugin-install.mjs +1 -0
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/.claude-plugin/plugin.json +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/hooks/runtime-shell.json +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/hooks/capture-cwd-hook.mjs +21 -14
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/hooks/ensure-backend-runner.mjs +26 -7
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/hooks/memory-skill-reminder-hook.mjs +86 -95
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/hooks/memory-skill-reminder-policy.mjs +58 -0
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/repo-memory/repo-memory-auto-build.mjs +2 -2
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/repo-memory/repo-memory-job-supervisor.mjs +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/windows-cli-invocation.mjs +13 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/package.json +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/SKILL.md +11 -2
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/defaults.json +8 -5
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/memorax-add.md +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/memorax-search.md +37 -9
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/personal-read.md +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/personal-write.md +33 -13
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/repo-build.md +62 -13
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/repo-read.md +11 -4
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/repo-templates.md +179 -59
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/repo-update.md +18 -7
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/collect_all.py +122 -39
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/detect_updates.py +73 -10
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/github_resource_facets.py +9 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +9 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/validate_memory.py +23 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/src/plugin-install.mjs +1 -0
- package/lib/memorax-code-codex-adapter/.codex-plugin/plugin.json +1 -1
- package/lib/memorax-code-codex-adapter/hooks/runtime-shell.json +1 -1
- package/lib/memorax-code-codex-adapter/package.json +1 -1
- package/lib/memorax-code-codex-adapter/runtime-hooks/memory-skill-reminder.mjs +10 -2
- package/lib/memorax-code-codex-adapter/skills/memorax-code/SKILL.md +11 -2
- package/lib/memorax-code-codex-adapter/skills/memorax-code/defaults.json +8 -5
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/memorax-add.md +1 -1
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/memorax-search.md +37 -9
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/personal-read.md +1 -1
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/personal-write.md +33 -13
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/repo-build.md +62 -13
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/repo-read.md +11 -4
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/repo-templates.md +179 -59
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/repo-update.md +18 -7
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/collect_all.py +122 -39
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/detect_updates.py +73 -10
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/github_resource_facets.py +9 -1
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +9 -1
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/validate_memory.py +23 -1
- package/lib/memorax-code-dsh-adapter/cordis.patch.yml +10 -0
- package/lib/memorax-code-dsh-adapter/hooks/repo-memory-job.mjs +68 -0
- package/lib/memorax-code-dsh-adapter/package.json +69 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/SKILL.md +91 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/agents/claude.yaml +10 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/agents/openai.yaml +7 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/defaults.json +12 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/memorax-add.md +86 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/memorax-search.md +91 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/personal-read.md +46 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/personal-write.md +120 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/repo-build.md +319 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/repo-read.md +103 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/repo-templates.md +390 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/repo-update.md +127 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/collect_all.py +579 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/detect_updates.py +919 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/git_commit_facets.py +222 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/github_resource_facets.py +512 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +517 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/prepare_repo_memory.py +411 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/user_profile_memory.py +528 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/validate_memory.py +248 -0
- package/lib/memorax-code-dsh-adapter/src/backend-client.mjs +119 -0
- package/lib/memorax-code-dsh-adapter/src/dsh-message.mjs +32 -0
- package/lib/memorax-code-dsh-adapter/src/dsh-version.mjs +18 -0
- package/lib/memorax-code-dsh-adapter/src/http-client.mjs +55 -0
- package/lib/memorax-code-dsh-adapter/src/index.mjs +72 -0
- package/lib/memorax-code-dsh-adapter/src/personal-context-worker.mjs +48 -0
- package/lib/memorax-code-dsh-adapter/src/personal-context.mjs +114 -0
- package/lib/memorax-code-dsh-adapter/src/plugin.mjs +724 -0
- package/lib/memorax-code-dsh-adapter/src/profile-lifecycle.mjs +1358 -0
- package/lib/memorax-code-dsh-adapter/src/protocol.mjs +145 -0
- package/lib/memorax-code-dsh-adapter/src/runtime-state.mjs +132 -0
- package/lib/memorax-code-opencode-adapter/hooks/repo-memory-job.mjs +37 -0
- package/lib/memorax-code-opencode-adapter/package.json +10 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/SKILL.md +91 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/agents/claude.yaml +10 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/agents/openai.yaml +7 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/defaults.json +12 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/memorax-add.md +86 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/memorax-search.md +91 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/personal-read.md +46 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/personal-write.md +120 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/repo-build.md +319 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/repo-read.md +103 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/repo-templates.md +390 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/repo-update.md +127 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/collect_all.py +579 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/detect_updates.py +919 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/git_commit_facets.py +222 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/github_resource_facets.py +512 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +517 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/prepare_repo_memory.py +411 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/user_profile_memory.py +528 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/validate_memory.py +248 -0
- package/lib/memorax-code-opencode-adapter/src/adapter-paths.mjs +37 -0
- package/lib/memorax-code-opencode-adapter/src/cli.mjs +260 -0
- package/lib/memorax-code-opencode-adapter/src/diagnostics.mjs +31 -0
- package/lib/memorax-code-opencode-adapter/src/plugin-install.mjs +673 -0
- package/lib/memorax-code-opencode-adapter/src/plugin.mjs +539 -0
- package/lib/memorax-code-opencode-adapter/src/repo-memory-server-runner.mjs +442 -0
- package/lib/run-entrypoint.mjs +6 -0
- package/package.json +7 -3
- package/lib/memorax-code-backend/dist/client-plugin-removal.js +0 -67
- /package/lib/memorax-code-backend/dist/{claude-transcript-turn.js → clients/claude/transcript-turn.js} +0 -0
- /package/lib/memorax-code-backend/dist/{codex-effective-prompt.js → clients/codex/effective-prompt.js} +0 -0
- /package/lib/memorax-code-backend/dist/{codex-rollout-turn.js → clients/codex/rollout-turn.js} +0 -0
- /package/lib/memorax-code-backend/dist/{codex-session-turn-index.js → clients/codex/session-turn-index.js} +0 -0
- /package/lib/memorax-code-backend/dist/{codex-workspace-links.js → clients/codex/workspace-links.js} +0 -0
- /package/lib/memorax-code-backend/dist/{backend-env.js → config/backend-env.js} +0 -0
- /package/lib/memorax-code-backend/dist/{proxy-env.js → config/proxy-env.js} +0 -0
- /package/lib/memorax-code-backend/dist/{entrypoint.js → entrypoints/main.js} +0 -0
- /package/lib/memorax-code-backend/dist/{backend-process.js → lifecycle/backend/process.js} +0 -0
- /package/lib/memorax-code-backend/dist/{backend-shutdown-request.js → lifecycle/backend/shutdown-request.js} +0 -0
- /package/lib/memorax-code-backend/dist/{backend-status.js → lifecycle/backend/status.js} +0 -0
- /package/lib/memorax-code-backend/dist/{adapter-lifecycle-participant.js → lifecycle/contracts.js} +0 -0
- /package/lib/memorax-code-backend/dist/{install-watchdog.js → lifecycle/install-watchdog.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-observability.js → lifecycle/participant.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-project.js → memory/project.js} +0 -0
- /package/lib/memorax-code-backend/dist/{repository-memory-scope.js → repository/scope.js} +0 -0
- /package/lib/memorax-code-backend/dist/{incremental-jsonl-projection.js → shared/incremental-jsonl-projection.js} +0 -0
- /package/lib/memorax-code-backend/dist/{utils.js → shared/record.js} +0 -0
- /package/lib/memorax-code-backend/dist/{server-json.js → transport/http/json.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-data-projection-cache.js → viewer/projection/cache.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-event-identity.js → viewer/projection/event-identity.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-redaction.js → viewer/projection/redaction.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-turn-reference.js → viewer/projection/turn-reference.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-icon.js → viewer/ui/icon.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-logo.js → viewer/ui/logo.js} +0 -0
|
@@ -21,6 +21,11 @@ description: >-
|
|
|
21
21
|
|
|
22
22
|
Classify the requested memory authority first, then its operation. Load only the matching reference unless the request genuinely spans authorities or operations.
|
|
23
23
|
|
|
24
|
+
After selecting an operation reference, read it completely in a standalone
|
|
25
|
+
tool call and wait for the full result before constructing or executing that
|
|
26
|
+
operation. Never combine reading a required reference with the command or
|
|
27
|
+
action it governs in the same shell command or tool call.
|
|
28
|
+
|
|
24
29
|
## Authority Router
|
|
25
30
|
|
|
26
31
|
### MemoraX Code Coding Memory
|
|
@@ -51,8 +56,11 @@ Use personal memory for user-owned repository procedures and durable profile or
|
|
|
51
56
|
- Route ordered actions, checklists, prerequisites, gates, exceptions, and validation rules to personal procedure memory, even when phrased as "I prefer", "I like", "我的习惯", or "我喜欢".
|
|
52
57
|
- Route preferred name, answer language, tone, verbosity, explanation style, and result presentation to personal profile memory.
|
|
53
58
|
- Route task-learned repairs, coding pitfalls, project engineering conventions, and reusable design lessons to MemoraX Code coding memory.
|
|
59
|
+
- Route prior project discussions, experiment conclusions, saved engineering findings, earlier fixes, and reusable project lessons to MemoraX Code coding memory. Do not route them to repo memory merely because they concern a project. Use repo memory for repository identity, architecture, module maps, commits, PRs, MRs, and issues.
|
|
54
60
|
- Route repository architecture, module maps, commit history, PRs, MRs, and issues to repo memory. Verify claims about current behavior against live code.
|
|
61
|
+
- Use both repo memory and MemoraX Code coding memory only when a request genuinely needs distinct repository evidence and reusable engineering lessons. This can apply to implementation, debugging, refactoring, migration planning, or validation when the answer may depend on repository module maps, commit/PR/issue evidence, and prior fixes, pitfalls, conventions, validation patterns, or design rationale. Do not use both authorities just because a request mentions a repository, file, module, or "previous".
|
|
55
62
|
- Route current-task instructions and temporary plans to the current task only; do not persist them.
|
|
63
|
+
- Current-task-only applies only when completing the request does not depend on prior project state. Do not select it merely because the requested action happens in the current turn. When implementation, debugging, review, experiment continuation, or validation depends on earlier project decisions, results, fixes, constraints, or plans that the user has not explicitly and completely supplied, route to MemoraX Code coding memory.
|
|
56
64
|
- Do not infer an authority from verbs such as "remember", "recall", "refresh", or "update" alone. Ask one focused question when the target remains ambiguous.
|
|
57
65
|
|
|
58
66
|
Examples:
|
|
@@ -72,11 +80,12 @@ Repo memory and personal memory remain local `.repo_memory` authorities. Resolve
|
|
|
72
80
|
|
|
73
81
|
Apply instructions in this order: system and developer instructions, `AGENTS.md`, the current user request, then stored memory. Memory is guidance or historical context, not proof of current repository behavior.
|
|
74
82
|
|
|
75
|
-
For MemoraX Code coding memory, use `memorax-cli` exactly as described by the selected reference. Invoke this skill as `$memorax-code` in Codex or `/memorax-code` in Claude Code
|
|
83
|
+
For MemoraX Code coding memory, use `memorax-cli` exactly as described by the selected reference. Invoke this skill as `$memorax-code` in Codex or `/memorax-code` in Claude Code. In OpenCode, ask the agent to use the `memorax-code` skill by name. These invocation forms are not shell commands. `memorax-code` is the lifecycle CLI and must not be used for memory search or add. Do not call MemoraX HTTP endpoints directly.
|
|
76
84
|
|
|
77
85
|
When explaining Memory Viewer, describe only `/memory-viewer`. It is a
|
|
78
86
|
content-free local summary and must not expose conversation or memory text,
|
|
79
87
|
session or turn identifiers, paths, or trace details. The page never queries
|
|
80
|
-
MemoraX directly; client
|
|
88
|
+
MemoraX directly; it projects client-qualified local activity and keeps each
|
|
89
|
+
supported harness isolated.
|
|
81
90
|
|
|
82
91
|
Never store secrets, credentials, `.env` content, sensitive personal data, raw transcripts, hidden tests, exact patches, temporary target commits, or unsafe destructive commands. Do not announce internal routing or reference loading.
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schema": "repo_memory_builder_defaults.
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
2
|
+
"schema": "repo_memory_builder_defaults.v2",
|
|
3
|
+
"repoHistory": {
|
|
4
|
+
"mode": "provider",
|
|
5
|
+
"limits": {
|
|
6
|
+
"commits": 30,
|
|
7
|
+
"prs": 30,
|
|
8
|
+
"issues": 30
|
|
9
|
+
}
|
|
7
10
|
},
|
|
8
11
|
"summaryChars": 4000
|
|
9
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MemoraX Code Coding Memory Add
|
|
2
2
|
|
|
3
|
-
Use these instructions only to add reusable coding knowledge through `memorax-cli`. Invoke the skill as `$memorax-code` in Codex or `/memorax-code` in Claude Code
|
|
3
|
+
Use these instructions only to add reusable coding knowledge through `memorax-cli`. Invoke the skill as `$memorax-code` in Codex or `/memorax-code` in Claude Code. In OpenCode, ask the agent to use the `memorax-code` skill by name. Do not route memory operations through the lifecycle-only `memorax-code` CLI. Do not use this authority for personal procedures, interaction preferences, generated repository facts, or one-off task details.
|
|
4
4
|
|
|
5
5
|
## Eligible Knowledge
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MemoraX Code Coding Memory Search
|
|
2
2
|
|
|
3
|
-
Use these instructions only to search reusable coding memory through `memorax-cli`. Invoke the skill as `$memorax-code` in Codex or `/memorax-code` in Claude Code
|
|
3
|
+
Use these instructions only to search reusable coding memory through `memorax-cli`. Invoke the skill as `$memorax-code` in Codex or `/memorax-code` in Claude Code. In OpenCode, ask the agent to use the `memorax-code` skill by name. Do not route memory operations through the lifecycle-only `memorax-code` CLI. Do not call MemoraX HTTP endpoints directly, print credentials, or edit memory storage by hand.
|
|
4
4
|
|
|
5
5
|
## Scope
|
|
6
6
|
|
|
@@ -21,8 +21,12 @@ Search when prior coding memory may change localization, implementation, review,
|
|
|
21
21
|
- a request for a previous fix, failed approach, coding convention, design decision, or reusable lesson;
|
|
22
22
|
- implementation, review, planning, API, schema, parser, workflow-contract, or migration work where prior project guidance may matter;
|
|
23
23
|
- explicit instructions to follow previous agreements or remembered engineering conventions.
|
|
24
|
+
- a request to recover, verify, or apply prior project discussions, experiment results, saved memory, earlier decisions, previous changes, or historical constraints, unless the needed facts are fully present in the current visible context.
|
|
25
|
+
- a requested action that depends on prior project state, results, fixes, constraints, or plans when the exact evidence needed is not explicitly present in the current user-provided material.
|
|
24
26
|
|
|
25
|
-
Skip search for simple current-code facts, tiny edits, typo fixes, one-shot commands, or behavior directly established by a clear live source.
|
|
27
|
+
Skip search for simple current-code facts, tiny edits, typo fixes, one-shot commands, or behavior directly established by a clear live source. Do not skip merely by saying the current conversation is sufficient or a relevant result was already retrieved; skip only when the current user message, selected text, or nearby visible context fully contains the facts needed for the answer. A nearby summary is sufficient for explaining that summary, but not automatically sufficient for diagnosing a regression, continuing an experiment, reviewing consistency with prior behavior, or claiming a complete historical account. A word such as "previous", "earlier", "remember", or "history" is not enough by itself to search when the visible context already contains the requested prior facts.
|
|
28
|
+
|
|
29
|
+
Do not search merely because a prior result or fix might exist. For an exact calculation from currently available data, or a current screenshot or reproducible symptom with sufficient live evidence, use the current evidence first. Search only when the user request or visible context establishes a concrete historical dependency.
|
|
26
30
|
|
|
27
31
|
Choose the closest coding scene to shape the query:
|
|
28
32
|
|
|
@@ -34,23 +38,47 @@ If the user asks for commit, PR, MR, issue, or repository architecture evidence,
|
|
|
34
38
|
|
|
35
39
|
## Query Workflow
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
Before searching, identify the user's current action, target, concrete behavior or symptom, and the historical knowledge that could change the next action. When the request is fragmented, derive one narrow working intent from only its explicit target, condition, and requested or implied outcome. Do not add generic security, authorization, concurrency, auditing, reliability, or best-practice concerns unless the request names that boundary or it is necessary to resolve the working intent. Ask one focused question when no actionable intent can be named.
|
|
42
|
+
|
|
43
|
+
Run up to two focused first-round searches before answering or editing: a primary query for the smallest user-facing decision, and a materially different complementary query only when a second independent fact can change the action. Keep one query when the request describes one strongly coupled calculation, diagnosis, ownership question, or lifecycle decision; do not split it merely to create coverage. Run independent first-round searches in parallel by default. If parallel execution encounters a transport, rate-limit, or caller-environment failure, run any remaining searches serially; do not switch solely because a successful search returns an unexpected number of items. After merging the first-round results, run at most one follow-up query only when one named residual gap can change implementation, localization, risk, or validation. Do not use the follow-up merely because results are few, generic, or incomplete.
|
|
44
|
+
|
|
45
|
+
Write each query as one short natural-language question or intent statement, not a keyword list. Derive it from the user's retrieval goal instead of copying or concatenating nouns from the prompt. Follow the user's language for the prose while preserving exact code, API, path, workflow, and project identifiers. Retain at least one distinctive noun phrase from the user's wording as an anchor, together with any explicit negation, time/order, quantity, or scope qualifier. Also retain one stable task entity explicitly established by the current conversation or live code/documentation when it is needed to resolve that anchor or make the target decidable; do not drop it merely because it is absent from the newest fragmented user message. Do not replace an anchor or stable entity with a more abstract mechanism, a more specific implementation guess, or an unverified term. Preserve whether a retained detail is an observed symptom, desired outcome, disputed field or hypothesis, or explicit exclusion; do not turn an observation into a required invariant or replace a named disputed field with a generic reference.
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
Preserve the user's requested answer shape as well as the target: for example, whether a value was introduced by a prior code change, which failed experiments require rerun, how a negative case differs, what source boundary applies, or which existing plan remains current. Encode an explicit exclusion, source boundary, or qualifier such as only, previous, failed, negative, not, latest, or before/after when it changes the answer. Do not turn an imperative, URL, copied log, or full task request into the query verbatim; extract the smallest reusable historical fact that could change the next action. When the user explicitly names several independent deliverables and their respective historical facts could change different next actions, use the existing two-query allowance for complementary coverage: let the primary query cover the central implementation or decision, and let the complementary query cover the separate validation, artifact, reporting, or boundary question. Do not split one tightly coupled task or create a second query merely to enumerate every noun.
|
|
48
|
+
|
|
49
|
+
State a fact-sized relationship that can change the next action: a target under a condition, and the decision, invariant, consequence, root cause, ownership, compatibility, validation question, or requested answer at issue. For behavior, data, and lifecycle work, every query must use this visible shape: `<target>: <condition>,<decision / invariant / consequence / validation question>?`. Keep the colon in both Chinese and English so the target, condition, and decision boundary remain explicit. Do not emit a generic topic, a keyword list, a label such as `primary query`, or an explanation around the query.
|
|
50
|
+
|
|
51
|
+
For a complementary first-round pair, each query must stand alone and cover a different decision boundary. Use a complementary pair only when the provided context gives each decision boundary a distinct exact code, API, path, workflow, or project identifier; otherwise keep one focused combined query that preserves both user-stated facts. Do not merely restate the same question with synonyms. If the user describes only one tightly coupled decision, emit exactly one query. Use one or two stable exact identifiers when they sharpen the query, and integrate them grammatically instead of appending search tags or filler. Use only user-provided anchors and stable terms from live code or documentation; do not reconstruct unseen fact wording from recalled memory.
|
|
40
52
|
|
|
41
53
|
Pass the query directly with `--query`. Put every dynamically generated query in single quotes, never double quotes. Treat `$HOME`, backticks, and `$(command)` as literal text inside those quotes. Replace each literal single quote in the value with the exact POSIX sequence `'\''`.
|
|
42
54
|
|
|
43
|
-
|
|
55
|
+
Use these actual output shapes as examples. They are queries themselves, not full user prompts or instructions for the user. Each Chinese/English pair is a language variant: choose the one matching the user, never run both merely because both are shown. The comments explain the example only and are not part of emitted query text.
|
|
44
56
|
|
|
45
57
|
```bash
|
|
46
|
-
|
|
47
|
-
memorax-cli search --query '
|
|
48
|
-
memorax-cli search --query '
|
|
58
|
+
# One tightly coupled decision: emit one query.
|
|
59
|
+
memorax-cli search --query 'Trace 生产版本:升级后到达的记录中,应以哪个客户端版本字段判断由旧插件产生,而非新版本上传进程?'
|
|
60
|
+
memorax-cli search --query 'Trace producer version: after an upgrade, which client-version field shows that an event came from the old plugin rather than the new uploader?'
|
|
61
|
+
|
|
62
|
+
# Two independent boundaries: emit a complementary pair.
|
|
63
|
+
memorax-cli search --query '任务上下文:升级新包后已打开任务仍按旧提示,是否绑定旧版本且必须新开对话?'
|
|
64
|
+
memorax-cli search --query '包缓存版本冲突:本地新包与缓存冲突时,已打开任务为何仍使用旧提示,如何确认实际加载版本?'
|
|
65
|
+
memorax-cli search --query 'Task context after upgrade: can an already-open task keep old injected context, and must validation use a fresh task?'
|
|
66
|
+
memorax-cli search --query 'Package-cache version collision: how do we confirm which version the active task actually loaded?'
|
|
67
|
+
|
|
68
|
+
# Preserve an explicit lifecycle condition and the required invariant.
|
|
69
|
+
memorax-cli search --query '自动写回:事件回调不等待 Promise 时,如何在消息终态后执行并防止重复?'
|
|
70
|
+
memorax-cli search --query 'Automatic writeback: when an event callback does not await a Promise, how should it run after message terminal state without duplicates?'
|
|
71
|
+
|
|
72
|
+
# Preserve a source boundary rather than turning it into a generic SDK question.
|
|
73
|
+
memorax-cli search --query '桌面 SDK 数据权威:无原生命令行时,应从哪些规范化消息和会话生命周期事件获取数据?'
|
|
74
|
+
memorax-cli search --query 'Desktop SDK authority: without a native CLI, which normalized messages and session lifecycle events are authoritative?'
|
|
49
75
|
```
|
|
50
76
|
|
|
51
77
|
Keep queries under 25 words when practical for the language, but do not shorten them into ungrammatical fragments. Exclude secrets, private URLs, full prompts, raw transcripts, copied files, long logs, stack traces, and one-off task details.
|
|
52
78
|
|
|
53
|
-
|
|
79
|
+
Do not use abstract query facets such as "state", "fix", "safety", or "best practice" unless they are the concrete target. Do not use generic security or safety queries as complementary queries; bind every query to an exact target, condition, and behavior boundary.
|
|
80
|
+
|
|
81
|
+
Merge and deduplicate first-round results by item identity when available, otherwise by matching scope, condition, claim, and consequence. Accept a memory only when all three checks pass: it has the same component, API, workflow, or ownership boundary; it has the same behavior, symptom, condition, or change; and it supplies a condition, conclusion, consequence, fix, or validation idea that can change the current action. Read or summarize at most two accepted direct hits. Prefer memories matching the current repository, module, API, lifecycle surface, ownership boundary, behavior, and failure mode. Treat verified memories as routing and validation hints, not patch recipes. Treat failed-attempt memories as negative evidence. Ignore stale or unrelated items and anything conflicting with current source, tests, or durable documentation. For application questions, reject retrieval-strategy, evaluation, prompting, or workflow-process memories as domain evidence even if they repeat application terms. If no memory passes all three checks, say that memory is insufficient for the requested decision rather than filling the gap with a generic principle.
|
|
54
82
|
|
|
55
83
|
## Transport Failures
|
|
56
84
|
|
|
@@ -39,7 +39,7 @@ python3 <skill-dir>/scripts/user_profile_memory.py list --repo <repo>
|
|
|
39
39
|
|
|
40
40
|
Use only active preferences returned by the script. If the preferences file does not exist, report that no user-profile memory is available; the list operation does not create it.
|
|
41
41
|
|
|
42
|
-
Mention only preferences relevant to the current request unless the user explicitly asks to list all of them. Stored preferences describe how
|
|
42
|
+
Mention only preferences relevant to the current request unless the user explicitly asks to list all of them. Stored preferences describe how the coding agent should interact with the user; they are not repository facts.
|
|
43
43
|
|
|
44
44
|
## Priority
|
|
45
45
|
|
|
@@ -21,27 +21,36 @@ Before writing, ensure the repository root `.gitignore` contains `.repo_memory/`
|
|
|
21
21
|
|
|
22
22
|
Do not create a global procedures file, index, event log, generated metadata, or version history. Do not edit `.repo_memory/PROFILE.md`, `.repo_memory/resources/`, `.repo_memory/raw/`, or `.repo_memory/user-profile/`.
|
|
23
23
|
|
|
24
|
-
Choose the closest existing topic file
|
|
24
|
+
Choose the closest existing topic file before writing:
|
|
25
|
+
|
|
26
|
+
- New topic: create a file.
|
|
27
|
+
- Addition or refinement to the same topic: update the existing file.
|
|
28
|
+
- A new rule directly conflicts with or replaces an old rule: update the existing file and remove the superseded content.
|
|
29
|
+
- An old rule references a command, file, or workflow that no longer exists: update the invalid part; delete the file if the entire procedure is obsolete.
|
|
30
|
+
- Equivalent content: do not add a duplicate.
|
|
31
|
+
- If it is unclear whether the change is durable or only applies to the current task: ask the user.
|
|
32
|
+
|
|
33
|
+
Do not modify existing memory because of a one-time instruction for the current task. Do not scan or clean up unrelated topics.
|
|
25
34
|
|
|
26
35
|
Use this shape when useful:
|
|
27
36
|
|
|
28
37
|
```markdown
|
|
29
|
-
#
|
|
38
|
+
# Reviewing Code
|
|
30
39
|
|
|
31
|
-
Use when:
|
|
40
|
+
Use when: reviewing changes in this repository.
|
|
32
41
|
|
|
33
42
|
## Procedure
|
|
34
43
|
|
|
35
|
-
1.
|
|
36
|
-
2.
|
|
37
|
-
3.
|
|
44
|
+
1. Review the changes before creating a PR.
|
|
45
|
+
2. Resolve blocking findings.
|
|
46
|
+
3. Create the PR only after review is complete.
|
|
38
47
|
|
|
39
48
|
## Exceptions
|
|
40
49
|
|
|
41
|
-
-
|
|
50
|
+
- Follow a more specific current user instruction first.
|
|
42
51
|
```
|
|
43
52
|
|
|
44
|
-
Delete only the topic file or
|
|
53
|
+
Delete only the topic file, section, or step the user explicitly identifies, and preserve unrelated content. Do not retain deleted text in tombstones, backups, inactive entries, or history files. Apply the same rule to superseded text.
|
|
45
54
|
|
|
46
55
|
## User-Profile Memory
|
|
47
56
|
|
|
@@ -59,15 +68,26 @@ List existing preferences before adding and perform semantic matching:
|
|
|
59
68
|
python3 <skill-dir>/scripts/user_profile_memory.py list --repo <repo>
|
|
60
69
|
```
|
|
61
70
|
|
|
62
|
-
|
|
71
|
+
Handle the semantic match before writing:
|
|
72
|
+
|
|
73
|
+
- New preference: add a new preference.
|
|
74
|
+
- Equivalent content: do not add a duplicate.
|
|
75
|
+
- Addition or refinement to the same preference: update the existing preference.
|
|
76
|
+
- A new preference directly conflicts with or replaces an old preference in the same scope: update the existing id and remove the superseded content.
|
|
77
|
+
- The user explicitly says a preference no longer applies: delete that preference.
|
|
78
|
+
- Its `Applies when` environment, tool, or workflow no longer exists: update the scope; delete it if the entire preference is obsolete.
|
|
79
|
+
|
|
80
|
+
Do not modify or delete existing preferences because of a one-time instruction for the current task. Do not scan or clean up unrelated preferences.
|
|
81
|
+
|
|
82
|
+
Use the matching id for updates. Add only a genuinely new preference:
|
|
63
83
|
|
|
64
84
|
```bash
|
|
65
85
|
python3 <skill-dir>/scripts/user_profile_memory.py add \
|
|
66
86
|
--repo <repo> \
|
|
67
87
|
--type communication \
|
|
68
|
-
--description "
|
|
69
|
-
--applies-when "
|
|
70
|
-
--do-not-apply-when "
|
|
88
|
+
--description "User prefers concise Chinese answers for this repository." \
|
|
89
|
+
--applies-when "Answering questions in this repository." \
|
|
90
|
+
--do-not-apply-when "The user explicitly requests another language or format."
|
|
71
91
|
```
|
|
72
92
|
|
|
73
93
|
Allowed script types are `communication`, `workflow`, `environment`, and `profile`. These type names do not expand this authority: never use `workflow` or `environment` to store an executable repository procedure.
|
|
@@ -83,7 +103,7 @@ python3 <skill-dir>/scripts/user_profile_memory.py update \
|
|
|
83
103
|
--do-not-apply-when <exception>
|
|
84
104
|
```
|
|
85
105
|
|
|
86
|
-
If multiple preferences may match,
|
|
106
|
+
If multiple preferences may match, or it is unclear whether the change is durable, ask the user. Delete only an explicitly identified preference:
|
|
87
107
|
|
|
88
108
|
```bash
|
|
89
109
|
python3 <skill-dir>/scripts/user_profile_memory.py delete \
|
|
@@ -15,6 +15,7 @@ The user selects a repository, not a memory directory. Do not ask for a `.repo_m
|
|
|
15
15
|
```text
|
|
16
16
|
<repo>/.repo_memory/
|
|
17
17
|
├── PROFILE.md
|
|
18
|
+
├── <repo-native-topic>.md conceptual pages
|
|
18
19
|
├── raw/
|
|
19
20
|
│ ├── prepare-report.json
|
|
20
21
|
│ ├── git-commits.json
|
|
@@ -25,10 +26,35 @@ The user selects a repository, not a memory directory. Do not ask for a `.repo_m
|
|
|
25
26
|
└── issues.md
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
Script-generated artifacts: `raw/prepare-report.json`, `raw/git-commits.json`, and optional `raw/github-facets.json` or `raw/gitlab-facets.json`. Agent-authored durable artifacts: `PROFILE.md`, `resources/commits.md`, `resources/prs.md`, and `resources/issues.md`.
|
|
29
|
+
Script-generated artifacts: `raw/prepare-report.json`, `raw/git-commits.json`, and optional `raw/github-facets.json` or `raw/gitlab-facets.json`. Agent-authored durable artifacts: `PROFILE.md`, repository-native supporting conceptual pages when the repository has enough surface area, `resources/commits.md`, `resources/prs.md`, and `resources/issues.md`. Temporary planning artifact `.repo_memory/_plan.md` is allowed during drafting but must be removed before final validation.
|
|
29
30
|
|
|
30
31
|
User-managed sidecars may coexist under `.repo_memory/procedure-memory/` and `.repo_memory/user-profile/`. Builder scripts preserve them and exclude them from bundle validation; this skill must not create, edit, or summarize their contents as repo-memory evidence.
|
|
31
32
|
|
|
33
|
+
## Wiki-Style Output Contract
|
|
34
|
+
|
|
35
|
+
MemoraX repo memory is a wiki-style repository memory backed by raw mechanical evidence. The primary user-facing product is a readable wiki, not a dense schema dump or a history table.
|
|
36
|
+
|
|
37
|
+
- `PROFILE.md` is the only fixed conceptual wiki file and the wiki landing page: project identity, what the repo contains, how it works, first-use path, Major Areas, Supporting Pages, provider context, and evidence inspected.
|
|
38
|
+
- Do not assume fixed supporting page names. Decide supporting pages and filenames from the repository itself after discovery.
|
|
39
|
+
- For very small repositories, `PROFILE.md` plus 1-2 supporting pages is enough. For most repositories, generate 3-7 Markdown pages total, including `PROFILE.md`. Only exceed 7 pages when the repository clearly has multiple substantial, independent areas that would become confusing if merged.
|
|
40
|
+
- Every durable supporting conceptual page must include frontmatter with `schema: "repo_memory_wiki_page.v0.1"` so validation can scan it.
|
|
41
|
+
- Supporting pages explain concepts, workflows, system areas, change surfaces, setup, verification, and agent routing cautions. They must link claims to inspected docs/source and use conservative wording when lightweight mode did not inspect source.
|
|
42
|
+
- resources/*.md remain compact historical routing cards for commits, PRs/MRs, and issues. They should not be the main architecture explanation.
|
|
43
|
+
- Keep raw JSON as debug evidence only. Do not ask future agents to read raw facets unless compact pages and resources are insufficient.
|
|
44
|
+
|
|
45
|
+
## Conceptual Page Planning
|
|
46
|
+
|
|
47
|
+
After discovery and before final wiki writing, create a temporary planning artifact at `.repo_memory/_plan.md`. Keep it compact. Use it to outline intended final pages, each page purpose, source evidence, page boundaries, canonical homes for overlapping concepts, remaining questions, weak evidence, and paths that must be verified before final writing.
|
|
48
|
+
|
|
49
|
+
- Remove `.repo_memory/_plan.md` before final validation; it is not part of the durable repo memory bundle.
|
|
50
|
+
- Organize pages like human documentation, not a raw file inventory. Use human documentation titles. Do not title pages or headings after source paths, and do not mirror the source tree.
|
|
51
|
+
- Create a page only when a future human or agent needs a canonical explanation for a concept, workflow, system area, or change surface. A page is a durable orientation artifact, not a parking place for exploration facts.
|
|
52
|
+
- Merge rather than split when two pages would repeat the same workflow, types, or source paths; when one page would only explain a subset of another page; or when the distinction is based on source directory layout rather than reader task or concept.
|
|
53
|
+
- Split rather than merge when one page would mix unrelated reader tasks; when a concept has its own workflow, data model, risks, and source-backed change guidance; or when a page would become too long to navigate.
|
|
54
|
+
- Prefer headings inside broader pages before creating many small pages. Avoid thin pages and stub-like pages.
|
|
55
|
+
|
|
56
|
+
Natural documentation domains are candidates, not a required checklist: architecture, workflows, data model, integrations, operations, testing/evaluation, and extension points. In `_plan.md`, decide which candidates were selected, merged, or skipped and why. Generic names such as `architecture.md`, `runtime-flow.md`, and `developer-workflow.md` are fallback names only when repository vocabulary gives no stronger topic.
|
|
57
|
+
|
|
32
58
|
## Repository Prerequisite
|
|
33
59
|
|
|
34
60
|
The selected target must be a local git repository: either the directory contains `.git/` or is inside a git worktree. A GitHub/GitLab remote is optional; local-only git repositories are supported.
|
|
@@ -60,19 +86,38 @@ Default mechanical collection settings are intentionally visible in `<skill-dir>
|
|
|
60
86
|
|
|
61
87
|
```json
|
|
62
88
|
{
|
|
63
|
-
"schema": "repo_memory_builder_defaults.
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
89
|
+
"schema": "repo_memory_builder_defaults.v2",
|
|
90
|
+
"repoHistory": {
|
|
91
|
+
"mode": "provider",
|
|
92
|
+
"limits": {
|
|
93
|
+
"commits": 30,
|
|
94
|
+
"prs": 30,
|
|
95
|
+
"issues": 30
|
|
96
|
+
}
|
|
68
97
|
},
|
|
69
98
|
"summaryChars": 4000
|
|
70
99
|
}
|
|
71
100
|
```
|
|
72
101
|
|
|
73
|
-
To change defaults for future builder runs, edit `defaults.json`, not the Python scripts. To override one run, pass `--commit-limit`, `--pr-limit`, `--issue-limit`, or `--summary-chars` to `collect_all.py`.
|
|
102
|
+
To change defaults for future builder runs, edit `defaults.json`, not the Python scripts. To override one run, pass `--history-mode`, `--commit-limit`, `--pr-limit`, `--issue-limit`, or `--summary-chars` to `collect_all.py`.
|
|
103
|
+
|
|
104
|
+
Provider collection is best-effort by default. Use `--history-mode local-only` or `--skip-provider` for an explicit local-only run that does not call GitHub/GitLab, and use `--history-mode provider-required` or `--require-provider` only when the user explicitly requires PR/MR/issue evidence and the run should fail instead of falling back to local-only memory.
|
|
105
|
+
|
|
106
|
+
## Historical Evidence Policy
|
|
107
|
+
|
|
108
|
+
Historical evidence collection is configurable per run with `--history-mode` and by default with `repoHistory.mode` in `defaults.json`:
|
|
109
|
+
|
|
110
|
+
| Mode | Commits | PRs/MRs and issues | Resource file contract |
|
|
111
|
+
|------|---------|--------------------|------------------------|
|
|
112
|
+
| `--history-mode none` | Disabled | Disabled | Write disabled resource files for commits, PRs/MRs, and issues using `source: "history_disabled"`, `resource_count: 0`, and `raw_source: ""`. |
|
|
113
|
+
| `--history-mode commits-only` | Collected locally | Disabled | Write commit resources from `raw/git-commits.json`; write PR/issue files using `source: "provider_skipped_local_only"`, `resource_count: 0`, and `raw_source: ""`. |
|
|
114
|
+
| `--history-mode local-only` | Collected locally | Disabled | Same as commits-only; use when the user wants local Git history but no provider calls. |
|
|
115
|
+
| `--history-mode provider` | Collected locally | Best-effort | Default. Collect provider facets when ready; if provider evidence is unavailable or fails, continue local-only and mark PR/issue resources unavailable. |
|
|
116
|
+
| `--history-mode provider-required` | Collected locally | Required | Fail the collection if provider facets cannot be collected. Use only when the user explicitly requires PR/MR/issue evidence. |
|
|
117
|
+
|
|
118
|
+
`--skip-provider` is a compatibility alias for `--history-mode local-only`; `--require-provider` is a compatibility alias for `--history-mode provider-required`.
|
|
74
119
|
|
|
75
|
-
|
|
120
|
+
When history or provider evidence is disabled, skipped, unavailable, or degraded, still create `resources/commits.md`, `resources/prs.md`, and `resources/issues.md`; write disabled resource files for any historical channel that was not collected. The disabled or unavailable resource files tell future agents that the builder intentionally did not collect that evidence. For PR/issue files, do not say that no PRs or issues exist unless provider evidence was actually collected and empty.
|
|
76
121
|
|
|
77
122
|
## User Count Requests
|
|
78
123
|
|
|
@@ -150,7 +195,7 @@ Do not use a restricted shell sandbox to verify provider/API availability. Verif
|
|
|
150
195
|
|
|
151
196
|
### `scripts/validate_memory.py`
|
|
152
197
|
|
|
153
|
-
Use this as the final gate after authoring `PROFILE.md
|
|
198
|
+
Use this as the final gate after authoring `PROFILE.md`, supporting conceptual pages, and `resources/*.md`. It accepts either the repository root or the memory root, validates required files, JSON parseability, frontmatter counts, placeholder removal, and provider raw/resource consistency.
|
|
154
199
|
|
|
155
200
|
```bash
|
|
156
201
|
python3 <skill-dir>/scripts/validate_memory.py <repo-path> --pretty
|
|
@@ -200,9 +245,12 @@ Run: `<notice.command>`
|
|
|
200
245
|
- Form project-level understanding before looking at PR/issue history.
|
|
201
246
|
- Record whether conclusions are doc-derived or code-inspected.
|
|
202
247
|
|
|
203
|
-
4. **
|
|
248
|
+
4. **Plan and draft the wiki landing page and conceptual pages**
|
|
204
249
|
- Read [repo-templates.md](repo-templates.md) before writing memory files.
|
|
205
|
-
-
|
|
250
|
+
- Create `.repo_memory/_plan.md` after discovery and before final wiki writing. Use it to cluster repository-native conceptual areas, page purposes, evidence, boundaries, canonical homes, merge/split decisions, weak evidence, and path verification needs.
|
|
251
|
+
- Write `PROFILE.md` as the wiki landing page with repo identity, checkout state, what the repo contains, how it works, first-use path, Major Areas, Supporting Pages, provider context, and evidence inspected.
|
|
252
|
+
- Create repository-native supporting conceptual pages from the plan. Cover only concepts, workflows, system areas, or change surfaces with enough evidence to deserve canonical pages.
|
|
253
|
+
- Remove `.repo_memory/_plan.md` before final validation.
|
|
206
254
|
- Record the selected build mode and avoid overstating code-level claims in lightweight mode.
|
|
207
255
|
|
|
208
256
|
5. **Review raw evidence**
|
|
@@ -243,8 +291,9 @@ Every description must say what the item explains, when a future agent should op
|
|
|
243
291
|
|
|
244
292
|
Generate memory that the `memorax-code` repo-read operation can consume progressively:
|
|
245
293
|
|
|
246
|
-
- `PROFILE.md` is the stable
|
|
247
|
-
-
|
|
294
|
+
- `PROFILE.md` is the stable wiki landing page and should summarize identity, evidence, major areas, supporting pages, verification gates, and resource pointers.
|
|
295
|
+
- Supporting conceptual pages are repository-native canonical homes for concepts, workflows, system areas, and change surfaces selected through temporary planning.
|
|
296
|
+
- `resources/*.md` are compact historical routing cards with search-grade descriptions.
|
|
248
297
|
- `raw/*.json` contains optional build/debug evidence for deep inspection when compact resources are insufficient.
|
|
249
298
|
|
|
250
299
|
Do not duplicate the daily retrieval workflow here. The `repo-read` operation owns trigger timing, silent background-maintenance handoff, and task-specific search behavior.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Role And Demand Gate
|
|
4
4
|
|
|
5
|
-
Use existing `.repo_memory/` as
|
|
5
|
+
Use existing `.repo_memory/` as wiki-style repo memory for repository identity, architecture, history, PR/issue context, remembered fixes, and cross-module search. Live code and tests remain authoritative.
|
|
6
6
|
|
|
7
7
|
Select this reference for broad repo introduction, history, architecture background, cross-module routing, PR/issue context, design rationale, or stale-memory awareness. Skip this reference for narrow tasks with a clear live-code target.
|
|
8
8
|
|
|
@@ -36,21 +36,27 @@ The default policy remains `adaptive(5 commits OR 24 hours)`. A missing or non-a
|
|
|
36
36
|
|
|
37
37
|
## Retrieval
|
|
38
38
|
|
|
39
|
-
If `.repo_memory/PROFILE.md` is a readable regular file, read
|
|
39
|
+
If `.repo_memory/PROFILE.md` is a readable regular file, read `PROFILE.md` as the wiki landing page once. Treat its descriptions as routing cues, not proof.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Extract task-relevant links from `Major Areas` and `Supporting Pages`. Do not assume fixed page names; use `PROFILE.md` links and headings to find the repository-native canonical homes for the user's task. Open at most 2-4 relevant conceptual pages from `.repo_memory/*.md` before searching historical resources.
|
|
42
|
+
|
|
43
|
+
Search `PROFILE.md`, `.repo_memory/*.md`, and `.repo_memory/resources/` with a combined query built from the user's strongest handles: path, basename, symbol, command, PR/issue number, error text, module, branch, environment variable, or config key.
|
|
42
44
|
|
|
43
45
|
```bash
|
|
44
46
|
rg -n '<handle-1>|<handle-2>' \
|
|
45
|
-
.repo_memory/PROFILE.md .repo_memory/resources
|
|
47
|
+
.repo_memory/PROFILE.md .repo_memory/*.md .repo_memory/resources
|
|
46
48
|
```
|
|
47
49
|
|
|
48
50
|
Use:
|
|
49
51
|
|
|
52
|
+
- conceptual `.repo_memory/*.md` pages for repository-native canonical homes, workflows, system areas, change surfaces, and verification routing;
|
|
53
|
+
- resources/*.md for historical routing cards;
|
|
50
54
|
- `resources/commits.md` for local history and regressions;
|
|
51
55
|
- `resources/prs.md` for merged or active implementation context;
|
|
52
56
|
- `resources/issues.md` for symptoms, requests, and requirements.
|
|
53
57
|
|
|
58
|
+
Disabled and unavailable historical resource files are collection state, not repository state. If a resource frontmatter uses `source: "history_disabled"`, `source: "provider_skipped_local_only"`, or `source: "provider_unavailable"` with `resource_count: 0`, do not conclude that there are no commits, PRs, MRs, or issues. Treat the channel as intentionally uncollected or unavailable; answer from available memory only. Ask whether to rebuild with provider history when that context matters.
|
|
59
|
+
|
|
54
60
|
If a read is missing, unreadable, or structurally mixed, discard conclusions that depend only on the bundle. Do not repair it in the foreground.
|
|
55
61
|
|
|
56
62
|
## Retrieval Budget
|
|
@@ -58,6 +64,7 @@ If a read is missing, unreadable, or structurally mixed, discard conclusions tha
|
|
|
58
64
|
- Read `PROFILE.md` at most once.
|
|
59
65
|
- Run at most 2 combined `rg` commands.
|
|
60
66
|
- Stop repo-memory retrieval as soon as the hits are sufficient.
|
|
67
|
+
- Open at most 2-4 relevant conceptual pages total during the bounded memory phase.
|
|
61
68
|
- Open only the matched resource section when `rg` context is insufficient.
|
|
62
69
|
|
|
63
70
|
Do NOT open these unless the user explicitly asks or a compact hit contains only a `facetId`:
|