Skip to content

getaero-io/gtm-eng-skills / engineering/warm-intro-scoring

warm-intro-scoring

Verified

FileKindSize
.gitignoreother121 B
GUIDE.mdmarkdown4.7 KB
LICENSEother1.1 KB
README.mdmarkdown8.0 KB
SKILL.mdskill md327 B
TESTING.mdmarkdown8.9 KB
UPSTREAM.mdmarkdown1.3 KB
assets/company-research.play.tsscript1021 B
assets/customer-db.sqlother2.7 KB
assets/evaluation-example.jsonconfig4.6 KB
assets/example.jsonconfig6.9 KB
assets/portfolio-focus.weights.jsonconfig32 B
assets/review.htmlother7.4 KB
assets/tuning-example.jsonconfig1.2 KB
assets/tuning.htmlother30.1 KB
check_all.pyscript1.4 KB
package-manifest.jsonconfig9.8 KB
plays/README.mdmarkdown18.2 KB
plays/check-report.pyscript1.8 KB
plays/check_all.pyscript1.6 KB
plays/check_parity.pyscript6.0 KB
plays/collect.play.tsscript4.0 KB
plays/collection.tsscript1.9 KB
plays/core.tsscript44.2 KB
plays/evaluation-contract.mdmarkdown3.4 KB
plays/evaluation.tsscript13.8 KB
plays/features.play.tsscript4.7 KB
plays/features.tsscript22.6 KB
plays/generatedtemplate.tsscript38.1 KB
plays/guardrails.tsscript948 B
plays/legacy.tsscript9.7 KB
plays/merge-payloads.pyscript8.6 KB
plays/parity-driver.tsscript995 B
plays/parity-evaluation.pyscript8.5 KB
plays/parity-reports.pyscript2.3 KB
plays/prepare-inputs.pyscript6.5 KB
plays/quality.tsscript3.8 KB
plays/read-sources.play.tsscript3.4 KB
plays/report-cli.tsscript590 B
plays/report.play.tsscript2.9 KB
plays/report.tsscript3.1 KB
plays/reports.tsscript5.7 KB
plays/research.play.tsscript1.6 KB
plays/review-uncertainty.play.tsscript5.5 KB
plays/score.play.tsscript2.3 KB
plays/snapshots.play.tsscript4.2 KB
plays/strict-json.tsscript1.8 KB
plays/sync-template.pyscript849 B
plays/uncertainty.tsscript4.9 KB
plays/validation.play.tsscript3.6 KB
references/adversarial-review.mdmarkdown7.0 KB
references/batch-collection.mdmarkdown5.1 KB
references/company-network.mdmarkdown5.8 KB
references/competitive-review.mdmarkdown8.8 KB
references/evaluation.mdmarkdown8.5 KB
references/evaluator-validation.mdmarkdown3.4 KB
references/evaluator.mdmarkdown7.9 KB
references/external-data.mdmarkdown4.0 KB
references/factor-test-matrix.mdmarkdown4.6 KB
references/factors.mdmarkdown6.1 KB
references/intro-drafts.mdmarkdown1.6 KB
references/pipeline.mdmarkdown7.6 KB
references/readable-output.mdmarkdown5.4 KB
references/research-brief.mdmarkdown2.4 KB
references/sources.mdmarkdown7.5 KB
references/tuning.mdmarkdown14.6 KB
scripts/audit_history.pyscript5.1 KB
scripts/check.pyscript5.1 KB
scripts/compare_versions.pyscript1.9 KB
scripts/evaluate.pyscript22.5 KB
scripts/package-skill.pyscript1.9 KB
scripts/portfolio.pyscript3.7 KB
scripts/quality.pyscript5.3 KB
scripts/recipe-demo.tsscript2.6 KB
scripts/render.pyscript1.6 KB
scripts/score.pyscript9.6 KB
scripts/temporal.pyscript2.2 KB
scripts/test_ask_handoff.pyscript2.1 KB
scripts/test_audit_history.pyscript2.7 KB
scripts/test_handoff_evaluate.pyscript9.1 KB
scripts/test_portfolio.pyscript3.6 KB
scripts/test_quality.pyscript3.1 KB
scripts/test_temporal.pyscript1.3 KB
scripts/test_tuning.pyscript14.1 KB
scripts/test_tuning_browser.cjsscript7.7 KB
scripts/test_version_parity.pyscript1.0 KB
scripts/tuning.pyscript10.9 KB
tests/adversarial.test.tsscript8.2 KB
tests/browser_e2e.cjsscript1.9 KB
tests/cloud_e2e.pyscript6.9 KB
tests/e2e-fixture.jsonconfig3.6 KB
tests/feature_parity.pyscript2.4 KB
tests/features.test.tsscript8.3 KB
tests/test_prepare_inputs.pyscript8.6 KB
tests/uncertainty.test.tsscript2.5 KB
vendor-manifest.jsonconfig748 B

plays/merge-payloads.py

View on GitHub
#!/usr/bin/env python3
"""Merge include_payload CSV exports into one report input, offline.

python3 plays/merge-payloads.py export-*.csv --out report-input.json
python3 plays/merge-payloads.py export-*.csv --review-state previous-input.json --out report-input.json

Use --review-state on refreshes to preserve human review holds. This command does
not publish reports, update production tables, or connect a scheduled pipeline.
"""
import hashlib
import argparse
import csv
import json
import os
from pathlib import Path


def merge(exports, previous=None, expected_keys=None):
    csv.field_size_limit(50_000_000)
    combined = None
    export_keys = set()
    paths, evidence, research, unresolved = {}, {}, {}, []
    source_coverage, notes = [], []
    statuses = {'needs_confirmation', 'blocked_declined', 'ready_for_human_review'}
    for source in exports:
        with Path(source).open(newline='') as handle:
            for row in csv.DictReader(handle):
                if row.get('key'):
                    if row['key'] in export_keys:
                        raise ValueError('Duplicate target export key')
                    export_keys.add(row['key'])
                result = json.loads(row['result'])
                payload = result.get('payload')
                if not isinstance(payload, dict):
                    raise ValueError('Export has no full payload; rerun one target with include_payload=true')
                if combined is None:
                    combined = {k: v for k, v in payload.items()
                                if k not in ('paths', 'evidence', 'target_research', 'coverage')}
                for key in ('as_of', 'profiles_checked_at', 'requester_name', 'model', 'weights'):
                    if payload.get(key) != combined.get(key):
                        raise ValueError('Incompatible payload metadata: ' + key)
                for path in payload['paths']:
                    if path['id'] in paths:
                        raise ValueError('Duplicate path in exports: ' + path['id'])
                    if path['review_status'] not in statuses:
                        raise ValueError('Invalid review status')
                    paths[path['id']] = path
                for record in payload.get('evidence', []):
                    old = evidence.get(record['id'])
                    if old is not None and old != record:
                        raise ValueError('Conflicting evidence ID: ' + record['id'])
                    evidence[record['id']] = record
                for key, value in payload.get('target_research', {}).items():
                    if key in research and research[key] != value:
                        raise ValueError('Conflicting target research: ' + key)
                    research[key] = value
                coverage = result.get('coverage', payload.get('coverage', {}))
                fields = ('connectors', 'matched_profiles', 'self_pairs_excluded', 'paths')
                if any(k in coverage for k in fields):
                    if not all(type(coverage.get(k)) is int and coverage[k] >= 0 for k in fields):
                        raise ValueError('Incomplete or invalid source coverage counts')
                    expected_paths = coverage['connectors'] * coverage['matched_profiles'] - coverage['self_pairs_excluded']
                    if expected_paths != len(payload['paths']) or coverage['paths'] != expected_paths:
                        raise ValueError('Source coverage does not reconcile with exported paths')
                source_coverage.append({'key': row.get('key'), 'coverage': coverage})
                notes.extend(n for n in coverage.get('notes', []) if isinstance(n, str))
                unresolved.extend(coverage.get('unresolved', []))
    if expected_keys is not None and export_keys != set(expected_keys):
        raise ValueError('Missing or unexpected target exports; compare with source manifest')
    if combined is None:
        raise ValueError('No payload rows found')
    def fingerprint(path, registry):
        features = path.get('features', {})
        ids = sorted({eid for feature in features.values() for eid in feature.get('evidence_ids', [])})
        value = {'features': features, 'evidence': [registry.get(eid) for eid in ids]}
        return 'evidence-v2:' + hashlib.sha256(json.dumps(value, sort_keys=True,
                              separators=(',', ':'), allow_nan=False).encode()).hexdigest()
    previous_evidence = {e['id']: e for e in (previous or {}).get('evidence', [])}
    ledger = {}
    if previous is not None:
        if previous.get('requester_name') not in (None, combined.get('requester_name')):
            raise ValueError('Prior review state belongs to a different requester')
        seen = set()
        for old in previous.get('paths', []):
            if old['id'] in seen:
                raise ValueError('Duplicate path in previous review state')
            seen.add(old['id'])
        for old in previous.get('review_state', []) + previous.get('paths', []):
            if old['review_status'] not in statuses:
                raise ValueError('Invalid prior review status')
            key = (old['connector_id'], old['target_id'])
            state = dict(id=old['id'], connector_id=key[0], target_id=key[1],
                         review_status=old['review_status'],
                         feature_hash=old.get('feature_hash', fingerprint(old, previous_evidence)))
            if ledger.get(key, {}).get('review_status') != 'blocked_declined':
                ledger[key] = state
            current = paths.get(old['id'])
            if current and any(old[k] != current[k] for k in ('target_id', 'connector_id')):
                raise ValueError('Path identity changed while preserving review state')
    current_keys = set()
    for path in paths.values():
        key = (path['connector_id'], path['target_id'])
        if key in current_keys:
            raise ValueError('Duplicate connector-target identity')
        current_keys.add(key)
        old = ledger.get(key)
        if old:
            state = 'blocked_declined' if path['review_status'] == 'blocked_declined' else old['review_status']
            if state == 'ready_for_human_review' and old['feature_hash'] != fingerprint(path, evidence):
                state = 'needs_confirmation'
            path['review_status'] = state
        ledger[key] = dict(id=path['id'], connector_id=key[0], target_id=key[1],
                           review_status=path['review_status'], feature_hash=fingerprint(path, evidence))
    orphaned = [state for key, state in ledger.items() if key not in current_keys]
    combined.update(paths=list(paths.values()), evidence=list(evidence.values()),
                    target_research=research, review_state=list(ledger.values()), coverage={'unresolved': unresolved, 'review_states_without_paths': orphaned, 'notes': list(dict.fromkeys(notes)), 'source_coverage': source_coverage, 'export_completeness': 'target_exports_verified' if expected_keys is not None else 'not_verified_without_source_manifest', 'exported_targets': len(export_keys)})
    for path in combined['paths']:
        for feature in path['features'].values():
            if feature['value'] and any(eid not in evidence for eid in feature['evidence_ids']):
                raise ValueError('Positive feature is missing evidence')
    return combined


def main():
    parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
    parser.add_argument('exports', nargs='+', type=Path)
    parser.add_argument('--out', required=True, type=Path)
    parser.add_argument('--review-state', type=Path)
    parser.add_argument('--source-input', type=Path, help='Original FeatureInput JSON; require exactly one export for each target key')
    args = parser.parse_args()
    try:
        previous = json.loads(args.review_state.read_text()) if args.review_state else None
        expected = ['target:' + str(i) for i in range(len(json.loads(args.source_input.read_text())['targets']))] if args.source_input else None
        result = merge(args.exports, previous, expected)
        with os.fdopen(os.open(args.out, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o600), 'w') as handle:
            json.dump(result, handle, ensure_ascii=False, separators=(',', ':'), allow_nan=False)
    except (ValueError, OSError, KeyError, TypeError) as exc:
        parser.exit(2, f'Payload merge failed: {exc}\n')
    print(json.dumps({'paths': len(result['paths']), 'unresolved': len(result['coverage']['unresolved']),
                      'prior_review_state_applied': previous is not None, 'out': str(args.out.resolve())}))


if __name__ == '__main__':
    main()
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall