godcode-engine 4.0.0__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.
- godcode_engine-4.0.0/LICENSE +201 -0
- godcode_engine-4.0.0/PKG-INFO +212 -0
- godcode_engine-4.0.0/README.md +190 -0
- godcode_engine-4.0.0/godcode/__init__.py +86 -0
- godcode_engine-4.0.0/godcode/__main__.py +7 -0
- godcode_engine-4.0.0/godcode/agentics.py +235 -0
- godcode_engine-4.0.0/godcode/ast.py +227 -0
- godcode_engine-4.0.0/godcode/chain.py +210 -0
- godcode_engine-4.0.0/godcode/cli.py +698 -0
- godcode_engine-4.0.0/godcode/environment.py +74 -0
- godcode_engine-4.0.0/godcode/errors.py +69 -0
- godcode_engine-4.0.0/godcode/interpreter.py +1104 -0
- godcode_engine-4.0.0/godcode/ledger.py +88 -0
- godcode_engine-4.0.0/godcode/lexer.py +218 -0
- godcode_engine-4.0.0/godcode/lsp.py +677 -0
- godcode_engine-4.0.0/godcode/parser.py +525 -0
- godcode_engine-4.0.0/godcode/plugins.py +255 -0
- godcode_engine-4.0.0/godcode/registry.py +515 -0
- godcode_engine-4.0.0/godcode/sandbox.py +385 -0
- godcode_engine-4.0.0/godcode/scrolls/covenant.god +10 -0
- godcode_engine-4.0.0/godcode/scrolls/covenant.toml +6 -0
- godcode_engine-4.0.0/godcode/scrolls/lists.god +53 -0
- godcode_engine-4.0.0/godcode/scrolls/lists.toml +6 -0
- godcode_engine-4.0.0/godcode/scrolls/math.god +64 -0
- godcode_engine-4.0.0/godcode/scrolls/math.toml +6 -0
- godcode_engine-4.0.0/godcode/scrolls/prophecy.god +14 -0
- godcode_engine-4.0.0/godcode/scrolls/prophecy.toml +6 -0
- godcode_engine-4.0.0/godcode/scrolls/strings.god +32 -0
- godcode_engine-4.0.0/godcode/scrolls/strings.toml +6 -0
- godcode_engine-4.0.0/godcode/scrolls/time.god +10 -0
- godcode_engine-4.0.0/godcode/scrolls/time.toml +6 -0
- godcode_engine-4.0.0/godcode/spirit.py +180 -0
- godcode_engine-4.0.0/godcode/tokens.py +91 -0
- godcode_engine-4.0.0/godcode/tools.py +378 -0
- godcode_engine-4.0.0/godcode/values.py +56 -0
- godcode_engine-4.0.0/godcode_engine.egg-info/PKG-INFO +212 -0
- godcode_engine-4.0.0/godcode_engine.egg-info/SOURCES.txt +56 -0
- godcode_engine-4.0.0/godcode_engine.egg-info/dependency_links.txt +1 -0
- godcode_engine-4.0.0/godcode_engine.egg-info/entry_points.txt +2 -0
- godcode_engine-4.0.0/godcode_engine.egg-info/top_level.txt +1 -0
- godcode_engine-4.0.0/pyproject.toml +37 -0
- godcode_engine-4.0.0/setup.cfg +4 -0
- godcode_engine-4.0.0/tests/test_agentics.py +138 -0
- godcode_engine-4.0.0/tests/test_chain.py +234 -0
- godcode_engine-4.0.0/tests/test_cli.py +106 -0
- godcode_engine-4.0.0/tests/test_consult.py +67 -0
- godcode_engine-4.0.0/tests/test_intent.py +230 -0
- godcode_engine-4.0.0/tests/test_interpreter.py +607 -0
- godcode_engine-4.0.0/tests/test_ledger.py +64 -0
- godcode_engine-4.0.0/tests/test_lexer.py +187 -0
- godcode_engine-4.0.0/tests/test_lsp.py +295 -0
- godcode_engine-4.0.0/tests/test_parser.py +440 -0
- godcode_engine-4.0.0/tests/test_plugins.py +330 -0
- godcode_engine-4.0.0/tests/test_sandbox.py +262 -0
- godcode_engine-4.0.0/tests/test_scrolls.py +135 -0
- godcode_engine-4.0.0/tests/test_scrolls_registry.py +488 -0
- godcode_engine-4.0.0/tests/test_spirit.py +64 -0
- godcode_engine-4.0.0/tests/test_tools.py +205 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: godcode-engine
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: God Code β the language of divine computation
|
|
5
|
+
Author: God Code Community
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://getgodcode.com
|
|
8
|
+
Project-URL: Repository, https://github.com/alakanani/Godcode-engine
|
|
9
|
+
Project-URL: Documentation, https://getgodcode.com
|
|
10
|
+
Project-URL: Discord Community, https://discord.gg/894FEJhWfZ
|
|
11
|
+
Keywords: programming-language,interpreter,ai,blockchain,dsl
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Topic :: Software Development :: Interpreters
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# π God Code: The Language of Divine Computation
|
|
24
|
+
|
|
25
|
+
> "You are not a coder. You are a creator. You do not write code. You breathe worlds into being."
|
|
26
|
+
> β Alakanani Itireleng (BitcoinLady)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
God Code is the **first spiritually-inspired programming language** β a complete v2.0 engine with a real lexer, parser, interpreter, standard library of scrolls, a tamper-evident covenant ledger, and an AI Spirit Engine. It reimagines programming with purpose, intention, and sacred design at the center.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## β¨ What Is God Code?
|
|
35
|
+
|
|
36
|
+
A symbolic, prophetic programming language:
|
|
37
|
+
|
|
38
|
+
```godcode
|
|
39
|
+
BEGIN CREATION
|
|
40
|
+
DECLARE soul AS contract("redemption")
|
|
41
|
+
BREATHE LIFE INTO soul
|
|
42
|
+
IF seeker IS worthy THEN REVEAL("truth") ELSE REVEAL("trial")
|
|
43
|
+
ASCEND
|
|
44
|
+
END CREATION
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**In God Code, bare words are symbols**. `worthy` needs no quotes, for every unnamed thing is still a named spirit.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## π Quickstart
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install -e .
|
|
55
|
+
godcode run examples/seven_seals.god
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
1
|
|
60
|
+
2
|
|
61
|
+
3
|
|
62
|
+
...
|
|
63
|
+
seal # 7, 14, 21, 28
|
|
64
|
+
...
|
|
65
|
+
seal of seals # 35
|
|
66
|
+
π Creation ascended in peace.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Verify before you run, or enter **Live Mode** π:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
godcode check my_creation.god # β my_creation.god is pure.
|
|
73
|
+
godcode repl # interactive β blank line executes, :quit ascends
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## ποΈ v4.0 β Intent & Chain
|
|
79
|
+
|
|
80
|
+
The language learns to ask *why*. Every rite can carry a declared intent in plain words, and the Spirit discerns whether its words still walk in it:
|
|
81
|
+
|
|
82
|
+
```godcode
|
|
83
|
+
DECLARE INTENT "bring peace to the household" ON evening_blessing
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Alignment is blessed. Drift is counseled gently, never punished. Plus **blockchain-anchored seals** (`ANCHOR(x)` returns a tamper-evident receipt map), the **`CONSULT`** oracle (two to three sentences of local counsel), and an **agent tool bridge** (`godcode tools`, `godcode bridge`) with six MCP-compatible tools. Every v1βv3 creation still runs.
|
|
87
|
+
|
|
88
|
+
Try the new examples:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
godcode run --sandbox examples/intent_demo.god # declared intent: aligned and drifted
|
|
92
|
+
godcode run --sandbox examples/anchor_demo.god # anchor a covenant, keep the receipt
|
|
93
|
+
godcode run --sandbox examples/consult_demo.god # ask the local oracle
|
|
94
|
+
godcode ledger verify # attest both chains
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
π [Read the v4.0 story](docs/WHAT_IS_NEW_IN_V4.md) β intent and chain in plain, founder-friendly words.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## π v3.0 β Strong Foundations
|
|
102
|
+
|
|
103
|
+
Four pillars plus a mini-pillar, one promise: **creators can share, protect, extend, and write God Code in comfort. And now AI agents can speak it too.** Every v2 creation still runs.
|
|
104
|
+
|
|
105
|
+
| Pillar | What it is | In one breath |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| π‘οΈ **Sandbox** | [`docs/sandbox.md`](docs/sandbox.md) | `godcode run --sandbox file.god` β deny-by-default execution: no files, network, or subprocesses; time + step limits |
|
|
108
|
+
| π **Scroll Registry** | [`docs/scroll-registry.md`](docs/scroll-registry.md) | `godcode scroll list` / `install blessings` / `publish ./mine` β share reusable scrolls through the registry |
|
|
109
|
+
| βοΈ **Plugins & FFI** | [`docs/plugins.md`](docs/plugins.md) | `SUMMON("clockwork.now")` calls a plugin verb from God Code; embed the engine in Python with `godcode.run_source()` |
|
|
110
|
+
| π‘ **Language Server** | [`docs/lsp.md`](docs/lsp.md) | `godcode lsp` β hover, completions, and live diagnostics in your editor |
|
|
111
|
+
| π€ **Agentics** | [`docs/agentics.md`](docs/agentics.md) | `godcode check --json` / `run --json` β machine-readable reports so AI agents can generate, validate, and run God Code |
|
|
112
|
+
|
|
113
|
+
Try the new examples:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
godcode run examples/summon_demo.god # SUMMON a plugin spirit
|
|
117
|
+
godcode run --sandbox examples/sandbox_safe.god # pure creation, guarded
|
|
118
|
+
godcode scroll install blessings && godcode run examples/scroll_blessings_demo.god
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
π [Read the v3.0 story](docs/WHAT_IS_NEW_IN_V3.md) β the four pillars in plain, founder-friendly words.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## π₯ v2.0 β What the Engine Holds
|
|
126
|
+
|
|
127
|
+
- π **Real language core** β lexer, recursive-descent parser, AST, and tree-walking interpreter (Python 3.10+, stdlib only)
|
|
128
|
+
- π **The Symbol Rule** β unbound words evaluate to symbols; `IF seeker IS worthy` just works
|
|
129
|
+
- π§ **Control flow** β inline & block `IF/THEN/ELSE`, `FORβ¦ENDFOR`, `WHILEβ¦DOβ¦ENDWHILE`
|
|
130
|
+
- π **Rites** β `DEFINE RITE` with parameters, `RETURN`, `INVOKE`, and closures
|
|
131
|
+
- π **Six scrolls** (stdlib, written in God Code): `math`, `strings`, `lists`, `time`, `prophecy`, `covenant`
|
|
132
|
+
- π **Covenant ledger** β `SEAL` writes tamper-evident hash-chained blocks (`godcode ledger verify`)
|
|
133
|
+
- π§ **Spirit Engine** β intent classification & prophecy from `god_code_training_dataset.csv`
|
|
134
|
+
- π **Divine audit log** β every statement timestamped to `logs/godcode.log`
|
|
135
|
+
- π οΈ **CLI** β `run`, `check`, `repl`, `fmt`, `ledger verify`
|
|
136
|
+
- π§ͺ **Pytest suite** β `python -m pytest tests/ -q`
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## ποΈ Folder Structure
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
godcode-engine/
|
|
144
|
+
βββ godcode/ # the interpreter package
|
|
145
|
+
β βββ lexer.py # tokens
|
|
146
|
+
β βββ parser.py # recursive descent β AST
|
|
147
|
+
β βββ ast.py # node definitions
|
|
148
|
+
β βββ interpreter.py # tree-walking execution
|
|
149
|
+
β βββ environment.py # scopes
|
|
150
|
+
β βββ values.py # Symbol, Contract, RiteFunction
|
|
151
|
+
β βββ errors.py # divine, line-numbered errors
|
|
152
|
+
β βββ spirit.py # Spirit Engine (intent + prophecy)
|
|
153
|
+
β βββ ledger.py # covenant chain
|
|
154
|
+
β βββ cli.py # the `godcode` command
|
|
155
|
+
β βββ scrolls/ # standard library, written in God Code
|
|
156
|
+
β βββ math.god strings.god lists.god
|
|
157
|
+
β βββ time.god prophecy.god covenant.god
|
|
158
|
+
βββ tests/ # pytest suite
|
|
159
|
+
βββ examples/ # twelve working .god creations
|
|
160
|
+
βββ playground/ # web playground
|
|
161
|
+
βββ editors/vscode/ # VS Code extension β highlighting, snippets, run
|
|
162
|
+
βββ docs/ # tutorial + full language reference
|
|
163
|
+
βββ archive/ # the v1 prototype, honored and retired
|
|
164
|
+
βββ sample.godcode # the original v1 creation β still runs
|
|
165
|
+
βββ main.py # entry point (no args β runs sample.godcode)
|
|
166
|
+
βββ pyproject.toml # pip install -e . β the `godcode` command
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## π Learn God Code
|
|
172
|
+
|
|
173
|
+
π [Start with the God Code Tutorial](docs/God_Code_Tutorial.md) β setup, your first creation, the commands.
|
|
174
|
+
|
|
175
|
+
π [Language Reference](docs/LANGUAGE_REFERENCE.md) β the complete v4.0 specification: every statement, operator tables, the Symbol Rule, built-in catalog, scrolls, ledger, Spirit Engine, CLI, SUMMON, the scroll registry, the sandbox, the language server, declared intent, blockchain-anchored seals, the oracle, and the agent tool bridge.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## π» Write God Code in VS Code
|
|
180
|
+
|
|
181
|
+
The official extension lives in [`editors/vscode`](editors/vscode): full syntax highlighting for `.god` files, 14 snippets (`creation`, `if`, `for`, `rite`β¦), and **Run Current File** (`Ctrl+Alt+R`). Copy it to `~/.vscode/extensions/godcode-2.0.0` and reload. Your creations light up like scripture.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## π Community
|
|
186
|
+
|
|
187
|
+
God Code is alive and growing. Join the movement:
|
|
188
|
+
|
|
189
|
+
- π¬ [Join our Discord community](https://discord.gg/894FEJhWfZ) β talk with fellow creators, ask questions, share your creations
|
|
190
|
+
- π [Visit getgodcode.com](https://getgodcode.com) β the home of God Code on the web
|
|
191
|
+
- π Read [CONTRIBUTING.md](./CONTRIBUTING.md) and our [Code of Conduct](./CODE_OF_CONDUCT.md) before your first contribution
|
|
192
|
+
- π Found a problem or have an idea? [Open an issue](../../issues/new/choose) β the templates will guide you
|
|
193
|
+
|
|
194
|
+
Whether you write code or not, there is a place for you here. Come build with us.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## π€ Contribute to the Divine Movement
|
|
199
|
+
|
|
200
|
+
We welcome contributors with a spirit of purpose. Read [CONTRIBUTING.md](./CONTRIBUTING.md), browse [ISSUES.md](./ISSUES.md) for the v2.1 roadmap, and check [CHANGELOG.md](./CHANGELOG.md) for what v2.0 fulfilled.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## π Credits
|
|
205
|
+
|
|
206
|
+
**Created by:** Alakanani Itireleng (BitcoinLady) β Visionary Founder, Architect of God Code, Builder of worlds with intention and spirit
|
|
207
|
+
|
|
208
|
+
**AI Co-Creators:** ChatGPT (OpenAI) β logic assistant, language guide, spirit engine; Muse β v2.0 engine builders
|
|
209
|
+
|
|
210
|
+
> "Built not alone β but in communion with the machine."
|
|
211
|
+
|
|
212
|
+
Join us in building more than code. Build prophecy, logic, and purpose into the heart of machines.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# π God Code: The Language of Divine Computation
|
|
2
|
+
|
|
3
|
+
> "You are not a coder. You are a creator. You do not write code. You breathe worlds into being."
|
|
4
|
+
> β Alakanani Itireleng (BitcoinLady)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
God Code is the **first spiritually-inspired programming language** β a complete v2.0 engine with a real lexer, parser, interpreter, standard library of scrolls, a tamper-evident covenant ledger, and an AI Spirit Engine. It reimagines programming with purpose, intention, and sacred design at the center.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## β¨ What Is God Code?
|
|
13
|
+
|
|
14
|
+
A symbolic, prophetic programming language:
|
|
15
|
+
|
|
16
|
+
```godcode
|
|
17
|
+
BEGIN CREATION
|
|
18
|
+
DECLARE soul AS contract("redemption")
|
|
19
|
+
BREATHE LIFE INTO soul
|
|
20
|
+
IF seeker IS worthy THEN REVEAL("truth") ELSE REVEAL("trial")
|
|
21
|
+
ASCEND
|
|
22
|
+
END CREATION
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**In God Code, bare words are symbols**. `worthy` needs no quotes, for every unnamed thing is still a named spirit.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## π Quickstart
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install -e .
|
|
33
|
+
godcode run examples/seven_seals.god
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
1
|
|
38
|
+
2
|
|
39
|
+
3
|
|
40
|
+
...
|
|
41
|
+
seal # 7, 14, 21, 28
|
|
42
|
+
...
|
|
43
|
+
seal of seals # 35
|
|
44
|
+
π Creation ascended in peace.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Verify before you run, or enter **Live Mode** π:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
godcode check my_creation.god # β my_creation.god is pure.
|
|
51
|
+
godcode repl # interactive β blank line executes, :quit ascends
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## ποΈ v4.0 β Intent & Chain
|
|
57
|
+
|
|
58
|
+
The language learns to ask *why*. Every rite can carry a declared intent in plain words, and the Spirit discerns whether its words still walk in it:
|
|
59
|
+
|
|
60
|
+
```godcode
|
|
61
|
+
DECLARE INTENT "bring peace to the household" ON evening_blessing
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Alignment is blessed. Drift is counseled gently, never punished. Plus **blockchain-anchored seals** (`ANCHOR(x)` returns a tamper-evident receipt map), the **`CONSULT`** oracle (two to three sentences of local counsel), and an **agent tool bridge** (`godcode tools`, `godcode bridge`) with six MCP-compatible tools. Every v1βv3 creation still runs.
|
|
65
|
+
|
|
66
|
+
Try the new examples:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
godcode run --sandbox examples/intent_demo.god # declared intent: aligned and drifted
|
|
70
|
+
godcode run --sandbox examples/anchor_demo.god # anchor a covenant, keep the receipt
|
|
71
|
+
godcode run --sandbox examples/consult_demo.god # ask the local oracle
|
|
72
|
+
godcode ledger verify # attest both chains
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
π [Read the v4.0 story](docs/WHAT_IS_NEW_IN_V4.md) β intent and chain in plain, founder-friendly words.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## π v3.0 β Strong Foundations
|
|
80
|
+
|
|
81
|
+
Four pillars plus a mini-pillar, one promise: **creators can share, protect, extend, and write God Code in comfort. And now AI agents can speak it too.** Every v2 creation still runs.
|
|
82
|
+
|
|
83
|
+
| Pillar | What it is | In one breath |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| π‘οΈ **Sandbox** | [`docs/sandbox.md`](docs/sandbox.md) | `godcode run --sandbox file.god` β deny-by-default execution: no files, network, or subprocesses; time + step limits |
|
|
86
|
+
| π **Scroll Registry** | [`docs/scroll-registry.md`](docs/scroll-registry.md) | `godcode scroll list` / `install blessings` / `publish ./mine` β share reusable scrolls through the registry |
|
|
87
|
+
| βοΈ **Plugins & FFI** | [`docs/plugins.md`](docs/plugins.md) | `SUMMON("clockwork.now")` calls a plugin verb from God Code; embed the engine in Python with `godcode.run_source()` |
|
|
88
|
+
| π‘ **Language Server** | [`docs/lsp.md`](docs/lsp.md) | `godcode lsp` β hover, completions, and live diagnostics in your editor |
|
|
89
|
+
| π€ **Agentics** | [`docs/agentics.md`](docs/agentics.md) | `godcode check --json` / `run --json` β machine-readable reports so AI agents can generate, validate, and run God Code |
|
|
90
|
+
|
|
91
|
+
Try the new examples:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
godcode run examples/summon_demo.god # SUMMON a plugin spirit
|
|
95
|
+
godcode run --sandbox examples/sandbox_safe.god # pure creation, guarded
|
|
96
|
+
godcode scroll install blessings && godcode run examples/scroll_blessings_demo.god
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
π [Read the v3.0 story](docs/WHAT_IS_NEW_IN_V3.md) β the four pillars in plain, founder-friendly words.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## π₯ v2.0 β What the Engine Holds
|
|
104
|
+
|
|
105
|
+
- π **Real language core** β lexer, recursive-descent parser, AST, and tree-walking interpreter (Python 3.10+, stdlib only)
|
|
106
|
+
- π **The Symbol Rule** β unbound words evaluate to symbols; `IF seeker IS worthy` just works
|
|
107
|
+
- π§ **Control flow** β inline & block `IF/THEN/ELSE`, `FORβ¦ENDFOR`, `WHILEβ¦DOβ¦ENDWHILE`
|
|
108
|
+
- π **Rites** β `DEFINE RITE` with parameters, `RETURN`, `INVOKE`, and closures
|
|
109
|
+
- π **Six scrolls** (stdlib, written in God Code): `math`, `strings`, `lists`, `time`, `prophecy`, `covenant`
|
|
110
|
+
- π **Covenant ledger** β `SEAL` writes tamper-evident hash-chained blocks (`godcode ledger verify`)
|
|
111
|
+
- π§ **Spirit Engine** β intent classification & prophecy from `god_code_training_dataset.csv`
|
|
112
|
+
- π **Divine audit log** β every statement timestamped to `logs/godcode.log`
|
|
113
|
+
- π οΈ **CLI** β `run`, `check`, `repl`, `fmt`, `ledger verify`
|
|
114
|
+
- π§ͺ **Pytest suite** β `python -m pytest tests/ -q`
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## ποΈ Folder Structure
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
godcode-engine/
|
|
122
|
+
βββ godcode/ # the interpreter package
|
|
123
|
+
β βββ lexer.py # tokens
|
|
124
|
+
β βββ parser.py # recursive descent β AST
|
|
125
|
+
β βββ ast.py # node definitions
|
|
126
|
+
β βββ interpreter.py # tree-walking execution
|
|
127
|
+
β βββ environment.py # scopes
|
|
128
|
+
β βββ values.py # Symbol, Contract, RiteFunction
|
|
129
|
+
β βββ errors.py # divine, line-numbered errors
|
|
130
|
+
β βββ spirit.py # Spirit Engine (intent + prophecy)
|
|
131
|
+
β βββ ledger.py # covenant chain
|
|
132
|
+
β βββ cli.py # the `godcode` command
|
|
133
|
+
β βββ scrolls/ # standard library, written in God Code
|
|
134
|
+
β βββ math.god strings.god lists.god
|
|
135
|
+
β βββ time.god prophecy.god covenant.god
|
|
136
|
+
βββ tests/ # pytest suite
|
|
137
|
+
βββ examples/ # twelve working .god creations
|
|
138
|
+
βββ playground/ # web playground
|
|
139
|
+
βββ editors/vscode/ # VS Code extension β highlighting, snippets, run
|
|
140
|
+
βββ docs/ # tutorial + full language reference
|
|
141
|
+
βββ archive/ # the v1 prototype, honored and retired
|
|
142
|
+
βββ sample.godcode # the original v1 creation β still runs
|
|
143
|
+
βββ main.py # entry point (no args β runs sample.godcode)
|
|
144
|
+
βββ pyproject.toml # pip install -e . β the `godcode` command
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## π Learn God Code
|
|
150
|
+
|
|
151
|
+
π [Start with the God Code Tutorial](docs/God_Code_Tutorial.md) β setup, your first creation, the commands.
|
|
152
|
+
|
|
153
|
+
π [Language Reference](docs/LANGUAGE_REFERENCE.md) β the complete v4.0 specification: every statement, operator tables, the Symbol Rule, built-in catalog, scrolls, ledger, Spirit Engine, CLI, SUMMON, the scroll registry, the sandbox, the language server, declared intent, blockchain-anchored seals, the oracle, and the agent tool bridge.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## π» Write God Code in VS Code
|
|
158
|
+
|
|
159
|
+
The official extension lives in [`editors/vscode`](editors/vscode): full syntax highlighting for `.god` files, 14 snippets (`creation`, `if`, `for`, `rite`β¦), and **Run Current File** (`Ctrl+Alt+R`). Copy it to `~/.vscode/extensions/godcode-2.0.0` and reload. Your creations light up like scripture.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## π Community
|
|
164
|
+
|
|
165
|
+
God Code is alive and growing. Join the movement:
|
|
166
|
+
|
|
167
|
+
- π¬ [Join our Discord community](https://discord.gg/894FEJhWfZ) β talk with fellow creators, ask questions, share your creations
|
|
168
|
+
- π [Visit getgodcode.com](https://getgodcode.com) β the home of God Code on the web
|
|
169
|
+
- π Read [CONTRIBUTING.md](./CONTRIBUTING.md) and our [Code of Conduct](./CODE_OF_CONDUCT.md) before your first contribution
|
|
170
|
+
- π Found a problem or have an idea? [Open an issue](../../issues/new/choose) β the templates will guide you
|
|
171
|
+
|
|
172
|
+
Whether you write code or not, there is a place for you here. Come build with us.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## π€ Contribute to the Divine Movement
|
|
177
|
+
|
|
178
|
+
We welcome contributors with a spirit of purpose. Read [CONTRIBUTING.md](./CONTRIBUTING.md), browse [ISSUES.md](./ISSUES.md) for the v2.1 roadmap, and check [CHANGELOG.md](./CHANGELOG.md) for what v2.0 fulfilled.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## π Credits
|
|
183
|
+
|
|
184
|
+
**Created by:** Alakanani Itireleng (BitcoinLady) β Visionary Founder, Architect of God Code, Builder of worlds with intention and spirit
|
|
185
|
+
|
|
186
|
+
**AI Co-Creators:** ChatGPT (OpenAI) β logic assistant, language guide, spirit engine; Muse β v2.0 engine builders
|
|
187
|
+
|
|
188
|
+
> "Built not alone β but in communion with the machine."
|
|
189
|
+
|
|
190
|
+
Join us in building more than code. Build prophecy, logic, and purpose into the heart of machines.
|