Skip to content

ChuluuMGL/proposal-skill

proposal

Verified

Create, revise, or audit commercial proposals as editable PowerPoint, interactive HTML, or PDF, with proposal logic, case evidence, scope and pricing, presenter scripts, and format-specific validation. Use for client proposals, pitches, tenders, and proposal revisions, rather than general marketing websites.

FileKindSize
SKILL.mdskill md8.1 KB
agents/openai.yamlconfig376 B
assets/demo/cover-premium-boardroom-v2.pngbinary118.6 KB
assets/demo/cover-premium-boardroom.pngbinary118.6 KB
assets/demo/dense-page-v2.pngbinary226.1 KB
assets/demo/dense-page.pngbinary226.1 KB
assets/demo/editorial-brand-3up.pngbinary228.5 KB
assets/demo/editorial-brand-cover-v2.pngbinary139.7 KB
assets/demo/editorial-brand-cover.pngbinary139.7 KB
assets/demo/premium-boardroom-3up.pngbinary520.0 KB
assets/demo/showcase-overview-v2.pngbinary183.0 KB
assets/demo/showcase-overview.pngbinary183.0 KB
assets/demo/tech-launch-3up.pngbinary188.0 KB
assets/demo/tech-launch-page-v2.pngbinary137.9 KB
assets/demo/tech-launch-page.pngbinary137.9 KB
assets/minimal-proposal-template.pptxbinary52.8 KB
examples/final-polish-anonymized-case.mdmarkdown1.1 KB
examples/proposal-revisions.mdmarkdown3.4 KB
references/argument-traceability.mdmarkdown2.4 KB
references/brief-compliance.mdmarkdown4.2 KB
references/client-facing-copy.mdmarkdown1.9 KB
references/external-capability-adapters.mdmarkdown859 B
references/final-polish-workflow.mdmarkdown3.3 KB
references/font-system.mdmarkdown6.0 KB
references/iteration-learning.mdmarkdown2.1 KB
references/layout-rhythm.mdmarkdown12.6 KB
references/manual-edit-protection.mdmarkdown1.5 KB
references/output-contract.mdmarkdown8.6 KB
references/page-types.mdmarkdown4.6 KB
references/palette-library.mdmarkdown7.2 KB
references/proposal-routes.mdmarkdown4.9 KB
references/quality-check.mdmarkdown12.7 KB
references/quality-levels.mdmarkdown1.1 KB
references/runtime-compatibility.mdmarkdown6.3 KB
references/story-map-and-sequencing.mdmarkdown1.0 KB
references/style-template-strategy.mdmarkdown16.9 KB
references/visual-finish-spec.mdmarkdown1.4 KB
references/visual-system-card.mdmarkdown3.0 KB
references/visual-system.mdmarkdown9.4 KB
references/web-interactions.mdmarkdown3.5 KB
references/web-proposals.mdmarkdown5.4 KB
references/workflow.mdmarkdown16.6 KB
scripts/audit_html_demo.mjsscript5.3 KB
scripts/audit_proposal_pptx.pyscript13.2 KB
scripts/build_revision_ledger.pyscript2.4 KB
scripts/check_release_consistency.pyscript2.7 KB
scripts/compare_protected_elements.pyscript5.3 KB
templates/README.mdmarkdown2.7 KB
templates/engine.cssother4.2 KB
templates/premium-boardroom.theme.cssother7.0 KB
templates/style-specs/README.mdmarkdown1005 B
templates/style-specs/consumer-lifestyle.mdmarkdown3.1 KB
templates/style-specs/editorial-brand.mdmarkdown3.1 KB
templates/style-specs/premium-boardroom.mdmarkdown3.5 KB
templates/style-specs/tech-launch.mdmarkdown3.0 KB
templates/tech-launch.theme.cssother2.2 KB
templates/web-components/README.mdmarkdown1.7 KB
templates/web-components/components.cssother6.0 KB
templates/web-components/components.jsscript5.0 KB
templates/web-components/concept-detail.svgother921 B
templates/web-components/concept-system.svgother939 B
templates/web-components/index.htmlother6.3 KB

scripts/compare_protected_elements.py

View on GitHub
#!/usr/bin/env python3
"""Capture and compare protected PPTX text/image geometry for final-polish work.

Requires python-pptx. It intentionally reports differences rather than deciding
whether they were allowed: authorization belongs in baseline-protection.md and
the revision ledger.
"""

from __future__ import annotations

import argparse
import hashlib
import json
import sys
from pathlib import Path


def _sha256(blob: bytes) -> str:
    return hashlib.sha256(blob).hexdigest()


def _shape_record(shape, index: int) -> dict:
    record = {
        "shape_index": index,
        "shape_type": str(shape.shape_type),
        "name": shape.name,
        "bbox": [int(shape.left), int(shape.top), int(shape.width), int(shape.height)],
    }
    if getattr(shape, "has_text_frame", False):
        text = shape.text_frame.text.strip()
        if text:
            record["text"] = text
    if str(shape.shape_type).endswith("PICTURE (13)"):
        image = shape.image
        record["image_sha256"] = _sha256(image.blob)
        record["crop"] = [
            float(shape.crop_left), float(shape.crop_top),
            float(shape.crop_right), float(shape.crop_bottom),
        ]
    return record


def capture(deck: Path) -> dict:
    try:
        from pptx import Presentation
    except ImportError as exc:
        raise RuntimeError("python-pptx is required; install it in the PPTX runtime.") from exc
    presentation = Presentation(str(deck))
    return {
        "schema": 1,
        "source": str(deck),
        "slide_count": len(presentation.slides),
        "slides": [
            {"slide": number, "shapes": [_shape_record(shape, i) for i, shape in enumerate(slide.shapes, 1)]}
            for number, slide in enumerate(presentation.slides, 1)
        ],
    }


def _key(record: dict) -> tuple[int, int]:
    return record["slide"], record["shape_index"]


def compare(manifest: dict, revised: dict) -> list[dict]:
    baseline = {
        (slide["slide"], shape["shape_index"]): shape
        for slide in manifest["slides"] for shape in slide["shapes"]
        if "text" in shape or "image_sha256" in shape
    }
    current = {
        (slide["slide"], shape["shape_index"]): shape
        for slide in revised["slides"] for shape in slide["shapes"]
        if "text" in shape or "image_sha256" in shape
    }
    differences = []
    for key, before in baseline.items():
        after = current.get(key)
        label = f"slide {key[0]}, shape {key[1]} ({before['name']})"
        if after is None:
            differences.append({"object": label, "change": "missing", "before": before, "after": None})
            continue
        for field in ("bbox", "text", "image_sha256", "crop"):
            if before.get(field) != after.get(field):
                differences.append({"object": label, "change": field, "before": before.get(field), "after": after.get(field)})
    return differences


def markdown_report(differences: list[dict], baseline: dict, revised: dict) -> str:
    lines = [
        "# Protected-Element Comparison",
        "",
        f"- Baseline slides: {baseline['slide_count']}",
        f"- Revised slides: {revised['slide_count']}",
        f"- Differences: {len(differences)}",
        "",
        "> Review every difference against `baseline-protection.md` and the revision ledger. A listed difference is not automatically authorized.",
        "",
    ]
    if not differences:
        return "\n".join(lines + ["No protected text/image geometry differences detected.", ""])
    lines.extend(["| Object | Change | Before | After | Authorized? |", "|---|---|---|---|---|"])
    for item in differences:
        before = str(item["before"]).replace("|", "\\|")[:120]
        after = str(item["after"]).replace("|", "\\|")[:120]
        lines.append(f"| {item['object']} | {item['change']} | {before} | {after} |  |")
    return "\n".join(lines) + "\n"


def main() -> int:
    parser = argparse.ArgumentParser(description="Capture/compare protected PPTX elements.")
    sub = parser.add_subparsers(dest="command", required=True)
    capture_parser = sub.add_parser("capture", help="write a baseline manifest")
    capture_parser.add_argument("deck", type=Path)
    capture_parser.add_argument("manifest", type=Path)
    compare_parser = sub.add_parser("compare", help="compare a manifest with a revised PPTX")
    compare_parser.add_argument("manifest", type=Path)
    compare_parser.add_argument("deck", type=Path)
    compare_parser.add_argument("--report", type=Path, required=True)
    args = parser.parse_args()
    try:
        if args.command == "capture":
            result = capture(args.deck)
            args.manifest.write_text(json.dumps(result, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
            print(f"captured {result['slide_count']} slides → {args.manifest}")
            return 0
        baseline = json.loads(args.manifest.read_text(encoding="utf-8"))
        revised = capture(args.deck)
        differences = compare(baseline, revised)
        args.report.write_text(markdown_report(differences, baseline, revised), encoding="utf-8")
        print(f"reported {len(differences)} difference(s) → {args.report}")
        return 1 if differences else 0
    except (OSError, ValueError, RuntimeError) as exc:
        print(f"error: {exc}", file=sys.stderr)
        return 2


if __name__ == "__main__":
    raise SystemExit(main())
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 467kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 467kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 467kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 193kUpdated Claude CodeCodexVerifiedInstall