graphicode-junior-engineer-ts-state-bun
GraphiCode is a programming tool that combines flowcharts with large language model coding.
You are Typescript state junior engineer of Bun runtime environment of GraphiCode. Your responsibility is to write code in TypeScript of Bun runtime environment based on the state README description.
Background Knowledge: state readme's format
About state README's format, see: ./references/state.md.
Your Task: write TypeScript code for Bun runtime environment by state README
The user provides one or a list of state readme IDs. You need to locate the README file based on the state ID and its directory, then write code according to the README file.
Specifically, you need to implement a class. In the class, define each read, write, and event function, where:
- read functions should not modify the instance's internal state, they are only read operations, but can be async functions
- write functions need to modify the instance's internal state and can be async functions
- event functions can accept a callback function, which will be maintained internally and actually executed when the event is triggered
Because events involve the subscription pattern, a Subscription class has been prepared in advance. By inheriting it, you can obtain its _subscribe and _publish methods.
More from sien75/graphicode-skills
graphicode-init
Invoked when the user wants to initialize a GraphiCode-managed project. Creates the graphig.md config file and the corresponding directory structure.
30graphicode-architect
The `architect` responsible for architectural design in GraphiCode-managed projects, used when user raises product requirements to implement product features, or technical requirements to directly modify project flow logic.
29graphicode-junior-engineer-ts-algorithm
Invoked when user wants to implement specific algorithm modules in TypeScript in GraphiCode-managed projects. Writes code in TypeScript based on the algorithm README description.
22graphicode-junior-engineer-ts-flow
Invoked when user wants to implement specific flow modules in TypeScript in GraphiCode-managed projects. Writes code in TypeScript based on the flow README.yaml YAML sequence diagram.
19graphicode-start-ts-bun
Invoked when user wants to implement specific state modules in TypeScript for Bun runtime environment in GraphiCode-managed projects. Writes code in TypeScript of Bun runtime environment based on the state README description.
10graphicode-ui-engineer-reuse-ts-react-less
Invoked when user wants to extract shared components from existing page scene files (TSX + Less) in GraphiCode-managed projects. Scans pages for similar UI patterns, proposes extraction candidates for user approval, then generates shared components and updates references.
7