-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Significant-Gravitas/ntindle/agpt-258
Add DB Block
- Loading branch information
Showing
8 changed files
with
279 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
codex/prompts/gpt-4-0125-preview/requirements/database/retry.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Generate a Prisma schema file with the following product spec. Make sure it covers all requirements, roles, Q&A, and auth | ||
|
||
Your product spec is as follows: | ||
{{ product_spec }} | ||
|
||
Your needed auth roles are: | ||
{{ needed_auth_roles }} | ||
|
||
The available modules are: | ||
{{ modules }} | ||
|
||
|
||
Relational data models will be needed to represent entities as well as defining relationships between them. | ||
|
||
|
||
For all schemas I provide, you need to make sure they are full schemas with no removals nor shortenings. | ||
|
||
|
||
Reply in the following format; do not add any extra information. Below is an explination of each section | ||
```json | ||
{ | ||
"think": "thoughts about the task, including things that should be included. Notate each model with what modules from the spec are relevant to it", | ||
"anti_think": "thoughts about what shouldn't be included, bad plans and generally things that should be avoided", | ||
"plan": "What do you plan to do focusing on the top-level models? Start with the required enums, then go to the models. Consider the key relationships and core entities. Then, break down each top-level model into relevant details about it. Notate each model with what modules from the spec are relevant to it", | ||
"refine": "refine the plan, and point out issues and gaps. if there's functionality that can't be accomplished with the plan, outline it here. Anything omitted here won't be included in the final product, so it needs to be through. Keep an eye out for things that can be converted to enums or models that are needed", | ||
"pre_answer": { | ||
"tables": [ | ||
{ | ||
"name": "The name of a table", | ||
"fields": "the, fields, of, the, table, split, by, commas", | ||
"relationships": "ex: Many-to-Many with x, One-to-Many with y and z, etc" | ||
}, | ||
... repeat for all needed tables | ||
], | ||
"enums": [ | ||
{ | ||
"name": "The name of the enum", | ||
"values": "the, values, of, the, enum, split, by, commas" | ||
}, | ||
... repeat for all needed enums | ||
] | ||
}, | ||
"pre_answer_issues": "list issues with pre_answer. add solutions to them in line", | ||
"full_schema": "improve the schema from pre_answer to include any additional fields needed. output a whole prisma schema. Anything ommited here won't be included in the final product so it needs to be through. Write the combined and full schema here with comments not including the database and generator", | ||
"database_schema": { | ||
"name": "Name of the Schema", | ||
"description": "Description of the Schema", | ||
"tables": [ | ||
{ | ||
"name": "The name of the prisma table", | ||
"description": "The description of the prisma table", | ||
"definition": "The string prisma definition for the schema" | ||
}, | ||
... repeat for all tables in full_schema making sure each is fully defined and valid prisma schemas | ||
] | ||
}, | ||
"conclusions": "any concluding thoughts" | ||
} | ||
``` | ||
|
||
You had an error whilst generating the response: | ||
|
||
{{ error }} |
5 changes: 5 additions & 0 deletions
5
codex/prompts/gpt-4-0125-preview/requirements/database/system.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
You are an expert product owner. You have a deep understanding of the product and its users, and you are able to communicate this understanding to the team. | ||
|
||
Respond in the following json format: | ||
|
||
{{ json_format }} |
59 changes: 59 additions & 0 deletions
59
codex/prompts/gpt-4-0125-preview/requirements/database/user.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
Generate a Prisma schema file with the following product spec. Make sure it covers all requirements, roles, Q&A, and auth | ||
|
||
Your product spec is as follows: | ||
{{ product_spec }} | ||
|
||
Your needed auth roles are: | ||
{{ needed_auth_roles }} | ||
|
||
The available modules are: | ||
{{ modules }} | ||
|
||
|
||
Relational data models will be needed to represent entities as well as defining relationships between them. | ||
|
||
|
||
For all schemas I provide, you need to make sure they are full schemas with no removals nor shortenings. | ||
|
||
|
||
Reply in the following format; do not add any extra information. Below is an explination of each section | ||
```json | ||
{ | ||
"think": "thoughts about the task, including things that should be included. Notate each model with what modules from the spec are relevant to it", | ||
"anti_think": "thoughts about what shouldn't be included, bad plans and generally things that should be avoided", | ||
"plan": "What do you plan to do focusing on the top-level models? Start with the required enums, then go to the models. Consider the key relationships and core entities. Then, break down each top-level model into relevant details about it. Notate each model with what modules from the spec are relevant to it", | ||
"refine": "refine the plan, and point out issues and gaps. if there's functionality that can't be accomplished with the plan, outline it here. Anything omitted here won't be included in the final product, so it needs to be through. Keep an eye out for things that can be converted to enums or models that are needed", | ||
"pre_answer": { | ||
"tables": [ | ||
{ | ||
"name": "The name of a table", | ||
"fields": "the, fields, of, the, table, split, by, commas", | ||
"relationships": "ex: Many-to-Many with x, One-to-Many with y and z, etc" | ||
}, | ||
... repeat for all needed tables | ||
], | ||
"enums": [ | ||
{ | ||
"name": "The name of the enum", | ||
"values": "the, values, of, the, enum, split, by, commas" | ||
}, | ||
... repeat for all needed enums | ||
] | ||
}, | ||
"pre_answer_issues": "list issues with pre_answer. add solutions to them in line", | ||
"full_schema": "improve the schema from pre_answer to include any additional fields needed. output a whole prisma schema. Anything ommited here won't be included in the final product so it needs to be through. Write the combined and full schema here with comments not including the database and generator", | ||
"database_schema": { | ||
"name": "Name of the Schema", | ||
"description": "Description of the Schema", | ||
"tables": [ | ||
{ | ||
"name": "The name of the prisma table", | ||
"description": "The description of the prisma table", | ||
"definition": "The string prisma definition for the schema" | ||
}, | ||
... repeat for all tables in full_schema making sure each is fully defined and valid prisma schemas | ||
] | ||
}, | ||
"conclusions": "any concluding thoughts" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters