ChatGPT Interaction - RodrigoMattosoSilveira/EnterpriseRemoteSystems GitHub Wiki

This is work in progress

Glossary

Following is a list of terms used in this page.

  • bite - A large enhancement, representing a chunky requirement, too unwieldy to implement, which I decompose into smaller enhancements.
  • bite, main - see bite.
  • bite, child - A small enhancement, decomposed from a larger enhancement, suitable to implementation.
  • bug - see defect.
  • defect - An observed behavior that violated a use case.
  • enhancement: new functionality,
  • issue - A GitBug artifact used to capture bites, child bites, enhancements, defects.
  • patch - A ChatGPT submission of a software change.
  • requirement - define how a software application must behave and perform.
  • use case - describes the interactions between an actor (which can be a human user or another system) and the software system to accomplish a particular requirement beavior.

Requirements

TBD

Architecture

TBD

Design

TBD

MVP

Use the Design Document to ask ChatGPT to define the application MVP and to break its implementation into manageable mother bites, there might be dozens. Save this document in the repository, a WIKI, or both, and use whenever necessary to refresh ChatGPT's memory.

Implementation

mother bites

First work with ChatGPT to flush out all the mother bites.

  • For each mother bite:
    • Ask ChatGPT to provide a detailed implementation description of the bite and its child-bites;
    • Create a GitHub Isse to capture the mother bite, use the mother bite:
      • name as its header
      • the ChatGPT response as its desscription;
    • Write a list of the child bites at the top of the issue

child bites

Seeding ChatGPT

  • Use the Design Document to induce ChatGPT to break the implementation into manageable bites, mother bites, of 4 to 6 small to medium sized patches, child-bites; there might be dozens of these manageable bites;
  • Create a GitHub issue to track the mother-bite; list each child-bite on the description
    • ChatGPT offers extensive commentary about each mother-bite, and their children; capture them as issue comments;
  • For each child-bite
    • Create a sub-issue
    • Create an issue branch, emanating from the development branch;
    • Checkout the issue branch into your local developement environment;
    • Ask ChatGPT to write the software to implement the child-bite, now captured as an issue: Please provide the software for <<child issue name>>, using <<issue branch name>> as our issue branch.

Pattern ChatGPT must use to submits patches;

  1. A description of the error or of the change,
  2. A reference to a patch file which I click to download into my ~/Downloads folder
  3. the git apply --check, to validate that the patch will integrate in my local issue branch, based on the project root
  4. the git apply to integrate the patch in my local issue branch, based on the project root
  5. a brief description of how you fixed the error or of the enchancement
  6. A description of the tests you executed. Thanks for adhering this the pattern

Requests to submit to ChatGPT

The best way to drive ChatGPT to yield good results is to establish request and patch submission process that survives chats.

Request

I discovered, mostly by reading ChatGPT thiking notes--which I highly reccommend--, that having a few standard ways to ask it to perform the tasks that we want, simplifies my work and helps ChatGPT to learn about how I like to have things done:. Following are a few basic requests:

  • Please provide the software changes to address this enhancement request: I as the actor name, when performing an action, expect the application to expected behavior.
  • Please provide the software to implement "child issue header", using child issue branch name as our issue branch.
  • All the local tests pass, please provide the manual tests I must execute before I promote "child issue header".
    • NOTE: I save the manual tests in the WIKI as part of test cases.
  • All the local tests pass, please provide the E2E tests for the "child issue header" patch.
    • NOTE: E2E tests are very expensive to write, run, and maintain; thus, design them to perform the minimum necessary validation.
  • All migrations worked, please provide the software for "child issue header", using "child issue branch name" as our issue branch.
  • Please provide the software changes to fix this defect (write the issue first on a scratch pad) :
    • Header
    • Steps to Reproduce
    • Observed Behavior
    • Expected Behavior
  • Please provide the software changes to fix this/these go test defect(s):
    • NOTE: Paste the test results here
  • Please provide the software changes to fix this/these vitest defect(s):
    • NOTE: Paste the test results here
  • Please provide the software changes to fix this E2E defect(s):
    • NOTE: Paste the test results here

Submissions

I highly reccoment you to train ChatGPT to submit patches in the following format:

  • A description of the error or of the change that ChatGPT worked on.
  • A reference to a patch file which I click to download the patch, which ChatGPT placed into my ~/Downloads folder.
  • The git apply --check command, to validate that the patch will integrate into my local issue branch, relative to the project root.
  • The git apply comand to integrate the patch into my local issue branch, relative to the project root.
  • A brief description of the software changes ChatGPT submited to resolve the issue.
  • A description of the tests ChatGPT executed.

Managing branch merges

There are three phases (I use these as Headers and Descriptions)

  • development <-- (#<>) <
  • test <-- (#<>) development
  • production <-- (#<>) test