ailc 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ailc/__init__.py ADDED
@@ -0,0 +1,2 @@
1
+ """ailc demo package."""
2
+ __version__ = "0.1.0"
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: convention-writer
3
+ description: Demo agent that turns plain-language team rules into one-line, ID'd convention entries.
4
+ ---
5
+
6
+ # Convention writer (demo)
7
+
8
+ You turn rules a human states in plain language into short, reviewable convention
9
+ entries. You never invent rules: every entry traces to something a human actually said.
10
+
11
+ ## What you do
12
+
13
+ 1. Listen for a rule stated in chat or staged in a `guardrails/` folder.
14
+ 2. Restate it as one line with an ID (see `skills/write-conventions/SKILL.md`).
15
+ 3. Ask the human to confirm the wording before writing it.
16
+ 4. File it in `conventions/conventions.md` under the right section.
17
+
18
+ ## What you never do
19
+
20
+ - Write a rule the human has not confirmed.
21
+ - Reword a rule so its meaning changes.
22
+ - Delete or weaken an existing rule without an explicit instruction.
@@ -0,0 +1,16 @@
1
+ # Conventions (demo template)
2
+
3
+ One line per rule. Format: `<ID> | <rule> | <source>`.
4
+ Sections: GEN (everything), API (endpoints), SEC (data handling).
5
+
6
+ ## GEN — general
7
+
8
+ GEN-001 | Use spaces for indentation, never tabs. | DEMO
9
+
10
+ ## API — endpoints
11
+
12
+ API-001 | Every error response has a machine-readable code and a human-readable message. | DEMO
13
+
14
+ ## SEC — data handling
15
+
16
+ SEC-001 | Never log request or response bodies. | DEMO
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: check-conventions
3
+ description: Read-only check that a folder's files follow the filed conventions; reports exceptions only.
4
+ ---
5
+
6
+ # check-conventions (demo skill)
7
+
8
+ ## When to use
9
+
10
+ Before a review or merge, to list which filed conventions are not being followed.
11
+
12
+ ## Steps
13
+
14
+ 1. **Load** `conventions/conventions.md` and list the entries that apply to the
15
+ files being checked (match by section: GEN applies to everything, API to
16
+ endpoint code, SEC to anything handling data).
17
+ 2. **Check each entry** against the files. A convention with no way to check it
18
+ mechanically is reported as "needs human review", never silently skipped.
19
+ 3. **Report exceptions only**: each violation as `<ID> | <file> | <one-line finding>`.
20
+ If everything passes, say "No exceptions." and stop.
21
+
22
+ ## Rules
23
+
24
+ - Read-only: this skill never edits files to make a check pass.
25
+ - Never report a violation without naming the convention ID it breaks.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: write-conventions
3
+ description: Turn a plain-language rule into a one-line, ID'd convention entry and file it.
4
+ ---
5
+
6
+ # write-conventions (demo skill)
7
+
8
+ ## When to use
9
+
10
+ A human states a lasting rule in plain language, for example "we always use spaces,
11
+ not tabs" or "API errors must return a problem+json body".
12
+
13
+ ## Steps
14
+
15
+ 1. **Restate** the rule as a single line: `<ID> | <rule> | <source>`.
16
+ - IDs are sequential per section: `GEN-001`, `API-001`, ...
17
+ - The rule is one sentence, testable, with no "should" (use "must" or "never").
18
+ - The source is the person or document that stated it.
19
+ 2. **Check for conflicts** with existing entries in `conventions/conventions.md`.
20
+ If the new rule contradicts an existing one, stop and show both to the human.
21
+ 3. **Confirm** the exact wording with the human.
22
+ 4. **Append** the confirmed line to the right section of `conventions/conventions.md`.
23
+
24
+ ## Example
25
+
26
+ Human says: "never log request bodies, they can hold personal data."
27
+
28
+ Filed as:
29
+
30
+ ```
31
+ SEC-001 | Never log request or response bodies. | HUMAN 2026-12-01
32
+ ```
ailc/cli.py ADDED
@@ -0,0 +1,56 @@
1
+ """ailc command line: install the demo agent, skills and conventions into a folder."""
2
+ import argparse
3
+ import shutil
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ from . import __version__
8
+
9
+ PAYLOAD = Path(__file__).resolve().parent / "_payload"
10
+
11
+
12
+ def payload_files():
13
+ if not PAYLOAD.is_dir():
14
+ raise SystemExit("This installation has no payload; reinstall the package.")
15
+ return [p for p in sorted(PAYLOAD.rglob("*")) if p.is_file() and "__pycache__" not in p.parts]
16
+
17
+
18
+ def cmd_init(args):
19
+ target = Path(args.target).resolve()
20
+ if not target.is_dir():
21
+ raise SystemExit(f"Target folder does not exist: {target}")
22
+ written, kept = [], []
23
+ for src in payload_files():
24
+ rel = src.relative_to(PAYLOAD)
25
+ dest = target / rel
26
+ if dest.exists() and not args.force:
27
+ kept.append(rel.as_posix())
28
+ continue
29
+ dest.parent.mkdir(parents=True, exist_ok=True)
30
+ shutil.copyfile(src, dest)
31
+ written.append(rel.as_posix())
32
+ print(f"Installed {len(written)} files; kept {len(kept)} existing files.")
33
+ for rel in written:
34
+ print(f" {rel}")
35
+ return 0
36
+
37
+
38
+ def cmd_version(_):
39
+ print(__version__)
40
+ return 0
41
+
42
+
43
+ def main(argv=None):
44
+ parser = argparse.ArgumentParser(prog="ailc", description=__doc__)
45
+ sub = parser.add_subparsers(dest="command", required=True)
46
+ p = sub.add_parser("init", help="copy the demo agent, skills and conventions into a folder")
47
+ p.add_argument("target", nargs="?", default=".", help="target folder (default: current folder)")
48
+ p.add_argument("--force", action="store_true", help="overwrite existing files")
49
+ p.set_defaults(func=cmd_init)
50
+ sub.add_parser("version", help="print the installed version").set_defaults(func=cmd_version)
51
+ args = parser.parse_args(argv)
52
+ return args.func(args)
53
+
54
+
55
+ if __name__ == "__main__":
56
+ sys.exit(main())
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: ailc
3
+ Version: 0.1.0
4
+ Summary: Demo installer: one convention-writer agent and two skills, showing the AI-DLC packaging flow.
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+
8
+ # ailc
9
+
10
+ A small demo package showing how an AI-assisted delivery framework can be shipped
11
+ as a pip-installable command. Installing it gives you an `ailc` command:
12
+
13
+ ```text
14
+ pip install ailc
15
+ ailc init # copies a demo agent, two skills and a conventions template into the current folder
16
+ ailc version
17
+ ```
18
+
19
+ The payload is deliberately minimal and generic: one convention-writer agent and two
20
+ skills that show the file shapes. It is a packaging-flow demonstration, not a product.
@@ -0,0 +1,11 @@
1
+ ailc/__init__.py,sha256=pRcZQrBCTBYRIiw336M72QA7xWaqAYVg5C3DDa4PVBw,49
2
+ ailc/cli.py,sha256=n0lneTCtCMLJ7y5m7J_XtJ5uVyuoSc_9HozVEo_T0vI,1930
3
+ ailc/_payload/agents/convention-writer.agent.md,sha256=e19gUbEGrv4cR0MJzeDd6jveO0fuFHH1YjJ_WZaquxs,827
4
+ ailc/_payload/conventions/conventions.md,sha256=aBRwTp-h8yXbPxMYAY5iZjAWEBDufmbUH9A210DNsRw,447
5
+ ailc/_payload/skills/check-conventions/SKILL.md,sha256=DpSBw44feDSLpSPoDVy0EusBFO2hIcLvGDEwg-DDLbM,959
6
+ ailc/_payload/skills/write-conventions/SKILL.md,sha256=VZJy9YBtKZY0t0Jqjbbc1k2PXpuMoJ7_6cmdaphz3H8,1103
7
+ ailc-0.1.0.dist-info/METADATA,sha256=HkZZNqK8jez80gCkDHqPf8_i5Yf7ZXIx-MqqlpSZQKg,716
8
+ ailc-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
9
+ ailc-0.1.0.dist-info/entry_points.txt,sha256=U-bbLpkspc1zzHNqjO8eec4c_9gDhPWSDM7EUJI55ZM,39
10
+ ailc-0.1.0.dist-info/top_level.txt,sha256=2v3rLARXiliY6-DTLh8uHa6SG-g7sMdasrMsJdv2PAQ,5
11
+ ailc-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ailc = ailc.cli:main
@@ -0,0 +1 @@
1
+ ailc