sf-smartprompt 3.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.
- sf_smartprompt-3.0.0/LICENSE +13 -0
- sf_smartprompt-3.0.0/MANIFEST.in +2 -0
- sf_smartprompt-3.0.0/MANIFESTO.md +20 -0
- sf_smartprompt-3.0.0/NOTICE +18 -0
- sf_smartprompt-3.0.0/PKG-INFO +222 -0
- sf_smartprompt-3.0.0/README.md +199 -0
- sf_smartprompt-3.0.0/demo/README.md +2 -0
- sf_smartprompt-3.0.0/pyproject.toml +35 -0
- sf_smartprompt-3.0.0/setup.cfg +4 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt/__init__.py +2 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt/__main__.py +3 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt/_version.py +1 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt/cli.py +39 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt/core.py +22 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt/models.py +14 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt.egg-info/PKG-INFO +222 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt.egg-info/SOURCES.txt +19 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt.egg-info/dependency_links.txt +1 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt.egg-info/entry_points.txt +2 -0
- sf_smartprompt-3.0.0/src/sf_smartprompt.egg-info/top_level.txt +1 -0
- sf_smartprompt-3.0.0/tests/test_smartprompt.py +8 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Apache License 2.0
|
|
2
|
+
|
|
3
|
+
Copyright 2026 SmartTasks Lab
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
6
|
+
this file except in compliance with the License. You may obtain a copy at
|
|
7
|
+
|
|
8
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
11
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
12
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
13
|
+
specific language governing permissions and limitations under the License.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# The SmartPrompt Code
|
|
2
|
+
|
|
3
|
+
*In the voice of The Pangolin Code — bold in the open, disciplined where it counts.*
|
|
4
|
+
|
|
5
|
+
**I. Close the gap at the moment it bites.**
|
|
6
|
+
SmartPrompt fires exactly when you direct ai now; vague prompts and thin context wreck the result.
|
|
7
|
+
|
|
8
|
+
**II. Work on clone.**
|
|
9
|
+
A tool that needs setup before it proves itself doesn't spread. Ship the demo.
|
|
10
|
+
|
|
11
|
+
**III. Same seal, same family.**
|
|
12
|
+
`PROMPT-*` rules, one mascot, one manifesto. Kin, not clones.
|
|
13
|
+
|
|
14
|
+
**IV. Conform, then compose.**
|
|
15
|
+
Meet the IAIso §4 · Context bar, then stack with every sibling tool.
|
|
16
|
+
|
|
17
|
+
**V. Bare it all — except the secrets.**
|
|
18
|
+
Radical in the open (sf-smartprompt/), locked where it counts (private/).
|
|
19
|
+
|
|
20
|
+
*SmartPrompt is part of the Smart* family. https://iaiso.org · https://smarttasks.cloud*
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
SmartPrompt
|
|
2
|
+
Copyright 2026 SmartTasks Lab
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
5
|
+
|
|
6
|
+
Names and affiliation
|
|
7
|
+
---------------------
|
|
8
|
+
|
|
9
|
+
SmartPrompt is published by SmartTasksOrg. The only package names it is
|
|
10
|
+
published under are those marked "registered": true in names.json.
|
|
11
|
+
|
|
12
|
+
LangChain is a trademark of its owner.
|
|
13
|
+
LlamaIndex is a trademark of its owner.
|
|
14
|
+
OpenAI is a trademark of its owner.
|
|
15
|
+
Anthropic is a trademark of its owner.
|
|
16
|
+
All other names are the property of their respective owners. Their use here
|
|
17
|
+
only says what the software reads, evaluates or connects to; it does not
|
|
18
|
+
imply affiliation, sponsorship or endorsement.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sf-smartprompt
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Lint before you send. Bad prompt in, bad work out — and it's your name on it.
|
|
5
|
+
Author: SmartTasks Lab
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://smarttasks.cloud
|
|
8
|
+
Project-URL: Source, https://github.com/SmartTasksOrg/sf-smartprompt
|
|
9
|
+
Project-URL: Issues, https://github.com/SmartTasksOrg/sf-smartprompt/issues
|
|
10
|
+
Project-URL: Security, https://github.com/SmartTasksOrg/sf-smartprompt/security/policy
|
|
11
|
+
Project-URL: Changelog, https://github.com/SmartTasksOrg/sf-smartprompt/blob/master/CHANGELOG.md
|
|
12
|
+
Project-URL: Standard, https://iaiso.org
|
|
13
|
+
Keywords: smart,ai,iaiso,sf-smartprompt,devtools
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
License-File: NOTICE
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
<!-- mcp-name: io.github.smarttasksorg/sf-smartprompt -->
|
|
25
|
+
<h1 align="center">🦔 SmartPrompt</h1>
|
|
26
|
+
<p align="center"><b>Lint before you send. Bad prompt in, bad work out — and it's your name on it.</b></p>
|
|
27
|
+
<p align="center">
|
|
28
|
+
<a href="https://iaiso.org">IAIso §4 · Context</a> ·
|
|
29
|
+
<a href="https://smarttasks.cloud">SmartTasks.cloud</a> ·
|
|
30
|
+
<a href="#part-of-the-smart-family">the Smart* family</a>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Bad prompt in, bad work out — and it's your name on the output.
|
|
36
|
+
|
|
37
|
+
As AI reshapes how we work, a new gap opens: you direct ai now; vague prompts and thin context wreck the result. **SmartPrompt** closes it —
|
|
38
|
+
`lint` at the exact moment the gap bites, and it works the second you clone it
|
|
39
|
+
(a synthetic demo ships in `demo/`).
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
SmartPrompt is not published on PyPI or any other package registry yet. Until
|
|
44
|
+
this section says otherwise, a package called `sf-smartprompt` on any registry
|
|
45
|
+
is not ours, and neither is `smartprompt`.
|
|
46
|
+
|
|
47
|
+
Install from a clone (Python 3.10 or later):
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone https://github.com/SmartTasksOrg/sf-smartprompt
|
|
51
|
+
cd sf-smartprompt
|
|
52
|
+
python -m venv .venv
|
|
53
|
+
. .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1
|
|
54
|
+
python -m pip install .
|
|
55
|
+
sf-smartprompt --demo
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Status
|
|
59
|
+
|
|
60
|
+
- **Version 3.0.0, experimental.** A small deterministic command-line tool with a bundled synthetic demo and two smoke tests.
|
|
61
|
+
- **Published:** nowhere yet; install from a clone (above).
|
|
62
|
+
- **Tested:** the 2 smoke tests in `tests/` on Python 3.12, Linux, on every push to master and every pull request (`.github/workflows/ci.yml`).
|
|
63
|
+
- **Not tested:** Windows and macOS; Python versions other than 3.12.
|
|
64
|
+
- **Ports:** Go, Java, Node and PHP ports in `ports/` are checked against the Python reference by `ports/conformance/run.sh` (run by hand, not in CI); they are not published on any registry.
|
|
65
|
+
- **Security review:** none independent. Report vulnerabilities as described in [SECURITY.md](SECURITY.md).
|
|
66
|
+
|
|
67
|
+
## Run it in your stack
|
|
68
|
+
|
|
69
|
+
| Where you work | How you run it |
|
|
70
|
+
|---|---|
|
|
71
|
+
| **Python** | from a clone: `python -m pip install .` (not on PyPI yet) |
|
|
72
|
+
| **Go · Java · Node · PHP** | native ports in [`ports/`](ports/), each verified against the Python reference by [`ports/conformance/run.sh`](ports/conformance/run.sh) |
|
|
73
|
+
| **Flowise · OpenAI/Anthropic tools · GitHub Actions · LangChain · LlamaIndex · MCP · pre-commit · VS Code** | ready-made wrappers in [`integrations/`](integrations/), all calling one `adapter.py` |
|
|
74
|
+
| **CI / pre-commit** | add the hook from [`.pre-commit-hooks.yaml`](.pre-commit-hooks.yaml) |
|
|
75
|
+
|
|
76
|
+
## What's in this repo
|
|
77
|
+
|
|
78
|
+
- **Core engine** — [`src/sf_smartprompt/`](src/sf_smartprompt/): lint() -> PromptScore. Deterministic, dependency-free.
|
|
79
|
+
- **CLI** — `sf-smartprompt --demo` (and `--version`): a deterministic demo of the core.
|
|
80
|
+
- **Language ports** — [`ports/`](ports/): native Go, Java, Node, PHP implementations that reproduce the Python reference, with a shared conformance harness.
|
|
81
|
+
- **Framework integrations** — [`integrations/`](integrations/): Flowise, OpenAI/Anthropic function-calling, GitHub Action, LangChain, LlamaIndex, MCP server, pre-commit, VS Code extension — each a thin wrapper over one `adapter.py` bound to the core.
|
|
82
|
+
- **Also included** — a runnable [`demo/`](demo/), [`examples/`](examples/), the IAIso mapping [`spec/iaiso-map.json`](spec/iaiso-map.json), a browser [`site/playground.html`](site/playground.html), plus public smoke tests in `tests/`.
|
|
83
|
+
|
|
84
|
+
## How it works
|
|
85
|
+
|
|
86
|
+
Rule IDs are namespaced `PROMPT-*` so output looks kin to the rest of the family
|
|
87
|
+
(SmartPangolin's `SEC-*`, etc.). Deterministic, dependency-free, fail-loud.
|
|
88
|
+
|
|
89
|
+
### The data objects (UML)
|
|
90
|
+
|
|
91
|
+
These are real dataclasses in [`src/sf_smartprompt/models.py`](src/sf_smartprompt/models.py) — the
|
|
92
|
+
diagram and the code are the same thing:
|
|
93
|
+
|
|
94
|
+
```mermaid
|
|
95
|
+
classDiagram
|
|
96
|
+
class Defect {
|
|
97
|
+
+rule: str
|
|
98
|
+
+issue: str
|
|
99
|
+
+fix: str
|
|
100
|
+
}
|
|
101
|
+
class PromptScore {
|
|
102
|
+
+clarity: int
|
|
103
|
+
+defects: list[Defect]
|
|
104
|
+
}
|
|
105
|
+
class IAIsoControl {
|
|
106
|
+
+section: str
|
|
107
|
+
+name: str
|
|
108
|
+
}
|
|
109
|
+
PromptScore ..> IAIsoControl : conforms to
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Where it sits in the architecture
|
|
113
|
+
|
|
114
|
+
SmartPrompt doesn't stand alone — it stacks with the family, and everything conforms to
|
|
115
|
+
the IAIso standard — the same standard that governs SmartTasks' own apps, while each tool here stays standalone and drops into your architecture:
|
|
116
|
+
|
|
117
|
+
```mermaid
|
|
118
|
+
graph LR
|
|
119
|
+
IAIso([IAIso standard]):::std
|
|
120
|
+
Cloud([SmartTasks.cloud]):::cloud
|
|
121
|
+
SmartPangolin[SmartPangolin]:::tool
|
|
122
|
+
SmartPrompt[SmartPrompt]:::tool
|
|
123
|
+
SmartCheck[SmartCheck]:::tool
|
|
124
|
+
SmartSeal[SmartSeal]:::tool
|
|
125
|
+
SmartStandard[SmartStandard]:::tool
|
|
126
|
+
SmartSim[SmartSim]:::tool
|
|
127
|
+
SmartMoat[SmartMoat]:::tool
|
|
128
|
+
SmartRoute[SmartRoute]:::tool
|
|
129
|
+
SmartFeed[SmartFeed]:::tool
|
|
130
|
+
SmartPangolin -->|emits clean artifacts to| SmartSeal
|
|
131
|
+
SmartPrompt -->|hands secret/PII flags to| SmartPangolin
|
|
132
|
+
SmartPrompt -->|enforces prompt rules from| SmartStandard
|
|
133
|
+
SmartCheck -->|stamps verified output with| SmartSeal
|
|
134
|
+
SmartCheck -->|checks against rules from| SmartStandard
|
|
135
|
+
SmartSeal -->|issues receipts consumed by| SmartCheck
|
|
136
|
+
SmartSeal -->|issues receipts consumed by| SmartRoute
|
|
137
|
+
SmartStandard -->|supplies rule sets to| SmartPrompt
|
|
138
|
+
SmartStandard -->|supplies rule sets to| SmartCheck
|
|
139
|
+
SmartSim -->|feeds role forecasts to| SmartMoat
|
|
140
|
+
SmartSim -->|draws signals from| SmartFeed
|
|
141
|
+
SmartMoat -->|consumes forecasts from| SmartSim
|
|
142
|
+
SmartRoute -->|verifies receipts from| SmartSeal
|
|
143
|
+
SmartRoute -->|enforces the standard from| SmartStandard
|
|
144
|
+
SmartFeed -->|feeds signals to| SmartSim
|
|
145
|
+
SmartFeed -->|feeds signals to| SmartMoat
|
|
146
|
+
SmartPangolin -.conforms.-> IAIso
|
|
147
|
+
SmartPangolin -.shares IAIso with.-> Cloud
|
|
148
|
+
SmartPrompt -.conforms.-> IAIso
|
|
149
|
+
SmartPrompt -.shares IAIso with.-> Cloud
|
|
150
|
+
SmartCheck -.conforms.-> IAIso
|
|
151
|
+
SmartCheck -.shares IAIso with.-> Cloud
|
|
152
|
+
SmartSeal -.conforms.-> IAIso
|
|
153
|
+
SmartSeal -.shares IAIso with.-> Cloud
|
|
154
|
+
SmartStandard -.conforms.-> IAIso
|
|
155
|
+
SmartStandard -.shares IAIso with.-> Cloud
|
|
156
|
+
SmartSim -.conforms.-> IAIso
|
|
157
|
+
SmartSim -.shares IAIso with.-> Cloud
|
|
158
|
+
SmartMoat -.conforms.-> IAIso
|
|
159
|
+
SmartMoat -.shares IAIso with.-> Cloud
|
|
160
|
+
SmartRoute -.conforms.-> IAIso
|
|
161
|
+
SmartRoute -.shares IAIso with.-> Cloud
|
|
162
|
+
SmartFeed -.conforms.-> IAIso
|
|
163
|
+
SmartFeed -.shares IAIso with.-> Cloud
|
|
164
|
+
IAIso -.governs.-> Cloud
|
|
165
|
+
classDef tool fill:#1c232d,stroke:#f5b83d,color:#efe9f5;
|
|
166
|
+
classDef std fill:#04121f,stroke:#46d6c8,color:#46d6c8;
|
|
167
|
+
classDef cloud fill:#1a1327,stroke:#a78bfa,color:#a78bfa;
|
|
168
|
+
style SmartPrompt stroke-width:3px,stroke:#ff6b6b;
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
- **SmartPrompt hands secret/PII flags to SmartPangolin** →
|
|
172
|
+
- **SmartPrompt enforces prompt rules from SmartStandard** →
|
|
173
|
+
|
|
174
|
+
Open [`site/playground.html`](site/playground.html) for the interactive version.
|
|
175
|
+
|
|
176
|
+
## Part of the Smart* family
|
|
177
|
+
|
|
178
|
+
One system, not nine projects — same mascot, same manifesto voice, same rule-ID style,
|
|
179
|
+
all aligned to the [IAIso standard](https://github.com/SmartTasksOrg/IAIso). Each is an independent, open-source, single-purpose tool you can integrate into your own architecture:
|
|
180
|
+
|
|
181
|
+
| Tool | IAIso | What it does |
|
|
182
|
+
|---|---|---|
|
|
183
|
+
| [SmartPangolin](https://github.com/SmartTasksOrg/sf-smartpangolin) | §1 · Secure Sharing | Scan before you share. Stop leaking secrets into AI models, agents, and tools. |
|
|
184
|
+
| [SmartCheck](https://github.com/SmartTasksOrg/sf-smartcheck) | §2 · Verification | Check before you sign off. Catch the AI when it's confidently wrong. |
|
|
185
|
+
| [SmartSeal](https://github.com/SmartTasksOrg/sf-smartseal) | §3 · Provenance | Seal what you ship. A signed receipt so anyone can verify what they received. |
|
|
186
|
+
| [SmartStandard](https://github.com/SmartTasksOrg/sf-smartstandard) | §7 · Standards | Standardize before you scale. One shared, auditable convention for AI-assisted work. |
|
|
187
|
+
| [SmartSim](https://github.com/SmartTasksOrg/sf-smartsim) | §8 · Foresight | Simulate before it hits you. See your role's task-by-task collapse sequence. |
|
|
188
|
+
| [SmartMoat](https://github.com/SmartTasksOrg/sf-smartmoat) | §6 · Workforce | Know your moat. Score the tasks AI can't easily take — and widen them. |
|
|
189
|
+
| [SmartRoute](https://github.com/SmartTasksOrg/sf-smartroute) | §5 · Orchestration | Route only what you trust. Gate agents and tools with trust scores and guardrails. |
|
|
190
|
+
| [SmartFeed](https://github.com/SmartTasksOrg/sf-smartfeed) | §9 · Awareness | Distill the firehose. A tight brief of only what moves your work. |
|
|
191
|
+
|
|
192
|
+
**Backed by the standard:** SmartPrompt implements **IAIso §4 · Context**.
|
|
193
|
+
**Open-source edition:** this repo is the simplified, single-purpose version, built for any org to integrate into its own architecture. SmartTasks' desktop app and [SmartTasks.cloud](https://smarttasks.cloud) run a more advanced, deeply-integrated implementation of the same IAIso governance — a separate product, not this code bundled.
|
|
194
|
+
|
|
195
|
+
## Who's behind this
|
|
196
|
+
|
|
197
|
+
- **Roen Branham** — CEO & AI Strategy Architect · CISSP-certified AI, security & governance architect; author of IAIso and sole inventor of the Z4 Semantic Fabric patent application. [LinkedIn](https://www.linkedin.com/in/roen-branham-167ab29/)
|
|
198
|
+
- **Le Vu Tanh** — CTO & Core Engineering Lead · Chief architect of the Cortex engine; large-scale system reliability and low-latency infrastructure — the engineer who ships what gets architected. [LinkedIn](https://www.linkedin.com/in/lee-thanh-76aa8ba0/)
|
|
199
|
+
|
|
200
|
+
The team behind IAIso & SmartTasks: a CISSP-certified security & governance architect
|
|
201
|
+
and a large-scale systems engineer — 20+ years shipping secure, AI-driven platforms for
|
|
202
|
+
regulated, blue-chip environments (Allianz, BMW, Rolls-Royce, Heidenhain).
|
|
203
|
+
|
|
204
|
+
<!-- SMARTTASKS-MODELS:START -->
|
|
205
|
+
## Runs on governed local models
|
|
206
|
+
|
|
207
|
+
Structured, machine-readable **scorecards** make model choice precise instead of guesswork.
|
|
208
|
+
|
|
209
|
+
This tool is local-first, so pair it with models you can actually vet. **SmartTasks** publishes 21+ governance-validated GGUF builds on Hugging Face — each with a machine-readable **scorecard** (capability tiers L1 Layman → L5 Agentic, IAIso conformance invariants (pass/warn/fail), OWASP-mapped garak red-team, transparency probes (viewpoint-alignment / over-refusal), and per-file SHA-256). Gate model selection on evidence, not vibes — and every finding, including warnings, is published in full.
|
|
210
|
+
|
|
211
|
+
→ **[SmartTasks on Hugging Face](https://huggingface.co/smarttasks)** · [Qwen3.6-27B](https://huggingface.co/smarttasks/Qwen3.6-27B-GGUF) (L5 agentic) · [react-agent-coder-llama-3.1-8b](https://huggingface.co/smarttasks/react-agent-coder-llama-3.1-8b-GGUF) (agentic coder) · [gpt-oss-20b](https://huggingface.co/smarttasks/gpt-oss-20b-GGUF) (open reasoning)
|
|
212
|
+
<!-- SMARTTASKS-MODELS:END -->
|
|
213
|
+
|
|
214
|
+
## Get in touch
|
|
215
|
+
|
|
216
|
+
- **Companies & enterprises:** [enterprise@smarttasks.cloud](mailto:enterprise@smarttasks.cloud) — we help
|
|
217
|
+
teams integrate SmartPrompt + IAIso into their architecture so governance and
|
|
218
|
+
audit-readiness become a byproduct of how they already work.
|
|
219
|
+
- **The standard:** [IAIso](https://github.com/SmartTasksOrg/IAIso) · [iaiso.org](https://iaiso.org)
|
|
220
|
+
- **The product:** [SmartTasks.cloud](https://smarttasks.cloud)
|
|
221
|
+
|
|
222
|
+
Built by **SmartTasks Lab**. Apache-2.0. Contributions welcome.
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.smarttasksorg/sf-smartprompt -->
|
|
2
|
+
<h1 align="center">🦔 SmartPrompt</h1>
|
|
3
|
+
<p align="center"><b>Lint before you send. Bad prompt in, bad work out — and it's your name on it.</b></p>
|
|
4
|
+
<p align="center">
|
|
5
|
+
<a href="https://iaiso.org">IAIso §4 · Context</a> ·
|
|
6
|
+
<a href="https://smarttasks.cloud">SmartTasks.cloud</a> ·
|
|
7
|
+
<a href="#part-of-the-smart-family">the Smart* family</a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Bad prompt in, bad work out — and it's your name on the output.
|
|
13
|
+
|
|
14
|
+
As AI reshapes how we work, a new gap opens: you direct ai now; vague prompts and thin context wreck the result. **SmartPrompt** closes it —
|
|
15
|
+
`lint` at the exact moment the gap bites, and it works the second you clone it
|
|
16
|
+
(a synthetic demo ships in `demo/`).
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
SmartPrompt is not published on PyPI or any other package registry yet. Until
|
|
21
|
+
this section says otherwise, a package called `sf-smartprompt` on any registry
|
|
22
|
+
is not ours, and neither is `smartprompt`.
|
|
23
|
+
|
|
24
|
+
Install from a clone (Python 3.10 or later):
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git clone https://github.com/SmartTasksOrg/sf-smartprompt
|
|
28
|
+
cd sf-smartprompt
|
|
29
|
+
python -m venv .venv
|
|
30
|
+
. .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1
|
|
31
|
+
python -m pip install .
|
|
32
|
+
sf-smartprompt --demo
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Status
|
|
36
|
+
|
|
37
|
+
- **Version 3.0.0, experimental.** A small deterministic command-line tool with a bundled synthetic demo and two smoke tests.
|
|
38
|
+
- **Published:** nowhere yet; install from a clone (above).
|
|
39
|
+
- **Tested:** the 2 smoke tests in `tests/` on Python 3.12, Linux, on every push to master and every pull request (`.github/workflows/ci.yml`).
|
|
40
|
+
- **Not tested:** Windows and macOS; Python versions other than 3.12.
|
|
41
|
+
- **Ports:** Go, Java, Node and PHP ports in `ports/` are checked against the Python reference by `ports/conformance/run.sh` (run by hand, not in CI); they are not published on any registry.
|
|
42
|
+
- **Security review:** none independent. Report vulnerabilities as described in [SECURITY.md](SECURITY.md).
|
|
43
|
+
|
|
44
|
+
## Run it in your stack
|
|
45
|
+
|
|
46
|
+
| Where you work | How you run it |
|
|
47
|
+
|---|---|
|
|
48
|
+
| **Python** | from a clone: `python -m pip install .` (not on PyPI yet) |
|
|
49
|
+
| **Go · Java · Node · PHP** | native ports in [`ports/`](ports/), each verified against the Python reference by [`ports/conformance/run.sh`](ports/conformance/run.sh) |
|
|
50
|
+
| **Flowise · OpenAI/Anthropic tools · GitHub Actions · LangChain · LlamaIndex · MCP · pre-commit · VS Code** | ready-made wrappers in [`integrations/`](integrations/), all calling one `adapter.py` |
|
|
51
|
+
| **CI / pre-commit** | add the hook from [`.pre-commit-hooks.yaml`](.pre-commit-hooks.yaml) |
|
|
52
|
+
|
|
53
|
+
## What's in this repo
|
|
54
|
+
|
|
55
|
+
- **Core engine** — [`src/sf_smartprompt/`](src/sf_smartprompt/): lint() -> PromptScore. Deterministic, dependency-free.
|
|
56
|
+
- **CLI** — `sf-smartprompt --demo` (and `--version`): a deterministic demo of the core.
|
|
57
|
+
- **Language ports** — [`ports/`](ports/): native Go, Java, Node, PHP implementations that reproduce the Python reference, with a shared conformance harness.
|
|
58
|
+
- **Framework integrations** — [`integrations/`](integrations/): Flowise, OpenAI/Anthropic function-calling, GitHub Action, LangChain, LlamaIndex, MCP server, pre-commit, VS Code extension — each a thin wrapper over one `adapter.py` bound to the core.
|
|
59
|
+
- **Also included** — a runnable [`demo/`](demo/), [`examples/`](examples/), the IAIso mapping [`spec/iaiso-map.json`](spec/iaiso-map.json), a browser [`site/playground.html`](site/playground.html), plus public smoke tests in `tests/`.
|
|
60
|
+
|
|
61
|
+
## How it works
|
|
62
|
+
|
|
63
|
+
Rule IDs are namespaced `PROMPT-*` so output looks kin to the rest of the family
|
|
64
|
+
(SmartPangolin's `SEC-*`, etc.). Deterministic, dependency-free, fail-loud.
|
|
65
|
+
|
|
66
|
+
### The data objects (UML)
|
|
67
|
+
|
|
68
|
+
These are real dataclasses in [`src/sf_smartprompt/models.py`](src/sf_smartprompt/models.py) — the
|
|
69
|
+
diagram and the code are the same thing:
|
|
70
|
+
|
|
71
|
+
```mermaid
|
|
72
|
+
classDiagram
|
|
73
|
+
class Defect {
|
|
74
|
+
+rule: str
|
|
75
|
+
+issue: str
|
|
76
|
+
+fix: str
|
|
77
|
+
}
|
|
78
|
+
class PromptScore {
|
|
79
|
+
+clarity: int
|
|
80
|
+
+defects: list[Defect]
|
|
81
|
+
}
|
|
82
|
+
class IAIsoControl {
|
|
83
|
+
+section: str
|
|
84
|
+
+name: str
|
|
85
|
+
}
|
|
86
|
+
PromptScore ..> IAIsoControl : conforms to
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Where it sits in the architecture
|
|
90
|
+
|
|
91
|
+
SmartPrompt doesn't stand alone — it stacks with the family, and everything conforms to
|
|
92
|
+
the IAIso standard — the same standard that governs SmartTasks' own apps, while each tool here stays standalone and drops into your architecture:
|
|
93
|
+
|
|
94
|
+
```mermaid
|
|
95
|
+
graph LR
|
|
96
|
+
IAIso([IAIso standard]):::std
|
|
97
|
+
Cloud([SmartTasks.cloud]):::cloud
|
|
98
|
+
SmartPangolin[SmartPangolin]:::tool
|
|
99
|
+
SmartPrompt[SmartPrompt]:::tool
|
|
100
|
+
SmartCheck[SmartCheck]:::tool
|
|
101
|
+
SmartSeal[SmartSeal]:::tool
|
|
102
|
+
SmartStandard[SmartStandard]:::tool
|
|
103
|
+
SmartSim[SmartSim]:::tool
|
|
104
|
+
SmartMoat[SmartMoat]:::tool
|
|
105
|
+
SmartRoute[SmartRoute]:::tool
|
|
106
|
+
SmartFeed[SmartFeed]:::tool
|
|
107
|
+
SmartPangolin -->|emits clean artifacts to| SmartSeal
|
|
108
|
+
SmartPrompt -->|hands secret/PII flags to| SmartPangolin
|
|
109
|
+
SmartPrompt -->|enforces prompt rules from| SmartStandard
|
|
110
|
+
SmartCheck -->|stamps verified output with| SmartSeal
|
|
111
|
+
SmartCheck -->|checks against rules from| SmartStandard
|
|
112
|
+
SmartSeal -->|issues receipts consumed by| SmartCheck
|
|
113
|
+
SmartSeal -->|issues receipts consumed by| SmartRoute
|
|
114
|
+
SmartStandard -->|supplies rule sets to| SmartPrompt
|
|
115
|
+
SmartStandard -->|supplies rule sets to| SmartCheck
|
|
116
|
+
SmartSim -->|feeds role forecasts to| SmartMoat
|
|
117
|
+
SmartSim -->|draws signals from| SmartFeed
|
|
118
|
+
SmartMoat -->|consumes forecasts from| SmartSim
|
|
119
|
+
SmartRoute -->|verifies receipts from| SmartSeal
|
|
120
|
+
SmartRoute -->|enforces the standard from| SmartStandard
|
|
121
|
+
SmartFeed -->|feeds signals to| SmartSim
|
|
122
|
+
SmartFeed -->|feeds signals to| SmartMoat
|
|
123
|
+
SmartPangolin -.conforms.-> IAIso
|
|
124
|
+
SmartPangolin -.shares IAIso with.-> Cloud
|
|
125
|
+
SmartPrompt -.conforms.-> IAIso
|
|
126
|
+
SmartPrompt -.shares IAIso with.-> Cloud
|
|
127
|
+
SmartCheck -.conforms.-> IAIso
|
|
128
|
+
SmartCheck -.shares IAIso with.-> Cloud
|
|
129
|
+
SmartSeal -.conforms.-> IAIso
|
|
130
|
+
SmartSeal -.shares IAIso with.-> Cloud
|
|
131
|
+
SmartStandard -.conforms.-> IAIso
|
|
132
|
+
SmartStandard -.shares IAIso with.-> Cloud
|
|
133
|
+
SmartSim -.conforms.-> IAIso
|
|
134
|
+
SmartSim -.shares IAIso with.-> Cloud
|
|
135
|
+
SmartMoat -.conforms.-> IAIso
|
|
136
|
+
SmartMoat -.shares IAIso with.-> Cloud
|
|
137
|
+
SmartRoute -.conforms.-> IAIso
|
|
138
|
+
SmartRoute -.shares IAIso with.-> Cloud
|
|
139
|
+
SmartFeed -.conforms.-> IAIso
|
|
140
|
+
SmartFeed -.shares IAIso with.-> Cloud
|
|
141
|
+
IAIso -.governs.-> Cloud
|
|
142
|
+
classDef tool fill:#1c232d,stroke:#f5b83d,color:#efe9f5;
|
|
143
|
+
classDef std fill:#04121f,stroke:#46d6c8,color:#46d6c8;
|
|
144
|
+
classDef cloud fill:#1a1327,stroke:#a78bfa,color:#a78bfa;
|
|
145
|
+
style SmartPrompt stroke-width:3px,stroke:#ff6b6b;
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
- **SmartPrompt hands secret/PII flags to SmartPangolin** →
|
|
149
|
+
- **SmartPrompt enforces prompt rules from SmartStandard** →
|
|
150
|
+
|
|
151
|
+
Open [`site/playground.html`](site/playground.html) for the interactive version.
|
|
152
|
+
|
|
153
|
+
## Part of the Smart* family
|
|
154
|
+
|
|
155
|
+
One system, not nine projects — same mascot, same manifesto voice, same rule-ID style,
|
|
156
|
+
all aligned to the [IAIso standard](https://github.com/SmartTasksOrg/IAIso). Each is an independent, open-source, single-purpose tool you can integrate into your own architecture:
|
|
157
|
+
|
|
158
|
+
| Tool | IAIso | What it does |
|
|
159
|
+
|---|---|---|
|
|
160
|
+
| [SmartPangolin](https://github.com/SmartTasksOrg/sf-smartpangolin) | §1 · Secure Sharing | Scan before you share. Stop leaking secrets into AI models, agents, and tools. |
|
|
161
|
+
| [SmartCheck](https://github.com/SmartTasksOrg/sf-smartcheck) | §2 · Verification | Check before you sign off. Catch the AI when it's confidently wrong. |
|
|
162
|
+
| [SmartSeal](https://github.com/SmartTasksOrg/sf-smartseal) | §3 · Provenance | Seal what you ship. A signed receipt so anyone can verify what they received. |
|
|
163
|
+
| [SmartStandard](https://github.com/SmartTasksOrg/sf-smartstandard) | §7 · Standards | Standardize before you scale. One shared, auditable convention for AI-assisted work. |
|
|
164
|
+
| [SmartSim](https://github.com/SmartTasksOrg/sf-smartsim) | §8 · Foresight | Simulate before it hits you. See your role's task-by-task collapse sequence. |
|
|
165
|
+
| [SmartMoat](https://github.com/SmartTasksOrg/sf-smartmoat) | §6 · Workforce | Know your moat. Score the tasks AI can't easily take — and widen them. |
|
|
166
|
+
| [SmartRoute](https://github.com/SmartTasksOrg/sf-smartroute) | §5 · Orchestration | Route only what you trust. Gate agents and tools with trust scores and guardrails. |
|
|
167
|
+
| [SmartFeed](https://github.com/SmartTasksOrg/sf-smartfeed) | §9 · Awareness | Distill the firehose. A tight brief of only what moves your work. |
|
|
168
|
+
|
|
169
|
+
**Backed by the standard:** SmartPrompt implements **IAIso §4 · Context**.
|
|
170
|
+
**Open-source edition:** this repo is the simplified, single-purpose version, built for any org to integrate into its own architecture. SmartTasks' desktop app and [SmartTasks.cloud](https://smarttasks.cloud) run a more advanced, deeply-integrated implementation of the same IAIso governance — a separate product, not this code bundled.
|
|
171
|
+
|
|
172
|
+
## Who's behind this
|
|
173
|
+
|
|
174
|
+
- **Roen Branham** — CEO & AI Strategy Architect · CISSP-certified AI, security & governance architect; author of IAIso and sole inventor of the Z4 Semantic Fabric patent application. [LinkedIn](https://www.linkedin.com/in/roen-branham-167ab29/)
|
|
175
|
+
- **Le Vu Tanh** — CTO & Core Engineering Lead · Chief architect of the Cortex engine; large-scale system reliability and low-latency infrastructure — the engineer who ships what gets architected. [LinkedIn](https://www.linkedin.com/in/lee-thanh-76aa8ba0/)
|
|
176
|
+
|
|
177
|
+
The team behind IAIso & SmartTasks: a CISSP-certified security & governance architect
|
|
178
|
+
and a large-scale systems engineer — 20+ years shipping secure, AI-driven platforms for
|
|
179
|
+
regulated, blue-chip environments (Allianz, BMW, Rolls-Royce, Heidenhain).
|
|
180
|
+
|
|
181
|
+
<!-- SMARTTASKS-MODELS:START -->
|
|
182
|
+
## Runs on governed local models
|
|
183
|
+
|
|
184
|
+
Structured, machine-readable **scorecards** make model choice precise instead of guesswork.
|
|
185
|
+
|
|
186
|
+
This tool is local-first, so pair it with models you can actually vet. **SmartTasks** publishes 21+ governance-validated GGUF builds on Hugging Face — each with a machine-readable **scorecard** (capability tiers L1 Layman → L5 Agentic, IAIso conformance invariants (pass/warn/fail), OWASP-mapped garak red-team, transparency probes (viewpoint-alignment / over-refusal), and per-file SHA-256). Gate model selection on evidence, not vibes — and every finding, including warnings, is published in full.
|
|
187
|
+
|
|
188
|
+
→ **[SmartTasks on Hugging Face](https://huggingface.co/smarttasks)** · [Qwen3.6-27B](https://huggingface.co/smarttasks/Qwen3.6-27B-GGUF) (L5 agentic) · [react-agent-coder-llama-3.1-8b](https://huggingface.co/smarttasks/react-agent-coder-llama-3.1-8b-GGUF) (agentic coder) · [gpt-oss-20b](https://huggingface.co/smarttasks/gpt-oss-20b-GGUF) (open reasoning)
|
|
189
|
+
<!-- SMARTTASKS-MODELS:END -->
|
|
190
|
+
|
|
191
|
+
## Get in touch
|
|
192
|
+
|
|
193
|
+
- **Companies & enterprises:** [enterprise@smarttasks.cloud](mailto:enterprise@smarttasks.cloud) — we help
|
|
194
|
+
teams integrate SmartPrompt + IAIso into their architecture so governance and
|
|
195
|
+
audit-readiness become a byproduct of how they already work.
|
|
196
|
+
- **The standard:** [IAIso](https://github.com/SmartTasksOrg/IAIso) · [iaiso.org](https://iaiso.org)
|
|
197
|
+
- **The product:** [SmartTasks.cloud](https://smarttasks.cloud)
|
|
198
|
+
|
|
199
|
+
Built by **SmartTasks Lab**. Apache-2.0. Contributions welcome.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sf-smartprompt"
|
|
7
|
+
version = "3.0.0"
|
|
8
|
+
description = "Lint before you send. Bad prompt in, bad work out — and it's your name on it."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
authors = [{ name = "SmartTasks Lab" }]
|
|
13
|
+
keywords = ["smart", "ai", "iaiso", "sf-smartprompt", "devtools"]
|
|
14
|
+
dependencies = []
|
|
15
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
Homepage = "https://smarttasks.cloud"
|
|
25
|
+
Source = "https://github.com/SmartTasksOrg/sf-smartprompt"
|
|
26
|
+
Issues = "https://github.com/SmartTasksOrg/sf-smartprompt/issues"
|
|
27
|
+
Security = "https://github.com/SmartTasksOrg/sf-smartprompt/security/policy"
|
|
28
|
+
Changelog = "https://github.com/SmartTasksOrg/sf-smartprompt/blob/master/CHANGELOG.md"
|
|
29
|
+
Standard = "https://iaiso.org"
|
|
30
|
+
|
|
31
|
+
[project.scripts]
|
|
32
|
+
sf-smartprompt = "sf_smartprompt.cli:main"
|
|
33
|
+
|
|
34
|
+
[tool.setuptools.packages.find]
|
|
35
|
+
where = ["src"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.0.0"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""SmartPrompt CLI — run `sf-smartprompt --demo`."""
|
|
2
|
+
import os, sys, json
|
|
3
|
+
from . import core
|
|
4
|
+
from ._version import __version__
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _demo_dir():
|
|
8
|
+
return os.path.join(os.path.dirname(__file__), "..", "..", "demo")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def main(argv=None):
|
|
12
|
+
argv = argv if argv is not None else sys.argv[1:]
|
|
13
|
+
if "--version" in argv:
|
|
14
|
+
print(f"SmartPrompt {__version__}"); return 0
|
|
15
|
+
demo = "--demo" in argv or not argv
|
|
16
|
+
print(f"\n🦔 SmartPrompt {__version__} · IAIso §4 · Context")
|
|
17
|
+
result = core_demo()
|
|
18
|
+
print(result)
|
|
19
|
+
print(f"\nBacked by IAIso §4 · Context · part of the Smart* family · https://smarttasks.cloud\n")
|
|
20
|
+
return 0
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def core_demo() -> str:
|
|
24
|
+
return _DEMO()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _DEMO():
|
|
28
|
+
good = "You are a senior analyst. Summarize this into 5 markdown bullets, under 100 words, for execs."
|
|
29
|
+
bad = "write something about our product"
|
|
30
|
+
out = []
|
|
31
|
+
for label, p in [("clean", good), ("messy", bad)]:
|
|
32
|
+
s = core.lint(p)
|
|
33
|
+
out.append(f"[{label}] clarity {s.clarity}/100" + ("" if not s.defects else ""))
|
|
34
|
+
for d in s.defects:
|
|
35
|
+
out.append(f" ✗ {d.rule:<18} {d.issue} → {d.fix}")
|
|
36
|
+
return "\n".join(out)
|
|
37
|
+
|
|
38
|
+
if __name__ == "__main__":
|
|
39
|
+
sys.exit(main())
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""SmartPrompt core — deterministic prompt linter."""
|
|
2
|
+
import re
|
|
3
|
+
from .models import Defect, PromptScore
|
|
4
|
+
|
|
5
|
+
RULES = [
|
|
6
|
+
("PROMPT-ROLE", "No role/persona set", lambda t: not re.search(r"\b(you are|act as|role:)\b", t, re.I),
|
|
7
|
+
"Open with a role: 'You are a <expert> ...'."),
|
|
8
|
+
("PROMPT-GOAL", "Vague or missing goal", lambda t: not re.search(r"\b(write|summariz|analyz|list|compare|generate|fix|explain|classif)", t, re.I),
|
|
9
|
+
"State one concrete verb+object."),
|
|
10
|
+
("PROMPT-FORMAT", "No output format", lambda t: not re.search(r"\b(json|markdown|table|bullet|list|format|schema)\b", t, re.I),
|
|
11
|
+
"Name the output shape."),
|
|
12
|
+
("PROMPT-CONSTRAINTS", "No constraints", lambda t: not re.search(r"\b(word|sentence|tone|audience|concise|under \d)", t, re.I),
|
|
13
|
+
"Add limits: length, tone, audience."),
|
|
14
|
+
("PROMPT-PII", "Secret/PII in prompt", lambda t: bool(re.search(r"(sk-[A-Za-z0-9]{12,}|AKIA[0-9A-Z]{12,})", t)),
|
|
15
|
+
"Remove the secret — see SmartPangolin."),
|
|
16
|
+
]
|
|
17
|
+
WEIGHT = {"PROMPT-PII": 35, "PROMPT-GOAL": 20, "PROMPT-ROLE": 12, "PROMPT-FORMAT": 12, "PROMPT-CONSTRAINTS": 10}
|
|
18
|
+
|
|
19
|
+
def lint(text: str) -> PromptScore:
|
|
20
|
+
defects = [Defect(rid, issue, fix) for rid, issue, test, fix in RULES if test(text)]
|
|
21
|
+
score = max(0, 100 - sum(WEIGHT.get(d.rule, 6) for d in defects))
|
|
22
|
+
return PromptScore(score, defects)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""UML data objects for SmartPrompt — the diagram in the README is these classes."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
|
|
5
|
+
@dataclass
|
|
6
|
+
class Defect:
|
|
7
|
+
rule: str
|
|
8
|
+
issue: str
|
|
9
|
+
fix: str
|
|
10
|
+
|
|
11
|
+
@dataclass
|
|
12
|
+
class PromptScore:
|
|
13
|
+
clarity: int
|
|
14
|
+
defects: list[Defect]
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sf-smartprompt
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Lint before you send. Bad prompt in, bad work out — and it's your name on it.
|
|
5
|
+
Author: SmartTasks Lab
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://smarttasks.cloud
|
|
8
|
+
Project-URL: Source, https://github.com/SmartTasksOrg/sf-smartprompt
|
|
9
|
+
Project-URL: Issues, https://github.com/SmartTasksOrg/sf-smartprompt/issues
|
|
10
|
+
Project-URL: Security, https://github.com/SmartTasksOrg/sf-smartprompt/security/policy
|
|
11
|
+
Project-URL: Changelog, https://github.com/SmartTasksOrg/sf-smartprompt/blob/master/CHANGELOG.md
|
|
12
|
+
Project-URL: Standard, https://iaiso.org
|
|
13
|
+
Keywords: smart,ai,iaiso,sf-smartprompt,devtools
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
License-File: NOTICE
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
<!-- mcp-name: io.github.smarttasksorg/sf-smartprompt -->
|
|
25
|
+
<h1 align="center">🦔 SmartPrompt</h1>
|
|
26
|
+
<p align="center"><b>Lint before you send. Bad prompt in, bad work out — and it's your name on it.</b></p>
|
|
27
|
+
<p align="center">
|
|
28
|
+
<a href="https://iaiso.org">IAIso §4 · Context</a> ·
|
|
29
|
+
<a href="https://smarttasks.cloud">SmartTasks.cloud</a> ·
|
|
30
|
+
<a href="#part-of-the-smart-family">the Smart* family</a>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Bad prompt in, bad work out — and it's your name on the output.
|
|
36
|
+
|
|
37
|
+
As AI reshapes how we work, a new gap opens: you direct ai now; vague prompts and thin context wreck the result. **SmartPrompt** closes it —
|
|
38
|
+
`lint` at the exact moment the gap bites, and it works the second you clone it
|
|
39
|
+
(a synthetic demo ships in `demo/`).
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
SmartPrompt is not published on PyPI or any other package registry yet. Until
|
|
44
|
+
this section says otherwise, a package called `sf-smartprompt` on any registry
|
|
45
|
+
is not ours, and neither is `smartprompt`.
|
|
46
|
+
|
|
47
|
+
Install from a clone (Python 3.10 or later):
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone https://github.com/SmartTasksOrg/sf-smartprompt
|
|
51
|
+
cd sf-smartprompt
|
|
52
|
+
python -m venv .venv
|
|
53
|
+
. .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1
|
|
54
|
+
python -m pip install .
|
|
55
|
+
sf-smartprompt --demo
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Status
|
|
59
|
+
|
|
60
|
+
- **Version 3.0.0, experimental.** A small deterministic command-line tool with a bundled synthetic demo and two smoke tests.
|
|
61
|
+
- **Published:** nowhere yet; install from a clone (above).
|
|
62
|
+
- **Tested:** the 2 smoke tests in `tests/` on Python 3.12, Linux, on every push to master and every pull request (`.github/workflows/ci.yml`).
|
|
63
|
+
- **Not tested:** Windows and macOS; Python versions other than 3.12.
|
|
64
|
+
- **Ports:** Go, Java, Node and PHP ports in `ports/` are checked against the Python reference by `ports/conformance/run.sh` (run by hand, not in CI); they are not published on any registry.
|
|
65
|
+
- **Security review:** none independent. Report vulnerabilities as described in [SECURITY.md](SECURITY.md).
|
|
66
|
+
|
|
67
|
+
## Run it in your stack
|
|
68
|
+
|
|
69
|
+
| Where you work | How you run it |
|
|
70
|
+
|---|---|
|
|
71
|
+
| **Python** | from a clone: `python -m pip install .` (not on PyPI yet) |
|
|
72
|
+
| **Go · Java · Node · PHP** | native ports in [`ports/`](ports/), each verified against the Python reference by [`ports/conformance/run.sh`](ports/conformance/run.sh) |
|
|
73
|
+
| **Flowise · OpenAI/Anthropic tools · GitHub Actions · LangChain · LlamaIndex · MCP · pre-commit · VS Code** | ready-made wrappers in [`integrations/`](integrations/), all calling one `adapter.py` |
|
|
74
|
+
| **CI / pre-commit** | add the hook from [`.pre-commit-hooks.yaml`](.pre-commit-hooks.yaml) |
|
|
75
|
+
|
|
76
|
+
## What's in this repo
|
|
77
|
+
|
|
78
|
+
- **Core engine** — [`src/sf_smartprompt/`](src/sf_smartprompt/): lint() -> PromptScore. Deterministic, dependency-free.
|
|
79
|
+
- **CLI** — `sf-smartprompt --demo` (and `--version`): a deterministic demo of the core.
|
|
80
|
+
- **Language ports** — [`ports/`](ports/): native Go, Java, Node, PHP implementations that reproduce the Python reference, with a shared conformance harness.
|
|
81
|
+
- **Framework integrations** — [`integrations/`](integrations/): Flowise, OpenAI/Anthropic function-calling, GitHub Action, LangChain, LlamaIndex, MCP server, pre-commit, VS Code extension — each a thin wrapper over one `adapter.py` bound to the core.
|
|
82
|
+
- **Also included** — a runnable [`demo/`](demo/), [`examples/`](examples/), the IAIso mapping [`spec/iaiso-map.json`](spec/iaiso-map.json), a browser [`site/playground.html`](site/playground.html), plus public smoke tests in `tests/`.
|
|
83
|
+
|
|
84
|
+
## How it works
|
|
85
|
+
|
|
86
|
+
Rule IDs are namespaced `PROMPT-*` so output looks kin to the rest of the family
|
|
87
|
+
(SmartPangolin's `SEC-*`, etc.). Deterministic, dependency-free, fail-loud.
|
|
88
|
+
|
|
89
|
+
### The data objects (UML)
|
|
90
|
+
|
|
91
|
+
These are real dataclasses in [`src/sf_smartprompt/models.py`](src/sf_smartprompt/models.py) — the
|
|
92
|
+
diagram and the code are the same thing:
|
|
93
|
+
|
|
94
|
+
```mermaid
|
|
95
|
+
classDiagram
|
|
96
|
+
class Defect {
|
|
97
|
+
+rule: str
|
|
98
|
+
+issue: str
|
|
99
|
+
+fix: str
|
|
100
|
+
}
|
|
101
|
+
class PromptScore {
|
|
102
|
+
+clarity: int
|
|
103
|
+
+defects: list[Defect]
|
|
104
|
+
}
|
|
105
|
+
class IAIsoControl {
|
|
106
|
+
+section: str
|
|
107
|
+
+name: str
|
|
108
|
+
}
|
|
109
|
+
PromptScore ..> IAIsoControl : conforms to
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Where it sits in the architecture
|
|
113
|
+
|
|
114
|
+
SmartPrompt doesn't stand alone — it stacks with the family, and everything conforms to
|
|
115
|
+
the IAIso standard — the same standard that governs SmartTasks' own apps, while each tool here stays standalone and drops into your architecture:
|
|
116
|
+
|
|
117
|
+
```mermaid
|
|
118
|
+
graph LR
|
|
119
|
+
IAIso([IAIso standard]):::std
|
|
120
|
+
Cloud([SmartTasks.cloud]):::cloud
|
|
121
|
+
SmartPangolin[SmartPangolin]:::tool
|
|
122
|
+
SmartPrompt[SmartPrompt]:::tool
|
|
123
|
+
SmartCheck[SmartCheck]:::tool
|
|
124
|
+
SmartSeal[SmartSeal]:::tool
|
|
125
|
+
SmartStandard[SmartStandard]:::tool
|
|
126
|
+
SmartSim[SmartSim]:::tool
|
|
127
|
+
SmartMoat[SmartMoat]:::tool
|
|
128
|
+
SmartRoute[SmartRoute]:::tool
|
|
129
|
+
SmartFeed[SmartFeed]:::tool
|
|
130
|
+
SmartPangolin -->|emits clean artifacts to| SmartSeal
|
|
131
|
+
SmartPrompt -->|hands secret/PII flags to| SmartPangolin
|
|
132
|
+
SmartPrompt -->|enforces prompt rules from| SmartStandard
|
|
133
|
+
SmartCheck -->|stamps verified output with| SmartSeal
|
|
134
|
+
SmartCheck -->|checks against rules from| SmartStandard
|
|
135
|
+
SmartSeal -->|issues receipts consumed by| SmartCheck
|
|
136
|
+
SmartSeal -->|issues receipts consumed by| SmartRoute
|
|
137
|
+
SmartStandard -->|supplies rule sets to| SmartPrompt
|
|
138
|
+
SmartStandard -->|supplies rule sets to| SmartCheck
|
|
139
|
+
SmartSim -->|feeds role forecasts to| SmartMoat
|
|
140
|
+
SmartSim -->|draws signals from| SmartFeed
|
|
141
|
+
SmartMoat -->|consumes forecasts from| SmartSim
|
|
142
|
+
SmartRoute -->|verifies receipts from| SmartSeal
|
|
143
|
+
SmartRoute -->|enforces the standard from| SmartStandard
|
|
144
|
+
SmartFeed -->|feeds signals to| SmartSim
|
|
145
|
+
SmartFeed -->|feeds signals to| SmartMoat
|
|
146
|
+
SmartPangolin -.conforms.-> IAIso
|
|
147
|
+
SmartPangolin -.shares IAIso with.-> Cloud
|
|
148
|
+
SmartPrompt -.conforms.-> IAIso
|
|
149
|
+
SmartPrompt -.shares IAIso with.-> Cloud
|
|
150
|
+
SmartCheck -.conforms.-> IAIso
|
|
151
|
+
SmartCheck -.shares IAIso with.-> Cloud
|
|
152
|
+
SmartSeal -.conforms.-> IAIso
|
|
153
|
+
SmartSeal -.shares IAIso with.-> Cloud
|
|
154
|
+
SmartStandard -.conforms.-> IAIso
|
|
155
|
+
SmartStandard -.shares IAIso with.-> Cloud
|
|
156
|
+
SmartSim -.conforms.-> IAIso
|
|
157
|
+
SmartSim -.shares IAIso with.-> Cloud
|
|
158
|
+
SmartMoat -.conforms.-> IAIso
|
|
159
|
+
SmartMoat -.shares IAIso with.-> Cloud
|
|
160
|
+
SmartRoute -.conforms.-> IAIso
|
|
161
|
+
SmartRoute -.shares IAIso with.-> Cloud
|
|
162
|
+
SmartFeed -.conforms.-> IAIso
|
|
163
|
+
SmartFeed -.shares IAIso with.-> Cloud
|
|
164
|
+
IAIso -.governs.-> Cloud
|
|
165
|
+
classDef tool fill:#1c232d,stroke:#f5b83d,color:#efe9f5;
|
|
166
|
+
classDef std fill:#04121f,stroke:#46d6c8,color:#46d6c8;
|
|
167
|
+
classDef cloud fill:#1a1327,stroke:#a78bfa,color:#a78bfa;
|
|
168
|
+
style SmartPrompt stroke-width:3px,stroke:#ff6b6b;
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
- **SmartPrompt hands secret/PII flags to SmartPangolin** →
|
|
172
|
+
- **SmartPrompt enforces prompt rules from SmartStandard** →
|
|
173
|
+
|
|
174
|
+
Open [`site/playground.html`](site/playground.html) for the interactive version.
|
|
175
|
+
|
|
176
|
+
## Part of the Smart* family
|
|
177
|
+
|
|
178
|
+
One system, not nine projects — same mascot, same manifesto voice, same rule-ID style,
|
|
179
|
+
all aligned to the [IAIso standard](https://github.com/SmartTasksOrg/IAIso). Each is an independent, open-source, single-purpose tool you can integrate into your own architecture:
|
|
180
|
+
|
|
181
|
+
| Tool | IAIso | What it does |
|
|
182
|
+
|---|---|---|
|
|
183
|
+
| [SmartPangolin](https://github.com/SmartTasksOrg/sf-smartpangolin) | §1 · Secure Sharing | Scan before you share. Stop leaking secrets into AI models, agents, and tools. |
|
|
184
|
+
| [SmartCheck](https://github.com/SmartTasksOrg/sf-smartcheck) | §2 · Verification | Check before you sign off. Catch the AI when it's confidently wrong. |
|
|
185
|
+
| [SmartSeal](https://github.com/SmartTasksOrg/sf-smartseal) | §3 · Provenance | Seal what you ship. A signed receipt so anyone can verify what they received. |
|
|
186
|
+
| [SmartStandard](https://github.com/SmartTasksOrg/sf-smartstandard) | §7 · Standards | Standardize before you scale. One shared, auditable convention for AI-assisted work. |
|
|
187
|
+
| [SmartSim](https://github.com/SmartTasksOrg/sf-smartsim) | §8 · Foresight | Simulate before it hits you. See your role's task-by-task collapse sequence. |
|
|
188
|
+
| [SmartMoat](https://github.com/SmartTasksOrg/sf-smartmoat) | §6 · Workforce | Know your moat. Score the tasks AI can't easily take — and widen them. |
|
|
189
|
+
| [SmartRoute](https://github.com/SmartTasksOrg/sf-smartroute) | §5 · Orchestration | Route only what you trust. Gate agents and tools with trust scores and guardrails. |
|
|
190
|
+
| [SmartFeed](https://github.com/SmartTasksOrg/sf-smartfeed) | §9 · Awareness | Distill the firehose. A tight brief of only what moves your work. |
|
|
191
|
+
|
|
192
|
+
**Backed by the standard:** SmartPrompt implements **IAIso §4 · Context**.
|
|
193
|
+
**Open-source edition:** this repo is the simplified, single-purpose version, built for any org to integrate into its own architecture. SmartTasks' desktop app and [SmartTasks.cloud](https://smarttasks.cloud) run a more advanced, deeply-integrated implementation of the same IAIso governance — a separate product, not this code bundled.
|
|
194
|
+
|
|
195
|
+
## Who's behind this
|
|
196
|
+
|
|
197
|
+
- **Roen Branham** — CEO & AI Strategy Architect · CISSP-certified AI, security & governance architect; author of IAIso and sole inventor of the Z4 Semantic Fabric patent application. [LinkedIn](https://www.linkedin.com/in/roen-branham-167ab29/)
|
|
198
|
+
- **Le Vu Tanh** — CTO & Core Engineering Lead · Chief architect of the Cortex engine; large-scale system reliability and low-latency infrastructure — the engineer who ships what gets architected. [LinkedIn](https://www.linkedin.com/in/lee-thanh-76aa8ba0/)
|
|
199
|
+
|
|
200
|
+
The team behind IAIso & SmartTasks: a CISSP-certified security & governance architect
|
|
201
|
+
and a large-scale systems engineer — 20+ years shipping secure, AI-driven platforms for
|
|
202
|
+
regulated, blue-chip environments (Allianz, BMW, Rolls-Royce, Heidenhain).
|
|
203
|
+
|
|
204
|
+
<!-- SMARTTASKS-MODELS:START -->
|
|
205
|
+
## Runs on governed local models
|
|
206
|
+
|
|
207
|
+
Structured, machine-readable **scorecards** make model choice precise instead of guesswork.
|
|
208
|
+
|
|
209
|
+
This tool is local-first, so pair it with models you can actually vet. **SmartTasks** publishes 21+ governance-validated GGUF builds on Hugging Face — each with a machine-readable **scorecard** (capability tiers L1 Layman → L5 Agentic, IAIso conformance invariants (pass/warn/fail), OWASP-mapped garak red-team, transparency probes (viewpoint-alignment / over-refusal), and per-file SHA-256). Gate model selection on evidence, not vibes — and every finding, including warnings, is published in full.
|
|
210
|
+
|
|
211
|
+
→ **[SmartTasks on Hugging Face](https://huggingface.co/smarttasks)** · [Qwen3.6-27B](https://huggingface.co/smarttasks/Qwen3.6-27B-GGUF) (L5 agentic) · [react-agent-coder-llama-3.1-8b](https://huggingface.co/smarttasks/react-agent-coder-llama-3.1-8b-GGUF) (agentic coder) · [gpt-oss-20b](https://huggingface.co/smarttasks/gpt-oss-20b-GGUF) (open reasoning)
|
|
212
|
+
<!-- SMARTTASKS-MODELS:END -->
|
|
213
|
+
|
|
214
|
+
## Get in touch
|
|
215
|
+
|
|
216
|
+
- **Companies & enterprises:** [enterprise@smarttasks.cloud](mailto:enterprise@smarttasks.cloud) — we help
|
|
217
|
+
teams integrate SmartPrompt + IAIso into their architecture so governance and
|
|
218
|
+
audit-readiness become a byproduct of how they already work.
|
|
219
|
+
- **The standard:** [IAIso](https://github.com/SmartTasksOrg/IAIso) · [iaiso.org](https://iaiso.org)
|
|
220
|
+
- **The product:** [SmartTasks.cloud](https://smarttasks.cloud)
|
|
221
|
+
|
|
222
|
+
Built by **SmartTasks Lab**. Apache-2.0. Contributions welcome.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
MANIFESTO.md
|
|
4
|
+
NOTICE
|
|
5
|
+
README.md
|
|
6
|
+
pyproject.toml
|
|
7
|
+
demo/README.md
|
|
8
|
+
src/sf_smartprompt/__init__.py
|
|
9
|
+
src/sf_smartprompt/__main__.py
|
|
10
|
+
src/sf_smartprompt/_version.py
|
|
11
|
+
src/sf_smartprompt/cli.py
|
|
12
|
+
src/sf_smartprompt/core.py
|
|
13
|
+
src/sf_smartprompt/models.py
|
|
14
|
+
src/sf_smartprompt.egg-info/PKG-INFO
|
|
15
|
+
src/sf_smartprompt.egg-info/SOURCES.txt
|
|
16
|
+
src/sf_smartprompt.egg-info/dependency_links.txt
|
|
17
|
+
src/sf_smartprompt.egg-info/entry_points.txt
|
|
18
|
+
src/sf_smartprompt.egg-info/top_level.txt
|
|
19
|
+
tests/test_smartprompt.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sf_smartprompt
|