Skip to content

Instantly share code, notes, and snippets.

TPRM Pipeline Prompt Engineering Improvements

For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Apply Anthropic's official Claude 4.6 prompt engineering best practices to the assessment pipeline — enable adaptive thinking, restructure system/user prompt split, optimize long-context ordering, and clean up the prompt.

Architecture: The methodology prompt moves from the user message into the system prompt (enabling prompt caching). The user message is reordered to data-first/instructions-last. Adaptive thinking is enabled for the assessment stage via api.py. A new v4 prompt file replaces v3 with XML tags, trimmed content, and positive framing.

Tech Stack: Python 3.9+, Anthropic SDK 0.64.0, Claude Opus 4.6

Prompt Engineering Review: vendor-risk-assessment-prompt-v3.md

Review of the TPRM pipeline's main assessment prompt against Anthropic's official prompt engineering best practices for Claude 4.6.


What's already strong

The prompt is well above average. The role definition is specific and purposeful. The citation standard with document register codes and evidence classes is excellent — it gives Claude concrete, unambiguous rules. The SOC 2 whitelist restriction includes a "why" explanation, which is exactly what the best practices recommend. The Four-Decision Process provides clear sequential gates. The style rules are sharp and actionable.

@chasballew
chasballew / Aptible Gridiron GDPR Slack Community Code of Conduct.md
Last active May 25, 2018 22:22 — forked from henryhund/Aptible Gridiron GDPR Slack Community Code of Conduct.md
This is a code of conduct by which we govern the Aptible Gridiron GDPR Slack Community.

Join the Aptible Gridiron GDPR Slack Community here.

Read the Aptible Privacy Statement to learn:

  • What information we collect and why we collect it
  • How we use that information and when we disclose it
  • Your rights regarding that information, including how to access and update your information
  • The steps we take to protect your information

Aptible Gridiron GDPR Slack Code of Conduct

@chasballew
chasballew / cheryl.rb
Created April 26, 2015 01:18
Cheryl's Birthday in Ruby
# http://nbviewer.ipython.org/url/norvig.com/ipython/Cheryl.ipynb
DATES = ['May 15', 'May 16', 'May 19',
'June 17', 'June 18',
'July 14', 'July 16',
'August 14', 'August 15', 'August 17']
def month(date)
date.split[0]
end
@chasballew
chasballew / gist:d1e793611706d6542ada
Created December 13, 2014 02:46
Flask w/ requirements Dockerfile
# DOCKER-VERSION 0.4.0
from ubuntu:12.04
run echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list
run apt-get -y update
run apt-get -y install python python-pip build-essential
run pip install flask flask-sqlalchemy
run apt-get -y purge build-essential
run apt-get -y autoremove
ADD . /opt/app
@chasballew
chasballew / gist:a6a8adb8f0ffe1a73f58
Last active August 29, 2015 14:11
Flask Dockerfile
# DOCKER-VERSION 0.4.0
from ubuntu:12.04
run echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list
run apt-get -y update
run apt-get -y install python python-pip build-essential
run pip install flask flask-sqlalchemy
run apt-get -y purge build-essential
run apt-get -y autoremove
ADD . /opt/app
@chasballew
chasballew / gist:72110106225f45a85892
Last active August 29, 2015 14:10
Current dir name in bash terminal

Bash provides an environment variable called PROMPT_COMMAND. The contents of this variable are executed as a regular Bash command just before Bash displays a prompt[0]. You can use the output of regular commands in PROMPT_COMMAND. Here we use echo to construct the command to set the window title.

export PROMPT_COMMAND='echo -ne "\033]0;${PWD##*/}\007"'

The key sequence here is:
ESC]0;stringBEL -- Set icon name and window title to $string

Breaking it down:

unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
GEMFILE
system 'bundle'
end