openmodus 0.0.1__py3-none-any.whl
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.
- modus/__init__.py +13 -0
- modus/__main__.py +6 -0
- modus/_bundled/schemas/module-meta.schema.yaml +86 -0
- modus/activation_guidance.py +18 -0
- modus/artifacts_io.py +1066 -0
- modus/catalog.py +361 -0
- modus/cli.py +1785 -0
- modus/commands/__init__.py +17 -0
- modus/commands/context_cmd.py +50 -0
- modus/commands/help.py +131 -0
- modus/commands/init_project.py +503 -0
- modus/commands/install_state.py +212 -0
- modus/commands/maintenance_scope.py +69 -0
- modus/commands/permission_errors.py +26 -0
- modus/commands/reporting.py +113 -0
- modus/commands/self_update.py +577 -0
- modus/commands/status.py +52 -0
- modus/commands/uninstall.py +359 -0
- modus/commands/uninstall_report.py +183 -0
- modus/commands/uninstall_self.py +373 -0
- modus/commands/update.py +526 -0
- modus/commands/update_report.py +162 -0
- modus/commands/verify_anchors.py +230 -0
- modus/config.py +492 -0
- modus/git_hygiene.py +466 -0
- modus/hooks/__init__.py +21 -0
- modus/hooks/bootstrap.py +232 -0
- modus/hooks/context.py +29 -0
- modus/hooks/contracts.py +111 -0
- modus/hooks/environment.py +86 -0
- modus/hooks/protocol.py +156 -0
- modus/hooks/runtime.py +136 -0
- modus/init_analysis/README.md +72 -0
- modus/init_analysis/__init__.py +35 -0
- modus/init_analysis/api.py +360 -0
- modus/init_analysis/authoring_projection.py +192 -0
- modus/init_analysis/build_context.py +1326 -0
- modus/init_analysis/bundle.py +1092 -0
- modus/init_analysis/capability_evidence.py +585 -0
- modus/init_analysis/catalog.py +448 -0
- modus/init_analysis/compiler/__init__.py +1 -0
- modus/init_analysis/compiler/cache.py +63 -0
- modus/init_analysis/compiler/cpp.py +536 -0
- modus/init_analysis/compiler/go.py +158 -0
- modus/init_analysis/compiler/java.py +112 -0
- modus/init_analysis/compiler/merge.py +211 -0
- modus/init_analysis/compiler/models.py +88 -0
- modus/init_analysis/compiler/process.py +259 -0
- modus/init_analysis/compiler/python.py +430 -0
- modus/init_analysis/compiler/typescript.py +73 -0
- modus/init_analysis/contracts.py +283 -0
- modus/init_analysis/engine.py +230 -0
- modus/init_analysis/entry_contracts.py +155 -0
- modus/init_analysis/evidence_graph.py +133 -0
- modus/init_analysis/evidence_records.py +211 -0
- modus/init_analysis/extraction_cache.py +309 -0
- modus/init_analysis/fingerprint.py +38 -0
- modus/init_analysis/framework_facts.py +472 -0
- modus/init_analysis/frontend.py +1523 -0
- modus/init_analysis/generic.py +77 -0
- modus/init_analysis/ids.py +35 -0
- modus/init_analysis/input_snapshot.py +675 -0
- modus/init_analysis/language-registry.json +550 -0
- modus/init_analysis/language_capabilities.py +78 -0
- modus/init_analysis/native_binding.py +734 -0
- modus/init_analysis/native_parser.py +905 -0
- modus/init_analysis/navigation.py +184 -0
- modus/init_analysis/pipeline.py +504 -0
- modus/init_analysis/projection.py +409 -0
- modus/init_analysis/provider_assets/ModusJavaAnalyzer.java +350 -0
- modus/init_analysis/provider_assets/modus_go_analyzer.go +367 -0
- modus/init_analysis/provider_assets/modus_typescript_analyzer.cjs +163 -0
- modus/init_analysis/reference_outcomes.py +318 -0
- modus/init_analysis/resources.py +78 -0
- modus/init_analysis/scan.py +95 -0
- modus/init_analysis/scope_candidates.py +372 -0
- modus/init_analysis/search_metadata.py +32 -0
- modus/init_analysis/semantic_contracts.py +119 -0
- modus/init_analysis/semantic_ir.py +582 -0
- modus/init_analysis/semantic_providers.py +188 -0
- modus/init_analysis/semantic_reconcile.py +491 -0
- modus/init_analysis/source_contracts.py +127 -0
- modus/init_analysis/source_coordinates.py +80 -0
- modus/init_analysis/source_filters.py +184 -0
- modus/init_analysis/source_inventory.py +251 -0
- modus/init_analysis/source_roles.py +99 -0
- modus/init_analysis/source_snapshot.py +65 -0
- modus/init_analysis/structural.py +119 -0
- modus/init_analysis/topology.py +2060 -0
- modus/init_analysis/value_summary.py +463 -0
- modus/init_analysis/view_quarantine.py +606 -0
- modus/knowledge_identity.py +200 -0
- modus/knowledge_reader.py +220 -0
- modus/knowledge_seeds.py +56 -0
- modus/knowledge_update.py +212 -0
- modus/knowledge_write_session.py +241 -0
- modus/manifest.py +210 -0
- modus/orchestrator/README.md +67 -0
- modus/orchestrator/__init__.py +14 -0
- modus/orchestrator/context_resolver.py +142 -0
- modus/orchestrator/evidence_search.py +473 -0
- modus/orchestrator/fallback.py +83 -0
- modus/orchestrator/knowledge_sync.py +349 -0
- modus/orchestrator/models.py +82 -0
- modus/orchestrator/module_meta.py +194 -0
- modus/orchestrator/path_scope.py +38 -0
- modus/orchestrator/preflight.py +125 -0
- modus/orchestrator/query_terms.py +124 -0
- modus/orchestrator/search_policy.py +161 -0
- modus/paths.py +279 -0
- modus/platforms/__init__.py +45 -0
- modus/platforms/base.py +299 -0
- modus/platforms/claude.py +98 -0
- modus/platforms/codebuddy.py +51 -0
- modus/platforms/codex.py +41 -0
- modus/platforms/cursor.py +45 -0
- modus/platforms/hooks.py +188 -0
- modus/platforms/models.py +166 -0
- modus/platforms/registry.py +88 -0
- modus/platforms/rendering.py +77 -0
- modus/platforms/sections.py +100 -0
- modus/precedence.py +47 -0
- modus/project_activation.py +99 -0
- modus/retrieval/README.md +64 -0
- modus/retrieval/__init__.py +9 -0
- modus/retrieval/budget.py +50 -0
- modus/retrieval/delivery.py +226 -0
- modus/retrieval/index.py +92 -0
- modus/retrieval/pipeline.py +718 -0
- modus/retrieval/query.py +189 -0
- modus/retrieval/routing.py +237 -0
- modus/retrieval/runtime.py +39 -0
- modus/retrieval/settings.py +75 -0
- modus/retrieval/stages/__init__.py +7 -0
- modus/retrieval/stages/discovery.py +91 -0
- modus/retrieval/stages/documents.py +694 -0
- modus/retrieval/stages/lexical.py +116 -0
- modus/retrieval/stages/ranking.py +179 -0
- modus/retrieval/stages/sections.py +64 -0
- modus/retrieval/stages/selection.py +221 -0
- modus/retrieval/stages/settings.py +7 -0
- modus/scaffold/README.md +68 -0
- modus/scaffold/__init__.py +36 -0
- modus/scaffold/catalog.py +170 -0
- modus/scaffold/project.py +361 -0
- modus/scaffold/templates/README.md +37 -0
- modus/scaffold/templates/commands/init.md +19 -0
- modus/scaffold/templates/commands/reinit.md +18 -0
- modus/scaffold/templates/commands/update-knowledge.md +19 -0
- modus/scaffold/templates/knowledge/constraint/global-standard.md +18 -0
- modus/scaffold/templates/knowledge/constraint/team-standard.md +28 -0
- modus/scaffold/templates/knowledge/handbook/SKILL.md +21 -0
- modus/scaffold/templates/skills/modus-init/SKILL.md +52 -0
- modus/scaffold/templates/skills/modus-init/references/architecture-overview.md +23 -0
- modus/scaffold/templates/skills/modus-init/references/business-skill.md +65 -0
- modus/scaffold/templates/skills/modus-init/references/code-skill.md +190 -0
- modus/scaffold/templates/skills/modus-init/references/constraint-extraction.md +86 -0
- modus/scaffold/templates/skills/modus-init/references/constraint-profiles/cpp.md +39 -0
- modus/scaffold/templates/skills/modus-init/references/constraint-profiles/go.md +39 -0
- modus/scaffold/templates/skills/modus-init/references/constraint-profiles/java.md +39 -0
- modus/scaffold/templates/skills/modus-init/references/constraint-profiles/php.md +39 -0
- modus/scaffold/templates/skills/modus-init/references/constraint-profiles/web.md +50 -0
- modus/scaffold/templates/skills/modus-init/references/global-standard.md +9 -0
- modus/scaffold/templates/skills/modus-init/references/language-adaptation.md +19 -0
- modus/scaffold/templates/skills/modus-init/references/scope-discovery.md +86 -0
- modus/scaffold/templates/skills/modus-init/references/team-standard.md +52 -0
- modus/scaffold/templates/skills/modus-init/references/workspace-init.md +67 -0
- modus/scaffold/templates/skills/modus-init/references/zh-style.md +12 -0
- modus/scaffold/templates/skills/modus-reinit/SKILL.md +22 -0
- modus/scaffold/templates/skills/modus-sync-knowledge/SKILL.md +28 -0
- modus/scaffold/templates/skills/modus-update-knowledge/SKILL.md +22 -0
- modus/scaffold/templates/skills/using-modus/SKILL.md +31 -0
- modus/scaffold/templates/skills/using-modus/references/constraint-usage.md +28 -0
- modus/scaffold/templates/skills/using-modus/references/framework-update.md +15 -0
- modus/scaffold/templates/skills/using-modus/references/knowledge-update-lifecycle.md +68 -0
- modus/scaffold/templates/skills/using-modus/references/router-details.md +42 -0
- modus/scaffold/writer.py +101 -0
- modus/schema_resources.py +56 -0
- modus/scope_models.py +504 -0
- modus/scope_resolver.py +109 -0
- modus/sensitive_literals.py +64 -0
- modus/skillmd.py +144 -0
- modus/source_listing.py +82 -0
- modus/surface.py +65 -0
- modus/text_tree.py +64 -0
- modus/versioning.py +61 -0
- modus/workspace.py +881 -0
- openmodus-0.0.1.dist-info/METADATA +251 -0
- openmodus-0.0.1.dist-info/RECORD +192 -0
- openmodus-0.0.1.dist-info/WHEEL +4 -0
- openmodus-0.0.1.dist-info/entry_points.txt +2 -0
- openmodus-0.0.1.dist-info/licenses/LICENSE +21 -0
modus/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Public package identity for Modus.
|
|
2
|
+
|
|
3
|
+
Modus keeps disposable initialization evidence separate from authored narrative
|
|
4
|
+
knowledge. The package root intentionally exposes only release metadata: new
|
|
5
|
+
capabilities belong to their owning modules instead of accumulating in a
|
|
6
|
+
convenience namespace with an accidental compatibility burden.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from typing import Final
|
|
10
|
+
|
|
11
|
+
__version__: Final = "0.0.1"
|
|
12
|
+
|
|
13
|
+
__all__ = ["__version__"]
|
modus/__main__.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
$schema: "http://json-schema.org/draft-07/schema#"
|
|
2
|
+
title: Modus ModuleMeta
|
|
3
|
+
description: Canonical wire contract for metadata attached to a Modus module document.
|
|
4
|
+
type: object
|
|
5
|
+
required: [schemaVersion, moduleId, state]
|
|
6
|
+
additionalProperties: false
|
|
7
|
+
properties:
|
|
8
|
+
schemaVersion: { const: 1 }
|
|
9
|
+
moduleId:
|
|
10
|
+
description: Stable identity serialized as exactly <domain>/<module>.
|
|
11
|
+
type: string
|
|
12
|
+
# JSON Schema regexes follow ECMA-262; the final lookahead is a portable
|
|
13
|
+
# true-end assertion that also rejects a trailing line break.
|
|
14
|
+
pattern: '^(?!\.{1,2}/)(?![^/]+/\.{1,2}(?![\s\S]))[^/\\:\s\x00-\x1f]+/[^/\\:\s\x00-\x1f]+(?![\s\S])'
|
|
15
|
+
parent:
|
|
16
|
+
description: Domain segment that physically contains the module document.
|
|
17
|
+
type: string
|
|
18
|
+
pattern: '^(?!\.{1,2}(?![\s\S]))[^/\\:\s\x00-\x1f]+(?![\s\S])'
|
|
19
|
+
state: { enum: [observed, proposed, confirmed] }
|
|
20
|
+
realization: { enum: [business-only, implemented] }
|
|
21
|
+
aliases:
|
|
22
|
+
type: array
|
|
23
|
+
uniqueItems: true
|
|
24
|
+
items: { type: string, minLength: 1 }
|
|
25
|
+
owners:
|
|
26
|
+
type: array
|
|
27
|
+
uniqueItems: true
|
|
28
|
+
items: { type: string, minLength: 1 }
|
|
29
|
+
responsibilities: { type: string }
|
|
30
|
+
anchors:
|
|
31
|
+
type: object
|
|
32
|
+
additionalProperties: false
|
|
33
|
+
properties:
|
|
34
|
+
paths:
|
|
35
|
+
type: array
|
|
36
|
+
uniqueItems: true
|
|
37
|
+
items: { type: string, minLength: 1 }
|
|
38
|
+
symbols:
|
|
39
|
+
type: array
|
|
40
|
+
uniqueItems: true
|
|
41
|
+
items: { type: string, minLength: 1 }
|
|
42
|
+
apis:
|
|
43
|
+
type: array
|
|
44
|
+
uniqueItems: true
|
|
45
|
+
items: { type: string, minLength: 1 }
|
|
46
|
+
routes:
|
|
47
|
+
type: array
|
|
48
|
+
uniqueItems: true
|
|
49
|
+
items: { type: string, minLength: 1 }
|
|
50
|
+
locations:
|
|
51
|
+
description: Auditable source bindings used for impact and anchor-drift checks.
|
|
52
|
+
type: array
|
|
53
|
+
uniqueItems: true
|
|
54
|
+
items:
|
|
55
|
+
type: object
|
|
56
|
+
required: [path, symbol, startLine]
|
|
57
|
+
additionalProperties: false
|
|
58
|
+
properties:
|
|
59
|
+
path: { type: string, minLength: 1 }
|
|
60
|
+
symbol: { type: string, minLength: 1 }
|
|
61
|
+
startLine: { type: integer, minimum: 1 }
|
|
62
|
+
endLine: { type: integer, minimum: 1 }
|
|
63
|
+
surfaces:
|
|
64
|
+
type: array
|
|
65
|
+
uniqueItems: true
|
|
66
|
+
items: { type: string, minLength: 1 }
|
|
67
|
+
contractIds:
|
|
68
|
+
type: array
|
|
69
|
+
uniqueItems: true
|
|
70
|
+
items:
|
|
71
|
+
type: string
|
|
72
|
+
maxLength: 256
|
|
73
|
+
pattern: '^(?:[A-Za-z0-9][A-Za-z0-9._:-]*|[A-Za-z0-9][A-Za-z0-9._:-]*\$\{[A-Za-z0-9._-]+(?::[A-Za-z0-9._-]+)?\})(?![\s\S])'
|
|
74
|
+
securitySensitive: { type: boolean }
|
|
75
|
+
confirmation:
|
|
76
|
+
type: object
|
|
77
|
+
required: [mode, confirmedBy, confirmedAt, evidence]
|
|
78
|
+
additionalProperties: false
|
|
79
|
+
properties:
|
|
80
|
+
mode: { enum: [human, heuristic] }
|
|
81
|
+
confirmedBy: { type: string, minLength: 1 }
|
|
82
|
+
confirmedAt: { type: string, minLength: 1 }
|
|
83
|
+
evidence:
|
|
84
|
+
type: array
|
|
85
|
+
minItems: 1
|
|
86
|
+
items: { type: string, minLength: 1 }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Canonical task-activation guidance shared by every host projection.
|
|
2
|
+
|
|
3
|
+
Keeping this text in one dependency-free module prevents hooks and generated
|
|
4
|
+
platform files from drifting into subtly different routing policies.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Final
|
|
8
|
+
|
|
9
|
+
MODUS_ENTRY_HINT: Final = (
|
|
10
|
+
"When the current task needs this project's source or implementation evidence "
|
|
11
|
+
"(including code-based documents or presentations), consult using-modus at "
|
|
12
|
+
"`.modus/skills/using-modus/SKILL.md` or its installed platform projection. "
|
|
13
|
+
"Load only relevant knowledge; missing skills, knowledge, CLI or caches do not block work. "
|
|
14
|
+
"For unrelated tasks, such as stock quotes or translating supplied text, do not load "
|
|
15
|
+
"using-modus, inspect Modus directories, or query project knowledge."
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
__all__ = ["MODUS_ENTRY_HINT"]
|