The prompt history is the new source code.
Most AI-assisted projects keep the finished files but lose the conversation that shaped them. PromptSourceCode keeps that story with the project: what you asked for, what you changed your mind about, what you attached, and what the agent ultimately did.
That makes it easier for you, or the next person, to understand not only what was built, but why and how it was built that way.
PromptSourceCode helps you:
PromptSourceCode is designed for local projects used with Codex Desktop. Other coding agent harnesses are not currently supported.
Requires a local Git project on macOS, Codex Desktop, and /usr/bin/python3
(tested with Python 3.9.6). No Python packages need to be installed.
Download Source code (zip) from the PromptSourceCode 0.2.0 release and unzip it.
From the downloaded folder, run:
/usr/bin/python3 scripts/instruction_contract.py install "/path/to/your/project"
/usr/bin/python3 scripts/instruction_contract.py check "/path/to/your/project"
This appends a small marked loader to the root AGENTS.md without replacing existing
instructions and installs the capture contract at
.prompt-source/instructions-v1.md plus its project-local capture helper at
.prompt-source/validate.py.
Review the three installed files, then open the project in Codex Desktop and start a new task.
That is the complete standard installation. It uses only project files and the system Python standard library—no global Codex configuration, hook, skill, plugin, background service, or network service.
Send this prompt in a new Codex Desktop task:
Create a file named hello.txt containing: Hello from PromptSourceCode!
After Codex finishes, look in your project root for PROMPT_SOURCE.md. It should contain
the request you sent and a short account of the result. The new hello.txt remains an
ordinary project file.
If you later send a follow-up such as:
Change the message to: Hello, prompt history!
the follow-up is added as a new part of the history. The original request remains visible instead of being replaced.
Imagine that you ask Codex to add a dark theme, then ask for blue accents, and finally correct that choice to green. The finished interface shows only the final design. PromptSourceCode preserves the full path:
Someone reviewing the project later can see that green was a deliberate correction, not an unexplained implementation detail.
PromptSourceCode keeps its generated history in your local project. It does not automatically commit, push, publish, or upload that history. Your normal project files continue to work with Git as usual.
Review the generated history before deciding whether you want to share it. Prompts and attachments can contain private or sensitive information.
The standard installation above is enough for normal use. An optional advanced setup can improve exact prompt matching and record trusted Stop-button interruptions. It requires separate review and activation; see the optional hooks guide when you are ready.
Please try the same path a new user would:
If anything is confusing or does not work, open an issue and describe the step where you got stuck.
PromptSourceCode is available under the terms in LICENSE.
35 commits
Python
100.0%
The prompt history is the new source code.
Most AI-assisted projects keep the finished files but lose the conversation that shaped them. PromptSourceCode keeps that story with the project: what you asked for, what you changed your mind about, what you attached, and what the agent ultimately did.
That makes it easier for you, or the next person, to understand not only what was built, but why and how it was built that way.
PromptSourceCode helps you:
PromptSourceCode is designed for local projects used with Codex Desktop. Other coding agent harnesses are not currently supported.
Requires a local Git project on macOS, Codex Desktop, and /usr/bin/python3
(tested with Python 3.9.6). No Python packages need to be installed.
Download Source code (zip) from the PromptSourceCode 0.2.0 release and unzip it.
From the downloaded folder, run:
/usr/bin/python3 scripts/instruction_contract.py install "/path/to/your/project"
/usr/bin/python3 scripts/instruction_contract.py check "/path/to/your/project"
This appends a small marked loader to the root AGENTS.md without replacing existing
instructions and installs the capture contract at
.prompt-source/instructions-v1.md plus its project-local capture helper at
.prompt-source/validate.py.
Review the three installed files, then open the project in Codex Desktop and start a new task.
That is the complete standard installation. It uses only project files and the system Python standard library—no global Codex configuration, hook, skill, plugin, background service, or network service.
Send this prompt in a new Codex Desktop task:
Create a file named hello.txt containing: Hello from PromptSourceCode!
After Codex finishes, look in your project root for PROMPT_SOURCE.md. It should contain
the request you sent and a short account of the result. The new hello.txt remains an
ordinary project file.
If you later send a follow-up such as:
Change the message to: Hello, prompt history!
the follow-up is added as a new part of the history. The original request remains visible instead of being replaced.
Imagine that you ask Codex to add a dark theme, then ask for blue accents, and finally correct that choice to green. The finished interface shows only the final design. PromptSourceCode preserves the full path:
Someone reviewing the project later can see that green was a deliberate correction, not an unexplained implementation detail.
PromptSourceCode keeps its generated history in your local project. It does not automatically commit, push, publish, or upload that history. Your normal project files continue to work with Git as usual.
Review the generated history before deciding whether you want to share it. Prompts and attachments can contain private or sensitive information.
The standard installation above is enough for normal use. An optional advanced setup can improve exact prompt matching and record trusted Stop-button interruptions. It requires separate review and activation; see the optional hooks guide when you are ready.
Please try the same path a new user would:
If anything is confusing or does not work, open an issue and describe the step where you got stuck.
PromptSourceCode is available under the terms in LICENSE.
35 commits
Python
100.0%