vf-apps issueshttps://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues2020-09-30T13:34:31Zhttps://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/10Pull together app specs from issues2020-09-30T13:34:31ZLynn FosterPull together app specs from issuesWe've discussed a number of things in issues. These should be pulled together in a more formal way as vf app specs. Probably need a lot of cleanup along the way. And possibly a way to denote things we feel pretty comfortable with, and...We've discussed a number of things in issues. These should be pulled together in a more formal way as vf app specs. Probably need a lot of cleanup along the way. And possibly a way to denote things we feel pretty comfortable with, and things that we need more testing on.https://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/9Misc. event-resource thoughts from holo-rea discussions2020-09-30T13:32:31ZLynn FosterMisc. event-resource thoughts from holo-rea discussionsPulling a few random thoughts from earlier discussions, mostly around event and resource mutations, mostly from https://github.com/holo-rea/holo-rea/issues/65#. (Note some of the discussion in that issue itself has been superceded.)
>...Pulling a few random thoughts from earlier discussions, mostly around event and resource mutations, mostly from https://github.com/holo-rea/holo-rea/issues/65#. (Note some of the discussion in that issue itself has been superceded.)
>**unitOfEffort**: similarly, must this be explicitly provided or does it come from the associated ResourceSpecification?
If explicitly provided, use that; else if in RS use that; else null.
>Something else- I'm just going to remove **classifiedAs** from the creation parameters for EconomicResource. Reason being it creates ambiguity and unnecessary complexity in handling EconomicEvent.resourceClassifiedAs- I would prefer to just be able to use that field as-is with the new resource, rather than having to concatenate and de-duplicate it.
>So I guess make **location** non-editable?
Agree.
a move event would affect currentLocation, as could other events.
We added atLocation to event based on your suggestion, which I understood was for the event location, not the resource location. I don't think we can assume those are the same right now, haven't had a real use case for it.
>Perhaps it could depend on the action? For me that would make sense
New note: We didn't add a new location field to event, so let's try using event.atLocation to update resource.currentLocation for move events.
>On validations, should all the transfer-* events require a **toResourceInventoriedAs** if resourceInventoriedAs is provided?
No, let's leave it flexible.
Actual inventoried resources are never required. Even if agents do inventory those resources, in transfers often the VF independent view will include only the ResourceSpecification, not the identifiers of the agents' inventoried resources. These are there mostly for when we do actually need them in the independent view, such as many currency transfers.
@bhaugen and I had a brief conversation at supper. Which was that we should **not allow changes to event quantities**, also **not allow deletion of events**. All changes to quantities would have to be a further event, even to correct them. That would keep us more in line with generally accepted accounting principles, which is probably a good thing for this implementation. And we wouldn't have to worry at all about the effect of accounting period reporting and such. There are probably other properties that this would apply to also, will give that a think later - provider and receiver agents would also affect accounting reports for example.
We had also discussed the possibility of splitting the records into one for can't-change and one for can-change. (Noting that everything is actually immutable, just a question of is it a new EconomicEvent or is it a Change Activity (in ActivityStreams speak, however that works in holochain).) To me this feels like too big a change for right now, and for our state of knowledge too. But it has possibilities.
I would think there are **Commitments** that also affect standard accounting reports, like feeding Accounts Receivable and Accounts Payable.
Suggest the fields that can be **changed on event**:
note: String
atLocation: ID
agreedIn: URI
realizationOf: ID # Agreement
triggeredBy: ID # EconomicEvent
Fields **updateable directly on a resource**:
classifiedAs: [URI!]
unitOfEffort: ID # Unit (would affect events going forward)
image: URI # URI
containedIn: ID # EconomicResource
note: String
So, here's a list of what **resource fields can be updated by an event**:
accountingQuantity: IMeasure
onhandQuantity: IMeasure
currentLocation: ID # SpatialThing
stage: ID # Processspecification
It's possible we need to add **state** to that list, not currently on event since we changed it to a string.
**conforms_to, tracking_identifier, lot** - we were thinking safest if those require new events to zero the old resource, and create a new one - we should get some feedback if that is excessive for peoplehttps://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/8Complex models vs simple UIs2020-05-04T19:21:07ZBob HaugenComplex models vs simple UIsAn experience report.
I'm hacking out a temporary app for the [Madison WI Mutual Aid Network](http://madisonman.coop/index.html) Everywhere Gardens project by forking our ancient valuenetwork software:
https://github.com/mikorizal/v...An experience report.
I'm hacking out a temporary app for the [Madison WI Mutual Aid Network](http://madisonman.coop/index.html) Everywhere Gardens project by forking our ancient valuenetwork software:
https://github.com/mikorizal/valuenetwork
The structure for a garden is:
* an EconomicResource of ResourceType "Garden Plot", located at
* a Location, and
* provided by an EconomicAgent
* who is also associated with the Everywhere Gardens project (another EconomicAgent) as a Garden Provider.
[Note: those are the names from our older software. In ValueFlows, ResourceType would be called ResourceSpecification.]
I put together [a slide deck showing how you could create such an assembly by creating and connecting all of the components](https://docs.google.com/presentation/d/1lP4KZ2vMd1j-FiFsVfxz89Dm42CPHtcxIlksDWsN8ck/edit?usp=sharing).
That's crazy!
So, before anybody decides to take revenge on me for cruel and unusual punishment, I simplified the process into one form:
![Screenshot from 2020-05-03 14-58-45](https://user-images.githubusercontent.com/117439/80966791-cecab700-8dda-11ea-945e-58a29b27c69d.png)
Here's the python code that assembled the components from the form:
```
data = new_garden_form.cleaned_data
garden_name = data['garden_name']
gprt = EconomicResourceType.objects.get(name="Garden plot")
address = data['address']
garden_latitude = data['latitude']
garden_longitude = data['longitude']
qty = data['size_in_sq_ft']
notes = data['description']
loc = Location(
name=garden_name,
address=address,
#Latitude and longitude are hidden fields in the form
#set by the geolocator.
latitude=garden_latitude,
longitude=garden_longitude,
)
loc.save()
garden = EconomicResource(
resource_type=gprt,
identifier=garden_name,
quantity=qty,
notes=notes,
current_location=loc,
)
garden.save()
provider = data['choose_known_provider']
if not provider:
new_provider = data['or_add_new_provider']
at = data['new_provider_type']
provider = EconomicAgent(
name=new_provider,
nick=new_provider,
agent_type=at,
primary_location=loc,
)
provider.save()
if provider:
eg = EconomicAgent.objects.get(name="Everywhere Gardens")
association_type = AgentAssociationType.objects.get(name="Garden Provider")
if not provider.is_associate_of_type_with(eg, association_type):
association = AgentAssociation(
is_associate=provider,
has_associate=eg,
association_type=association_type,
)
association.save()
owner_roles = AgentResourceRoleType.objects.filter(is_owner=True)
if owner_roles:
owner = owner_roles[0]
ownership = AgentResourceRole(
agent=provider,
resource=garden,
role=owner,
is_contact=True,
)
ownership.save()
```
You can also see by some of the hard-coded selections that this is a hack for this project and not a general-purpose solution for the multitudes and ages.
But this is an example of what a lot of people will need to do with VF models.
I think the complexity of the models is justified and necessary and may write a comment below explaining why, but enough for now to write up this experience.https://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/7Fields for fulltext indexing2020-03-12T19:58:06ZpospiFields for fulltext indexingWe need to define the set of fields which should be processed through a fulltext search indexing pipeline in order for implementations to provide such functionality.
This is less relevant in RDF, where the "client" app crawls the web ...We need to define the set of fields which should be processed through a fulltext search indexing pipeline in order for implementations to provide such functionality.
This is less relevant in RDF, where the "client" app crawls the web to retrieve all data prior to query execution. In actual client/server or distributed implementations, the search lookups need to be performed from the "server" side of the relationship.
As a base, `skos:note` and any `vf:name` fields should be included. We need to detail any record-specific fields that need to be indexed in addition to these.https://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/6link dumps2019-12-21T00:07:35ZBob Haugenlink dumpshttps://spderosso.github.io/onward19.pdf
> A new approach to web application development is presented, in which an application is constructed by configuring and composing concepts drawn from a catalog developed by
experts.
> A conce...https://spderosso.github.io/onward19.pdf
> A new approach to web application development is presented, in which an application is constructed by configuring and composing concepts drawn from a catalog developed by
experts.
> A concept is a self-contained, reusable increment of functionality. Each concept includes both front-end and back-end functionality, and exports a collection of components—fullstack GUI elements, backed by application logic and database storage.
> To build an app, the developer imports concepts from the catalog, tunes them to fit the application’s particular needs via configuration variables, and links concept components
together to create pages. Components of different concepts may be executed independently, or bound together declaratively with dataflows and synchronization. The instantiation, configuration, linking and binding of components is all expressed in a simple template language that extends HTML
@pospi how does this relate to your plans for https://github.com/valueflows/vf-ui components?https://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/5Validation logic2020-03-11T23:40:19ZpospiValidation logicBeyond schema validation we need to define all the custom validation rules that apply to records at the API boundary. This includes validation for ['either' fields](https://github.com/holo-rea/holo-rea/issues/56) as well as any other cus...Beyond schema validation we need to define all the custom validation rules that apply to records at the API boundary. This includes validation for ['either' fields](https://github.com/holo-rea/holo-rea/issues/56) as well as any other custom dependencies, existence checks and domain-specific constraints that need to be imposed in order for requests to be considered valid.
Starting with the observation, planning & specification records (in that order) would be optimal in terms of informing HoloREA's development as it progresses.Lynn FosterBob HaugenLynn Fosterhttps://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/4EconomicEvent and EconomicResource create and update2020-11-05T16:44:34ZLynn FosterEconomicEvent and EconomicResource create and updateExperimenting with some pseudo-code, please improve as needed. @pospi @ivanminutillo @bhaugen
EconomicEvent which creates an EconomicResource:
```
If action.resourceEffect is "+" or "-"
If create-resource flag is set
Crea...Experimenting with some pseudo-code, please improve as needed. @pospi @ivanminutillo @bhaugen
EconomicEvent which creates an EconomicResource:
```
If action.resourceEffect is "+" or "-"
If create-resource flag is set
Create the resource with zero quantity fields
Else
If it exists
Get the resource based on resourceInventoriedAs
If there is a resource from the above
If action.resourceEffect is "+"
Add event resourceQuantity to both accountingQuantity and onhandQuantity
Else if action.resourceEffect is "-"
Subtract event resourceQuantity from both accountingQuantity and onhandQuantity
Else if action.resourceEffect is "-+" or action.onhandEffect is "-+" (two resources can be affected)
If create-resource flag is set
Create the to-resource with zero quantity fields
Else
Get the to-resource based on toResourceInventoriedAs
If it exists in the event
Get the from-resource based on the resourceInventoriedAs
If action is "transfer-custody" or "transfer" or "move"
If the from-resource exists
Subtract event resourceQuantity from from-resource.onhandQuantity
If the to-resource exists
Add event resourceQuantity to to-resource.onhandQuantity
If action is "transfer-all-rights" or "transfer" or "move"
If the from-resource exists
Subtract event resourceQuantity from from-resource.accountingQuantity
If the to-resource exists
Add event resourceQuantity to to-resource.accountingQuantity
If a new resource is created by the economic event
or if ((action is "transfer-all-rights" or "transfer")
and resourceInventoriedAs is the same as toResourceInventoriedAs)
Set the primaryAccountable to the receiver agent
```https://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/3Deletable logic2020-08-01T19:55:21ZBob HaugenDeletable logicThis will be a _first draft_ of some rules for when we could and when we should not delete something. The rules are stated in terms of relationships or references to the candidate for deletion. In most cases, do not delete if any other r...This will be a _first draft_ of some rules for when we could and when we should not delete something. The rules are stated in terms of relationships or references to the candidate for deletion. In most cases, do not delete if any other references to the candidate. In some cases, cascade or consider a [tombstone](https://en.wikipedia.org/wiki/Tombstone_(data_store)).
These considerations may vary depending on the feasibility of finding references in a particular technical environment. If finding references is difficult, consider leaving a tombstone. Given that we are targeting distributed environments, a tombstone might be the best bet in all cases.
If we opt for tombstones in all cases, "delete" means "leave a tombstone".
* Agent:
* do not delete if:
* any EconomicEvents or
* any Commitments
* any Intents
* cascade (also delete) other references?
* or consider a tombstone?
* ResourceSpecification:
* do not delete if:
* any RecipeResources
* any Intents
* any EconomicResources
* any EconomicEvents
* any Commitments
* any Claims
* RecipeResource:
* do not delete if any RecipeFlows
* ProcessSpecification:
* do not delete if:
* any Processes
* any RecipeProcesses
* Process:
* do not delete if:
* any EconomicEvents or
* any Commitments
* any Intents
* Plan or Scenario:
* do not delete if:
* any non-deletable Processes
* any non-deletable Commitments
* otherwise consider cascading (deleting) associated Processes and Commitments?
* Action:
* do not delete if:
* any EconomicEvents
* any Commitments
* any Claims
* any Intents
* Intent:
* do not delete if:
* any Satisfactions
* EconomicResource:
* do not delete if any EconomicEvents
* will a tombstone suffice for other references?
I think EconomicEvents and Claims are not deletable at all.
RecipeProcesses and RecipeFlows seem to be deletable at-will. Maybe also Proposals?
@fosterlynn what did I miss?
https://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/2Modularity2019-04-04T13:37:57ZBob HaugenModularityThis is a raw idea. Don't know how far I will be able to take it right now, but I want to lay down a marker. Maybe somebody else can take it farther.
Consider each of the vf: classes or types. Instances of each of those could have a s...This is a raw idea. Don't know how far I will be able to take it right now, but I want to lay down a marker. Maybe somebody else can take it farther.
Consider each of the vf: classes or types. Instances of each of those could have a set of functions that do things for and with it.
Just as a GraphQl reference is emerging, it could be accompanied by code modules.
Those code modules could be composed into vf-apps.
We might need to design a bit more about how they could interconnect. Like, vf:protocols.
Then (@fosterlynn says) the classes and functions could appear in UI modules that could be assembled into sentences and network overviews and dashboards.
Then, given an agent-centric architecture, the agents could form agent-centric organizations and select which modules and apps they want to use, and the vf:vocab and protocols could get the apps and the agents to interconnect and communicate.
Thus, also, modular organizations.
Did I go too far here? Or not yet far enough?https://lab.allmende.io/valueflows/vf-app-specs/vf-apps/-/issues/1Sequences for deploying vf-apps2018-07-29T18:05:25ZBob HaugenSequences for deploying vf-appsThis is a discussion issue which may turn into a wiki page.
Vf-apps might be deployed in different sequences for different agents and different purposes.
One sequence might be a logical progression of developing economic organizati...This is a discussion issue which may turn into a wiki page.
Vf-apps might be deployed in different sequences for different agents and different purposes.
One sequence might be a logical progression of developing economic organizations:
1. Deploy the personal Agent apps first.
2. Then deploy the organizational-forming apps and the organizational Agent apps.
3. Then the apps that the people and organizations want to use.
Another sequence might be for a community that already exists, according to what it might find useful. For example, [Luandro of Moinho-Mesh](https://www.loomio.org/d/KEcf2u84/experimentation-with-open-app-ecosystem) thinks that the first useful apps might be a buying club like [Cobuy](https://github.com/root-systems/cobuy) or a ride-sharing app. So he would deploy those first, and then the people who wanted to use them would connect their personal agent apps.