chaincompiler 0.3.0__tar.gz → 0.3.2__tar.gz
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.
- chaincompiler-0.3.2/LICENSE +21 -0
- chaincompiler-0.3.2/PKG-INFO +71 -0
- chaincompiler-0.3.2/README.md +55 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/pyproject.toml +6 -4
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler/__init__.py +1 -1
- chaincompiler-0.3.2/src/chaincompiler.egg-info/PKG-INFO +71 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler.egg-info/SOURCES.txt +2 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler.egg-info/requires.txt +3 -3
- chaincompiler-0.3.0/PKG-INFO +0 -11
- chaincompiler-0.3.0/src/chaincompiler.egg-info/PKG-INFO +0 -11
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/setup.cfg +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler/bridge.py +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler/forge.py +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler/persona.py +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler/prime.py +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler/skillpack.py +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler.egg-info/dependency_links.txt +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/src/chaincompiler.egg-info/top_level.txt +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/tests/test_chainpress.py +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/tests/test_persona.py +0 -0
- {chaincompiler-0.3.0 → chaincompiler-0.3.2}/tests/test_strict_gate.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 sancovp
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chaincompiler
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: The printing press for agent cognition chains: learn → gate → compile → prime
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: honeyc==0.3.2
|
|
10
|
+
Requires-Dist: rulecatcher==0.3.2
|
|
11
|
+
Requires-Dist: agent-skilltree>=0.4.0
|
|
12
|
+
Requires-Dist: agent-prompt-engineering>=0.2.0
|
|
13
|
+
Provides-Extra: persona
|
|
14
|
+
Requires-Dist: glyphsteer==0.3.2; extra == "persona"
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# chaincompiler — the base the chain compilers are made from
|
|
18
|
+
|
|
19
|
+
`chaincompiler` is the base package of [ChainCompiler](https://github.com/sancovp/chaincompiler), a compiler-compiler
|
|
20
|
+
for cognition. A language model thinks in whatever notation it is given, so the useful machine is not one notation but a
|
|
21
|
+
factory for them: ChainCompiler mints a notation from examples, gates text against it so a model cannot malform it, and
|
|
22
|
+
compiles it into a skill (`<name>/SKILL.md`) that any agent loads. This package is the part of that factory every
|
|
23
|
+
notation shares:
|
|
24
|
+
|
|
25
|
+
- `forge(kind, name, examples, db=…)` learns a grammar from example chains into a named scope, `<kind>:<name>` — a
|
|
26
|
+
*forged language* — and returns it as a `Language`;
|
|
27
|
+
- `gate_language(language, candidate)` lints a candidate chain against that grammar and returns its violations and the
|
|
28
|
+
fixes it suggests, so a model's output is checked against the language it was taught;
|
|
29
|
+
- `package_skill(name, body, out_dir=…, description=…)` writes a compiled body as `<name>/SKILL.md`;
|
|
30
|
+
- `build_prime(...)` renders the block that teaches a model the grammar and shows it one compiled example, so the model
|
|
31
|
+
writes in shape and the gate catches drift;
|
|
32
|
+
- `compile_chain` runs a chain through [`honeyc`](https://pypi.org/project/honeyc/) into its lenses.
|
|
33
|
+
|
|
34
|
+
The three chain compilers — [`chaincompiler-accc`](https://pypi.org/project/chaincompiler-accc/) (attention chains),
|
|
35
|
+
[`corcc`](https://pypi.org/project/corcc/) (chains of reasoning) and [`sccc`](https://pypi.org/project/sccc/) (skill
|
|
36
|
+
chains) — are each made from this base by adding only their kind, their parser and their renderer. Every check it makes
|
|
37
|
+
is about syntax and structure; it never judges whether a thought is good.
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install chaincompiler
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
It brings [`honeyc`](https://pypi.org/project/honeyc/) and [`rulecatcher`](https://pypi.org/project/rulecatcher/) at the
|
|
46
|
+
same release, and `agent-prompt-engineering` and `agent-skilltree` from PyPI. The extra `persona` adds
|
|
47
|
+
[`glyphsteer`](https://pypi.org/project/glyphsteer/), which `chaincompiler.persona` (the glyph-persona front end) imports:
|
|
48
|
+
`pip install "chaincompiler[persona]"`. The `chaincompiler` command is installed by
|
|
49
|
+
[`chainaios`](https://pypi.org/project/chainaios/), the agent tier, not by this package.
|
|
50
|
+
|
|
51
|
+
To work on it, clone the [repository](https://github.com/sancovp/chaincompiler) and run `./install.sh`, which installs
|
|
52
|
+
all fifteen packages editable.
|
|
53
|
+
|
|
54
|
+
## Use
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from chaincompiler import forge, gate_language
|
|
58
|
+
|
|
59
|
+
lang = forge("ac", "triage", ["[Symptom] ⇒ [Scope] ⇒ |Severity|", "[Repro] ⇒ [Localize] ⇒ |Cause|"], db="cc.db")
|
|
60
|
+
violations, suggestions = gate_language(lang, "[Symptom] ⇒ [Scope] ⇒ |Severity|")
|
|
61
|
+
print(lang.scope, violations) # ac:triage []
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Its design
|
|
65
|
+
|
|
66
|
+
The repository's [`DESIGN.md`](https://github.com/sancovp/chaincompiler/blob/main/DESIGN.md) §1 (the one type and the
|
|
67
|
+
loop every constructor runs) and §4 (this package).
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# chaincompiler — the base the chain compilers are made from
|
|
2
|
+
|
|
3
|
+
`chaincompiler` is the base package of [ChainCompiler](https://github.com/sancovp/chaincompiler), a compiler-compiler
|
|
4
|
+
for cognition. A language model thinks in whatever notation it is given, so the useful machine is not one notation but a
|
|
5
|
+
factory for them: ChainCompiler mints a notation from examples, gates text against it so a model cannot malform it, and
|
|
6
|
+
compiles it into a skill (`<name>/SKILL.md`) that any agent loads. This package is the part of that factory every
|
|
7
|
+
notation shares:
|
|
8
|
+
|
|
9
|
+
- `forge(kind, name, examples, db=…)` learns a grammar from example chains into a named scope, `<kind>:<name>` — a
|
|
10
|
+
*forged language* — and returns it as a `Language`;
|
|
11
|
+
- `gate_language(language, candidate)` lints a candidate chain against that grammar and returns its violations and the
|
|
12
|
+
fixes it suggests, so a model's output is checked against the language it was taught;
|
|
13
|
+
- `package_skill(name, body, out_dir=…, description=…)` writes a compiled body as `<name>/SKILL.md`;
|
|
14
|
+
- `build_prime(...)` renders the block that teaches a model the grammar and shows it one compiled example, so the model
|
|
15
|
+
writes in shape and the gate catches drift;
|
|
16
|
+
- `compile_chain` runs a chain through [`honeyc`](https://pypi.org/project/honeyc/) into its lenses.
|
|
17
|
+
|
|
18
|
+
The three chain compilers — [`chaincompiler-accc`](https://pypi.org/project/chaincompiler-accc/) (attention chains),
|
|
19
|
+
[`corcc`](https://pypi.org/project/corcc/) (chains of reasoning) and [`sccc`](https://pypi.org/project/sccc/) (skill
|
|
20
|
+
chains) — are each made from this base by adding only their kind, their parser and their renderer. Every check it makes
|
|
21
|
+
is about syntax and structure; it never judges whether a thought is good.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install chaincompiler
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
It brings [`honeyc`](https://pypi.org/project/honeyc/) and [`rulecatcher`](https://pypi.org/project/rulecatcher/) at the
|
|
30
|
+
same release, and `agent-prompt-engineering` and `agent-skilltree` from PyPI. The extra `persona` adds
|
|
31
|
+
[`glyphsteer`](https://pypi.org/project/glyphsteer/), which `chaincompiler.persona` (the glyph-persona front end) imports:
|
|
32
|
+
`pip install "chaincompiler[persona]"`. The `chaincompiler` command is installed by
|
|
33
|
+
[`chainaios`](https://pypi.org/project/chainaios/), the agent tier, not by this package.
|
|
34
|
+
|
|
35
|
+
To work on it, clone the [repository](https://github.com/sancovp/chaincompiler) and run `./install.sh`, which installs
|
|
36
|
+
all fifteen packages editable.
|
|
37
|
+
|
|
38
|
+
## Use
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from chaincompiler import forge, gate_language
|
|
42
|
+
|
|
43
|
+
lang = forge("ac", "triage", ["[Symptom] ⇒ [Scope] ⇒ |Severity|", "[Repro] ⇒ [Localize] ⇒ |Cause|"], db="cc.db")
|
|
44
|
+
violations, suggestions = gate_language(lang, "[Symptom] ⇒ [Scope] ⇒ |Severity|")
|
|
45
|
+
print(lang.scope, violations) # ac:triage []
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Its design
|
|
49
|
+
|
|
50
|
+
The repository's [`DESIGN.md`](https://github.com/sancovp/chaincompiler/blob/main/DESIGN.md) §1 (the one type and the
|
|
51
|
+
loop every constructor runs) and §4 (this package).
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT.
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "chaincompiler"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.2"
|
|
8
8
|
description = "The printing press for agent cognition chains: learn → gate → compile → prime"
|
|
9
|
+
readme = "README.md"
|
|
9
10
|
requires-python = ">=3.11"
|
|
11
|
+
license = "MIT"
|
|
10
12
|
# honeyc + the *CC are vendored in this monorepo (packages/); install.sh wires them.
|
|
11
13
|
# agent-prompt-engineering is the published prompt-engine BASE chaincompiler imports DOWN onto.
|
|
12
|
-
dependencies = ["honeyc==0.3.
|
|
14
|
+
dependencies = ["honeyc==0.3.2", "rulecatcher==0.3.2", "agent-skilltree>=0.4.0", "agent-prompt-engineering>=0.2.0"]
|
|
13
15
|
|
|
14
16
|
# A lazy import is an optional extra (DESIGN.md §18): the `persona` front end imports glyphsteer inside its functions.
|
|
15
17
|
[project.optional-dependencies]
|
|
16
|
-
persona = ["glyphsteer==0.3.
|
|
18
|
+
persona = ["glyphsteer==0.3.2"]
|
|
17
19
|
|
|
18
20
|
# NOTE: the `chaincompiler` CLI command moved to the `chainaios` package (its AIOS subcommands are
|
|
19
21
|
# *CC-coupled, which would make this BASE import the *CC). The command NAME is unchanged — see
|
|
@@ -12,7 +12,7 @@ application that orchestrates AC+CoR+SC (construct_language / GBA / HBA / COG) l
|
|
|
12
12
|
"""
|
|
13
13
|
from __future__ import annotations
|
|
14
14
|
|
|
15
|
-
__version__ = "0.3.
|
|
15
|
+
__version__ = "0.3.2"
|
|
16
16
|
|
|
17
17
|
from .bridge import compile_chain, gate, learn
|
|
18
18
|
from .prime import build_prime
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chaincompiler
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: The printing press for agent cognition chains: learn → gate → compile → prime
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: honeyc==0.3.2
|
|
10
|
+
Requires-Dist: rulecatcher==0.3.2
|
|
11
|
+
Requires-Dist: agent-skilltree>=0.4.0
|
|
12
|
+
Requires-Dist: agent-prompt-engineering>=0.2.0
|
|
13
|
+
Provides-Extra: persona
|
|
14
|
+
Requires-Dist: glyphsteer==0.3.2; extra == "persona"
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# chaincompiler — the base the chain compilers are made from
|
|
18
|
+
|
|
19
|
+
`chaincompiler` is the base package of [ChainCompiler](https://github.com/sancovp/chaincompiler), a compiler-compiler
|
|
20
|
+
for cognition. A language model thinks in whatever notation it is given, so the useful machine is not one notation but a
|
|
21
|
+
factory for them: ChainCompiler mints a notation from examples, gates text against it so a model cannot malform it, and
|
|
22
|
+
compiles it into a skill (`<name>/SKILL.md`) that any agent loads. This package is the part of that factory every
|
|
23
|
+
notation shares:
|
|
24
|
+
|
|
25
|
+
- `forge(kind, name, examples, db=…)` learns a grammar from example chains into a named scope, `<kind>:<name>` — a
|
|
26
|
+
*forged language* — and returns it as a `Language`;
|
|
27
|
+
- `gate_language(language, candidate)` lints a candidate chain against that grammar and returns its violations and the
|
|
28
|
+
fixes it suggests, so a model's output is checked against the language it was taught;
|
|
29
|
+
- `package_skill(name, body, out_dir=…, description=…)` writes a compiled body as `<name>/SKILL.md`;
|
|
30
|
+
- `build_prime(...)` renders the block that teaches a model the grammar and shows it one compiled example, so the model
|
|
31
|
+
writes in shape and the gate catches drift;
|
|
32
|
+
- `compile_chain` runs a chain through [`honeyc`](https://pypi.org/project/honeyc/) into its lenses.
|
|
33
|
+
|
|
34
|
+
The three chain compilers — [`chaincompiler-accc`](https://pypi.org/project/chaincompiler-accc/) (attention chains),
|
|
35
|
+
[`corcc`](https://pypi.org/project/corcc/) (chains of reasoning) and [`sccc`](https://pypi.org/project/sccc/) (skill
|
|
36
|
+
chains) — are each made from this base by adding only their kind, their parser and their renderer. Every check it makes
|
|
37
|
+
is about syntax and structure; it never judges whether a thought is good.
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install chaincompiler
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
It brings [`honeyc`](https://pypi.org/project/honeyc/) and [`rulecatcher`](https://pypi.org/project/rulecatcher/) at the
|
|
46
|
+
same release, and `agent-prompt-engineering` and `agent-skilltree` from PyPI. The extra `persona` adds
|
|
47
|
+
[`glyphsteer`](https://pypi.org/project/glyphsteer/), which `chaincompiler.persona` (the glyph-persona front end) imports:
|
|
48
|
+
`pip install "chaincompiler[persona]"`. The `chaincompiler` command is installed by
|
|
49
|
+
[`chainaios`](https://pypi.org/project/chainaios/), the agent tier, not by this package.
|
|
50
|
+
|
|
51
|
+
To work on it, clone the [repository](https://github.com/sancovp/chaincompiler) and run `./install.sh`, which installs
|
|
52
|
+
all fifteen packages editable.
|
|
53
|
+
|
|
54
|
+
## Use
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from chaincompiler import forge, gate_language
|
|
58
|
+
|
|
59
|
+
lang = forge("ac", "triage", ["[Symptom] ⇒ [Scope] ⇒ |Severity|", "[Repro] ⇒ [Localize] ⇒ |Cause|"], db="cc.db")
|
|
60
|
+
violations, suggestions = gate_language(lang, "[Symptom] ⇒ [Scope] ⇒ |Severity|")
|
|
61
|
+
print(lang.scope, violations) # ac:triage []
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Its design
|
|
65
|
+
|
|
66
|
+
The repository's [`DESIGN.md`](https://github.com/sancovp/chaincompiler/blob/main/DESIGN.md) §1 (the one type and the
|
|
67
|
+
loop every constructor runs) and §4 (this package).
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT.
|
chaincompiler-0.3.0/PKG-INFO
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: chaincompiler
|
|
3
|
-
Version: 0.3.0
|
|
4
|
-
Summary: The printing press for agent cognition chains: learn → gate → compile → prime
|
|
5
|
-
Requires-Python: >=3.11
|
|
6
|
-
Requires-Dist: honeyc==0.3.0
|
|
7
|
-
Requires-Dist: rulecatcher==0.3.0
|
|
8
|
-
Requires-Dist: agent-skilltree>=0.4.0
|
|
9
|
-
Requires-Dist: agent-prompt-engineering>=0.2.0
|
|
10
|
-
Provides-Extra: persona
|
|
11
|
-
Requires-Dist: glyphsteer==0.3.0; extra == "persona"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: chaincompiler
|
|
3
|
-
Version: 0.3.0
|
|
4
|
-
Summary: The printing press for agent cognition chains: learn → gate → compile → prime
|
|
5
|
-
Requires-Python: >=3.11
|
|
6
|
-
Requires-Dist: honeyc==0.3.0
|
|
7
|
-
Requires-Dist: rulecatcher==0.3.0
|
|
8
|
-
Requires-Dist: agent-skilltree>=0.4.0
|
|
9
|
-
Requires-Dist: agent-prompt-engineering>=0.2.0
|
|
10
|
-
Provides-Extra: persona
|
|
11
|
-
Requires-Dist: glyphsteer==0.3.0; extra == "persona"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|