stakwork / sphinx-tribes-frontend

Frontend for sphinx tribes and bounties. The bounty platform that pays out in bitcoin. Sign up with Sphinx Chat, complete a bounty, and earn bitcoin! Go to our website for available bounties.
https://community.sphinx.chat/bounties
12 stars 42 forks source link

Initiate workflow on page load (send POST request to stakwork) #600

Open humansinstitute opened 1 day ago

humansinstitute commented 1 day ago

Blocked until complete of https://github.com/stakwork/sphinx-tribes-frontend/issues/599

Context

The Hive Process Automation system currently lacks an automated story generation capability that would streamline the product management workflow. Product managers need to manually create user stories, which is time-consuming and can lead to inconsistent quality.

This ticket will POST data to the Stakwork Workflow for User Story generation.

Follow on from completion of:

  1. The modal: https://github.com/stakwork/sphinx-tribes-frontend/issues/594
  2. The data retrieval: https://github.com/stakwork/sphinx-tribes-frontend/issues/599

Design

Take the data object postData from the previous ticket and make a Post request. The following CURL statement provides details.

Please note that the API key is not valid.

curl --location 'https://api.stakwork.com/api/v1/projects' \
--header 'Authorization: Token token="aaaaaaahhhhhnoooooo"' \
--header 'Content-Type: application/json' \
--data '{"name":"string","workflow_id":35080,"workflow_params":{"set_var":{"attributes":{"vars": $postData }}}}'

Where postData example is:

{
                    "productBrief": "Product: Hive Automation Process. \nProduct Brief: \n* Mission: Build the software delivery methodology and supporting tooling for the AI age. \n* Objectives: \n* AI assisted workflows for all PM tasks \n* Generation of consistent and clean, deliverables tickets \n* Auto generation of Code and Test Coverage drafts for completion by developers. \n* Delivery of functional code from a crowd of developers \n* Self assignment through 'skin in the game' staking for developers \n* Full developer tooling and environment provision for 0 time to start coding.",
                    "featureName": "User Story Automation",
                    "description": "Hive Process integrates Stakwork Workflows and LLM based automation into the Hive Development Process. This will reduce workload on Product Managers by streamlining creative tasks and automating the drafting of product artefacts and audit tasks.\n In this feature we will automate the production of User Stories and Requirements from a Product Brief and Feature Brief.\n This will leverage a Stakwork workflow which will take the following steps: 1. Load the product context and specific feature context. 2. Generate a series of user stories in the workflow as a JSON object. 3. Iterate through the user stories and score them for relevance against the product and feature context. 4. Filter out low relevance scores 5. Return the information to a form in the Hive Process for human review and acceptance.",
                    "examples": [ ],
                    "webhook_url": "https://webhook.site/8adf917d-d292-47ce-88e8-3994f63bfcce"
                }

Literal of the Product Brief:

productBrief = `Product: ${name}. Product Brief:\n Mission: ${mission}.\n\n Objectives: ${tactics}`

Feature Name = $featureName description = $featureDescription examples = [ ] (will be an empty array for now that will be populated with examples later)

3) Display object in modal for testing / verification

Please display $postData object in the modal for verification and testing of this change. (this will be removed in next phase)

Assignment Criteria

Before requesting assignment:

Acceptance Criteria

Frontend Implementation:

jordan-ae commented 1 day ago

Please assign me

MuhammadUmer44 commented 1 day ago

@humansinstitute Please assign me

MahtabBukhari commented 1 day ago

@humansinstitute Could you please assign me?

aliraza556 commented 15 hours ago

@humansinstitute, Please assign me?